ResetWorldProperties: Difference between revisions
Jump to navigation
Jump to search
m (→Note) |
Fernando187 (talk | contribs) 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. | ||
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
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- resetGlitches: Disable all glitches enabled by setGlitchEnabled.
- resetJetpackWeapons: Reset jetpack weapons changes by setJetpackWeaponEnabled to default (uzi, pistol, tec9).
Returns
This function returns nothing (nil).
Example
resetWorldProperties()
See Also
- areTrafficLightsLocked
- getAircraftMaxHeight
- getAircraftMaxVelocity
- getCloudsEnabled
- getFarClipDistance
- getFogDistance
- getGameSpeed
- getGravity
- getHeatHaze
- getInteriorSoundsEnabled
- getJetpackMaxHeight
- getMinuteDuration
- getMoonSize
- getOcclusionsEnabled
- getRainLevel
- getSunColor
- getSunSize
- getTime
- getTrafficLightState
- getWeather
- getWindVelocity
- getSkyGradient
- getZoneName
- isGarageOpen
- removeWorldModel
- resetFarClipDistance
- resetFogDistance
- resetHeatHaze
- resetMoonSize
- resetRainLevel
- resetSkyGradient
- resetSunColor
- resetSunSize
- resetWindVelocity
- restoreAllWorldModels
- restoreWorldModel
- setAircraftMaxHeight
- setAircraftMaxVelocity
- setCloudsEnabled
- setFarClipDistance
- setFogDistance
- setGameSpeed
- setGarageOpen
- setGravity
- setHeatHaze
- setInteriorSoundsEnabled
- setMinuteDuration
- setMoonSize
- setOcclusionsEnabled
- setRainLevel
- setSkyGradient
- setSunColor
- setSunSize
- setTime
- setTrafficLightState
- setTrafficLightsLocked
- setWeather
- setWeatherBlended
- setWindVelocity
- setJetpackMaxHeight