SetPlayerWeather

From SA-MP Wiki

Jump to: navigation, search


Description:

Set a player's weather.


Parameters:
(playerid, weather)
playeridThe ID of the player whose weather to set.
weatherThe weather to set.


Return Values:

  • 1: The function executed successfully.
  • 0: The function failed to execute. This means the player specified does not exist.


public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext, "/storm", true))
    {
        SetPlayerWeather(playerid, 8);
        return 1;
    }
    return 0;
}
Tip

Image:Light_bulb_icon.png

If TogglePlayerClock is enabled, weather will slowly change over time, instead of changing instantly.


Related Functions

The following functions may be useful, as they are related to this function in one way or another.

In other languages