GetVehiclesLODDistance: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 12: Line 12:
* '''float:''' general distance used for most vehicles
* '''float:''' general distance used for most vehicles
* '''float:''' distance used for trains and planes
* '''float:''' distance used for trains and planes
==Example==
This example shows the lod distance of vehicles
<syntaxhighlight lang="lua">
addEventHandler("onClientResourceStart",resourceRoot,function()
local vehicles,planes_trains = getVehiclesLODDistance()
outputChatBox("general distance of most vehicles: "..math.floor(vehicles),0,255,0)
outputChatBox("distance of planes and trains: "..math.floor(planes_trains),0,255,0)
end)
</syntaxhighlight>


==See Also==
==See Also==

Revision as of 11:47, 16 July 2017

Accessories-text-editor.png Script Example Missing Function GetVehiclesLODDistance needs a script example, help out by writing one.

Before submitting check out Editing Guidelines Script Examples.

Returns the distance of vehicles LOD.

Syntax

float, float getVehiclesLODDistance ( )

Returns

  • float: general distance used for most vehicles
  • float: distance used for trains and planes

Example

This example shows the lod distance of vehicles

addEventHandler("onClientResourceStart",resourceRoot,function()
	local vehicles,planes_trains = getVehiclesLODDistance()
	outputChatBox("general distance of most vehicles: "..math.floor(vehicles),0,255,0)
	outputChatBox("distance of planes and trains: "..math.floor(planes_trains),0,255,0)
end)

See Also