ResetVehiclesLODDistance: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
mNo edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
{{Client function}}{{Needs Example}}__NOTOC__
__NOTOC__
{{Client function}}
{{New feature/item|3.0154|1.5.3|11199|
{{New feature/item|3.0154|1.5.3|11199|
Resets the distance of vehicles LOD to default. Default values depends on client setting. If client has enabled ''high detail vehicles'' in video options, value will be reset to (500, 500) - otherwise to (70, 150). You can check value of this option using [[dxGetStatus]] (''SettingHighDetailVehicles'').
Resets the distance of vehicles LOD to default. Default values depends on client setting. If client has enabled ''high detail vehicles'' in video options, value will be reset to (500, 500) - otherwise to (70, 150). You can check value of this option using [[dxGetStatus]] (''SettingHighDetailVehicles'').
Line 10: Line 11:


===Returns===
===Returns===
Returns true if the ambient sounds were reset, false otherwise.
Returns true if the vehicles LOD distance was reset, false otherwise.


==Example==
==Example==
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
function resetLOD()  
function resetLOD( )
resetVehiclesLODDistance() --This will reset the LOD distance
    resetVehiclesLODDistance( )
end
end
addCommandHandler("resetlod", resetLOD) -- If you use this command it would trigger the resetLOD function
addCommandHandler( "resetlod", resetLOD )
</syntaxhighlight>
</syntaxhighlight>


Line 23: Line 24:
* [[engineGetModelLODDistance]]
* [[engineGetModelLODDistance]]
* [[engineSetModelLODDistance]]
* [[engineSetModelLODDistance]]
{{World functions}}
{{Client world functions}}

Latest revision as of 23:16, 22 July 2018

Resets the distance of vehicles LOD to default. Default values depends on client setting. If client has enabled high detail vehicles in video options, value will be reset to (500, 500) - otherwise to (70, 150). You can check value of this option using dxGetStatus (SettingHighDetailVehicles).

Syntax

bool resetVehiclesLODDistance ( )

Returns

Returns true if the vehicles LOD distance was reset, false otherwise.

Example

function resetLOD( )
    resetVehiclesLODDistance( )
end
addCommandHandler( "resetlod", resetLOD )

See Also