Squirrel/Server/Functions/Game/SetTime
From Liberty Unleashed Wiki
(Difference between revisions)
Line 1: | Line 1: | ||
− | + | {{Squirrel/Title|SetTime}} | |
Changes the server world time. This affects all players. | Changes the server world time. This affects all players. | ||
Latest revision as of 10:46, 11 October 2010
Changes the server world time. This affects all players.
[edit] Syntax
bool SetTime( int hour, int min )
[edit] Arguments
- hour - The number of hours you want to change the server time to
- min - The number of minutes you want to change the server time to
[edit] Example
This command will change the server time to 12:00 when somebody types '/settime 12 00'.
function onPlayerCommand( plr, cmd, text ) { if ( cmd == "settime" ) { local aTime = split( text, " " ); local szHour = aTime[0], szMin = aTime[1]; SetTime( szHour.tointeger(), szMin.tointeger() ); } }
[edit] Notes
The call onPlayerCommand was used in in this example. More info about this in the corresponding page.
[edit] Related Functions
- CloseGarage
- CloseSSVBridge
- EnableTrains
- GetBoundariesLower
- GetBoundariesUpper
- GetFriendlyFire
- GetGamespeed
- GetGravity
- GetHour
- GetIslands
- GetMinute
- GetSSVBridgeLock
- GetSSVBridgeUpdateTime
- GetSurfaceTraction
- GetTimeLock
- GetWeather
- GetWeatherLock
- IsSSVBridgeUp
- OpenGarage
- OpenSSVBridge
- SetBoundaries
- SetFriendlyFire
- SetGamespeed
- SetGravity
- SetIslands
- SetSSVBridgeLock
- SetSSVBridgeUpdateTime
- SetSurfaceTraction
- SetTime
- SetTimeLock
- SetWeather
- SetWeatherLock