<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.multitheftauto.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Mangalis</id>
	<title>Multi Theft Auto: Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.multitheftauto.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Mangalis"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/wiki/Special:Contributions/Mangalis"/>
	<updated>2026-04-03T21:03:08Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=DxDrawLine3D&amp;diff=67496</id>
		<title>DxDrawLine3D</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=DxDrawLine3D&amp;diff=67496"/>
		<updated>2020-10-10T15:19:04Z</updated>

		<summary type="html">&lt;p&gt;Mangalis: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Client function}} &lt;br /&gt;
This function draws a 3D line between two points in the 3D world - rendered for '''one''' frame.  This should be used in conjunction with [[onClientRender]] in order to display continuously.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool dxDrawLine3D ( float startX, float startY, float startZ, float endX, float endY, float endZ [, int color = 0xFFFFFFFF, float width = 1.0, bool postGUI = false ] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
* '''startX:''' The start X position of the 3D line, representing a coordinate in the GTA world.&lt;br /&gt;
* '''startY:''' The start Y position of the 3D line, representing a coordinate in the GTA world.&lt;br /&gt;
* '''startZ:''' The start Z position of the 3D line, representing a coordinate in the GTA world.&lt;br /&gt;
* '''endX:''' The end X position of the 3D line, representing a coordinate in the GTA world.&lt;br /&gt;
* '''endY:''' The end Y position of the 3D line, representing a coordinate in the GTA world.&lt;br /&gt;
* '''endZ:''' The end Z position of the 3D line, representing a coordinate in the GTA world.&lt;br /&gt;
&lt;br /&gt;
==Optional Arguments==&lt;br /&gt;
{{OptionalArg}}&lt;br /&gt;
* '''color:''' An integer of the hex color, produced using [[tocolor]] or 0xAARRGGBB (AA = alpha, RR = red, GG = green, BB = blue).&lt;br /&gt;
* '''width:''' The width/thickness of the line&lt;br /&gt;
* '''postGUI:''' A bool representing whether the line should be drawn on top of or behind any ingame GUI (rendered by CEGUI).&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns a ''true'' if the operation was successful, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
This is a small example of creating 3D Line / &amp;quot;Rope&amp;quot; between vehicle and player.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function makeLineAppear()&lt;br /&gt;
	testVehicle = createVehicle ( 411, 0, 0, 5 ) -- Create our test vehicle.&lt;br /&gt;
	addEventHandler(&amp;quot;onClientRender&amp;quot;, root, createLine)        -- onClientRender keeps the 3D Line visible.&lt;br /&gt;
end&lt;br /&gt;
function createLine ( )&lt;br /&gt;
	x1, y1, z1 = getElementPosition ( testVehicle )                       -- Get test vehicles position.&lt;br /&gt;
	x2, y2, z2 = getElementPosition ( localPlayer )                  -- Get local players position.&lt;br /&gt;
	dxDrawLine3D ( x1, y1, z1, x2, y2, z2, tocolor ( 0, 255, 0, 230 ), 2) -- Create 3D Line between test vehicle and local player.&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler(&amp;quot;line&amp;quot;, makeLineAppear)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Drawing_functions}}&lt;br /&gt;
&lt;br /&gt;
[[hu:dxDrawLine3D]]&lt;/div&gt;</summary>
		<author><name>Mangalis</name></author>
	</entry>
</feed>