<?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=Kirukiru</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=Kirukiru"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/wiki/Special:Contributions/Kirukiru"/>
	<updated>2026-05-03T01:24:57Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=DxDrawImage3D&amp;diff=64791</id>
		<title>DxDrawImage3D</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=DxDrawImage3D&amp;diff=64791"/>
		<updated>2019-12-19T13:48:43Z</updated>

		<summary type="html">&lt;p&gt;Kirukiru: Typo? (another float width arg after element material&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Useful Function}}&lt;br /&gt;
This function draws a textured 3D line between two points in the 3D world that appers to be a 3D image - rendered for one frame  This should be used in conjunction with [[onClientPreRender]] in order to display continuously.&lt;br /&gt;
&lt;br /&gt;
The 3D line with a large width value and a texture effectively becomes a 3D image, hence the possibility to construct basic shapes such as boxes with several large width lines and the appropriate values for 'faceToward'.&lt;br /&gt;
&lt;br /&gt;
3D lines are drawn at a particular place in the [[Game_Processing_Order|game processing order]], so use [[onClientPreRender]] for drawing if you are attaching them to world elements.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;bool dxDrawImage3D ( float x, float y, float z, float width, float height, element material,&lt;br /&gt;
                   [ int color = white, float rotation = 0, [ bool postGUI = false, ] float faceTowardX, float faceTowardY, float faceTowardZ ] )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
* '''X/Y/Z:''' The start position of the 3D image, representing a coordinate in the GTA world.&lt;br /&gt;
* '''width:''' The width of the image in GTA world units. (This is 1/75th of the width used in dxDrawLine3D)&lt;br /&gt;
* '''height:''' The height of the image in GTA world units. (This is 1/75th of the width used in dxDrawLine3D)&lt;br /&gt;
* '''material:''' A material to draw the image with.&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;
* '''rotation:''' Rotation (end point of the image) offset&lt;br /&gt;
{{New items|3.0156|1.5.5|&lt;br /&gt;
* '''postGUI''': A bool representing whether the image should be drawn on top of or behind any ingame GUI.&lt;br /&gt;
|11998}}&lt;br /&gt;
* '''faceTowardX/Y/Z:''' The direction the front of the image should face towards. If this is not set, the front of the image always faces toward the camera.&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;
==Code==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Client&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function dxDrawImage3D( x, y, z, width, height, material, color, rotation, ... )&lt;br /&gt;
    return dxDrawMaterialLine3D( x, y, z, x + width, y + height, z + tonumber( rotation or 0 ), material, height, color or 0xFFFFFFFF, ... )&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This draws a trollface in the middle of the GTA world for no reason&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local face = dxCreateTexture( &amp;quot;trollface.png&amp;quot; )&lt;br /&gt;
&lt;br /&gt;
addEventHandler( &amp;quot;onClientRender&amp;quot;, root,&lt;br /&gt;
    function( )&lt;br /&gt;
        dxDrawImage3D( 0,0, 20, 20, 20, face, tocolor( 255, 255, 255, 255 ) )&lt;br /&gt;
    end&lt;br /&gt;
)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Author:''' qaisjp&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Useful_Functions}}&lt;/div&gt;</summary>
		<author><name>Kirukiru</name></author>
	</entry>
</feed>