SetWeather

From Multi Theft Auto: Wiki
Revision as of 16:07, 4 August 2007 by Norby89 (talk | contribs)
Jump to navigation Jump to search

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

Click to collapse [-]
Server

This example will change the weather to foggy.

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

See Also