Everythings fine, just that when an admin chooses the vampire function and kills someone, everyone in the server is given hp. How do I make it so only the admin would get hp.
PHP Code:
public death_event(id)
{
if(get_user_flags(id) & ADMIN_ACCESS)
{
new iKiller = read_data(1);
new iVictim = read_data(2);
if(vampir_active[iKiller] && iKiller != iVictim)
{
set_user_health(iKiller, get_user_health(iKiller) + get_cvar_num("amx_vampir_hp"));
client_print(id, print_chat, "%L", LANG_PLAYER, "VAMPIRE", get_cvar_num("amx_vampir_hp"));
message_begin(MSG_ONE, get_user_msgid("ScreenFade"), _, iKiller);
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();
}
}
}