hey ive encountered some problems with zp50, i changed last human to be infected instead of killed and the gamemode is not ending i even tried to force trigger without success
i want last human after infection round to be ended
heres that part of the code (it's default)
PHP Code:
// Ham Take Damage Forward (needed to block explosion damage too)
public fw_TakeDamage(victim, inflictor, attacker, Float:damage, damage_type)
{
// Non-player damage or self damage
if (victim == attacker || !is_user_alive(attacker))
return HAM_IGNORED;
// Prevent attacks when no game mode is active
if (g_CurrentGameMode == ZP_NO_GAME_MODE)
return HAM_SUPERCEDE;
// Prevent friendly fire
if (zp_core_is_zombie(attacker) == zp_core_is_zombie(victim))
return HAM_SUPERCEDE;
// Mode allows infection and zombie attacking human...
if (g_AllowInfection && zp_core_is_zombie(attacker) && !zp_core_is_zombie(victim))
{
// Prevent infection/damage by HE grenade (bugfix)
if (damage_type & DMG_HEGRENADE)
return HAM_SUPERCEDE;
// Last human is killed to trigger round end
if (zp_core_get_human_count() == 1)
return HAM_IGNORED;
// Infect only if damage is done to victim
if (damage > 0.0 && GetHamReturnStatus() != HAM_SUPERCEDE)
{
// Infect victim!
zp_core_infect(victim, attacker)
return HAM_SUPERCEDE;
}
}
return HAM_IGNORED;
}