|
new g_pcvar_mlm
public plugin_init()
{
register_plugin(PLUGIN,VERSION,AUTHOR)
register_event("DeathMsg","death_event","a","1>0")
g_pcvar_mlm = register_cvar("moneyleech_mode","1")
}
public death_event()
{
if(!get_pcvar_num(g_pcvar_mlm))
return
new killer = read_data(1)
if(!is_user_connected(killer)) return
new victim = read_data(2)
if(killer == victim || get_user_team(killer) == get_user_team(victim))
return
if(is_user_alive(killer))
{
if(get_user_health(killer)>=80)
{
set_user_health(killer, 100)
cs_set_user_armor(killer, 100, CS_ARMOR_VESTHELM)
}
if(get_user_health(killer)<80)
{
set_user_health(killer, get_user_health(killer) + 20)
cs_set_user_armor(killer, 100, CS_ARMOR_VESTHELM)
}
}
} |
|