public event_damage(victim)
{
if(!is_user_alive(victim) || !g_gamestarted)
return PLUGIN_CONTINUE
if(g_himera[victim])
{
static Float:gametime
gametime = get_gametime()
g_regendelay[victim] = gametime + g_class_data[g_player_class[victim]
g_hitdelay[victim] = gametime + g_class_data[g_player_class[victim]
}
else
{
static attacker
attacker = get_user_attacker(victim)
if(!is_user_alive(attacker) || !g_himera[attacker] || g_himer)
return PLUGIN_CONTINUE
if(g_victim[attacker] == victim)
{
g_himer = true
g_victim[attacker] = 0
message_begin(MSG_ALL, g_msg_deathmsg)
write_byte(attacker)
write_byte(victim)
write_byte(0)
write_string(g_infection_name)
message_end()
message_begin(MSG_ALL, g_msg_scoreattrib)
write_byte(victim)
write_byte(0)
message_end()
himer_user(victim, attacker)
static frags, deaths
frags = get_user_frags(attacker)
deaths = cs_get_user_deaths(victim)
set_user_frags(attacker, frags + 1)
cs_set_user_deaths(victim, deaths + 1)
fm_set_user_money(attacker, get_pcvar_num(cvar_infectmoney))
static params[2]
params[0] = attacker
params[1] = victim
set_task(0.3, "task_updatescore", TASKID_UPDATESCR, params, 2)
}
g_infecting = false
}
return PLUGIN_CONTINUE
}