SA-MP Forums Archive
/restart - 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)
+--- Thread: /restart (/showthread.php?tid=405939)



/restart - RiChArD_A - 08.01.2013

Hi, I need the command /restart to restart my server. Thank you.


Re: /restart - Infinity90 - 08.01.2013

CMD:gmx(playerid,params[])
{
SendRconCommand("gmx");
return 1;
}


Re: /restart - [FR]Fratzica - 08.01.2013

you can login with rcon(/rcon login (password)) and then do /rcon gmx and the server restarts


Respuesta: /restart - RiChArD_A - 10.01.2013

It dose't work! I don't understand it that way. Please maki it into the normal command. Pleaseeeesss... Thank you.


Re: Respuesta: /restart - EAsT-OAK_510 - 10.01.2013

Quote:
Originally Posted by Lauder
Посмотреть сообщение
It dose't work! I don't understand it that way. Please maki it into the normal command. Pleaseeeesss... Thank you.
Infinity90 basically wrote the command for you:
Quote:
pawn Код:
CMD:gmx(playerid,params[])
{
    SendRconCommand("gmx");
    return 1;
}



Re: /restart - Threshold - 11.01.2013

pawn Код:
CMD:restart(playerid,params[])
{
    SendRconCommand("gmx");
    return 1;
}
EDIT:
STRCMP

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp(cmdtext, "/restart", true) == 0)
    {
        SendRconCommand("gmx");
        return 1;
    }
    return 0;
}
??


Re: /restart - EAsT-OAK_510 - 11.01.2013

In case he's using the old method:

pawn Код:
if(strcmp(cmdtext, "/gmx", true) == 0)
{
    SendRconCommand("gmx");
    return 1;
}



Respuesta: Re: /restart - RiChArD_A - 11.01.2013

Quote:
Originally Posted by EAsT-OAK_510
Посмотреть сообщение
In case he's using the old method:

pawn Код:
if(strcmp(cmdtext, "/gmx", true) == 0)
{
    SendRconCommand("gmx");
    return 1;
}
Will try this, stand by.
-----------
EDIT: It WORKED!!! thank you men


Re: Respuesta: Re: /restart - EAsT-OAK_510 - 11.01.2013

Quote:
Originally Posted by Lauder
Посмотреть сообщение
Will try this, stand by.
-----------
EDIT: It WORKED!!! thank you men
You are welcome.