From 2a5f127fd10effc66b291c5a391251288e016bec Mon Sep 17 00:00:00 2001 From: JetBoom Date: Sun, 23 Nov 2014 05:20:41 -0500 Subject: [PATCH] Fix hammer error. --- .../zombiesurvival/entities/weapons/weapon_zs_hammer/init.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gamemodes/zombiesurvival/entities/weapons/weapon_zs_hammer/init.lua b/gamemodes/zombiesurvival/entities/weapons/weapon_zs_hammer/init.lua index 2d4a42d..08906f8 100644 --- a/gamemodes/zombiesurvival/entities/weapons/weapon_zs_hammer/init.lua +++ b/gamemodes/zombiesurvival/entities/weapons/weapon_zs_hammer/init.lua @@ -29,7 +29,7 @@ function SWEP:Reload() if not ent or not gamemode.Call("CanRemoveNail", owner, ent) then return end local nailowner = ent:GetOwner() - if nailowner:IsValid() and nailowner ~= owner and nailowner:Team() == TEAM_HUMAN and not gamemode.Call("PlayerIsAdmin", owner) and not gamemode.Call("CanRemoveOthersNail", owner, nailowner, ent) then return end + if nailowner:IsValid() and nailowner:IsPlayer() and nailowner ~= owner and nailowner:Team() == TEAM_HUMAN and not gamemode.Call("PlayerIsAdmin", owner) and not gamemode.Call("CanRemoveOthersNail", owner, nailowner, ent) then return end self:SetNextPrimaryFire(CurTime() + 1) @@ -44,7 +44,7 @@ function SWEP:Reload() ent:GetParent():RemoveNail(ent, nil, self.Owner) - if nailowner and nailowner ~= owner and nailowner:Team() == TEAM_HUMAN then + if nailowner and nailowner:IsValid() and nailowner:IsPlayer() and nailowner ~= owner and nailowner:Team() == TEAM_HUMAN then if not gamemode.Call("PlayerIsAdmin", owner) and (nailowner:Frags() >= 75 or owner:Frags() < 75) then owner:GivePenalty(30) owner:ReflectDamage(20)