Server restart CMD help.
#3

Requires ZCMD or YCMD and sscanf.
pawn Код:
CMD:arestart(playerid, params[]) {
    new seconds;
    if(sscanf(params, "d", seconds))
        return SendClientMessage(playerid, -1, "/arestart (seconds)");
    SetTimer("restarttimer", seconds, false); // Starts the timer with the amount of seconds you entered.
    return true;
}

forward restarttimer();
public restarttimer() {
    // Saving stuff here.
    SendRconCommand("gmx"); // As soon as the timer finishes it'll restart the server.
}
Reply


Messages In This Thread
Server restart CMD help. - by Aarab - 24.02.2013, 17:06
Re: Server restart CMD help. - by Misiur - 24.02.2013, 17:10
Re: Server restart CMD help. - by Boolean - 24.02.2013, 17:14
Re: Server restart CMD help. - by Aarab - 24.02.2013, 17:21
Re: Server restart CMD help. - by ZeroCools - 24.02.2013, 20:22

Forum Jump:


Users browsing this thread: 2 Guest(s)