24.02.2013, 17:14
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.
}