Function SetPlayerTime sets the game time for a player. If a player's clock is enabled (TogglePlayerClock) the time displayed by it will update automatically.
Using this function under OnPlayerConnect doesn't work.

(playerid, hour, minute)
int playerid The ID of the player to set the game time of.
int hour Hour to set (0-23).
int minute Minutes to set (0-59).

Return Values:
  • 1: The function was executed successfully.
  • 0: The function failed to execute. The player specified does not exist.

SetPlayerTime(playerid, 12, 0); // Noon
SetPlayerTime(playerid, 0, 0); // Midnight

Related Functions
The following functions may be useful, as they are related to this function in one way or another.