SetWeather: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 9: Line 9:


===Required Arguments===
===Required Arguments===
*'''weatherID''': The new weather id. Valid values are 0 to 255 inclusive.
*'''weatherID''': The ID of new [[weather]]. Valid values are 0 to 255 inclusive.


===Returns===
===Returns===

Revision as of 19:02, 8 December 2014

This function sets the current weather to the given valid value. To change the weather gradually, see setWeatherBlended.

Syntax

bool setWeather ( int weatherID )

Required Arguments

  • weatherID: The ID of new weather. Valid values are 0 to 255 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!" )

See Also

Shared