2018-05-02 06:32:59 +08:00
|
|
|
SWEP.PrintName = "Item"
|
2014-11-16 10:41:28 +08:00
|
|
|
|
|
|
|
SWEP.AnimPrefix = "none"
|
|
|
|
SWEP.HoldType = "normal"
|
|
|
|
|
|
|
|
SWEP.Spawnable = true
|
|
|
|
SWEP.AdminSpawnable = true
|
|
|
|
|
|
|
|
SWEP.Primary.ClipSize = -1
|
|
|
|
SWEP.Primary.DefaultClip = -1
|
|
|
|
SWEP.Primary.Automatic = false
|
2015-04-19 13:54:47 +08:00
|
|
|
SWEP.Primary.Ammo = "none"
|
2014-11-16 10:41:28 +08:00
|
|
|
|
|
|
|
SWEP.Secondary.ClipSize = -1
|
|
|
|
SWEP.Secondary.DefaultClip = -1
|
|
|
|
SWEP.Secondary.Automatic = false
|
2015-04-19 13:54:47 +08:00
|
|
|
SWEP.Secondary.Ammo = "none"
|
2014-11-16 10:41:28 +08:00
|
|
|
|
|
|
|
SWEP.DrawCrosshair = false
|
|
|
|
SWEP.Primary.Sound = Sound("")
|
|
|
|
|
2018-05-02 06:32:59 +08:00
|
|
|
SWEP.WorldModel = "models/weapons/w_crowbar.mdl"
|
2014-11-16 10:41:28 +08:00
|
|
|
|
|
|
|
SWEP.WalkSpeed = SPEED_NORMAL
|
|
|
|
|
|
|
|
function SWEP:Initialize()
|
|
|
|
end
|
|
|
|
|
2018-05-02 06:32:59 +08:00
|
|
|
function SWEP:Equip()
|
|
|
|
local owner = self:GetOwner()
|
|
|
|
local children = self:GetChildren()
|
|
|
|
|
|
|
|
if GAMEMODE.ZombieEscape then
|
|
|
|
if #children > 0 then
|
|
|
|
GAMEMODE:CenterNotifyAll(COLOR_GREEN, owner:GetName() .. " has picked up a ZE Weapon. ("..children[math.random(#children)]:GetName()..")")
|
|
|
|
PrintMessage(HUD_PRINTTALK, owner:GetName() .. " has picked up a ZE Weapon. ("..children[math.random(#children)]:GetName()..")")
|
|
|
|
if SERVER then
|
|
|
|
gamemode.Call("OnZEWeaponPickup", owner, self)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2014-11-16 10:41:28 +08:00
|
|
|
function SWEP:SetWeaponHoldType()
|
|
|
|
end
|
|
|
|
|
|
|
|
function SWEP:PrimaryAttack()
|
|
|
|
end
|
|
|
|
|
|
|
|
function SWEP:SecondaryAttack()
|
|
|
|
end
|
|
|
|
|
|
|
|
function SWEP:Reload()
|
|
|
|
end
|
|
|
|
|
|
|
|
function SWEP:Deploy()
|
|
|
|
if SERVER then
|
2018-05-02 06:32:59 +08:00
|
|
|
local owner = self:GetOwner()
|
|
|
|
|
2015-01-31 07:56:38 +08:00
|
|
|
if GAMEMODE.ZombieEscape then
|
2018-05-02 06:32:59 +08:00
|
|
|
owner:SelectWeapon("weapon_zs_zeknife")
|
2015-01-31 07:56:38 +08:00
|
|
|
else
|
2018-05-02 06:32:59 +08:00
|
|
|
owner:SelectWeapon("weapon_zs_fists")
|
2015-01-31 07:56:38 +08:00
|
|
|
end
|
2014-11-16 10:41:28 +08:00
|
|
|
end
|
|
|
|
return true
|
|
|
|
end
|
|
|
|
|
|
|
|
function SWEP:CanPrimaryAttack()
|
|
|
|
return false
|
|
|
|
end
|
|
|
|
|
|
|
|
function SWEP:CanSecondaryAttack()
|
|
|
|
return false
|
|
|
|
end
|