World::setWeatherTransition: Difference between revisions
(Added example) |
|||
| Line 9: | Line 9: | ||
mp.world.setWeatherTransition("CLEARING", 600000); // Set's the server's weather to 'CLEARING' with 10 minutes transition | mp.world.setWeatherTransition("CLEARING", 600000); // Set's the server's weather to 'CLEARING' with 10 minutes transition | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Note: the second use with duration field seems to be buggy, it has graphical issues with transition from SMOG to FOGGY weather (and probably with some other weather), so right now the best choise would be to do weather transition on client side and sync it manually. | |||
==See Also== | ==See Also== | ||
[[Weather]] | [[Weather]] | ||
{{World_definition}} | {{World_definition}} | ||
Revision as of 11:35, 10 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
Note: the second use with duration field seems to be buggy, it has graphical issues with transition from SMOG to FOGGY weather (and probably with some other weather), so right now the best choise would be to do weather transition on client side and sync it manually.