aboutsummaryrefslogtreecommitdiff
path: root/entities
diff options
context:
space:
mode:
authorAlexander Pickering <alexandermpickering@gmail.com>2017-08-17 20:08:23 -0400
committerAlexander Pickering <alexandermpickering@gmail.com>2017-08-17 20:08:23 -0400
commit7a31161e59b34d34917a5c8826d5187fd63e844b (patch)
tree85694d3dc3429f2a3c2183f03b5e7c7a818958b3 /entities
parentfcffbc1ff27a7cb28bab85b223be7060c481bf8b (diff)
downloadartery-7a31161e59b34d34917a5c8826d5187fd63e844b.tar.gz
artery-7a31161e59b34d34917a5c8826d5187fd63e844b.tar.bz2
artery-7a31161e59b34d34917a5c8826d5187fd63e844b.zip
Made console commands admin-only
this was probably a big security bug or something lol
Diffstat (limited to 'entities')
-rw-r--r--entities/entities/art_droppeditem/init.lua1
-rw-r--r--entities/weapons/hands.lua4
2 files changed, 5 insertions, 0 deletions
diff --git a/entities/entities/art_droppeditem/init.lua b/entities/entities/art_droppeditem/init.lua
index 7d5ad2f..a403dd0 100644
--- a/entities/entities/art_droppeditem/init.lua
+++ b/entities/entities/art_droppeditem/init.lua
@@ -76,6 +76,7 @@ end
print("Remove the concommand in art_droppeditem/init.lua")
concommand.Add("dropmellon",function(ply,cmd,args)
+ if not ply:IsAdmin() then return end
local e = ents.Create("art_droppeditem")
e.Model = "models/props_junk/Rock001a.mdl"
e.Item = itm.GetItemByName("Watermelon")
diff --git a/entities/weapons/hands.lua b/entities/weapons/hands.lua
index 4220f5e..7532104 100644
--- a/entities/weapons/hands.lua
+++ b/entities/weapons/hands.lua
@@ -109,3 +109,7 @@ function SWEP:SecondaryAttack()
weapon:onClick(self.Owner)
end --Make sure we have a weapon
end
+
+hook.Add("PlayerSpawn","give_hands",function(ply)
+ ply:Give("hands")
+end)