15.11.2017, 20:42
This one is better, and you won't need to script the loop inside every time command.
PHP Code:
#define SetTimeForAll(0%, %1) for(new i; i<MAX_PLAYERS; i++) { SetPlayerTime(i, 0%, %1) }
PHP Code:
CMD:day(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] <= 2) return SendClientMessage(playerid, COLOR_RED, "ERROR: Insufficient Permissions!");
SetTimeForAll(12,0);
SendClientMessageToAll(COLOR_RED, "Server's time has been set to day time!");
return 1;
}