2014-10-02 08:49:54 +08:00
|
|
|
AddCSLuaFile()
|
|
|
|
|
2018-05-02 06:32:59 +08:00
|
|
|
SWEP.PrintName = "Zombie Kung Fu"
|
2014-10-02 08:49:54 +08:00
|
|
|
|
|
|
|
SWEP.Base = "weapon_zs_zombie"
|
|
|
|
|
|
|
|
SWEP.MeleeDelay = 0.32
|
|
|
|
SWEP.MeleeReach = 40
|
|
|
|
SWEP.MeleeDamage = 17
|
|
|
|
|
|
|
|
SWEP.DelayWhenDeployed = true
|
|
|
|
|
2018-05-02 06:32:59 +08:00
|
|
|
--[[function SWEP:Move(mv)
|
2014-10-02 08:49:54 +08:00
|
|
|
if self:IsSwinging() then
|
|
|
|
mv:SetMaxSpeed(0)
|
|
|
|
mv:SetMaxClientSpeed(0)
|
|
|
|
end
|
2018-05-02 06:32:59 +08:00
|
|
|
end]]
|
2014-10-02 08:49:54 +08:00
|
|
|
|
|
|
|
function SWEP:PrimaryAttack(fromsecondary)
|
|
|
|
local n = self:GetNextPrimaryAttack()
|
|
|
|
|
2018-05-02 06:32:59 +08:00
|
|
|
if self:GetOwner():IsOnGround() or self:GetOwner():WaterLevel() >= 2 or self:GetOwner():GetMoveType() ~= MOVETYPE_WALK then
|
2014-10-02 08:49:54 +08:00
|
|
|
self.BaseClass.PrimaryAttack(self)
|
|
|
|
end
|
|
|
|
|
|
|
|
if not fromsecondary and n ~= self:GetNextPrimaryAttack() then
|
|
|
|
self:SetDTBool(3, false)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
function SWEP:SecondaryAttack()
|
|
|
|
local n = self:GetNextPrimaryAttack()
|
|
|
|
self:PrimaryAttack(true)
|
|
|
|
if n ~= self:GetNextPrimaryAttack() then
|
|
|
|
self:SetDTBool(3, true)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
function SWEP:PlayHitSound()
|
2018-05-02 06:32:59 +08:00
|
|
|
self:EmitSound("npc/zombie/zombie_pound_door.wav", nil, nil, nil, CHAN_AUTO)
|
2014-10-02 08:49:54 +08:00
|
|
|
end
|
|
|
|
|
|
|
|
function SWEP:PlayAttackSound()
|
2018-05-02 06:32:59 +08:00
|
|
|
self:EmitSound("npc/zombie/foot_slide"..math.random(3)..".wav", nil, nil, nil, CHAN_AUTO)
|
2014-10-02 08:49:54 +08:00
|
|
|
end
|
|
|
|
|
|
|
|
function SWEP:Reload()
|
|
|
|
end
|
|
|
|
|
|
|
|
function SWEP:StartMoaning()
|
|
|
|
end
|
|
|
|
|
|
|
|
function SWEP:StopMoaning()
|
|
|
|
end
|
|
|
|
|
|
|
|
function SWEP:IsMoaning()
|
|
|
|
return false
|
|
|
|
end
|