<?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=%E9%95%B7%E7%80%9E%E6%97%A9%E7%80%AC</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=%E9%95%B7%E7%80%9E%E6%97%A9%E7%80%AC"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/wiki/Special:Contributions/%E9%95%B7%E7%80%9E%E6%97%A9%E7%80%AC"/>
	<updated>2026-04-28T21:05:40Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=DxDrawCircleOnElement&amp;diff=75597</id>
		<title>DxDrawCircleOnElement</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=DxDrawCircleOnElement&amp;diff=75597"/>
		<updated>2022-10-19T08:13:09Z</updated>

		<summary type="html">&lt;p&gt;長瀞早瀬: /* Optional arguments */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Useful Function}}&amp;lt;lowercasetitle/&amp;gt;&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This useful client function draws a circle on any element you choose.&lt;br /&gt;
{{Note|You have to use [[onClientRender]] or [[onClientPreRender]] events with this function.}}&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;boolean dxDrawCircleOnElement(element TheElement, int marginFromTop = 1.25, int radius = 1, int distance = 20, int color = tocolor(255,255,255), int centerColor = tocolor(255,255,255))&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[[Image:Drawcircleonelementdemo.jpg|thumb|Example of how it should looks like.|304x250px]]&lt;br /&gt;
&lt;br /&gt;
==Required arguments==&lt;br /&gt;
* '''TheElement''': The element you want to draw the text on it.&lt;br /&gt;
* '''radius''': An integer representing the radius scale of the circle that is being drawn.&lt;br /&gt;
* '''distance''': The distance you will be able to view the circle from.&lt;br /&gt;
&lt;br /&gt;
==Optional arguments==&lt;br /&gt;
* '''marginFromTop''': The circle margin from top.&lt;br /&gt;
* '''color''': The circle border color.&lt;br /&gt;
* '''centerColor''': The circle center color.&lt;br /&gt;
&lt;br /&gt;
==Returns==&lt;br /&gt;
Returns '''true''' if successful, '''false''' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Function source==&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 dxDrawCircleOnElement(TheElement,marginFromTop,radius,distance,color,centerColor)&lt;br /&gt;
	local x, y, z = getElementPosition(TheElement)&lt;br /&gt;
	local x2, y2, z2 = getCameraMatrix()&lt;br /&gt;
	local sx, sy = getScreenFromWorldPosition(x, y, z-marginFromTop)&lt;br /&gt;
	if(sx) and (sy) then&lt;br /&gt;
		local distanceBetweenPoints = getDistanceBetweenPoints3D(x, y, z, x2, y2, z2)&lt;br /&gt;
		if(distanceBetweenPoints &amp;lt; distance) then&lt;br /&gt;
			dxDrawCircle(sx,sy,radius,nil,nil,color or tocolor(255,255,255,255),centerColor or tocolor(255,255,255,255))&lt;br /&gt;
		end&lt;br /&gt;
	end&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;
==See also==&lt;br /&gt;
{{Useful Functions}}&lt;/div&gt;</summary>
		<author><name>長瀞早瀬</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=DxDrawCircleOnElement&amp;diff=75596</id>
		<title>DxDrawCircleOnElement</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=DxDrawCircleOnElement&amp;diff=75596"/>
		<updated>2022-10-18T19:14:57Z</updated>

		<summary type="html">&lt;p&gt;長瀞早瀬: Created page with &amp;quot;{{Useful Function}}&amp;lt;lowercasetitle/&amp;gt; __NOTOC__ This useful client function draws a circle on any element you choose. {{Note|You have to use onClientRender or onClientPreRender events with this function.}}  ==Syntax== &amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;boolean dxDrawCircleOnElement(element TheElement, int marginFromTop = 1.25, int radius = 1, int distance = 20, int color = tocolor(255,255,255), int centerColor = tocolor(255,255,255))&amp;lt;/syntaxhighlight&amp;gt; Image:Drawcircleo...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Useful Function}}&amp;lt;lowercasetitle/&amp;gt;&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This useful client function draws a circle on any element you choose.&lt;br /&gt;
{{Note|You have to use [[onClientRender]] or [[onClientPreRender]] events with this function.}}&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;boolean dxDrawCircleOnElement(element TheElement, int marginFromTop = 1.25, int radius = 1, int distance = 20, int color = tocolor(255,255,255), int centerColor = tocolor(255,255,255))&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[[Image:Drawcircleonelementdemo.jpg|thumb|Example of how it should looks like.|304x250px]]&lt;br /&gt;
&lt;br /&gt;
==Required arguments==&lt;br /&gt;
* '''TheElement''': The element you want to draw the text on it.&lt;br /&gt;
* '''radius''': An integer representing the radius scale of the circle that is being drawn.&lt;br /&gt;
* '''distance''': The distance you will be able to view the circle from.&lt;br /&gt;
&lt;br /&gt;
==Optional arguments==&lt;br /&gt;
* '''marginFromTop''': The height of the text, it's 1 by default.&lt;br /&gt;
* '''color''': The circle border color.&lt;br /&gt;
* '''centerColor''': The circle center color.&lt;br /&gt;
&lt;br /&gt;
==Returns==&lt;br /&gt;
Returns '''true''' if successful, '''false''' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Function source==&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 dxDrawCircleOnElement(TheElement,marginFromTop,radius,distance,color,centerColor)&lt;br /&gt;
	local x, y, z = getElementPosition(TheElement)&lt;br /&gt;
	local x2, y2, z2 = getCameraMatrix()&lt;br /&gt;
	local sx, sy = getScreenFromWorldPosition(x, y, z-marginFromTop)&lt;br /&gt;
	if(sx) and (sy) then&lt;br /&gt;
		local distanceBetweenPoints = getDistanceBetweenPoints3D(x, y, z, x2, y2, z2)&lt;br /&gt;
		if(distanceBetweenPoints &amp;lt; distance) then&lt;br /&gt;
			dxDrawCircle(sx,sy,radius,nil,nil,color or tocolor(255,255,255,255),centerColor or tocolor(255,255,255,255))&lt;br /&gt;
		end&lt;br /&gt;
	end&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;
==See also==&lt;br /&gt;
{{Useful Functions}}&lt;/div&gt;</summary>
		<author><name>長瀞早瀬</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=File:Drawcircleonelementdemo.jpg&amp;diff=75592</id>
		<title>File:Drawcircleonelementdemo.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=File:Drawcircleonelementdemo.jpg&amp;diff=75592"/>
		<updated>2022-10-18T19:01:14Z</updated>

		<summary type="html">&lt;p&gt;長瀞早瀬: dxDrawCircleOnElement demonstration image
Category:Useful Functions&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary ==&lt;br /&gt;
dxDrawCircleOnElement demonstration image&lt;br /&gt;
[[Category:Useful Functions]]&lt;/div&gt;</summary>
		<author><name>長瀞早瀬</name></author>
	</entry>
</feed>