- Documentation
- Shared functions
- setWeather
Function
setWeather
Changes 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 with setWeatherBlended.
Syntax
bool setWeather(int id)Arguments
idint- Weather number 0-255 (meaningful 0-22).
Returns
true on success, false for an out-of-range number.
Example
addCommandHandler("pogoda", function(player, _, id)
if tonumber(id) then setWeather(tonumber(id)) end
end)
Notes
Client. In a client script - weather for this player only, until the next setWeather on the server.