SetCloudsEnabled: Difference between revisions
Jump to navigation
Jump to search
Cazomino05 (talk | contribs) m (-.-) |
No edit summary |
||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
{{Server client function}} | {{Server client function}} | ||
This function will enable or disable clouds | This function will enable or disable clouds. This is useful for race maps which are placed high up as clouds can cause low FPS. | ||
==Syntax== | ==Syntax== | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
bool setCloudsEnabled( bool | bool setCloudsEnabled ( bool enabled ) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
===Required Arguments=== | ===Required Arguments=== | ||
*''' | *'''enabled:''' A [[boolean]] value determining if clouds should be shown. Use ''true'' to show clouds and ''false'' to hide them. | ||
===Returns=== | ===Returns=== | ||
Returns ''true'' if the | Returns ''true'' if the cloud state was changed succesfully, ''false'' if an invalid argument was specified. | ||
==Example== | ==Example== | ||
Line 20: | Line 19: | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
function disableClouds () | function disableClouds () | ||
setCloudsEnabled( false ) -- Hide the clouds for all players when the resource starts | setCloudsEnabled ( false ) -- Hide the clouds for all players when the resource starts | ||
end | end | ||
addEventHandler ( "onResourceStart", getResourceRootElement(getThisResource()), disableClouds ) | addEventHandler ( "onResourceStart", getResourceRootElement(getThisResource()), disableClouds ) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
</section> | </section> | ||
==See Also== | |||
{{World functions}} |
Revision as of 17:48, 7 June 2009
This function will enable or disable clouds. This is useful for race maps which are placed high up as clouds can cause low FPS.
Syntax
bool setCloudsEnabled ( bool enabled )
Required Arguments
- enabled: A boolean value determining if clouds should be shown. Use true to show clouds and false to hide them.
Returns
Returns true if the cloud state was changed succesfully, false if an invalid argument was specified.
Example
Click to collapse [-]
ServerThis example Disables clouds for all players
function disableClouds () setCloudsEnabled ( false ) -- Hide the clouds for all players when the resource starts end addEventHandler ( "onResourceStart", getResourceRootElement(getThisResource()), disableClouds )
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