19.04.2011, 07:16
Hey all what is the command for restart server ?
if(strcmp(cmd, "/restart", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if (PlayerInfo[playerid][pAdmin] >= 1337)
{
GameModeInitExitFunc();
}
else
{
SendClientMessage(playerid, 0x639EC5FF, "you are not authorized to use that command!");
}
}
return 1;
}
if(strcmp(cmd, "/gmx", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if (PlayerInfo[playerid][pAdmin] >= 1337)
{
GameModeInitExitFunc();
}
else
{
SendClientMessage(playerid, 0x639EC5FF, "you are not authorized to use that command!");
}
}
return 1;
}
COMMAND:restart(playerid) {
new
name1[30],
text[128];
if(PlayerInfo[playerid][pAdminLevel] == 4) {
GetPlayerName(playerid,name1,sizeof(name1));
format(text,sizeof(text),"Administrator \"%s\" has restarted the server. Please don't leave.",name1);
SendClientMessageToAll(red,text);
SendRconCommand("gmx");
} else {
return SendClientMessage(playerid,red,"Only lvl4 admins can restart the server. (only if needed!)");
}
return 1;
}