From SA-MP Wiki

Jump to: navigation, search


Set a player's weather.

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

Return Values:

  • 1: The function was 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;


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

Related Functions

The following functions may be helpful as they relate to this function in one way or another.

Personal tools
In other languages