AdminCheats: Fix kill <target> and explode <target> being usable by everyone...
This commit is contained in:
parent
ffe77f672a
commit
64d75a7321
@ -40,6 +40,9 @@ public void OnPluginStart()
|
||||
}
|
||||
while(FindNextConCommand(hSearch, sConCommand, sizeof(sConCommand), IsCommand, Flags));
|
||||
|
||||
AddCommandListener(OnCheatCommand, "kill"); NumHooks++;
|
||||
AddCommandListener(OnCheatCommand, "explode"); NumHooks++;
|
||||
|
||||
PrintToServer("Hooked %d cheat commands.", NumHooks);
|
||||
|
||||
UpdateClients();
|
||||
@ -99,7 +102,9 @@ public Action OnCheatCommand(int client, const char[] command, int argc)
|
||||
if(IsClientAuthorized(client) && CheckCommandAccess(client, "", ADMFLAG_CHEATS))
|
||||
return Plugin_Continue;
|
||||
|
||||
//PrintToConsole(client, "denied :^)");
|
||||
if(!argc && (StrEqual(command, "kill") || StrEqual(command, "explode")))
|
||||
return Plugin_Continue;
|
||||
|
||||
return Plugin_Handled;
|
||||
}
|
||||
|
||||
@ -114,7 +119,6 @@ public Action OnPlayerRunCmd(int client, int &buttons, int &impulse, float vel[3
|
||||
if(IsClientAuthorized(client) && CheckCommandAccess(client, "", ADMFLAG_CHEATS))
|
||||
return Plugin_Continue;
|
||||
|
||||
//PrintToConsole(client, "denied :^)");
|
||||
return Plugin_Handled;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user