<?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=Michael89</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=Michael89"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/wiki/Special:Contributions/Michael89"/>
	<updated>2026-04-05T21:28:15Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=DxDrawCircle&amp;diff=41134</id>
		<title>DxDrawCircle</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=DxDrawCircle&amp;diff=41134"/>
		<updated>2014-08-03T09:10:11Z</updated>

		<summary type="html">&lt;p&gt;Michael89: added second example for new optional arguments&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 number of 2D lines in order to achieve a circle shape on the screen - 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;bool dxDrawCircle ( int posX, int posY [, int radius = 50, int, width = 5, int angleAmount = 1, int startAngle = 0, int stopAngle = 360, int color = white, bool postGUI = false ] )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
[[Image:DxDrawCircle_example.png|thumb|An example of how dxDrawCircle function works in practice.]]&lt;br /&gt;
* '''posX''': An integer representing the '''absolute''' X position of the circle center, represented by pixels on the screen.&lt;br /&gt;
* '''posY''': An integer representing the '''absolute''' Y position of the circle center, represented by pixels on the screen.&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
{{OptionalArg}}&lt;br /&gt;
* '''radius''': An integer representing the radius scale of the circle that is being drawn.&lt;br /&gt;
* '''width''': An integer representing the width of the line that is being drawn.&lt;br /&gt;
* '''angleAmount''': An integer representing the tightness of the circle. Lower amount makes it smoother, higher amount makes it more of a clock looking circle.&lt;br /&gt;
* '''startAngle''': An integer representing the angle of the first point of the circle.&lt;br /&gt;
* '''stopAngle''': An integer representing the angle of the last point of the circle.&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;
* '''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;
==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 dxDrawCircle( posX, posY, radius, width, angleAmount, startAngle, stopAngle, color, postGUI )&lt;br /&gt;
	if ( type( posX ) ~= &amp;quot;number&amp;quot; ) or ( type( posY ) ~= &amp;quot;number&amp;quot; ) then&lt;br /&gt;
		return false&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	radius = radius or 50&lt;br /&gt;
	width = width or 5&lt;br /&gt;
	angleAmount = angleAmount or 1&lt;br /&gt;
	startAngle = startAngle or 0&lt;br /&gt;
	stopAngle = stopAngle or 360&lt;br /&gt;
	color = color or tocolor( 255, 255, 255, 200 )&lt;br /&gt;
	postGUI = postGUI or false&lt;br /&gt;
	&lt;br /&gt;
	for i = startAngle, stopAngle, angleAmount do&lt;br /&gt;
		local startX = math.cos( math.rad( i ) ) * ( radius - width )&lt;br /&gt;
		local startY = math.sin( math.rad( i ) ) * ( radius - width )&lt;br /&gt;
		local endX = math.cos( math.rad( i ) ) * ( radius + width )&lt;br /&gt;
		local endY = math.sin( math.rad( i ) ) * ( radius + width )&lt;br /&gt;
	&lt;br /&gt;
		dxDrawLine( startX + posX, startY + posY, endX + posX, endY + posY, color, width, postGUI )&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	return true&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;Client&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This example draws a complete circle shape in the middle of the screen after the resource is loaded for the client.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addEventHandler( &amp;quot;onClientResourceStart&amp;quot;, resourceRoot,&lt;br /&gt;
	function( )&lt;br /&gt;
		screenWidth, screenHeight = guiGetScreenSize( )&lt;br /&gt;
		addEventHandler( &amp;quot;onClientRender&amp;quot;, root,&lt;br /&gt;
			function( )&lt;br /&gt;
				dxDrawCircle( screenWidth / 2, screenHeight / 2 )&lt;br /&gt;
			end&lt;br /&gt;
		)&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;
&amp;lt;br /&amp;gt;'''Author:''' Socialz&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&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;
This example permanently draws the shape of a circle arc with an angle of 90°. &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addEventHandler ( &amp;quot;onClientRender&amp;quot;, root, &lt;br /&gt;
	function (  )&lt;br /&gt;
		-- We're starting to draw the circle at 0° which means that the first point of the arc is ( 200+50 | 200 )&lt;br /&gt;
		-- Therefore the last point is ( 200 | 200+50 ). &amp;gt; Our arc is the &amp;quot;lower right&amp;quot; quarter of the circle.&lt;br /&gt;
		dxDrawCircle ( 200, 200, 50, 5, 1, 0, 90 )&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;
&amp;lt;br /&amp;gt;'''Author:''' Michael89/Trevit&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Useful_Functions}}&lt;/div&gt;</summary>
		<author><name>Michael89</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=DxDrawCircle&amp;diff=41128</id>
		<title>DxDrawCircle</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=DxDrawCircle&amp;diff=41128"/>
		<updated>2014-08-02T21:18:10Z</updated>

		<summary type="html">&lt;p&gt;Michael89: /* Optional Arguments */&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 2D line in a circle shape on the screen - 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;bool dxDrawCircle ( int posX, int posY, [int radius = 50, int, width = 5, int angleAmount = 1, int startAngle = 0, int stopAngle = 360, int color = white, bool postGUI = false] )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
[[Image:DxDrawCircle_example.png|thumb|An example of how dxDrawCircle function works in practice.]]&lt;br /&gt;
* '''posX''': An integer representing the '''absolute''' X position of the circle center, represented by pixels on the screen.&lt;br /&gt;
* '''posY''': An integer representing the '''absolute''' Y position of the circle center, represented by pixels on the screen.&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
{{OptionalArg}}&lt;br /&gt;
* '''radius''': An integer representing the radius scale of the circle that is being drawn.&lt;br /&gt;
* '''width''': An integer representing the width of the line that is being drawn.&lt;br /&gt;
* '''angleAmount''': An integer representing the tightness of the circle. Lower amount makes it smoother, higher amount makes it more of a clock looking circle.&lt;br /&gt;
* '''startAngle''': An integer representing the angle of the first point of the circle.&lt;br /&gt;
* '''stopAngle''': An integer representing the angle of the last point of the circle.&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;
* '''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;
==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 dxDrawCircle ( posX, posY, radius, width, angleAmount, startAngle, stopAngle, color, postGUI )&lt;br /&gt;
&lt;br /&gt;
	local rtn = false&lt;br /&gt;
	radius = radius or 50&lt;br /&gt;
	width = width or 5&lt;br /&gt;
	angleAmount = angleAmount or 1&lt;br /&gt;
	startAngle = startAngle or 0&lt;br /&gt;
	stopAngle = stopAngle or 360&lt;br /&gt;
	color = color or tocolor(255, 255, 255, 200)&lt;br /&gt;
	postGUI = postGUI or false&lt;br /&gt;
	&lt;br /&gt;
	for i = startAngle, stopAngle, angleAmount do&lt;br /&gt;
	&lt;br /&gt;
		local x1 = math.cos ( math.rad ( i ) ) * ( radius-width )&lt;br /&gt;
		local x2 = math.cos ( math.rad ( i ) ) * ( radius+width )&lt;br /&gt;
		local y1 = math.sin ( math.rad ( i ) ) * ( radius-width )&lt;br /&gt;
		local y2 = math.sin ( math.rad ( i ) ) * ( radius+width )&lt;br /&gt;
	&lt;br /&gt;
		rtn = dxDrawLine ( x1+posX, y1+posY, x2+posX, y2+posY, color, width, postGUI )&lt;br /&gt;
	&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	return rtn&lt;br /&gt;
