Scripting/Squirrel/Functions/Game/SetWeather

From VC-MP Wiki

Jump to: navigation, search

This function changes the server weather for all players.

Syntax

bool SetWeather( int weather )

Arguments

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

Personal tools
squirrel scripting