World::setWeatherTransition: Difference between revisions
mNo edit summary |
(Added example) |
||
| Line 4: | Line 4: | ||
==Example== | ==Example== | ||
<syntaxhighlight lang="javascript"> | <syntaxhighlight lang="javascript"> | ||
mp.world.setWeatherTransition("CLEARING"); // Set's the server's weather to 'CLEARING' | mp.world.setWeatherTransition("CLEARING"); // Set's the server's weather to 'CLEARING' immediately | ||
</syntaxhighlight> | |||
<syntaxhighlight lang="javascript"> | |||
mp.world.setWeatherTransition("CLEARING", 600000); // Set's the server's weather to 'CLEARING' with 10 minutes transition | |||
</syntaxhighlight> | </syntaxhighlight> | ||
Revision as of 19:20, 7 September 2019
This function start a weather transition to the weather specified and sync it to all clients.
Example
mp.world.setWeatherTransition("CLEARING"); // Set's the server's weather to 'CLEARING' immediately
mp.world.setWeatherTransition("CLEARING", 600000); // Set's the server's weather to 'CLEARING' with 10 minutes transition