&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;Client&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This example draws a circle shape in the middle of the screen on resource start.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addEventHandler(&amp;quot;onClientResourceStart&amp;quot;, resourceRoot,&lt;br /&gt;
	function()&lt;br /&gt;
		sx, sy = guiGetScreenSize()&lt;br /&gt;
		addEventHandler(&amp;quot;onClientRender&amp;quot;, root,&lt;br /&gt;
			function()&lt;br /&gt;
				dxDrawCircle(sx/2, sy/2)&lt;br /&gt;
			end&lt;br /&gt;
		)&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;
&amp;lt;br /&amp;gt;'''Author:''' Socialz&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Useful_Functions}}&lt;/div&gt;</summary>
		<author><name>Michael89</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=DxDrawCircle&amp;diff=41127</id>
		<title>DxDrawCircle</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=DxDrawCircle&amp;diff=41127"/>
		<updated>2014-08-02T21:15:36Z</updated>

		<summary type="html">&lt;p&gt;Michael89: /* 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 draws a 2D line in a circle shape on the screen - 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;bool dxDrawCircle ( int posX, int posY, [int radius = 50, int, width = 5, int angleAmount = 1, int startAngle = 0, int stopAngle = 360, int color = white, bool postGUI = false] )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
[[Image:DxDrawCircle_example.png|thumb|An example of how dxDrawCircle function works in practice.]]&lt;br /&gt;
* '''posX''': An integer representing the '''absolute''' X position of the circle center, represented by pixels on the screen.&lt;br /&gt;
* '''posY''': An integer representing the '''absolute''' Y position of the circle center, represented by pixels on the screen.&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
{{OptionalArg}}&lt;br /&gt;
* '''radius''': An integer representing the radius scale of the circle that is being drawn.&lt;br /&gt;
* '''width''': An integer representing the width of the line that is being drawn.&lt;br /&gt;
* '''angleAmount''': An integer representing the tightness of the circle. Lower amount makes it smoother, higher amount makes it more of a clock looking circle.&lt;br /&gt;
* '''startAngle''': An integer representing the angle of the first point of the circle.&lt;br /&gt;
* '''stopAngle''': An integer representing the angle of the last point of the circle.&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;
* '''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;
==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 dxDrawCircle ( posX, posY, radius, width, angleAmount, startAngle, stopAngle, color, postGUI )&lt;br /&gt;
&lt;br /&gt;
	local rtn = false&lt;br /&gt;
	radius = radius or 50&lt;br /&gt;
	width = width or 5&lt;br /&gt;
	angleAmount = angleAmount or 1&lt;br /&gt;
	startAngle = startAngle or 0&lt;br /&gt;
	stopAngle = stopAngle or 360&lt;br /&gt;
	color = color or tocolor(255, 255, 255, 200)&lt;br /&gt;
	postGUI = postGUI or false&lt;br /&gt;
	&lt;br /&gt;
	for i = startAngle, stopAngle, angleAmount do&lt;br /&gt;
	&lt;br /&gt;
		local x1 = math.cos ( math.rad ( i ) ) * ( radius-width )&lt;br /&gt;
		local x2 = math.cos ( math.rad ( i ) ) * ( radius+width )&lt;br /&gt;
		local y1 = math.sin ( math.rad ( i ) ) * ( radius-width )&lt;br /&gt;
		local y2 = math.sin ( math.rad ( i ) ) * ( radius+width )&lt;br /&gt;
	&lt;br /&gt;
		rtn = dxDrawLine ( x1+posX, y1+posY, x2+posX, y2+posY, color, width, postGUI )&lt;br /&gt;
	&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	return rtn&lt;br /&gt;
&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;Client&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This example draws a circle shape in the middle of the screen on resource start.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addEventHandler(&amp;quot;onClientResourceStart&amp;quot;, resourceRoot,&lt;br /&gt;
	function()&lt;br /&gt;
		sx, sy = guiGetScreenSize()&lt;br /&gt;
		addEventHandler(&amp;quot;onClientRender&amp;quot;, root,&lt;br /&gt;
			function()&lt;br /&gt;
				dxDrawCircle(sx/2, sy/2)&lt;br /&gt;
			end&lt;br /&gt;
		)&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;
&amp;lt;br /&amp;gt;'''Author:''' Socialz&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Useful_Functions}}&lt;/div&gt;</summary>
		<author><name>Michael89</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=DxDrawCircle&amp;diff=41126</id>
		<title>DxDrawCircle</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=DxDrawCircle&amp;diff=41126"/>
		<updated>2014-08-02T21:15:17Z</updated>

		<summary type="html">&lt;p&gt;Michael89: /* 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 draws a 2D line in a circle shape on the screen - 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;bool dxDrawCircle ( int posX, int posY, [int radius = 50, int, width = 5, int angleAmount = 1, int startAngle = 0, int stopAngle = 360, int color = white, bool postGUI = false] )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
[[Image:DxDrawCircle_example.png|thumb|An example of how dxDrawCircle function works in practice.]]&lt;br /&gt;
* '''posX''': An integer representing the '''absolute''' X position of the circle center, represented by pixels on the screen.&lt;br /&gt;
* '''posY''': An integer representing the '''absolute''' Y position of the circle center, represented by pixels on the screen.&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
{{OptionalArg}}&lt;br /&gt;
* '''radius''': An integer representing the radius scale of the circle that is being drawn.&lt;br /&gt;
* '''width''': An integer representing the width of the line that is being drawn.&lt;br /&gt;
* '''angleAmount''': An integer representing the tightness of the circle. Lower amount makes it smoother, higher amount makes it more of a clock looking circle.&lt;br /&gt;
* '''startAngle''': An integer representing the angle of the first point of the circle.&lt;br /&gt;
* '''stopAngle''': An integer representing the angle of the last point of the circle.&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;
* '''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;
==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 dxDrawCircle ( posX, posY, radius, width, angleAmount, startAngle, stopAngle, color, postGUI )&lt;br /&gt;
&lt;br /&gt;
	local bool = false&lt;br /&gt;
	radius = radius or 50&lt;br /&gt;
	width = width or 5&lt;br /&gt;
	angleAmount = angleAmount or 1&lt;br /&gt;
	startAngle = startAngle or 0&lt;br /&gt;
	stopAngle = stopAngle or 360&lt;br /&gt;
	color = color or tocolor(255, 255, 255, 200)&lt;br /&gt;
	postGUI = postGUI or false&lt;br /&gt;
	&lt;br /&gt;
	for i = startAngle, stopAngle, angleAmount do&lt;br /&gt;
	&lt;br /&gt;
		local x1 = math.cos ( math.rad ( i ) ) * ( radius-width )&lt;br /&gt;
		local x2 = math.cos ( math.rad ( i ) ) * ( radius+width )&lt;br /&gt;
		local y1 = math.sin ( math.rad ( i ) ) * ( radius-width )&lt;br /&gt;
		local y2 = math.sin ( math.rad ( i ) ) * ( radius+width )&lt;br /&gt;
	&lt;br /&gt;
		bool = dxDrawLine ( x1+posX, y1+posY, x2+posX, y2+posY, color, width, postGUI )&lt;br /&gt;
	&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	return bool&lt;br /&gt;
&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;Client&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This example draws a circle shape in the middle of the screen on resource start.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addEventHandler(&amp;quot;onClientResourceStart&amp;quot;, resourceRoot,&lt;br /&gt;
	function()&lt;br /&gt;
		sx, sy = guiGetScreenSize()&lt;br /&gt;
		addEventHandler(&amp;quot;onClientRender&amp;quot;, root,&lt;br /&gt;
			function()&lt;br /&gt;
				dxDrawCircle(sx/2, sy/2)&lt;br /&gt;
			end&lt;br /&gt;
		)&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;
&amp;lt;br /&amp;gt;'''Author:''' Socialz&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Useful_Functions}}&lt;/div&gt;</summary>
		<author><name>Michael89</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=DxDrawCircle&amp;diff=41125</id>
		<title>DxDrawCircle</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=DxDrawCircle&amp;diff=41125"/>
		<updated>2014-08-02T21:14:16Z</updated>

		<summary type="html">&lt;p&gt;Michael89: /* Syntax */&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 2D line in a circle shape on the screen - 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;bool dxDrawCircle ( int posX, int posY, [int radius = 50, int, width = 5, int angleAmount = 1, int startAngle = 0, int stopAngle = 360, int color = white, bool postGUI = false] )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
