From 92cef6c39d52cba6cff4a29e952af5cd978b86bf Mon Sep 17 00:00:00 2001 From: Bob Blackmon Date: Sat, 1 Apr 2017 18:28:45 -0400 Subject: Fixed client removal error --- zones/lua/weapons/weapon_zone_designator.lua | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/zones/lua/weapons/weapon_zone_designator.lua b/zones/lua/weapons/weapon_zone_designator.lua index cc30629..90f96f5 100644 --- a/zones/lua/weapons/weapon_zone_designator.lua +++ b/zones/lua/weapons/weapon_zone_designator.lua @@ -16,15 +16,20 @@ if CLIENT then weight = 1000, } ) +else + concommand.Add("zone_swep",function(p,c,a) + if p:IsAdmin() then + p:Give("weapon_zone_designator") + end + end) end if engine.ActiveGamemode() == "terrortown" then SWEP.Base = "weapon_tttbase" + SWEP.Kind = WEAPON_EQUIP2 end -SWEP.Kind = WEAPON_EQUIP2 - SWEP.NoSights = true SWEP.PrintName = "Zone Designator" @@ -32,7 +37,7 @@ SWEP.Author = "Bobblehead" SWEP.Purpose = "Creates zones. Reload for menu. Right click to remove a point/zone." SWEP.Slot = 5 -SWEP.SlotPos = 6 +SWEP.SlotPos = 5 SWEP.Spawnable = true SWEP.AdminOnly = true @@ -42,7 +47,7 @@ SWEP.ViewModelFOV = 51 SWEP.ViewModelFlip = false SWEP.UseHands = true SWEP.ViewModel = "models/weapons/c_toolgun.mdl" -SWEP.WorldModel = "models/weapons/c_toolgun.mdl" +SWEP.WorldModel = "models/weapons/w_toolgun.mdl" SWEP.AutoSwitchFrom = true SWEP.AutoSwitchTo = true @@ -498,7 +503,7 @@ end function SWEP:ResetTool() - if self:GetMode() == 1 then + if self:GetMode() == 1 and SERVER then local cur = self:GetCurrentPoint() if IsValid(cur) and cur:GetZoneID() == -1 then @@ -509,7 +514,6 @@ function SWEP:ResetTool() end end - elseif self:GetMode() == 2 then end self:SetCurrentPoint(NULL) -- cgit v1.2.3-70-g09d2