zombiesurvival-evolved/gamemodes/zombiesurvival/entities/weapons/weapon_zs_butcherknifez.lua

24 lines
558 B
Lua
Raw Normal View History

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