Code:
#include <amxmod>
new num_dead
new num_nolost
public dead(){
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(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 = get_user_money(victim)
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","dead","ade")
num_dead = register_cvar("num_dead", "0")
num_nolost = register_cvar("num_nolost", "10000")
}
I can turn this sma into amxx, but it is not working well. Only when num_nolost is 0, or else i won't lost any money when i died. I want to set a number, when u got more money that this number, u will lost money when u are died. Please HELP! Is any part wrong, cuz i wrote it and i am a NOOB ):
Warning when i compile it:
compile: sma<18>: warning 217: loose indentation
compile: sma<30>: warning 217: loose indentation
Code:
register_event("DeathMsg","dead","ade")
And what is use of "ade" behind "dead" and somthings, there will be "5=0" "3=1" something like that. What is the use of these number?