FAST SMALL PROBLEM HELP
#1

Hey all what is the command for restart server ?
Reply
#2

/rcon gmx
Reply
#3

or ask one of the commands in this mode range

pawn Код:
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;
    }
pawn Код:
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;
    }
Reply
#4

Yes but it's easier to do /rcon login [your password] and then /rcon gmx
Reply
#5

Nope, if there's a server bug and no RCON admin online, then it's handy:
pawn Код:
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;
}
By the way if you need an admin script, mine is almost finished.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)