Quote:
Originally Posted by kongzted
But how?
|
Like this ?
EDIT:
PHP Code:
#include <sourcemod>
#include <sdktools>
#define PLUGIN_AUTHOR "Arkarr"
#define PLUGIN_VERSION "1.00"
Handle CVAR_SvCheats;
public Plugin myinfo =
{
name = "[ANY] SV_CHEATS hack",
author = PLUGIN_AUTHOR,
description = "Allow you to use commands wich would normal require having sv_cheats set to 1",
version = PLUGIN_VERSION,
url = "http://www.sourcemod.net"
};
public void OnPluginStart()
{
RegAdminCmd("sm_cheat", CMD_ByPassSVCHeats, ADMFLAG_CHEATS, "Allow you to use a sv_cheats command");
CVAR_SvCheats = FindConVar("sv_cheats");
}
public Action CMD_ByPassSVCHeats(client, args)
{
if(args < 1)
{
ReplyToCommand(client, "[SM] Usage sm_cheats [command]");
return Plugin_Continue;
}
char command[45];
GetCmdArg(1, command, sizeof(command));
SetConVarInt(CVAR_SvCheats, 1, true, false);
ServerCommand(command);
SetConVarInt(CVAR_SvCheats, 0, true, false);
ReplyToCommand(client, "[SM] You executed '%s'", command);
return Plugin_Handled;
}
__________________