forked from UNLOZE/sm-plugins
minor changes
This commit is contained in:
@@ -23,6 +23,8 @@ 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;
|
||||
@@ -108,7 +110,9 @@ public Action OnCheatCommand(int client, const char[] command, int argc)
|
||||
|
||||
if(StrEqual(command, "noclip") && IsPlayerAlive(client))
|
||||
ShowActivity2(client, "[SM] ", "toggled noclip on himself.");
|
||||
|
||||
LogAction(client, -1, "\"%L\" used cheat command: \"%s\"", client, command);
|
||||
|
||||
return Plugin_Continue;
|
||||
}
|
||||
|
||||
@@ -128,3 +132,10 @@ 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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user