<?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=Easterdie</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=Easterdie"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/wiki/Special:Contributions/Easterdie"/>
	<updated>2026-05-17T23:40:32Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=DxDrawSprite&amp;diff=63636</id>
		<title>DxDrawSprite</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=DxDrawSprite&amp;diff=63636"/>
		<updated>2019-08-07T17:43:41Z</updated>

		<summary type="html">&lt;p&gt;Easterdie: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Useful Function}}&lt;br /&gt;
&amp;lt;lowercasetitle/&amp;gt;&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function draws a sprite in the 3D world.&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;dxDrawSprite( float x, float y, float z, float size, element material, int color )﻿&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required arguments===&lt;br /&gt;
* '''X/Y/Z:''' The center position of the sprite image, representing a coordinate in the GTA world.&lt;br /&gt;
* '''size:''' A size of the sprite.&lt;br /&gt;
* '''material:''' A material to draw the sprite with.&lt;br /&gt;
* '''color:''' A color of the sprite.&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;
scr = {guiGetScreenSize()}&lt;br /&gt;
function dxDrawSprite(x, y, z, size, material, color)&lt;br /&gt;
    local s = size/2&lt;br /&gt;
    local _xc, _yc, _zc = getWorldFromScreenPosition(scr[1]/2, scr[2]/2, 1)&lt;br /&gt;
    local _xu, _yu, _zu = getWorldFromScreenPosition(scr[1]/2, scr[2]/2 - 240, 1)&lt;br /&gt;
    local _d = getDistanceBetweenPoints3D(_xc, _yc, _zc, _xu, _yu, _zu)&lt;br /&gt;
    local XUP,    YUP,    ZUP    = (_xu - _xc)/_d, (_yu - _yc)/_d, (_zu - _zc)/_d&lt;br /&gt;
    dxDrawMaterialLine3D(x+(XUP*s), y+(YUP*s), z+(ZUP*s), x-(XUP*s), y-(YUP*s), z-(ZUP*s), material, size, color)&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;
&amp;lt;section name=&amp;quot;Example&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;
local material = dxCreateTexture(&amp;quot;0.png&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
addEventHandler(&amp;quot;onClientRender&amp;quot;, root, function()&lt;br /&gt;
        dxDrawSprite(0, 0, 3, 6, material, tocolor(255, 255, 255, 192))&lt;br /&gt;
    end&lt;br /&gt;
)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Author:''' Lex128 / Easterdie.&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Useful_Functions}}&lt;/div&gt;</summary>
		<author><name>Easterdie</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=DxDrawSprite&amp;diff=63635</id>
		<title>DxDrawSprite</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=DxDrawSprite&amp;diff=63635"/>
		<updated>2019-08-07T17:38:51Z</updated>

		<summary type="html">&lt;p&gt;Easterdie: /* Code */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Useful Function}}&lt;br /&gt;
&amp;lt;lowercasetitle/&amp;gt;&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function draw a sprite in the 3D world.&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;dxDrawSprite( float x, float y, float z, float size, element material, int color )﻿&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required arguments===&lt;br /&gt;
* '''X/Y/Z:''' The center position of the sprite image, representing a coordinate in the GTA world.&lt;br /&gt;
* '''size:''' A size of the sprite.&lt;br /&gt;
* '''material:''' A material to draw the sprite with.&lt;br /&gt;
* '''color:''' A color of the sprite.&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;
scr = {guiGetScreenSize()}&lt;br /&gt;
function dxDrawSprite(x, y, z, size, material, color)&lt;br /&gt;
    local s = size/2&lt;br /&gt;
    local _xc, _yc, _zc = getWorldFromScreenPosition(scr[1]/2, scr[2]/2, 1)&lt;br /&gt;
    local _xu, _yu, _zu = getWorldFromScreenPosition(scr[1]/2, scr[2]/2 - 240, 1)&lt;br /&gt;
    local _d = getDistanceBetweenPoints3D(_xc, _yc, _zc, _xu, _yu, _zu)&lt;br /&gt;
    local XUP,    YUP,    ZUP    = (_xu - _xc)/_d, (_yu - _yc)/_d, (_zu - _zc)/_d&lt;br /&gt;
    dxDrawMaterialLine3D(x+(XUP*s), y+(YUP*s), z+(ZUP*s), x-(XUP*s), y-(YUP*s), z-(ZUP*s), material, size, color)&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;
&amp;lt;section name=&amp;quot;Example&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;
local material = dxCreateTexture(&amp;quot;0.png&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
addEventHandler(&amp;quot;onClientRender&amp;quot;, root, function()&lt;br /&gt;
        dxDrawSprite(0, 0, 3, 6, material, tocolor(255, 255, 255, 192))&lt;br /&gt;
    end&lt;br /&gt;
)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Author:''' Lex128 / Easterdie.&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Useful_Functions}}&lt;/div&gt;</summary>
		<author><name>Easterdie</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=DxDrawSprite&amp;diff=63634</id>
		<title>DxDrawSprite</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=DxDrawSprite&amp;diff=63634"/>
		<updated>2019-08-07T17:25:16Z</updated>

		<summary type="html">&lt;p&gt;Easterdie: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Useful Function}}&lt;br /&gt;
