GetTime: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
{{Server client function}} | |||
This function is used to get the current time in the game. | |||
==Syntax== | ==Syntax== | ||
<syntaxhighlight lang="lua">getTime ()</syntaxhighlight> | <syntaxhighlight lang="lua">getTime ()</syntaxhighlight> | ||
===Returns=== | |||
Returns two ''ints'' that represent hours and minutes. | |||
==Example== | ==Example== | ||
<syntaxhighlight lang="lua">hour, | <syntaxhighlight lang="lua"> | ||
outputChatBox ( "The current time is " | local hour, mins = getTime () | ||
outputChatBox ( "The current time is ".. hour ..":".. mins ) | |||
</syntaxhighlight> | |||
==See Also== | ==See Also== | ||
{{World functions}} | {{World functions}} |
Revision as of 16:33, 10 August 2007
This function is used to get the current time in the game.
Syntax
getTime ()
Returns
Returns two ints that represent hours and minutes.
Example
local hour, mins = getTime () outputChatBox ( "The current time is ".. hour ..":".. mins )
See Also
- areTrafficLightsLocked
- getAircraftMaxHeight
- getAircraftMaxVelocity
- getCloudsEnabled
- getFarClipDistance
- getFogDistance
- getGameSpeed
- getGravity
- getHeatHaze
- getInteriorSoundsEnabled
- getJetpackMaxHeight
- getMinuteDuration
- getMoonSize
- getOcclusionsEnabled
- getRainLevel
- getSunColor
- getSunSize
- getTime
- getTrafficLightState
- getWeather
- getWindVelocity
- getSkyGradient
- getPlayerBlurLevel
- getZoneName
- isGarageOpen
- removeWorldModel
- resetFarClipDistance
- resetFogDistance
- resetHeatHaze
- resetMoonSize
- resetRainLevel
- resetSkyGradient
- resetSunColor
- resetSunSize
- resetWindVelocity
- restoreAllWorldModels
- restoreWorldModel
- setAircraftMaxHeight
- setAircraftMaxVelocity
- setCloudsEnabled
- setFarClipDistance
- setFogDistance
- setGameSpeed
- setGarageOpen
- setGravity
- setHeatHaze
- setInteriorSoundsEnabled
- setMinuteDuration
- setMoonSize
- setOcclusionsEnabled
- setRainLevel
- setSkyGradient
- setSunColor
- setSunSize
- setTime
- setTrafficLightState
- setTrafficLightsLocked
- setWeather
- setWeatherBlended
- setWindVelocity
- setJetpackMaxHeight
- setPlayerBlurLevel