Restart command
#1

Hello, i need to add a restart command to restart my server IG
Reply
#2

pawn Код:
if(strcmp(cmd, "/gmx", true) == 0)
    {
                        GameModeExit();
        return 1;
    }
Reply
#3

or why you dont restart your servar wich rcon command.[HOW TO] login into your servar then type /rconlogin and your password (example:/rconlogin 123) after you login as rcon admin type /rcon gmx and servar will automatic restart !

EDIT: you can use all rcon cmd over here
Reply
#4

Quote:
Originally Posted by doreto
Посмотреть сообщение
mineralo this will not restart servar it will only stop him!!!
are you sure? I use it myself, and works, when server get gamemodeexit the server will restart, I'm sure at 100500% you can check yourself
Reply
#5

@Detro thanks
@Mineralo i think is not
Reply
#6

loops you have right for that im sorry XD
Reply
#7

you can also use

pawn Код:
SendRconCommand("gmx");//use this in you command
Reply
#8

Heres one so only rcon admins can restart the gamemode so you dont have random people restarting it on you....

pawn Код:
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;
    }
But like i said only use exit if you have any sort of auto restart or your server will just shut off
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)