[[Image:DxDrawCircle_example.png|thumb|An example of how dxDrawCircle function works in practice.]]&lt;br /&gt;
* '''posX''': An integer representing the '''absolute''' X position of the circle center, represented by pixels on the screen.&lt;br /&gt;
* '''posY''': An integer representing the '''absolute''' Y position of the circle center, represented by pixels on the screen.&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
{{OptionalArg}}&lt;br /&gt;
* '''radius''': An integer representing the radius scale of the circle that is being drawn.&lt;br /&gt;
* '''width''': An integer representing the width of the line that is being drawn.&lt;br /&gt;
* '''angleAmount''': An integer representing the tightness of the circle. Lower amount makes it smoother, higher amount makes it more of a clock looking circle.&lt;br /&gt;
* '''startAngle''': An integer representing the angle of the first point of the circle.&lt;br /&gt;
* '''stopAngle''': An integer representing the angle of the last point of the circle.&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;
* '''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;
==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 dxDrawCircle ( posX, posY, radius, width, angleAmount, startAngle, stopAngle, color, postGUI )&lt;br /&gt;
&lt;br /&gt;
	radius = radius or 50&lt;br /&gt;
	width = width or 5&lt;br /&gt;
	angleAmount = angleAmount or 1&lt;br /&gt;
	startAngle = startAngle or 0&lt;br /&gt;
	stopAngle = stopAngle or 360&lt;br /&gt;
	color = color or tocolor(255, 255, 255, 200)&lt;br /&gt;
	postGUI = postGUI or false&lt;br /&gt;
	&lt;br /&gt;
	for i = startAngle, stopAngle, angleAmount do&lt;br /&gt;
	&lt;br /&gt;
		local x1 = math.cos ( math.rad ( i ) ) * ( radius-width )&lt;br /&gt;
		local x2 = math.cos ( math.rad ( i ) ) * ( radius+width )&lt;br /&gt;
		local y1 = math.sin ( math.rad ( i ) ) * ( radius-width )&lt;br /&gt;
		local y2 = math.sin ( math.rad ( i ) ) * ( radius+width )&lt;br /&gt;
	&lt;br /&gt;
		dxDrawLine ( x1+posX, y1+posY, x2+posX, y2+posY, color, width, postGUI )&lt;br /&gt;
	&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	return true&lt;br /&gt;
&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;Client&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This example draws a circle shape in the middle of the screen on resource start.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addEventHandler(&amp;quot;onClientResourceStart&amp;quot;, resourceRoot,&lt;br /&gt;
	function()&lt;br /&gt;
		sx, sy = guiGetScreenSize()&lt;br /&gt;
		addEventHandler(&amp;quot;onClientRender&amp;quot;, root,&lt;br /&gt;
			function()&lt;br /&gt;
				dxDrawCircle(sx/2, sy/2)&lt;br /&gt;
			end&lt;br /&gt;
		)&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;
&amp;lt;br /&amp;gt;'''Author:''' Socialz&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Useful_Functions}}&lt;/div&gt;</summary>
		<author><name>Michael89</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=DxDrawCircle&amp;diff=41124</id>
		<title>DxDrawCircle</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=DxDrawCircle&amp;diff=41124"/>
		<updated>2014-08-02T21:13:47Z</updated>

		<summary type="html">&lt;p&gt;Michael89: /* 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 draws a 2D line in a circle shape on the screen - 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;bool dxDrawCircle ( int posX, int posY [, int radius = 50, int, width = 5, int angleAmount = 1, int startAngle = 0, int stopAngle = 360, int color = white, bool postGUI = false ] )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
[[Image:DxDrawCircle_example.png|thumb|An example of how dxDrawCircle function works in practice.]]&lt;br /&gt;
* '''posX''': An integer representing the '''absolute''' X position of the circle center, represented by pixels on the screen.&lt;br /&gt;
* '''posY''': An integer representing the '''absolute''' Y position of the circle center, represented by pixels on the screen.&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
{{OptionalArg}}&lt;br /&gt;
* '''radius''': An integer representing the radius scale of the circle that is being drawn.&lt;br /&gt;
* '''width''': An integer representing the width of the line that is being drawn.&lt;br /&gt;
* '''angleAmount''': An integer representing the tightness of the circle. Lower amount makes it smoother, higher amount makes it more of a clock looking circle.&lt;br /&gt;
* '''startAngle''': An integer representing the angle of the first point of the circle.&lt;br /&gt;
* '''stopAngle''': An integer representing the angle of the last point of the circle.&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;
* '''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;
==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 dxDrawCircle ( posX, posY, radius, width, angleAmount, startAngle, stopAngle, color, postGUI )&lt;br /&gt;
&lt;br /&gt;
	radius = radius or 50&lt;br /&gt;
	width = width or 5&lt;br /&gt;
	angleAmount = angleAmount or 1&lt;br /&gt;
	startAngle = startAngle or 0&lt;br /&gt;
	stopAngle = stopAngle or 360&lt;br /&gt;
	color = color or tocolor(255, 255, 255, 200)&lt;br /&gt;
	postGUI = postGUI or false&lt;br /&gt;
	&lt;br /&gt;
	for i = startAngle, stopAngle, angleAmount do&lt;br /&gt;
	&lt;br /&gt;
		local x1 = math.cos ( math.rad ( i ) ) * ( radius-width )&lt;br /&gt;
		local x2 = math.cos ( math.rad ( i ) ) * ( radius+width )&lt;br /&gt;
		local y1 = math.sin ( math.rad ( i ) ) * ( radius-width )&lt;br /&gt;
		local y2 = math.sin ( math.rad ( i ) ) * ( radius+width )&lt;br /&gt;
	&lt;br /&gt;
		dxDrawLine ( x1+posX, y1+posY, x2+posX, y2+posY, color, width, postGUI )&lt;br /&gt;
	&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	return true&lt;br /&gt;
