SetWeather: 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 instantly sets the current weather id to the given value. | This function instantly sets the current weather id to the given value. | ||
Line 16: | Line 17: | ||
==Example== | ==Example== | ||
<section name="Server" class="server" show="true"> | |||
This example will change the weather to foggy. | This example will change the weather to foggy. | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
Line 21: | Line 23: | ||
outputChatBox ( "Weather changed to foggy!" ) | outputChatBox ( "Weather changed to foggy!" ) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
</section> | |||
==See Also== | ==See Also== | ||
{{World functions}} | {{World functions}} |
Revision as of 16:07, 4 August 2007
This function instantly sets the current weather id to the given value.
To change the weather gradually, see setWeatherBlended.
Syntax
bool setWeather ( int weatherID )
Required Arguments
- weatherID: The new weather id. Valid values are 0 to 19 inclusive.
Returns
Returns true if the weather was set succesfully, false if an invalid weatherID was specified.
Example
Click to collapse [-]
ServerThis example will change the weather to foggy.
setWeather ( 9 ) outputChatBox ( "Weather changed to foggy!" )
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