GetWeather: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
Line 4: Line 4:
==Syntax==
==Syntax==
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
int getWeather ( void )
int getWeather()
</syntaxhighlight>
</syntaxhighlight>



Revision as of 20:49, 2 August 2007

This function returns the current weather id.

Syntax

int getWeather()

Returns

Returns an integer indicating the weather type that is currently active. This can vary from area to area of the map.

Example

This example outputs the current weather ID in that chat box.

local weatherID = getWeather()
outputChatBox ( "The current weather ID is " .. weatherID )

See Also