zombiesurvival-evolved/gamemodes/zombiesurvival/entities/weapons/weapon_zs_butcherknifez.lua
William Moodhe e9da54c2f9 ZS updates for 2014-2018
Too many changes to list.
2018-05-01 18:32:59 -04:00

24 lines
No EOL
558 B
Lua

AddCSLuaFile()
SWEP.Base = "weapon_zs_butcherknife"
SWEP.ZombieOnly = true
SWEP.MeleeDamage = 28
SWEP.OriginalMeleeDamage = SWEP.MeleeDamage
SWEP.Primary.Delay = 0.45
function SWEP:OnMeleeHit(hitent, hitflesh, tr)
if not hitent:IsPlayer() then
self.MeleeDamage = 18
end
end
function SWEP:PostOnMeleeHit(hitent, hitflesh, tr)
self.MeleeDamage = self.OriginalMeleeDamage
end
function SWEP:SetNextAttack()
local owner = self:GetOwner()
local armdelay = owner:GetMeleeSpeedMul()
self:SetNextPrimaryFire(CurTime() + self.Primary.Delay * armdelay)
end