Squirrel/Server/Functions/Game/SetWeather
From Liberty Unleashed Wiki
(Difference between revisions)
(New page: __NOTOC__ Changes the weather in the server. This affects all players. == Syntax == <code>bool SetWeather( int weatherid )</code> == Arguments == * '''weatherid''' - The [[WeatherIDs|W...) |
Revision as of 14:37, 20 October 2008
Changes the weather in the server. This affects all players.
Syntax
bool SetWeather( int weatherid )
Arguments
- weatherid - The WeatherID you want to change the server weather to
Example
This will change the weather in the server when a player types '/setweather 1'.
function OnPlayerCommand( id, cmd, text ) { if ( cmd == "setweather" ) { SetWeather( text.tointeger() ); } }
Notes
The call OnPlayerCommand was used in in this example. More info about this in the corresponding page.