15.11.2017, 19:28
Code:
CMD:day(playerid, params[]) { if(PlayerInfo[playerid][pAdmin] <= 2) return SendClientMessage(playerid, COLOR_RED, "ERROR: Insufficient Permissions!"); for(new i = 0; i < MAX_PLAYERS; i++) { SetPlayerTime(i, 12, 0); SendClientMessageToAll(COLOR_RED, "Server's time has been set to day time!"); } return 1; }
And if I make it that way:
Code:
CMD:day(playerid, params[]) { if(PlayerInfo[playerid][pAdmin] <= 2) return SendClientMessage(playerid, COLOR_RED, "ERROR: Insufficient Permissions!"); for(new i = 0; i < MAX_PLAYERS; i++) { SetPlayerTime(i, 12, 0); SendClientMessageToAll(COLOR_RED, "Server's time has been set to day time!"); return 1; } return 1; }
Please can somebody fix my problem and explain the reasons, thanks.
Btw, I know that I can use SetWorldTime(12) but anyway I just want to know if it possible to make it like I did.