AdminCheats: Add logging.
This commit is contained in:
parent
b250cb13fe
commit
a228405eab
@ -99,13 +99,14 @@ public Action OnCheatCommand(int client, const char[] command, int argc)
|
||||
if(client == 0)
|
||||
return Plugin_Continue;
|
||||
|
||||
if(IsClientAuthorized(client) && CheckCommandAccess(client, "", ADMFLAG_CHEATS))
|
||||
return Plugin_Continue;
|
||||
|
||||
if(!argc && (StrEqual(command, "kill") || StrEqual(command, "explode")))
|
||||
return Plugin_Continue;
|
||||
|
||||
if(!IsClientAuthorized(client) || !CheckCommandAccess(client, "", ADMFLAG_CHEATS))
|
||||
return Plugin_Handled;
|
||||
|
||||
LogAction(client, -1, "\"%L\" used cheat command: \"%s\"", client, command);
|
||||
return Plugin_Continue;
|
||||
}
|
||||
|
||||
public Action OnPlayerRunCmd(int client, int &buttons, int &impulse, float vel[3], float angles[3], int &weapon, int &subtype, int &cmdnum, int &tickcount, int &seed, int mouse[2])
|
||||
@ -116,10 +117,11 @@ public Action OnPlayerRunCmd(int client, int &buttons, int &impulse, float vel[3
|
||||
if(impulse == 100 || impulse == 201)
|
||||
return Plugin_Continue;
|
||||
|
||||
if(IsClientAuthorized(client) && CheckCommandAccess(client, "", ADMFLAG_CHEATS))
|
||||
return Plugin_Continue;
|
||||
|
||||
if(!IsClientAuthorized(client) || !CheckCommandAccess(client, "", ADMFLAG_CHEATS))
|
||||
return Plugin_Handled;
|
||||
|
||||
LogAction(client, -1, "\"%L\" used cheat command: \"impulse %d\"", client, impulse);
|
||||
return Plugin_Continue;
|
||||
}
|
||||
|
||||
stock void MakeCheatCommand(const char[] name)
|
||||
|
Loading…
Reference in New Issue
Block a user