#include <amxmodx>
#include <cstrike>
#include <hamsandwich>
#define PLUGIN "[HELP]Amx-x.Ru"
#define VERSION "0.1.0"
#define AUTHOR "X"
#define REWARD_FOR_KILL 100
new g_beforeKill[33]
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
RegisterHam(Ham_Killed, "player", "fwdKilledPre")
RegisterHam(Ham_Killed, "player", "fwdKilledPost", 1)
}
public fwdKilledPre(id, attacker, gibs)
{
if (is_user_connected(attacker))
{
g_beforeKill[attacker] = cs_get_user_money(attacker)
}
}
public fwdKilledPost(id, attacker, gibs)
{
if (is_user_connected(attacker))
{
cs_set_user_money(attacker, g_beforeKill[attacker], 0)
cs_set_user_money(attacker, cs_get_user_money(attacker) + REWARD_FOR_KILL, 1)
}
}