I'm switching from Zombie Plague 4.3 to ZP 5.0.8a, I've noticed an bug and don't know how to fix it or what plugins are responsible for this bug, I'm not using anything other than the default ZP Plugins, I haven't disabled all my plugins but Remin's problem.
Even when I'm the last human the armor still works and in Swarm mode like I said, how do I fix it please tell me which plugin I should send as I have no idea.
zp50_human_armor.sma check for the swarm mode under this part: 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;
zp50_human_armor.sma check for the swarm mode under this part: 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; Here is the code I have under this part:
Can you fix it if possible please? Because I don't understand codes things.
Here is the code under this part:
// Ham Take Damage Forward
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;
// Zombie attacking human...
if (zp_core_is_zombie(attacker) && !zp_core_is_zombie(victim))
{
// Ignore damage coming from a HE grenade (bugfix)
if (damage_type & DMG_HEGRENADE)
return HAM_IGNORED;
// Does human armor need to be reduced before infecting/damaging?
if (!get_pcvar_num(cvar_human_armor_protect))
return HAM_IGNORED;
// Should armor protect against nemesis attacks?
if (LibraryExists(LIBRARY_NEMESIS, LibType_Library) && !get_pcvar_num(cvar_armor_protect_nemesis) && zp_class_nemesis_get(attacker))
return HAM_IGNORED;
// Should armor protect against assassin attacks?
if (LibraryExists(LIBRARY_ASSASSIN, LibType_Library) && !get_pcvar_num(cvar_armor_protect_assassin) && zp_class_assassin_get(attacker))
return HAM_IGNORED;
// Should armor protect survivor too?
if (LibraryExists(LIBRARY_SURVIVOR, LibType_Library) && !get_pcvar_num(cvar_survivor_armor_protect) && zp_class_survivor_get(victim))
return HAM_IGNORED;
// Should armor protect sniper too?
if (LibraryExists(LIBRARY_SNIPER, LibType_Library) && !get_pcvar_num(cvar_sniper_armor_protect) && zp_class_sniper_get(victim))
return HAM_IGNORED;
// Get victim armor
static Float:armor
pev(victim, pev_armorvalue, armor)
// If he has some, block damage and reduce armor instead
Add this variable new gMode_Swarm Add this function public plugin_cfg() { gMode_Swarm = zp_gamemodes_get_id("Swarm Mode") }
Replace the ham entire function with this or just add the new lines. The line: // Ham Take Damage Forward
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; // Ignore the whole thing for the swarm mode. new get_cm = zp_gamemodes_get_current() if(get_cm == gMode_Swarm) return HAM_IGNORED;
// Zombie attacking human...
if (zp_core_is_zombie(attacker) && !zp_core_is_zombie(victim))
{
// Ignore damage coming from a HE grenade (bugfix)
if (damage_type & DMG_HEGRENADE)
return HAM_IGNORED;
// Does human armor need to be reduced before infecting/damaging?
if (!get_pcvar_num(cvar_human_armor_protect))
return HAM_IGNORED;
// Should armor protect against nemesis attacks?
if (LibraryExists(LIBRARY_NEMESIS, LibType_Library) && !get_pcvar_num(cvar_armor_protect_nemesis) && zp_class_nemesis_get(attacker))
return HAM_IGNORED;
// Should armor protect against assassin attacks?
if (LibraryExists(LIBRARY_ASSASSIN, LibType_Library) && !get_pcvar_num(cvar_armor_protect_assassin) && zp_class_assassin_get(attacker))
return HAM_IGNORED;
// Should armor protect survivor too?
if (LibraryExists(LIBRARY_SURVIVOR, LibType_Library) && !get_pcvar_num(cvar_survivor_armor_protect) && zp_class_survivor_get(victim))
return HAM_IGNORED;
// Should armor protect sniper too?
if (LibraryExists(LIBRARY_SNIPER, LibType_Library) && !get_pcvar_num(cvar_sniper_armor_protect) && zp_class_sniper_get(victim))
return HAM_IGNORED;
// Get victim armor static Float:armor pev(victim, pev_armorvalue, armor)
// If he has some, block damage and reduce armor instead if (armor > 0.0) { emit_sound(victim, CHAN_BODY, g_sound_armor_hit, 1.0, ATTN_NORM, 0, PITCH_NORM) if (armor - damage > 0.0) set_pev(victim, pev_armorvalue, armor - damage) else cs_set_user_armor(victim, 0, CS_ARMOR_NONE)
// Block damage, but still set the pain shock offset set_pdata_float(victim, OFFSET_PAINSHOCK, 0.5) return HAM_SUPERCEDE; } } return HAM_IGNORED;
}
Thanks for your help!
I still need one last thing if possible, in a normal infection or multiple infection I want if a human becomes the last human the armor stops working as well.
Also, if the player has armor, I want that if he gets hit by zombies, don't slow down his movements.
Please put all the code in one message so I can copy and replace it.