29.12.2013, 09:40
Hello guys, I need to make this time command to have 2 usages. First usage I have done. It is /restart HOUR MIN but I want to make this command when player enters /restart SEC, when he just type one integer I want to make it for seconds. But dont know how to add it to the command. Code:
Thx.
pawn Код:
YCMD:restart (playerid, params [], help)
{
if (!IsPlayerAdmin (playerid)) return SendClientMessage (playerid, -1, "You must be main administrator to use this command!");
new string [128];
if (sscanf (params, "ii", restarth, restartm)) return SendClientMessage (playerid, -1, "You have entered wrong format of command. Use: /restart HOUR MINUTE");
format (string, sizeof (string), "Administrator set server restart today, in time: %d:%d", restarth, restartm);
SendClientMessageToAll (-1, string);
SetTimer ("RLTimeRestart", 1000*60, false);
return true;
}
