SetCloudsEnabled: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
(Replace to predefined variables.) |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 16: | Line 16: | ||
==Example== | ==Example== | ||
<section name="Server" class="server" show="true"> | <section name="Server" class="server" show="true"> | ||
This example | This example disables clouds for all players when resource starts. | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
function | function onResourceStart() | ||
setCloudsEnabled ( false ) | setCloudsEnabled(false) | ||
end | end | ||
addEventHandler ( "onResourceStart", | addEventHandler("onResourceStart", resourceRoot, onResourceStart) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
</section> | </section> | ||
Line 27: | Line 27: | ||
==See Also== | ==See Also== | ||
{{World functions}} | {{World functions}} | ||
[[ru:setCloudsEnabled]] |
Latest revision as of 23:16, 11 January 2023
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 when resource starts.
function onResourceStart() setCloudsEnabled(false) end addEventHandler("onResourceStart", resourceRoot, onResourceStart)
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