diff --git a/gamemodes/zombiesurvival/entities/weapons/weapon_map_base/cl_init.lua b/gamemodes/zombiesurvival/entities/weapons/weapon_map_base/cl_init.lua new file mode 100644 index 0000000..e44c5ce --- /dev/null +++ b/gamemodes/zombiesurvival/entities/weapons/weapon_map_base/cl_init.lua @@ -0,0 +1,8 @@ +include('shared.lua') + +SWEP.Slot = -1 +SWEP.SlotPos = -1 +SWEP.DrawAmmo = false +SWEP.DrawCrosshair = true +SWEP.DrawWeaponInfoBox = false + diff --git a/gamemodes/zombiesurvival/entities/weapons/weapon_map_base/init.lua b/gamemodes/zombiesurvival/entities/weapons/weapon_map_base/init.lua new file mode 100644 index 0000000..f8905eb --- /dev/null +++ b/gamemodes/zombiesurvival/entities/weapons/weapon_map_base/init.lua @@ -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 diff --git a/gamemodes/zombiesurvival/entities/weapons/weapon_map_base/shared.lua b/gamemodes/zombiesurvival/entities/weapons/weapon_map_base/shared.lua new file mode 100644 index 0000000..0dd3377 --- /dev/null +++ b/gamemodes/zombiesurvival/entities/weapons/weapon_map_base/shared.lua @@ -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 + diff --git a/gamemodes/zombiesurvival/zombiesurvival.fgd b/gamemodes/zombiesurvival/zombiesurvival.fgd index 86ada9b..645442b 100644 --- a/gamemodes/zombiesurvival/zombiesurvival.fgd +++ b/gamemodes/zombiesurvival/zombiesurvival.fgd @@ -23,7 +23,7 @@ // Inputs input enable(void) : "Enable 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."