&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;Client&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This example draws a circle shape in the middle of the screen on resource start.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addEventHandler(&amp;quot;onClientResourceStart&amp;quot;, resourceRoot,&lt;br /&gt;
	function()&lt;br /&gt;
		sx, sy = guiGetScreenSize()&lt;br /&gt;
		addEventHandler(&amp;quot;onClientRender&amp;quot;, root,&lt;br /&gt;
			function()&lt;br /&gt;
				dxDrawCircle(sx/2, sy/2)&lt;br /&gt;
			end&lt;br /&gt;
		)&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;
&amp;lt;br /&amp;gt;'''Author:''' Socialz&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Useful_Functions}}&lt;/div&gt;</summary>
		<author><name>Michael89</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=DxDrawCircle&amp;diff=41123</id>
		<title>DxDrawCircle</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=DxDrawCircle&amp;diff=41123"/>
		<updated>2014-08-02T21:13:25Z</updated>

		<summary type="html">&lt;p&gt;Michael89: /* 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 draws a 2D line in a circle shape on the screen - 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;bool dxDrawCircle ( int posX, int posY [, int radius = 50, int, width = 5, int angleAmount = 1, int startAngle = 0, int stopAngle = 360, int color = white, bool postGUI = false ] )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
[[Image:DxDrawCircle_example.png|thumb|An example of how dxDrawCircle function works in practice.]]&lt;br /&gt;
* '''posX''': An integer representing the '''absolute''' X position of the circle center, represented by pixels on the screen.&lt;br /&gt;
* '''posY''': An integer representing the '''absolute''' Y position of the circle center, represented by pixels on the screen.&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
{{OptionalArg}}&lt;br /&gt;
* '''radius''': An integer representing the radius scale of the circle that is being drawn.&lt;br /&gt;
* '''width''': An integer representing the width of the line that is being drawn.&lt;br /&gt;
* '''angleAmount''': An integer representing the tightness of the circle. Lower amount makes it smoother, higher amount makes it more of a clock looking circle.&lt;br /&gt;
* '''startAngle''': An integer representing the angle of the first point of the circle.&lt;br /&gt;
* '''stopAngle''': An integer representing the angle of the last point of the circle.&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;
* '''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;
==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 dxDrawCircle ( posX, posY, radius, width, angleAmount, startAngle, stopAngle, color, postGUI )&lt;br /&gt;
&lt;br /&gt;
	radius = radius or 50&lt;br /&gt;
	width = width or 5&lt;br /&gt;
	angleAmount = angleAmount or 1&lt;br /&gt;
	startAngle = startAngle or 0&lt;br /&gt;
	stopAngle = stopAngle or 260&lt;br /&gt;
	color = color or tocolor(255, 255, 255, 200)&lt;br /&gt;
	postGUI = postGUI or false&lt;br /&gt;
	&lt;br /&gt;
	for i = startAngle, stopAngle, angleAmount do&lt;br /&gt;
	&lt;br /&gt;
		local x1 = math.cos ( math.rad ( i ) ) * ( radius-width )&lt;br /&gt;
		local x2 = math.cos ( math.rad ( i ) ) * ( radius+width )&lt;br /&gt;
		local y1 = math.sin ( math.rad ( i ) ) * ( radius-width )&lt;br /&gt;
		local y2 = math.sin ( math.rad ( i ) ) * ( radius+width )&lt;br /&gt;
	&lt;br /&gt;
		dxDrawLine ( x1+posX, y1+posY, x2+posX, y2+posY, color, width, postGUI )&lt;br /&gt;
	&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	return true&lt;br /&gt;
&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;Client&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This example draws a circle shape in the middle of the screen on resource start.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addEventHandler(&amp;quot;onClientResourceStart&amp;quot;, resourceRoot,&lt;br /&gt;
	function()&lt;br /&gt;
		sx, sy = guiGetScreenSize()&lt;br /&gt;
		addEventHandler(&amp;quot;onClientRender&amp;quot;, root,&lt;br /&gt;
			function()&lt;br /&gt;
				dxDrawCircle(sx/2, sy/2)&lt;br /&gt;
			end&lt;br /&gt;
		)&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;
&amp;lt;br /&amp;gt;'''Author:''' Socialz&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Useful_Functions}}&lt;/div&gt;</summary>
		<author><name>Michael89</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=DxDrawCircle&amp;diff=41122</id>
		<title>DxDrawCircle</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=DxDrawCircle&amp;diff=41122"/>
		<updated>2014-08-02T21:12:30Z</updated>

		<summary type="html">&lt;p&gt;Michael89: /* 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 draws a 2D line in a circle shape on the screen - 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;bool dxDrawCircle ( int posX, int posY [, int radius = 50, int, width = 5, int angleAmount = 1, int startAngle = 0, int stopAngle = 360, int color = white, bool postGUI = false ] )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
[[Image:DxDrawCircle_example.png|thumb|An example of how dxDrawCircle function works in practice.]]&lt;br /&gt;
* '''posX''': An integer representing the '''absolute''' X position of the circle center, represented by pixels on the screen.&lt;br /&gt;
* '''posY''': An integer representing the '''absolute''' Y position of the circle center, represented by pixels on the screen.&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
{{OptionalArg}}&lt;br /&gt;
* '''radius''': An integer representing the radius scale of the circle that is being drawn.&lt;br /&gt;
* '''width''': An integer representing the width of the line that is being drawn.&lt;br /&gt;
* '''angleAmount''': An integer representing the tightness of the circle. Lower amount makes it smoother, higher amount makes it more of a clock looking circle.&lt;br /&gt;
* '''startAngle''': An integer representing the angle of the first point of the circle.&lt;br /&gt;
* '''stopAngle''': An integer representing the angle of the last point of the circle.&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;
* '''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;
==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 dxDrawCircle ( posX, posY, radius, width, angleAmount, startAngle, stopAngle, color, postGUI )&lt;br /&gt;
&lt;br /&gt;
	radius = radius or 50&lt;br /&gt;
	width = width or 5&lt;br /&gt;
	angleAmount = angleAmount or 1&lt;br /&gt;
	startAngle = startAngle or 0&lt;br /&gt;
	stopAngle = stopAngle or 260&lt;br /&gt;
	color = color or tocolor(255, 255, 255, 200)&lt;br /&gt;
	postGUI = postGUI or false&lt;br /&gt;
	&lt;br /&gt;
	for i = startAngle, stopAngle, angleAmount do&lt;br /&gt;
	&lt;br /&gt;
		local x1 = math.cos ( math.rad ( i ) ) * ( radius-width )&lt;br /&gt;
		local x2 = math.cos ( math.rad ( i ) ) * ( radius+width )&lt;br /&gt;
		local y1 = math.sin ( math.rad ( i ) ) * ( radius-width )&lt;br /&gt;
		local y2 = math.sin ( math.rad ( i ) ) * ( radius+width )&lt;br /&gt;
	&lt;br /&gt;
		dxDrawLine ( x1+x, y1+y, x2+x, y2+y, color, width )&lt;br /&gt;
	&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	return true&lt;br /&gt;
&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;Client&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This example draws a circle shape in the middle of the screen on resource start.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addEventHandler(&amp;quot;onClientResourceStart&amp;quot;, resourceRoot,&lt;br /&gt;
	function()&lt;br /&gt;
		sx, sy = guiGetScreenSize()&lt;br /&gt;
		addEventHandler(&amp;quot;onClientRender&amp;quot;, root,&lt;br /&gt;
			function()&lt;br /&gt;
				dxDrawCircle(sx/2, sy/2)&lt;br /&gt;
			end&lt;br /&gt;
		)&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;
&amp;lt;br /&amp;gt;'''Author:''' Socialz&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Useful_Functions}}&lt;/div&gt;</summary>
		<author><name>Michael89</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=DxDrawCircle&amp;diff=41121</id>
		<title>DxDrawCircle</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=DxDrawCircle&amp;diff=41121"/>
		<updated>2014-08-02T21:09:56Z</updated>

		<summary type="html">&lt;p&gt;Michael89: /* Syntax */&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 2D line in a circle shape on the screen - 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;bool dxDrawCircle ( int posX, int posY [, int radius = 50, int, width = 5, int angleAmount = 1, int startAngle = 0, int stopAngle = 360, int color = white, bool postGUI = false ] )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
