Created inert weapon base for hammer made weapons
Weapons using this base: - Cannot be selected from the player's HUD - Cannot be dropped or seen in-game - Switch to "weapon_zs_fists" if switched to forcefully
This commit is contained in:
parent
d49bd320d8
commit
1d538e1c90
4 changed files with 74 additions and 1 deletions
|
@ -0,0 +1,8 @@
|
||||||
|
include('shared.lua')
|
||||||
|
|
||||||
|
SWEP.Slot = -1
|
||||||
|
SWEP.SlotPos = -1
|
||||||
|
SWEP.DrawAmmo = false
|
||||||
|
SWEP.DrawCrosshair = true
|
||||||
|
SWEP.DrawWeaponInfoBox = false
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
AddCSLuaFile("cl_init.lua")
|
||||||
|
AddCSLuaFile("shared.lua")
|
||||||
|
|
||||||
|
include("shared.lua")
|
||||||
|
|
||||||
|
function SWEP:OnDrop()
|
||||||
|
if self:IsValid() then
|
||||||
|
self.Weapon:Remove()
|
||||||
|
end
|
||||||
|
end
|
|
@ -0,0 +1,55 @@
|
||||||
|
SWEP.Name = "Item"
|
||||||
|
|
||||||
|
SWEP.AnimPrefix = "none"
|
||||||
|
SWEP.HoldType = "normal"
|
||||||
|
|
||||||
|
SWEP.Spawnable = true
|
||||||
|
SWEP.AdminSpawnable = true
|
||||||
|
|
||||||
|
SWEP.Primary.ClipSize = -1
|
||||||
|
SWEP.Primary.DefaultClip = -1
|
||||||
|
SWEP.Primary.Automatic = false
|
||||||
|
SWEP.Primary.Ammo = "None"
|
||||||
|
|
||||||
|
SWEP.Secondary.ClipSize = -1
|
||||||
|
SWEP.Secondary.DefaultClip = -1
|
||||||
|
SWEP.Secondary.Automatic = false
|
||||||
|
SWEP.Secondary.Ammo = "None"
|
||||||
|
|
||||||
|
SWEP.DrawCrosshair = false
|
||||||
|
SWEP.Primary.Sound = Sound("")
|
||||||
|
|
||||||
|
SWEP.WorldModel = ""
|
||||||
|
|
||||||
|
SWEP.WalkSpeed = SPEED_NORMAL
|
||||||
|
|
||||||
|
function SWEP:Initialize()
|
||||||
|
end
|
||||||
|
|
||||||
|
function SWEP:SetWeaponHoldType()
|
||||||
|
end
|
||||||
|
|
||||||
|
function SWEP:PrimaryAttack()
|
||||||
|
end
|
||||||
|
|
||||||
|
function SWEP:SecondaryAttack()
|
||||||
|
end
|
||||||
|
|
||||||
|
function SWEP:Reload()
|
||||||
|
end
|
||||||
|
|
||||||
|
function SWEP:Deploy()
|
||||||
|
if SERVER then
|
||||||
|
self.Owner:SelectWeapon("weapon_zs_fists")
|
||||||
|
end
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
function SWEP:CanPrimaryAttack()
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
|
function SWEP:CanSecondaryAttack()
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
// Inputs
|
// Inputs
|
||||||
input enable(void) : "Enable the entity."
|
input enable(void) : "Enable the entity."
|
||||||
input disable(void) : "Disable the entity."
|
input disable(void) : "Disable the entity."
|
||||||
input toggle(void) : "Toggle the entity."
|
input seton(integer) : "Enable or Disable the entity."
|
||||||
]
|
]
|
||||||
|
|
||||||
@SolidClass base(Targetname) = trigger_zombieclass : "ZS: You can directly control the changing of classes with this."
|
@SolidClass base(Targetname) = trigger_zombieclass : "ZS: You can directly control the changing of classes with this."
|
||||||
|
|
Loading…
Reference in a new issue