/restart
#1

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

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

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

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

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;
}
Reply
#6

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;
}
??
Reply
#7

In case he's using the old method:

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

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
Reply
#9

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


Forum Jump:


Users browsing this thread: 1 Guest(s)