SetRainLevel: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 10: | Line 10: | ||
===Required Arguments=== | ===Required Arguments=== | ||
*'''level:''' A floating point number representing the rain level. 1 represents the maximum rain level usually available in GTA, but higher values are accepted. | *'''level:''' A floating point number representing the rain level. 1 represents the maximum rain level usually available in GTA, but higher values are accepted. | ||
** '''Note:''' The level value is clamped between 0.0 and 10.0 to avoid gameplay issues. | |||
===Returns=== | ===Returns=== |
Revision as of 00:56, 19 May 2017
This function sets the rain level to any weather available in GTA. Use resetRainLevel to undo the changes.
Syntax
bool setRainLevel ( float level )
Required Arguments
- level: A floating point number representing the rain level. 1 represents the maximum rain level usually available in GTA, but higher values are accepted.
- Note: The level value is clamped between 0.0 and 10.0 to avoid gameplay issues.
Returns
Returns true if the rain level was set, false otherwise.
Example
Click to collapse [-]
ClientThis example will make it rain when you enter a vehicle and stop it when you leave the vehicle.
function startRaining() setRainLevel(5) end addEventHandler("onClientVehicleEnter", getRootElement(), startRaining) function stopRaining() resetRainLevel() end addEventHandler("onClientVehicleExit", getRootElement(), stopRaining)
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