[[Image:DxDrawCircle_example.png|thumb|An example of how dxDrawCircle function works in practice.]]&lt;br /&gt;
* '''posX''': An integer representing the '''absolute''' X position of the circle center, represented by pixels on the screen.&lt;br /&gt;
* '''posY''': An integer representing the '''absolute''' Y position of the circle center, represented by pixels on the screen.&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
{{OptionalArg}}&lt;br /&gt;
* '''radius''': An integer representing the radius scale of the circle that is being drawn.&lt;br /&gt;
* '''width''': An integer representing the width of the line that is being drawn.&lt;br /&gt;
* '''angleAmount''': An integer representing the tightness of the circle. Lower amount makes it smoother, higher amount makes it more of a clock looking circle.&lt;br /&gt;
* '''startAngle''': An integer representing the angle of the first point of the circle.&lt;br /&gt;
* '''stopAngle''': An integer representing the angle of the last point of the circle.&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;
* '''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;
==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 dxDrawCircle(posX, posY, radius, width, angleAmount, color, postGUI)&lt;br /&gt;
	radius = radius or 50&lt;br /&gt;
	width = width or 5&lt;br /&gt;
	angleAmount = angleAmount or 1&lt;br /&gt;
	color = color or tocolor(255, 255, 255, 200)&lt;br /&gt;
	postGUI = postGUI or false&lt;br /&gt;
	&lt;br /&gt;
	for i=0,360,angleAmount do&lt;br /&gt;
		local _i = i*(math.pi/180)&lt;br /&gt;
		dxDrawLine(math.cos(_i)*(radius-width)+posX, math.sin(_i)*(radius-width)+posY, math.cos(_i)*(radius+width)+posX, math.sin(_i)*(radius+width)+posY, color, width, postGUI)&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	return true&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;Client&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This example draws a circle shape in the middle of the screen on resource start.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addEventHandler(&amp;quot;onClientResourceStart&amp;quot;, resourceRoot,&lt;br /&gt;
	function()&lt;br /&gt;
		sx, sy = guiGetScreenSize()&lt;br /&gt;
		addEventHandler(&amp;quot;onClientRender&amp;quot;, root,&lt;br /&gt;
			function()&lt;br /&gt;
				dxDrawCircle(sx/2, sy/2)&lt;br /&gt;
			end&lt;br /&gt;
		)&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;
&amp;lt;br /&amp;gt;'''Author:''' Socialz&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Useful_Functions}}&lt;/div&gt;</summary>
		<author><name>Michael89</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=DbPoll&amp;diff=31800</id>
		<title>DbPoll</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=DbPoll&amp;diff=31800"/>
		<updated>2012-07-06T18:47:09Z</updated>

		<summary type="html">&lt;p&gt;Michael89: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Server function}}&lt;br /&gt;
This function checks the progress of a database query.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
table dbPoll ( handle queryHandle, int timeout )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''queryHandle:''' A query handle previously returned from [[dbQuery]]&lt;br /&gt;
*'''timeout:''' How many milliseconds to wait for a result. Use 0 for and instant response (which may return nil). Use -1 to wait until a result is ready. Note: A wait here will freeze the entire server just like the executeSQL* functions&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
*''nil:'' Returns nil if the query results are not yet ready. You should try again in a little while. (If you give up waiting for a result, be sure to call [[dbFree]])&lt;br /&gt;
*''false'' Returns false if the query string contained an error, the connection has been lost or the query handle is incorrect. This automatically frees the query handle, so you do not have to call [[dbFree]].&lt;br /&gt;
** This also returns two extra values: error code and error message. See the example on how to retrieve them,&lt;br /&gt;
*''table:'' Returns a table when the results are ready. This automatically frees the query handle, so you do not have to call [[dbFree]].&lt;br /&gt;
** This also returns an extra value: number of affected rows&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This example waits until a result is ready:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local result = dbPoll ( qh, -1 )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This example shows the possible return values:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local result, numrows, errmsg = dbPoll ( qh, -1 )&lt;br /&gt;
&lt;br /&gt;
if result == nil then&lt;br /&gt;
    outputConsole( &amp;quot;dbPoll result not ready yet&amp;quot; )&lt;br /&gt;
