zp_core_infect native
if you see the native, you see that this happens only if player is died. with your VICTIM_ID is dead.
PHP Code:
public native_core_infect(plugin_id, num_params)
{
new id = get_param(1)
if (!is_user_alive(id))
{
log_error(AMX_ERR_NATIVE, "[ZP] Invalid Player (%d)", id)
return false;
}
if (flag_get(g_IsZombie, id))
{
log_error(AMX_ERR_NATIVE, "[ZP] Player already infected (%d)", id)
return false;
}
new attacker = get_param(2)
InfectPlayer(id, attacker)
return true;
}
you can try before turning to zombie check
PHP Code:
if(is_user_alive(victim))
{
// Turn into zombie
zp_core_infect(victim, attacker) // 332 line
}
else
{
continue;
}
why you need to double check if is_user_alive i can't answer.. maybe cause from first line to this line passed a some time when player get killed..
__________________