06.05.2011, 11:40
How to do so when I write /tod 200, appears to me that "You can not set a time before 0 and after 23 hours"? Thanks in advance
Код:
if(strcmp(cmd, "/tod", true) == 0) { if(IsPlayerConnected(playerid)) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_WHITE, "USAGE: /tod [0-23]"); return 1; } new hour; hour = strval(tmp); if (PlayerInfo[playerid][pAdmin] >= 4) { SetWorldTime(hour); format(string, sizeof(string), "Weather is set to %d hours.", hour); SendClientMessageToAll(COLOR_GRAD1, string); } else { SendClientMessage(playerid, COLOR_GRAD1, "You are not an admin!"); } } return 1; }