SetWeather: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
__NOTOC__
__NOTOC__
This function sets the current weather id to the given value.
This function instantly sets the current weather id to the given value.
 
To change the weather gradually, see [[setWeatherBlended]].


==Syntax==
==Syntax==
Line 14: Line 16:


==Example==
==Example==
This example will change the weather to foggy.
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
setWeather ( 9 )
setWeather ( 9 )

Revision as of 13:42, 20 May 2006

This function instantly sets the current weather id to the given value.

To change the weather gradually, see setWeatherBlended.

Syntax

bool setWeather ( int weatherID )

Required Arguments

  • weatherID: The new weather id. Valid values are 0 to 19 inclusive.

Returns

Returns true if the weather was set succesfully, false if an invalid weatherID was specified.

Example

This example will change the weather to foggy.

setWeather ( 9 )
outputChatBox ( "Weather changed to foggy!" )

Template:World Functions