From 7a31161e59b34d34917a5c8826d5187fd63e844b Mon Sep 17 00:00:00 2001 From: Alexander Pickering Date: Thu, 17 Aug 2017 20:08:23 -0400 Subject: Made console commands admin-only this was probably a big security bug or something lol --- entities/entities/art_droppeditem/init.lua | 1 + entities/weapons/hands.lua | 4 ++++ 2 files changed, 5 insertions(+) (limited to 'entities') 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) -- cgit v1.2.3-70-g09d2