ResetWorldProperties: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
m (Move unnecessary note section to desc)
 
Line 1: Line 1:
__NOTOC__  
__NOTOC__  
{{Shared function}}
{{Shared function}}
{{New feature/item|3.0161|1.6.0|22741|This function resets all world properties to default.}}
{{New feature/item|3.0161|1.6.0|22741|This function resets all world properties to default.


==Syntax==
<syntaxhighlight lang="lua">nil resetWorldProperties( [ bool resetSpecialProperties = true, bool resetWorldProperties = true, bool resetWeatherProperties = true, bool resetLODs = true, bool resetSounds = true, bool resetGlitches = true, bool resetJetpackWeapons = true ] )</syntaxhighlight>
===Optional arguments===
{{OptionalArg}}
* '''resetSpecialProperties:''' Restores all special world properties changed by [[setWorldSpecialPropertyEnabled]] to default.
* '''resetWorldProperties:''' Reset all world properties changed by [[setWorldProperty]].
* '''resetWeatherProperties:''' Reset all weather properties like heat haze, rain level, sun color etc.
* '''resetLODs:''' Reset vehicles and peds lod distance.
* '''resetSounds:''' Restore interior sounds, world sounds and ambient sounds.
<section name="Server" class="server" show="true">
* '''resetGlitches:''' Disable all glitches enabled by [[setGlitchEnabled]].
* '''resetJetpackWeapons:''' Reset jetpack weapons changes by [[setJetpackWeaponEnabled]] to default (uzi, pistol, tec9).
</section>
===Note===
Regardless of the value of the arguments, the following properties are reset:
Regardless of the value of the arguments, the following properties are reset:
* Far clip distance
* Far clip distance
Line 38: Line 23:
* Game time freeze
* Game time freeze
* Dynamic ped shadows
* Dynamic ped shadows
}}
==Syntax==
<syntaxhighlight lang="lua">nil resetWorldProperties( [ bool resetSpecialProperties = true, bool resetWorldProperties = true, bool resetWeatherProperties = true, bool resetLODs = true, bool resetSounds = true, bool resetGlitches = true, bool resetJetpackWeapons = true ] )</syntaxhighlight>
===Optional arguments===
{{OptionalArg}}
* '''resetSpecialProperties:''' Restores all special world properties changed by [[setWorldSpecialPropertyEnabled]] to default.
* '''resetWorldProperties:''' Reset all world properties changed by [[setWorldProperty]].
* '''resetWeatherProperties:''' Reset all weather properties like heat haze, rain level, sun color etc.
* '''resetLODs:''' Reset vehicles and peds lod distance.
* '''resetSounds:''' Restore interior sounds, world sounds and ambient sounds.
<section name="Server" class="server" show="true">
* '''resetGlitches:''' Disable all glitches enabled by [[setGlitchEnabled]].
* '''resetJetpackWeapons:''' Reset jetpack weapons changes by [[setJetpackWeaponEnabled]] to default (uzi, pistol, tec9).
</section>


===Returns===
===Returns===

Latest revision as of 17:12, 11 November 2025

ADDED/UPDATED IN VERSION 1.6.0 r22741:
This function resets all world properties to default.

Regardless of the value of the arguments, the following properties are reset:

  • Far clip distance
  • Near clip distance
  • Clouds (enabled)
  • Birds (enabled)
  • Occlusions (enabled)
  • Gravity
  • Game speed
  • Aircraft max height & velocity
  • Jetpack max height
  • Interior furnitures (enabled)
  • Minute duration
  • Blur level
  • Corona reflections
  • Traffic lights locked state
  • Water level and color
  • Wave height
  • Volumetric shadows
  • Game time freeze
  • Dynamic ped shadows

Syntax

nil resetWorldProperties( [ bool resetSpecialProperties = true, bool resetWorldProperties = true, bool resetWeatherProperties = true, bool resetLODs = true, bool resetSounds = true, bool resetGlitches = true, bool resetJetpackWeapons = true ] )

Optional arguments

NOTE: When using optional arguments, you might need to supply all arguments before the one you wish to use. For more information on optional arguments, see optional arguments.

  • resetSpecialProperties: Restores all special world properties changed by setWorldSpecialPropertyEnabled to default.
  • resetWorldProperties: Reset all world properties changed by setWorldProperty.
  • resetWeatherProperties: Reset all weather properties like heat haze, rain level, sun color etc.
  • resetLODs: Reset vehicles and peds lod distance.
  • resetSounds: Restore interior sounds, world sounds and ambient sounds.
Click to collapse [-]
Server

Returns

This function returns nothing (nil).

Example

resetWorldProperties()

See Also