跳到主要内容

SetWorldTime

Description

Sets the world time (for all players) to a specific hour.

NameDescription
hourThe hour to set (0-23)

Returns

This function does not return any specific values.

Examples

// Set the time to 12 o'clock (noon)
SetWorldTime(12);

Notes

提示

This function is only relevant for players that do not use a passing clock - see TogglePlayerClock.

提示

To set the minutes and/or to set the time for individual players, see SetPlayerTime.