elseif result == false then&lt;br /&gt;
    outputConsole( &amp;quot;dbPoll failed. Error code: &amp;quot; .. tostring(numrows) .. &amp;quot;  Error message: &amp;quot; .. tostring(errmsg) )&lt;br /&gt;
else&lt;br /&gt;
    outputConsole( &amp;quot;dbPoll succeeded. Number of affected rows: &amp;quot; .. tostring(numrows) )&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This example shows how to handle the result if the query selected data:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local result, numrows, errmsg = dbPoll ( qh, -1 )&lt;br /&gt;
&lt;br /&gt;
if numrows &amp;gt; 0 then&lt;br /&gt;
    &lt;br /&gt;
	for result, row in pairs ( result ) do&lt;br /&gt;
		-- by using a second loop (use it if you want to get the values of all columns the query selected):&lt;br /&gt;
		for column, value in pairs ( row ) do&lt;br /&gt;
			-- column = the mysql column of the table in the query&lt;br /&gt;
			-- value = the value of that column in this certain row&lt;br /&gt;
		end&lt;br /&gt;
		&lt;br /&gt;
		-- or without a second loop (use it if you want to handle every value in a special way):&lt;br /&gt;
		outputChatBox ( row[&amp;quot;column&amp;quot;] ) -- it will output the value of the column &amp;quot;column&amp;quot; in this certain row&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
{{Requirements|1.1.1-9.03328|n/a}}&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Registry_functions}}&lt;/div&gt;</summary>
		<author><name>Michael89</name></author>
	</entry>
</feed>