Whats wrong here? When I kill an opponent I am given hp and shown the specified effect, but when I get killed myself the same happens.. How could I fix that?
PHP Code:
public death_event(id)
{
if(get_user_flags(id) & ADMIN_ACCESS)
{
new killer = read_data(1)
if(vampir_active[killer] == 1)
{
set_user_health(killer, get_user_health(killer)+get_cvar_num("amx_vampire_hp"))
client_print(killer, print_chat, "%L", LANG_PLAYER, "VAMPIRE", get_cvar_num("amx_vampire_hp"))
message_begin(MSG_ONE, get_user_msgid("ScreenFade"), {0,0,0}, killer)
write_short(1<<10)
write_short(1<<10)
write_short(0x0000)
write_byte(0)
write_byte(0)
write_byte(200)
write_byte(75)
message_end()
}
}
}