08.04.2013, 23:31
Something like this?
Or you need the automatic time change?
Код:
if(strcmp(cmd, "/tod", true) == 0)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_GRAD2, "Usage: /tod [timeofday] (0-23)");
if(PlayerInfo[playerid][pAdmin] >= 1337) return SendClientMessage(playerid, COLOR_GRAD1, " You are not authorized to use that command!");
for(new i = 0; i < MAX_PLAYERS; i++) if(IsPlayerConnected) SetPlayerTime(i, strval(tmp), 0);
format(string, sizeof(string), " Time set to %d:00.", strval(tmp));
return BroadCast(COLOR_GRAD1, string);
}

