SA-MP Forums Archive
FAST SMALL PROBLEM HELP - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: FAST SMALL PROBLEM HELP (/showthread.php?tid=249505)



FAST SMALL PROBLEM HELP - rokata555 - 19.04.2011

Hey all what is the command for restart server ?


Re: FAST SMALL PROBLEM HELP - BASITJALIL - 19.04.2011

/rcon gmx


Re: FAST SMALL PROBLEM HELP - DnL - 19.04.2011

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;
    }



Re: FAST SMALL PROBLEM HELP - Cjgogo - 19.04.2011

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


Re: FAST SMALL PROBLEM HELP - Seven_of_Nine - 19.04.2011

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.