SetWeatherBlended: 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__  
{{Server client function}}
This function will change the weather from the current weather (set using [[setWeather]]) to another weather state over a period of 60 seconds.
This function will change the weather from the current weather (set using [[setWeather]]) to another weather state over a period of 60 seconds.


Line 14: Line 15:


==Example==  
==Example==  
<section name="Server" class="server" show="true">
This example sets the weather to sunny, then makes it change to a foggy over the period of a minute.
This example sets the weather to sunny, then makes it change to a foggy over the period of a minute.
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
Line 21: Line 23:
setWeatherBlended ( 9 )
setWeatherBlended ( 9 )
</syntaxhighlight>
</syntaxhighlight>
</section>


==See Also==
==See Also==
{{World functions}}
{{World functions}}

Revision as of 16:07, 4 August 2007

This function will change the weather from the current weather (set using setWeather) to another weather state over a period of 60 seconds.

Syntax

bool setWeatherBlended ( int weatherID )

Required Arguments

  • weatherID: The ID of the weather state you wish to set. Valid values are 0 to 19 inclusive.

Returns

Returns true if successful, false if an invalid weatherID is passed.

Example

Click to collapse [-]
Server

This example sets the weather to sunny, then makes it change to a foggy over the period of a minute.

-- Set the weather to sunny
setWeather ( 0 )
-- Blend the weather to foggy
setWeatherBlended ( 9 )

See Also