<?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=Boszboszek</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=Boszboszek"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/wiki/Special:Contributions/Boszboszek"/>
	<updated>2026-05-11T18:04:51Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=DxDrawOctagon3D&amp;diff=65305</id>
		<title>DxDrawOctagon3D</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=DxDrawOctagon3D&amp;diff=65305"/>
		<updated>2020-03-04T16:51:25Z</updated>

		<summary type="html">&lt;p&gt;Boszboszek: /* Example : */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Useful Function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function creates the Octagon , by combining dxDrawLine3D with each other , it needs to act onClientRender because the function of action on frames.&lt;br /&gt;
*'''This is made to be used clientside!.'''&lt;br /&gt;
== Syntax ==&lt;br /&gt;
[[File:Ocatgon.png|thumb|An example of how dxDrawOctagon3D function works in practice.]]&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool dxDrawOctagon3D(int x, int y, int z, [int radius, int width, int color = white] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
== Required Arguments ==&lt;br /&gt;
*'''x:''' x coordinates of the form&lt;br /&gt;
*'''y:''' y coordinates of the form&lt;br /&gt;
*'''z:''' z coordinates of the form&lt;br /&gt;
*'''width:''' Display format&lt;br /&gt;
*'''radius:''' size format&lt;br /&gt;
*'''color:''' Color hard form produced using tocolor&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns true if successful, false if they are not passed good arguments to the function.&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 dxDrawOctagon3D(x, y, z, radius, width, color)&lt;br /&gt;
	if type(x) ~= &amp;quot;number&amp;quot; or type(y) ~= &amp;quot;number&amp;quot; or type(z) ~= &amp;quot;number&amp;quot; then&lt;br /&gt;
		return false&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local radius = radius or 1&lt;br /&gt;
	local radius2 = radius/math.sqrt(2)&lt;br /&gt;
	local width = width or 1&lt;br /&gt;
	local color = color or tocolor(255,255,255,150)&lt;br /&gt;
&lt;br /&gt;
	point = {}&lt;br /&gt;
&lt;br /&gt;
		for i=1,8 do&lt;br /&gt;
			point[i] = {}&lt;br /&gt;
		end&lt;br /&gt;
&lt;br /&gt;
		point[1].x = x&lt;br /&gt;
		point[1].y = y-radius&lt;br /&gt;
		point[2].x = x+radius2&lt;br /&gt;
		point[2].y = y-radius2&lt;br /&gt;
		point[3].x = x+radius&lt;br /&gt;
		point[3].y = y&lt;br /&gt;
		point[4].x = x+radius2&lt;br /&gt;
		point[4].y = y+radius2&lt;br /&gt;
		point[5].x = x&lt;br /&gt;
		point[5].y = y+radius&lt;br /&gt;
		point[6].x = x-radius2&lt;br /&gt;
		point[6].y = y+radius2&lt;br /&gt;
		point[7].x = x-radius&lt;br /&gt;
		point[7].y = y&lt;br /&gt;
		point[8].x = x-radius2&lt;br /&gt;
		point[8].y = y-radius2&lt;br /&gt;
		&lt;br /&gt;
	for i=1,8 do&lt;br /&gt;
		if i ~= 8 then&lt;br /&gt;
			x, y, z, x2, y2, z2 = point[i].x,point[i].y,z,point[i+1].x,point[i+1].y,z&lt;br /&gt;
		else&lt;br /&gt;
			x, y, z, x2, y2, z2 = point[i].x,point[i].y,z,point[1].x,point[1].y,z&lt;br /&gt;
		end&lt;br /&gt;
		dxDrawLine3D(x, y, z, x2, y2, z2, color, width)&lt;br /&gt;
	end&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;
 &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 Show()&lt;br /&gt;
	dxDrawOctagon3D(-706.464, 957.945, 12.439, 2, 1, tocolor(255,0,0,150) )&lt;br /&gt;
end&lt;br /&gt;
addEventHandler ( &amp;quot;onClientRender&amp;quot;, root, Show )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
**Author: boszboszek**&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>Boszboszek</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=DxDrawOctagon3D&amp;diff=65304</id>
		<title>DxDrawOctagon3D</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=DxDrawOctagon3D&amp;diff=65304"/>
		<updated>2020-03-04T16:51:10Z</updated>

		<summary type="html">&lt;p&gt;Boszboszek: /* Example : */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Useful Function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function creates the Octagon , by combining dxDrawLine3D with each other , it needs to act onClientRender because the function of action on frames.&lt;br /&gt;
*'''This is made to be used clientside!.'''&lt;br /&gt;
== Syntax ==&lt;br /&gt;
[[File:Ocatgon.png|thumb|An example of how dxDrawOctagon3D function works in practice.]]&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool dxDrawOctagon3D(int x, int y, int z, [int radius, int width, int color = white] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
== Required Arguments ==&lt;br /&gt;
*'''x:''' x coordinates of the form&lt;br /&gt;
*'''y:''' y coordinates of the form&lt;br /&gt;
*'''z:''' z coordinates of the form&lt;br /&gt;
*'''width:''' Display format&lt;br /&gt;
*'''radius:''' size format&lt;br /&gt;
*'''color:''' Color hard form produced using tocolor&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns true if successful, false if they are not passed good arguments to the function.&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 dxDrawOctagon3D(x, y, z, radius, width, color)&lt;br /&gt;
	if type(x) ~= &amp;quot;number&amp;quot; or type(y) ~= &amp;quot;number&amp;quot; or type(z) ~= &amp;quot;number&amp;quot; then&lt;br /&gt;
		return false&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local radius = radius or 1&lt;br /&gt;
	local radius2 = radius/math.sqrt(2)&lt;br /&gt;
	local width = width or 1&lt;br /&gt;
	local color = color or tocolor(255,255,255,150)&lt;br /&gt;
&lt;br /&gt;
	point = {}&lt;br /&gt;
&lt;br /&gt;
		for i=1,8 do&lt;br /&gt;
			point[i] = {}&lt;br /&gt;
		end&lt;br /&gt;
&lt;br /&gt;
		point[1].x = x&lt;br /&gt;
		point[1].y = y-radius&lt;br /&gt;
		point[2].x = x+radius2&lt;br /&gt;
		point[2].y = y-radius2&lt;br /&gt;
		point[3].x = x+radius&lt;br /&gt;
		point[3].y = y&lt;br /&gt;
		point[4].x = x+radius2&lt;br /&gt;
		point[4].y = y+radius2&lt;br /&gt;
		point[5].x = x&lt;br /&gt;
		point[5].y = y+radius&lt;br /&gt;
		point[6].x = x-radius2&lt;br /&gt;
		point[6].y = y+radius2&lt;br /&gt;
		point[7].x = x-radius&lt;br /&gt;
		point[7].y = y&lt;br /&gt;
		point[8].x = x-radius2&lt;br /&gt;
		point[8].y = y-radius2&lt;br /&gt;
		&lt;br /&gt;
	for i=1,8 do&lt;br /&gt;
		if i ~= 8 then&lt;br /&gt;
			x, y, z, x2, y2, z2 = point[i].x,point[i].y,z,point[i+1].x,point[i+1].y,z&lt;br /&gt;
		else&lt;br /&gt;
			x, y, z, x2, y2, z2 = point[i].x,point[i].y,z,point[1].x,point[1].y,z&lt;br /&gt;
		end&lt;br /&gt;
		dxDrawLine3D(x, y, z, x2, y2, z2, color, width)&lt;br /&gt;
	end&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;
 &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 Show()&lt;br /&gt;
	dxDrawOctagon3D(-706.464, 957.945, 12.439, 2, 1, tocolor(255,0,0,150) )&lt;br /&gt;
end&lt;br /&gt;
addEventHandler ( &amp;quot;onClientRender&amp;quot;, root, Show )&lt;br /&gt;
&lt;br /&gt;
**Author: boszboszek**&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>Boszboszek</name></author>
	</entry>
</feed>