zombieme(id, infector, nemesis, silentmode, rewards)
{
// User infect attempt forward
ExecuteForward(g_fwUserInfect_attempt, g_fwDummyResult, id, infector, nemesis)
// One or more plugins blocked the infection. Only allow this after making sure it's
// not going to leave us with no zombies. Take into account a last player leaving case.
// BUGFIX: only allow after a mode has started, to prevent blocking first zombie e.g.
if (g_fwDummyResult >= ZP_PLUGIN_HANDLED && g_modestarted && fnGetZombies() > g_lastplayerleaving)
return 0;
/**
* код ...
*/
// в конце
return 1;
}
public fw_TakeDamage(victim, inflictor, attacker, Float:damage, damage_type)
{
/**
* код ...
*/
// Infection allowed
zombieme(victim, attacker, 0, 0, 1) // turn into zombie
return HAM_SUPERCEDE;
}
public fw_TakeDamage(victim, inflictor, attacker, Float:damage, damage_type)
{
/**
* код ...
*/
// Infection allowed
if(!zombieme(victim, attacker, 0, 0, 1)) // turn into zombie
return HAM_IGNORED;
return HAM_SUPERCEDE;
}