Squirrel/Server/Functions/Game/GetWeather
From Liberty Unleashed Wiki
(Difference between revisions)
(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
int GetWeather()
Arguments
- None
Example
This command will tell player the current weather ID when they type '/weather'.
function OnPlayerCommand( id, cmd, text ) { if ( cmd == "weather" ) { MessagePlayer( "Server weather ID is: " + GetWeather(), id ); } }
Notes
The function MessagePlayer and call OnPlayerCommand were used in in this example. More info about them in corresponding pages.