29.03.2012, 18:30
Hello, i need to add a restart command to restart my server IG
if(strcmp(cmd, "/gmx", true) == 0)
{
GameModeExit();
return 1;
}
SendRconCommand("gmx");//use this in you command
if (strcmp("/restart", cmdtext, true, 8) == 0)
{
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,0xFF0000FF,"Only admins can use this command");
SendRconCommand("gmx");
/*or if you have some type of auto restart like if the server would shut down on its own you could do this
SendRconCommand("exit"); That will make the server do a compleate restart not just the gamemode. But only that if you have a auto crash restart thing*/
return 1;
}