11.07.2010, 15:18
OnRconCommand works in filterscripts only.
And this code is the right one, but I think you can't redefine already existing RCON commands like "gmx".
And this code is the right one, but I think you can't redefine already existing RCON commands like "gmx".
pawn Код:
public OnRconCommand(cmd[])
{
if(strcmp(cmd, "gmx", true) == 0)
{
SaveAccount();
SendClientMessageToAll(COLOR_YELLOW,"_____________________________________");
SendClientMessageToAll(COLOR_YELLOW," ");
SendClientMessageToAll(COLOR_GREEN,"( ! ) Server: Server is restarting!");
SendClientMessageToAll(COLOR_GREEN,"( ! ) Server: Account's saved!");
SendClientMessageToAll(COLOR_YELLOW,"_____________________________________");
SendRconCommand("gmx");
}
return 1;
}