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 --- gamemode/core/combat/cl_weaponswing.lua | 1 + gamemode/core/combat/sv_weaponswing.lua | 2 ++ 2 files changed, 3 insertions(+) (limited to 'gamemode/core/combat') diff --git a/gamemode/core/combat/cl_weaponswing.lua b/gamemode/core/combat/cl_weaponswing.lua index 74365b1..11557e5 100644 --- a/gamemode/core/combat/cl_weaponswing.lua +++ b/gamemode/core/combat/cl_weaponswing.lua @@ -84,6 +84,7 @@ net.Receive("artery_doanimation",function() end) concommand.Add("artery_startanimation",function(ply,cmd,args) + if not ply:IsAdmin() then return end swingtbl = {} ply:SetLuaAnimation(args[1]) timer.Simple(args[2],function() diff --git a/gamemode/core/combat/sv_weaponswing.lua b/gamemode/core/combat/sv_weaponswing.lua index 0b37c0a..29afd7a 100644 --- a/gamemode/core/combat/sv_weaponswing.lua +++ b/gamemode/core/combat/sv_weaponswing.lua @@ -91,6 +91,7 @@ end --Create a fake thing in front of the player, do the swing animations, and record them. concommand.Add("artery_recordanimations",function(ply,cmd,args) + if not ply:IsAdmin() then return end local e = ply e:SetAngles(Angle(0,0,0)) e:SetEyeAngles(Angle(0,0,0)) @@ -177,6 +178,7 @@ concommand.Add("artery_checkSwingable",function(ply,cmd,args) end) concommand.Add("artery_clearswingable",function(ply,cmd,args) + if not ply:IsAdmin() then return end swingable = {} end) -- cgit v1.2.3-70-g09d2