From 4149771bebfa3647ed16d56a2f73c665d073f766 Mon Sep 17 00:00:00 2001 From: jenzur Date: Sun, 6 Sep 2020 21:52:08 +0200 Subject: [PATCH] removing give as cheat command so it cant be abused further unnoticed --- AdminCheats/scripting/AdminCheats.sp | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/AdminCheats/scripting/AdminCheats.sp b/AdminCheats/scripting/AdminCheats.sp index a4f6684d..43d10f62 100644 --- a/AdminCheats/scripting/AdminCheats.sp +++ b/AdminCheats/scripting/AdminCheats.sp @@ -23,8 +23,6 @@ public void OnPluginStart() g_CVar_sv_cheats.AddChangeHook(OnConVarChanged); g_CVar_sv_cheats.SetInt(1); - MakeCheatCommand("give"); - int NumHooks = 0; char sConCommand[128]; bool IsCommand; @@ -110,10 +108,7 @@ public Action OnCheatCommand(int client, const char[] command, int argc) if(StrEqual(command, "noclip") && IsPlayerAlive(client)) ShowActivity2(client, "[SM] ", "toggled noclip on himself."); - - if(!StrEqual(command, "give")) - LogAction(client, -1, "\"%L\" used cheat command: \"%s\"", client, command); - + LogAction(client, -1, "\"%L\" used cheat command: \"%s\"", client, command); return Plugin_Continue; } @@ -133,10 +128,3 @@ public Action OnPlayerRunCmd(int client, int &buttons, int &impulse, float vel[3 return Plugin_Continue; } - -stock void MakeCheatCommand(const char[] name) -{ - int Flags = GetCommandFlags(name); - if(Flags != INVALID_FCVAR_FLAGS) - SetCommandFlags(name, FCVAR_CHEAT | Flags); -}