note Help Needed
This wiki is the result of an ongoing community effort — thank you all for helping!
If you want to provide changes to this page then please click here.
SetWeather
Description
Set the world weather for all players.
Name | Description |
---|---|
weatherid | The weather to set. |
Returns
This function does not return any specific values.
Examples
public OnPlayerCommandText(playerid, cmdtext[])
{
if (!strcmp(cmdtext, "/sandstorm", true))
{
SetWeather(19);
return 1;
}
return 1;
}
Notes
tip
- If TogglePlayerClock is enabled, weather will slowly change over time, instead of changing instantly.
- There are only valid 21 weather IDs in the game (0 - 20), however the game does not have any form of range check.
Related Functions
- GetWeather: Get the current world weather.
- SetPlayerWeather: Set a player's weather.
- SetGravity: Set the global gravity.