&amp;lt;lowercasetitle/&amp;gt;&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function draw a sprite in the 3D world.&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;dxDrawSprite( float x, float y, float z, float size, element material, int color )﻿&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required arguments===&lt;br /&gt;
* '''X/Y/Z:''' The center position of the sprite image, representing a coordinate in the GTA world.&lt;br /&gt;
* '''size:''' A size of the sprite.&lt;br /&gt;
* '''material:''' A material to draw the sprite with.&lt;br /&gt;
* '''color:''' A color of the sprite.&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;
scr = {guiGetScreenSize()}&lt;br /&gt;
function dxDrawSprite(x, y, z, size, material, color)&lt;br /&gt;
    local s = size/2&lt;br /&gt;
    local _xc, _yc, _zc = getWorldFromScreenPosition(scr[1]/2, scr[2]/2, 1)&lt;br /&gt;
    local _xu, _yu, _zu = getWorldFromScreenPosition(scr[1]/2, scr[2]/2 - 240, 1)&lt;br /&gt;
    local _d = getDistanceBetweenPoints3D(_xc, _yc, _zc, _xu, _yu, _zu)&lt;br /&gt;
    XUP,    YUP,    ZUP    = (_xu - _xc)/_d, (_yu - _yc)/_d, (_zu - _zc)/_d&lt;br /&gt;
    dxDrawMaterialLine3D(x+(XUP*s), y+(YUP*s), z+(ZUP*s), x-(XUP*s), y-(YUP*s), z-(ZUP*s), material, size, color)&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;
&amp;lt;section name=&amp;quot;Example&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;
local material = dxCreateTexture(&amp;quot;0.png&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
addEventHandler(&amp;quot;onClientRender&amp;quot;, root, function()&lt;br /&gt;
        dxDrawSprite(0, 0, 3, 6, material, tocolor(255, 255, 255, 192))&lt;br /&gt;
    end&lt;br /&gt;
)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Author:''' Lex128 / Easterdie.&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Useful_Functions}}&lt;/div&gt;</summary>
		<author><name>Easterdie</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=DxDrawSprite&amp;diff=63632</id>
		<title>DxDrawSprite</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=DxDrawSprite&amp;diff=63632"/>
		<updated>2019-08-07T17:16:02Z</updated>

		<summary type="html">&lt;p&gt;Easterdie: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Useful Function}}&lt;br /&gt;
&amp;lt;lowercasetitle/&amp;gt;&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function draw a sprite in the 3D world.&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;dxDrawSprite( float x, float y, float z, float size, element material, int color )﻿&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required arguments===&lt;br /&gt;
* '''X/Y/Z:''' The center position of the sprite image, representing a coordinate in the GTA world.&lt;br /&gt;
* '''size:''' A size of the sprite.&lt;br /&gt;
* '''material:''' A material to draw the sprite with.&lt;br /&gt;
* '''color:''' A color of the sprite.&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;
scr = {guiGetScreenSize()}&lt;br /&gt;
function dxDrawSprite(x, y, z, size, material, color)&lt;br /&gt;
    local s = size/2&lt;br /&gt;
    local _xc, _yc, _zc = getWorldFromScreenPosition(scr[1]/2, scr[2]/2, 1)&lt;br /&gt;
    local _xu, _yu, _zu = getWorldFromScreenPosition(scr[1]/2, scr[2]/2 - 240, 1)&lt;br /&gt;
    local _d = getDistanceBetweenPoints3D(_xc, _yc, _zc, _xu, _yu, _zu)&lt;br /&gt;
    XUP,    YUP,    ZUP    = (_xu - _xc)/_d, (_yu - _yc)/_d, (_zu - _zc)/_d&lt;br /&gt;
    dxDrawMaterialLine3D(x+(XUP*s), y+(YUP*s), z+(ZUP*s), x-(XUP*s), y-(YUP*s), z-(ZUP*s), material, size, color)&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;
&amp;lt;section name=&amp;quot;Example&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;
local material = dxCreateTexture(&amp;quot;0.png&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
addEventHandler(&amp;quot;onClientRender&amp;quot;, root, function()&lt;br /&gt;
        dxDrawSprite(-33.04, 17.87, 7.91, 6, material, tocolor(255, 255, 255, 192))&lt;br /&gt;
    end&lt;br /&gt;
)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Author:''' Lex128 / Easterdie.&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Useful_Functions}}&lt;/div&gt;</summary>
		<author><name>Easterdie</name></author>
	</entry>
</feed>