SetVehiclesLODDistance: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
m (Mark optional params in syntax)
Line 6: Line 6:
==Syntax==
==Syntax==
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
bool setVehiclesLODDistance ( float vehiclesDistance, float trainsAndPlanesDistance = vehiclesDistance * 2.14 )
bool setVehiclesLODDistance(float vehiclesDistance [, float trainsAndPlanesDistance = vehiclesDistance * 2.14 ])
</syntaxhighlight>
</syntaxhighlight>
===Required Arguments===  
===Required Arguments===  

Revision as of 13:24, 5 August 2021

Sets the distance of vehicles LOD.

Syntax

bool setVehiclesLODDistance(float vehiclesDistance [, float trainsAndPlanesDistance = vehiclesDistance * 2.14 ])

Required Arguments

  • vehiclesDistance: general distance used for most vehicles, this value is clamped to 0 – 500

Optional Arguments

  • trainsAndPlanesDistance: distance used for trains and planes, this value is clamped to 0 – 500

Example

addEventHandler("onClientResourceStart",resourceRoot,function()
	setVehiclesLODDistance(10)
end)

See Also