SetWorldTime
From SA-MP Wiki
(Difference between revisions)
Revision as of 18:00, 27 April 2014 MP2 (Talk | contribs) ← Previous diff |
Revision as of 16:55, 10 May 2015 MP2 (Talk | contribs) Next diff → |
||
Line 4: | Line 4: | ||
{{Parameters|hour}} | {{Parameters|hour}} | ||
- | {{Param|hour|The hour to set. It is not possible to set the minutes.}} | + | {{Param|hour|The hour to set (0-23)}} |
{{NoReturn}} | {{NoReturn}} | ||
+ | |||
+ | {{Tip|To set the minutes and/or to set the time for individual players, see [[SetPlayerTime]].}} | ||
{{Example}} | {{Example}} |
Revision as of 16:55, 10 May 2015
Description:
Sets the world time (for all players) to a specific hour.
(hour)
hour | The hour to set (0-23) |
Return Values:
This function does not return any specific values.
Tip | To set the minutes and/or to set the time for individual players, see SetPlayerTime. |
Example Usage:
// Set the time to 12 o'clock (noon) SetWorldTime(12);
Note | This function is only relevant for players that do not use a passing clock - see TogglePlayerClock. |
Related Functions
The following functions may be useful, as they are related to this function in one way or another.
- SetPlayerTime: Set a player's time.
- SetWeather: Set the global weather.
- SetGravity: Set the global gravity.