Squirrel/Server/Functions/Game/SetWeather

From Liberty Unleashed Wiki
(Difference between revisions)
Jump to: navigation, search
(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 20:06, 26 November 2009

Changes the weather in the server. This affects all players.

Syntax

  1. 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'.

  1.  
  2. function OnPlayerCommand( id, cmd, text )
  3. {
  4. if ( cmd == "setweather" )
  5. {
  6. SetWeather( text.tointeger() );
  7. }
  8. }
  9.  

Notes

The call OnPlayerCommand was used in in this example. More info about this in the corresponding page.

Related Functions

Template:Squirrel/Functions/Game

Personal tools
Namespaces

Variants
Actions
Navigation
scripting
Toolbox