Squirrel/Server/Functions/Game/GetWeather

From Liberty Unleashed Wiki
(Difference between revisions)
Jump to: navigation, search
(New page: __NOTOC__ Returns the current weather in the server. == Syntax == <code>int GetWeather()</code> == Arguments == * '''None''' == Example == This command will tell player the current w...)

Revision as of 14:35, 20 October 2008

Returns the current weather in the server.

Syntax

  1. int GetWeather()

Arguments

  • None

Example

This command will tell player the current weather ID when they type '/weather'.

  1.  
  2. function OnPlayerCommand( id, cmd, text )
  3. {
  4. if ( cmd == "weather" )
  5. {
  6. MessagePlayer( "Server weather ID is: " + GetWeather(), id );
  7. }
  8. }
  9.  

Notes

The function MessagePlayer and call OnPlayerCommand were used in in this example. More info about them in corresponding pages.

Related Functions

Template:Squirrel/Functions/Game

Personal tools
Namespaces

Variants
Actions
Navigation
scripting
Toolbox