Code:
#include <amxmodx>
#include <cstrike>
new num_dead
new num_nolost
public death(){
new killer = read_data(1)
new victim = read_data(2)
new Killer[33]
new Victim[33]
get_user_name(killer, Killer,32)
get_user_name(victim, Victim,32)
if(get_user_team(victim) != get_user_team(killer)){
if(cs_get_user_money(victim) < get_pcvar_num(num_nolost)){
set_hudmessage(255, 150, 50, 0.10, 0.5, 0, 6.0, 10.0, 0.5, 0.15, 9)
show_hudmessage(0, "He Got No More MONEY")
}
else {
new money = cs_get_user_money(victim)
cs_set_user_money(victim, money - get_pcvar_num(num_dead))
}
}
return PLUGIN_CONTINUE
}
public plugin_init() {
register_plugin("kill Rewards","0.0","default")
register_event("DeathMsg","death","ade")
num_dead = register_cvar("num_dead", "5000")
num_nolost = register_cvar("num_nolost", "10000")
}
It is still not working....Is any thing wrong?
I get that from a sma that get bouns money when headshot, may be that sma is wrong too...