- Documentation
- Server functions
- resetWorldProperties
Function
resetWorldProperties
Clears most world settings stored by scripts at once: named properties, colour filter, fog, sun and moon size, rain, grain, blur, drawing distances, waves, birds, reflections, shadows, furniture, muted sounds, game speed and minute length. Unless you pass false, it also clears special properties, garages, glitches and the jetpack weapon setting.
Syntax
bool resetWorldProperties([bool resetSpecialProperties = true, bool resetGarages = true, bool resetGlitches = true, bool resetJetpackWeapons = true])Arguments
resetSpecialPropertiesbool, optional = true- Clear special properties.
resetGaragesbool, optional = true- Clear garage state.
resetGlitchesbool, optional = true- Clear glitches.
resetJetpackWeaponsbool, optional = true- Clear the jetpack weapon setting.
Differences from MTA:SA
- These MTA:SA arguments are not here:
bool resetSounds = true,bool resetGlitches = true,bool resetJetpackWeapons = true
In MTA:SA
resetWorldProperties(bool resetSpecialProperties = true, bool resetWorldProperties = true, bool resetWeatherProperties = true, bool resetLODs = true, bool resetSounds = true, bool resetGlitches = true, bool resetJetpackWeapons = true)Returns
Always true.
Example
addEventHandler("onResourceStop", resourceRoot, function()
resetWorldProperties(true, true, true, true)
end)
See also
resetWorldPropertyClears one named property fromsetWorldProperty.setWorldSpecialPropertyEnabledTurns a special world property on or off:hovercars,aircars,extrabunny,extrajump,randomfoliage,snipermoon,extraairresistance,underworldwarp,vehiclesunglare,coronaztest,watercreatures,burnflippedcars,fireballdestruct,roadsignstext,extendedwatercannons,tunnelweatherblend,ignorefirestate,flyingcomponents,vehicleburnexplosions,vehicle_engine_autostart.vehicle_engine_autostartreally works: turned off, a car engine does not start by itself when a driver gets in and must be turned on withsetVehicleEngineState.