Scripting/Squirrel/Functions/Game/SetWeather
From VC-MP Wiki
This function changes the server weather for all players.
Syntax
bool SetWeather( int weather )
Arguments
- weather - The weather ID to be set
Example
This example will change the server weather when someone types '/c setweather 1'.
function onPlayerCommand( player, cmd, text ) { if ( cmd == "setweather" ) { SetWeather( text.tointeger() ); } }
Notes
The call onPlayerCommand was also used in the example. More info about this in the corresponding page.
Related Functions
- GetHour
- SetHour
- GetMinute
- SetMinute
- SetTime
- GetTimeRate
- SetTimeRate
- GetWeather
- SetWeather
- GetWeatherRate
- SetWeatherRate
- GetWeatherLock
- SetWeatherLock
- SetAmmuWeapon
- IsAmmuWeaponEnabled
- SetAmmuWeaponEnabled
- CreateMarker
- CreateMarkerForPlayer
- GetWeaponSync
- SetWeaponSync
- GetGravity
- SetGravity
- GetGamespeed
- SetGamespeed
- GetWaterLevel
- SetWaterLevel
