GetGameSpeed: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
{{Server client function}} | {{Server client function}} | ||
__NOTOC__ | __NOTOC__ | ||
This function gets the current game speed value. | This function gets the current game speed value. | ||
==Syntax== | ==Syntax== | ||
<syntaxhighlight lang="lua">getGameSpeed()</syntaxhighlight> | <syntaxhighlight lang="lua">int getGameSpeed()</syntaxhighlight> | ||
===Returns=== | |||
Returns a ''int''. | |||
==Example== | ==Example== | ||
<section name="Server and Client" class="both" show="true"> | |||
This example adds a 'gamespeed' console command that prints the game speed to the chat box. | This example adds a 'gamespeed' console command that prints the game speed to the chat box. | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
Line 16: | Line 19: | ||
addCommandHandler ( "gamespeed", gamespeedvalue ) | addCommandHandler ( "gamespeed", gamespeedvalue ) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
</section> | |||
==See Also== | ==See Also== | ||
{{World functions}} | {{World functions}} |
Revision as of 12:00, 14 May 2009
This function gets the current game speed value.
Syntax
int getGameSpeed()
Returns
Returns a int.
Example
Click to collapse [-]
Server and ClientThis example adds a 'gamespeed' console command that prints the game speed to the chat box.
function gamespeedvalue ( ) local speed = getGameSpeed ( ) outputChatbox ( "Gamespeed is currently set to " .. speed .. "." ) end addCommandHandler ( "gamespeed", gamespeedvalue )
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