engineGetModelLODDistance | Multi Theft Auto: Wiki Skip to content

engineGetModelLODDistance

Client-side
Server-side
Shared

Pair: engineSetModelLODDistance

This function gets the LOD distance for any object / model ID.

Note

You can use getVehiclesLODDistance for vehicles and getPedsLODDistance for peds.

OOP Syntax Help! I don't understand this!

  • Method:Engine.getModelLODDistance(...)

Syntax

float|false engineGetModelLODDistance ( ​int model )
Required arguments
  • model: The model / object ID number you want to get the LOD distance of.

Returns

Returns a float representing the LOD distance of the model, or false if the model argument is incorrect.

  • float|false: lod distance

Code Examples

client

This example calculates the actual LOD distance by taking into account the Video tab 'Draw distance' setting.

local LODDistance = engineGetModelLODDistance(1337)
local actualLODDistance = math.min(300, LODDistance * (dxGetStatus().SettingDrawDistance / 100 + 1))

See Also

Engine Functions