- Documentation
- Server functions
- setRainLevel
Function
setRainLevel
Sets the rain level 0-10. The value is stored for compatibility with existing scripts (getRainLevel) but does not change the in-game rain; rain comes from the weather (setWeather).
Syntax
bool setRainLevel(float level)Arguments
levelfloat- Level 0-10.
Returns
true on success.
Example
setWeather(16)
setRainLevel(5)
See also
getRainLevelReturns the rain level stored withsetRainLevel(0 by default). Works on the server and the client.resetRainLevelRestores the default rain level (0).setWeatherChanges the weather immediately for every player. Numbers 0-22 are San Andreas weathers, e.g. 0 extra sunny, 1-7 different mixes of sun and clouds, 8 storm, 9 fog, 16 rain, 19 sandstorm. It stops a smooth change started withsetWeatherBlended.