let weatherName = "XMAS"; // Наша погода
mp.game.gameplay.setWeatherTypeOverTime(weatherName, 0);
if (weatherName == "XMAS" || weatherName == "SNOWLIGHT" || weatherName == "BLIZZARD" || weatherName == "SNOW")
{
mp.game.streaming.requestNamedPtfxAsset("core_snow");
while (!mp.game.streaming.hasNamedPtfxAssetLoaded("core_snow"))
await methods.sleep(10);
}
mp.game.gameplay.setWeatherTypePersist(weatherName);
mp.game.gameplay.setWeatherTypeNowPersist(weatherName);
mp.game.gameplay.setWeatherTypeNow(weatherName);
mp.game.gameplay.setOverrideWeather(weatherName);
// Включить
mp.game.graphics.setForceVehicleTrails(true);
mp.game.graphics.setForcePedFootstepsTracks(true);
mp.game.gameplay.setOverrideWeather("XMAS");
mp.game.audio.requestScriptAudioBank("ICE_FOOTSTEPS", false);
mp.game.audio.requestScriptAudioBank("SNOW_FOOTSTEPS", false);
mp.game.graphics.setPtfxAssetNextCall("core_snow");
//
mp.game.invoke("0x6E9EF3A33C8899F8", true); // Enable snow textures
mp.game.invoke("0x7F06937B0CDCBC1A", 1.0); // Snow intensity
// ====================================== //
// Выключить
mp.game.audio.releaseNamedScriptAudioBank("ICE_FOOTSTEPS");
mp.game.audio.releaseNamedScriptAudioBank("SNOW_FOOTSTEPS");
mp.game.graphics.setForceVehicleTrails(false);
mp.game.graphics.setForcePedFootstepsTracks(false);
mp.game.streaming.removeNamedPtfxAsset("core_snow");
//
mp.game.invoke("0x6E9EF3A33C8899F8", false); // Disable snow textures
mp.game.invoke("0x7F06937B0CDCBC1A", 0.0); // Snow intensity