PHP Code:
#include <amxmodx>
#pragma semicolon 1
new const g_szCommands[][] =
{
"/rr",
"!rr",
".rr"
};
public plugin_init()
{
register_plugin("O", "M", "G");
register_concmd("say", "ConsoleCommand_Say");
}
public ConsoleCommand_Say(iClient)
{
new szSaid[192], szCommand[3], szValue[3], iValue;
read_args(szSaid, charsmax(szSaid));
for(new i = 0; i < sizeof(g_szCommands); i++)
{
if(equali(szSaid, g_szCommands[i], 3))
{
strbreak(szSaid, szCommand, charsmax(szCommand), szValue, charsmax(szValue));
iValue = str_to_num(szValue);
if(iValue)
server_cmd("sv_restart %d", iValue);
else
server_cmd("sv_restart 1");
}
}
return PLUGIN_CONTINUE;
}
Not tested, though.
__________________