<?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=Renkon</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=Renkon"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/wiki/Special:Contributions/Renkon"/>
	<updated>2026-05-13T03:48:26Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=User:Renkon&amp;diff=53208</id>
		<title>User:Renkon</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=User:Renkon&amp;diff=53208"/>
		<updated>2017-12-27T03:47:18Z</updated>

		<summary type="html">&lt;p&gt;Renkon: /* Who am I */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Who am I==&lt;br /&gt;
&lt;br /&gt;
I'm a 22 year-old boy from Argentina who fancies playing Multi Theft Auto. I started playing SA-MP back in 2007 and moved to MTA in late 2009. Since then I have never left the community (although I got registered in 2010). I'm currently active in FFS Gaming community and the forum itself.&lt;br /&gt;
&lt;br /&gt;
==Feedback==&lt;br /&gt;
&lt;br /&gt;
*Alexs_Steel approves this guy&lt;/div&gt;</summary>
		<author><name>Renkon</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=DxDrawDashedLine&amp;diff=53207</id>
		<title>DxDrawDashedLine</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=DxDrawDashedLine&amp;diff=53207"/>
		<updated>2017-12-27T00:45:00Z</updated>

		<summary type="html">&lt;p&gt;Renkon: /* Optional Arguments */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Useful Function}}&lt;br /&gt;
This function lets you draw a line with dashes or dots.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
dxDrawDashedLine ( int startX, int startY, int endX, int endY, int lengthLine, [ int lengthSpace = lengthLine, int color = 0xFFFFFFFF, int width = 1, bool postGUI = false ] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''startX:''' An integer representing the absolute start X position of the line, represented by pixels on the screen.&lt;br /&gt;
*'''startY:''' An integer representing the absolute start Y position of the line, represented by pixels on the screen.&lt;br /&gt;
*'''endX:''' An integer representing the absolute end X position of the line, represented by pixels on the screen.&lt;br /&gt;
*'''endY:''' An integer representing the absolute end Y position of the line, represented by pixels on the screen.&lt;br /&gt;
*'''lengthLine:''' An integer representing the length of each dash.&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments=== &lt;br /&gt;
*'''lengthSpace:''' An integer representing the length of the empty space between the dashes.&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;
*'''width:''' The width/thickness of the line&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;
This function does not return anything.&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Client-Side Script&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 dxDrawDashedLine(sX, sY, eX, eY, lengthLine, lengthSpace, color, width, postGUI)&lt;br /&gt;
	lengthSpace = lengthSpace or lengthLine;&lt;br /&gt;
	color = color or tocolor(255, 255, 255, 255);&lt;br /&gt;
	width = width or 1;&lt;br /&gt;
	postGUI = postGUI or false;&lt;br /&gt;
	local length = getDistanceBetweenPoints2D(sX, sY, eX, eY);&lt;br /&gt;
	local linePartLength = lengthLine + lengthSpace;&lt;br /&gt;
	local lineParts = length / linePartLength;&lt;br /&gt;
	local xToAdd = (eX - sX) / lineParts;&lt;br /&gt;
	local yToAdd = (eY - sY) / lineParts;&lt;br /&gt;
	local lineRatio = lengthSpace / lengthLine;&lt;br /&gt;
	while (length &amp;gt; 0) do&lt;br /&gt;
		if (lengthLine &amp;gt; length) then&lt;br /&gt;
			dxDrawLine(sX, sY, eX, eY, color, width, postGUI);&lt;br /&gt;
			length = 0;&lt;br /&gt;
		else&lt;br /&gt;
			dxDrawLine(sX, sY, sX + xToAdd - xToAdd * lineRatio, sY + yToAdd - yToAdd * lineRatio, color, width, postGUI);&lt;br /&gt;
			sX = sX + xToAdd;&lt;br /&gt;
			sY = sY + yToAdd;&lt;br /&gt;
			length = length - linePartLength;&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;
==Example==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Client-Side Example&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This example shows how to draw an X on the screen.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local sW, sH = guiGetScreenSize()&lt;br /&gt;
&lt;br /&gt;
addEventHandler(&amp;quot;onClientRender&amp;quot;, root, function()&lt;br /&gt;
	dxDrawDashedLine(100, 100, sW - 100, sH - 100, 10, 5, tocolor(255, 255, 255, 255), 2, false);&lt;br /&gt;
	dxDrawDashedLine(100, sH - 100, sW - 100, 100, 10, 5, tocolor(255, 255, 255, 255), 2, false);&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;
'''Author: Renkon'''&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Useful_Functions}}&lt;br /&gt;
[[:Category:Useful_Functions]]&lt;/div&gt;</summary>
		<author><name>Renkon</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=DxDrawDashedLine&amp;diff=53206</id>
		<title>DxDrawDashedLine</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=DxDrawDashedLine&amp;diff=53206"/>
		<updated>2017-12-27T00:38:46Z</updated>

		<summary type="html">&lt;p&gt;Renkon: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Useful Function}}&lt;br /&gt;
This function lets you draw a line with dashes or dots.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
dxDrawDashedLine ( int startX, int startY, int endX, int endY, int lengthLine, [ int lengthSpace = lengthLine, int color = 0xFFFFFFFF, int width = 1, bool postGUI = false ] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''startX:''' An integer representing the absolute start X position of the line, represented by pixels on the screen.&lt;br /&gt;
*'''startY:''' An integer representing the absolute start Y position of the line, represented by pixels on the screen.&lt;br /&gt;
*'''endX:''' An integer representing the absolute end X position of the line, represented by pixels on the screen.&lt;br /&gt;
*'''endY:''' An integer representing the absolute end Y position of the line, represented by pixels on the screen.&lt;br /&gt;
*'''lengthLine:''' An integer representing the length of each dash.&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments=== &lt;br /&gt;
*'''lengthSpace:''' An integer representing the length of the empty space between the dashes.&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;
&lt;br /&gt;
===Returns===&lt;br /&gt;
This function does not return anything.&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Client-Side Script&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 dxDrawDashedLine(sX, sY, eX, eY, lengthLine, lengthSpace, color, width, postGUI)&lt;br /&gt;
	lengthSpace = lengthSpace or lengthLine;&lt;br /&gt;
	color = color or tocolor(255, 255, 255, 255);&lt;br /&gt;
	width = width or 1;&lt;br /&gt;
	postGUI = postGUI or false;&lt;br /&gt;
	local length = getDistanceBetweenPoints2D(sX, sY, eX, eY);&lt;br /&gt;
	local linePartLength = lengthLine + lengthSpace;&lt;br /&gt;
	local lineParts = length / linePartLength;&lt;br /&gt;
	local xToAdd = (eX - sX) / lineParts;&lt;br /&gt;
	local yToAdd = (eY - sY) / lineParts;&lt;br /&gt;
	local lineRatio = lengthSpace / lengthLine;&lt;br /&gt;
	while (length &amp;gt; 0) do&lt;br /&gt;
		if (lengthLine &amp;gt; length) then&lt;br /&gt;
			dxDrawLine(sX, sY, eX, eY, color, width, postGUI);&lt;br /&gt;
			length = 0;&lt;br /&gt;
		else&lt;br /&gt;
			dxDrawLine(sX, sY, sX + xToAdd - xToAdd * lineRatio, sY + yToAdd - yToAdd * lineRatio, color, width, postGUI);&lt;br /&gt;
			sX = sX + xToAdd;&lt;br /&gt;
			sY = sY + yToAdd;&lt;br /&gt;
			length = length - linePartLength;&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;
==Example==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Client-Side Example&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This example shows how to draw an X on the screen.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local sW, sH = guiGetScreenSize()&lt;br /&gt;
&lt;br /&gt;
addEventHandler(&amp;quot;onClientRender&amp;quot;, root, function()&lt;br /&gt;
	dxDrawDashedLine(100, 100, sW - 100, sH - 100, 10, 5, tocolor(255, 255, 255, 255), 2, false);&lt;br /&gt;
	dxDrawDashedLine(100, sH - 100, sW - 100, 100, 10, 5, tocolor(255, 255, 255, 255), 2, false);&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;
'''Author: Renkon'''&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Useful_Functions}}&lt;br /&gt;
[[:Category:Useful_Functions]]&lt;/div&gt;</summary>
		<author><name>Renkon</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=DxDrawDashedLine&amp;diff=53205</id>
		<title>DxDrawDashedLine</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=DxDrawDashedLine&amp;diff=53205"/>
		<updated>2017-12-27T00:36:39Z</updated>

		<summary type="html">&lt;p&gt;Renkon: Created page with &amp;quot;__NOTOC__ {{Useful Function}} This function lets you draw a line with dashes or dots.  ==Syntax==  &amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt; dxDrawDashedLine ( int startX, int startY, int...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Useful Function}}&lt;br /&gt;
This function lets you draw a line with dashes or dots.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
dxDrawDashedLine ( int startX, int startY, int endX, int endY, int lengthLine, [ int lengthSpace = lengthLine, int color = 0xFFFFFFFF, int width = 1, bool postGUI = false ] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''startX:''' An integer representing the absolute start X position of the line, represented by pixels on the screen.&lt;br /&gt;
*'''startY:''' An integer representing the absolute start Y position of the line, represented by pixels on the screen.&lt;br /&gt;
*'''endX:''' An integer representing the absolute end X position of the line, represented by pixels on the screen.&lt;br /&gt;
*'''endY:''' An integer representing the absolute end Y position of the line, represented by pixels on the screen.&lt;br /&gt;
*'''lengthLine:''' An integer representing the length of each dash.&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments=== &lt;br /&gt;
*'''lengthSpace:''' An integer representing the length of the empty space between the dashes.&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;
&lt;br /&gt;
===Returns===&lt;br /&gt;
This function does not return anything.&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Client-Side Script&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 dxDrawDashedLine(sX, sY, eX, eY, lengthLine, lengthSpace, color, width, postGUI)&lt;br /&gt;
	lengthSpace = lengthSpace or lengthLine;&lt;br /&gt;
	color = color or tocolor(255, 255, 255, 255);&lt;br /&gt;
	width = width or 1;&lt;br /&gt;
	postGUI = postGUI or false;&lt;br /&gt;
	local length = getDistanceBetweenPoints2D(sX, sY, eX, eY);&lt;br /&gt;
	local linePartLength = lengthLine + lengthSpace;&lt;br /&gt;
	local lineParts = length / linePartLength;&lt;br /&gt;
	local xToAdd = (eX - sX) / lineParts;&lt;br /&gt;
	local yToAdd = (eY - sY) / lineParts;&lt;br /&gt;
	local lineRatio = lengthSpace / lengthLine;&lt;br /&gt;
	while (length &amp;gt; 0) do&lt;br /&gt;
		if (lengthLine &amp;gt; length) then&lt;br /&gt;
			dxDrawLine(sX, sY, eX, eY, color, width, postGUI);&lt;br /&gt;
			length = 0;&lt;br /&gt;
		else&lt;br /&gt;
			dxDrawLine(sX, sY, sX + xToAdd - xToAdd * lineRatio, sY + yToAdd - yToAdd * lineRatio, color, width, postGUI);&lt;br /&gt;
			sX = sX + xToAdd;&lt;br /&gt;
			sY = sY + yToAdd;&lt;br /&gt;
			length = length - linePartLength;&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;
==Example==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Client-Side Example&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This example shows how to draw an X on the screen.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local sW, sH = guiGetScreenSize()&lt;br /&gt;
&lt;br /&gt;
addEventHandler(&amp;quot;onClientRender&amp;quot;, root, function()&lt;br /&gt;
	dxDrawDashedLine(100, 100, sW - 100, sH - 100, 10, 5, tocolor(255, 255, 255, 255), 2, false);&lt;br /&gt;
	dxDrawDashedLine(100, sW - 100, sH - 100, 100, 10, 5, tocolor(255, 255, 255, 255), 2, false);&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;
'''Author: Renkon'''&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Useful_Functions}}&lt;br /&gt;
[[:Category:Useful_Functions]]&lt;/div&gt;</summary>
		<author><name>Renkon</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Template:Useful_Functions&amp;diff=53204</id>
		<title>Template:Useful Functions</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Template:Useful_Functions&amp;diff=53204"/>
		<updated>2017-12-27T00:24:30Z</updated>

		<summary type="html">&lt;p&gt;Renkon: added dxDrawDashedLine&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== ACL functions ===&lt;br /&gt;
*[[aclGroupClone]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function clone a group to another group with/without ACLs and/or objects.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPlayerAcls]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table of all ACL groups on a player.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isPlayerInACL]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks if a player element is in an ACL group.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[renameAclGroup]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function gives an existing ACL group a new name.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Account functions ===&lt;br /&gt;
*[[setAccountName]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function is used to change an existing account's name.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[removeAccountData]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function is used to remove data from account .&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Camera functions ===&lt;br /&gt;
*[[smoothMoveCamera]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to create a cinematic camera flight.&lt;br /&gt;
&lt;br /&gt;
=== Cursor functions ===&lt;br /&gt;
*[[getCursorMoveOn]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks in which way the cursor is currently moving.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getCursorMovedOn]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks in which way the cursor is currently moving.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Drawing functions ===&lt;br /&gt;
*[[dxDrawAnimWindow]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function draws an animated 2D window on the screen.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawCircle]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function draws a number of 2D lines in order to achieve a circle shape on the screen.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawDashedLine]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function draws a line with dashes.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawOctagon3D]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function creates a 3D Octagon&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawTriangle]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This is a function that will create a triangle with dx lines.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawLinedRectangle]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This is a function that will create a rectangle outline with dx lines.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawBorderedRectangle]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This is a function that will create a bordered rectangle .&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawGifImage]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function simulates the effect of a GIF image by using image sprites in 2D.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawImage3D]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function draws a 3D image in GTA world.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawImageOnElement]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function draws an image on any element.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawLoading]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function draws a loading bar on the screen.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawProgressBar]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function simulates a progress bar drawed using DirectDraw.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawRectangle3D]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function draws a 3D rectangle in GTA world.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawTextOnElement]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function draws a text on any element.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxGetFontSizeFromHeight]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function calculates the font size from given height.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxGetRealFontHeight]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function calculates the height of a font.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Effects functions ===&lt;br /&gt;
*[[attachEffect]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows you attach an effect to an element.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Elements functions === &lt;br /&gt;
*[[getElementSpeed]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns the specified element's speed in m/s, km/h or mph.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getElementsInDimension]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table of elements that are in the specified dimension.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getElementsWithinMarker]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table of elements that are within a marker's collision shape.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isElementInPhotograph]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks if an element is in the player's camera picture area.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isElementInRange]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to check if an element's range to a main point is within the maximum range.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isElementMoving]]&amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks if an element is moving.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isElementWithinAColShape]]&amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks if an element is within a collision shape element.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[multi_check]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks one element to many, handy and clean.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[setElementSpeed]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to set the speed of an element in kph or mph units.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Events ===&lt;br /&gt;
*[[onVehicleWeaponFire]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This code implements an event that is triggered when a player in a vehicle fires a vehicle's weapon.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Input functions ===&lt;br /&gt;
*[[bindControlKeys]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to bind each key bound to a control individually. Doing this bypasses a little MTA restriction.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getBoundControls]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table of control names that are bound to the specified key.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[unbindControlKeys]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to unbind each key bound to a control individually. Use this function with [[bindControlKeys]].&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Data functions === &lt;br /&gt;
*[[Byte2human]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function converts an integer (number of bytes) into a human-readable unit.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[capitalize]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function capitalizes a given string.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[convertNumber]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function converts and formats large numbers.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[convertServerTickToTimeStamp]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function converts server ticks to a unix timestamp.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[convertTextToSpeech]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function converts the provided text to a speech in the provided language which players can hear.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[findRotation]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function takes two points and returns the direction from point A to point B.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[FormatDate]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function formats a date on the basis of a format string and returns it.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getRealMonthM]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function gives you the real months name&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getRealMonthH]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function convert english months to arabic months&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[generateString]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function generates a random string with any characters.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[generateRandomASCIIString]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a random string which uses ASCII characters. &amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getAge]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function calculates the age of a given birthday.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getDistanceBetweenPointAndSegment2D]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function takes point coordinates and line (a segment) starting and ending coordinates. It returns the shortest distance between the point and the line.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getEasterDate]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns easter date monthday and month for a given year.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getKeyFromValueInTable]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns the key of the specified value in a table.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getOffsetFromXYZ]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to take an entity and a position and calculate the relative offset between them accounting for rotations.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPointFromDistanceRotation]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function finds a point based on a starting point, direction and distance.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getRGColorFromPercentage]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia', sans-serif; font-size:smaller;&amp;quot;&amp;gt;»This function returns two integers representing red and green colors according to the specified percentage.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getScreenRotationFromWorldPosition]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a screen relative rotation to a world position.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getTimestamp]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns the UNIX timestamp of a specified date and time.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isLeapYear]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a boolean representing if a given year is a leap year.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isValidMail]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks whether a provided e-mail string is valid.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[removeHex]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function is used to remove hexadecimal numbers (colors, for example) from strings.&lt;br /&gt;
*[[RGBToHex]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a string representing the color in hexadecimal.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[toHex]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function converts a decimal number to a hexadecimal number, as a fix to be used client-side.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[secondsToTimeDesc]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function converts a plain seconds-integer into a user-friendly time description.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[string.count]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function counts the amount of occurences of a string in a string.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[string.explode]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function splits a string at a given separator pattern and returns a table with the pieces.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[switch]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows the value of a variable or expression to control the flow of program execution via a multiway branch.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[var dump]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function outputs information about one or more variables using outputConsole.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[wavelengthToRGBA]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function converts a physical wavelength of light to a RGBA color.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== GUI functions === &lt;br /&gt;
*[[centerWindow]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function centers a CEGUI window element responsively in any resolution.&amp;lt;/span&amp;gt;&lt;br /&gt;
=====Comboboxes=====&lt;br /&gt;
*[[guiComboBoxAdjustHeight]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function adjusts a CEGUI combobox element to have the correct height.&amp;lt;/span&amp;gt;&lt;br /&gt;
=====Gridlists=====&lt;br /&gt;
*[[getGridListRowIndexFromText]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns the GridList row index from the specified text.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[guiGridListGetSelectedText]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a string containing the inner text of a selected gridlist item.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[guiGridListAddPlayers]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function add all online players to a grid list.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isTextInGridList]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks if some text exist or not in the GridList.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Math functions ===&lt;br /&gt;
*[[mathNumber]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function is a workaround for the client-side floating-point precision of 24-bits.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[math.hypot]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns the Hypotenuse of the triangle given by sides x and y.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[math.percent]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a percentage from two number values.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[math.round]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» Rounds a number whereas the number of decimals to keep and the method may be set.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[reMap]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» Re-maps a number from one range to another.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Ped functions ===&lt;br /&gt;
*[[getAlivePlayers (Client)|getAlivePlayers]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table of the alive players client-side.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getAlivePlayersInTeam]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table of the alive players in a team.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getOnlineAdmins]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table of all logged-in administrators.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPedMaxHealth]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a pedestrians's maximum health by converting it from their maximum health stat.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPedMaxOxygenLevel]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a ped's maximum oxygen level by converting it from their maximum underwater stamina stat.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPlayerFromNamePart]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a player from partial name.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPlayerFromSerial]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a player from their serial.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPlayersInGroup]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns all Players In Group .&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getGuestPlayers]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function gets a players not login or players Guest .&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPlayersByData]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table of players that have the specified data name.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPlayersInPhotograph]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table of all players in photograph.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isPedAiming]]&amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks if a pedestrian is aiming their weapon.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isPedDrivingVehicle]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks if a specified pedestrian is driving a vehicle.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isPlayerInTeam]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks if a player is in a specified team.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isPedAimingNearPed]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This is similar to isPedAiming but uses a colshape to be more precise.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPedEyesPosition]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to get peds eyes position.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Resource functions ===&lt;br /&gt;
*[[getResourceSettings]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table of the resource settings.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getResourceScripts]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table of the resource scripts.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[refreshResource]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function refreshes your resource if you changed any of the files&lt;br /&gt;
&lt;br /&gt;
=== Sound functions ===&lt;br /&gt;
*[[isSoundFinished]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks if a sound element has finished.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[stopSoundSlowly]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function stop your sound element slowly.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Table functions ===&lt;br /&gt;
*[[rangeToTable]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function converts a string range to a table containing number values.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[setTableProtected]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function protects a table and makes it read-only.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[table.copy]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function copies a whole table and all the tables in that table.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[table.compare]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks whether two given tables are equal.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[table.empty]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks whether a table is empty.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[table.map]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function goes through a table and replaces every field with the return of the passed function, where the field's value is passed as first argument and optionally more arguments.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[table.merge]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function merges two or more tables together.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[table.random]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function retrieves a random value from a table.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[table.size]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns the absolute size of a table.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[table.removeValue]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function removes a specified value from a table.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[Sort_Functions]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» These functions are able to sort your tables by a key.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Team functions ===&lt;br /&gt;
*[[getTeamFromColor]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a team element by the specified color.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getTeamWithFewestPlayers]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a team element with least players of all the specified teams.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Vehicle funcions === &lt;br /&gt;
*[[getRandomVehicle]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function gets a random vehicle.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getValidVehicleModels]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table of all valid vehicle models.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getVehicleRespawnPosition]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to get the respawn position of a vehicle.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getVehiclesCountByType]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns the amount of vehicles by the given type as an integer value.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isVehicleEmpty]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks whether a vehicle is empty.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getNearestVehicle]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function gets the nearest vehicle to the specified player in a specified distance.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isVehicleOccupied]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks if a specified vehicle is occupied.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isVehicleMovingBackwards]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks if a specified vehicle is moving backwards.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isVehicleOnRoof]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks whether vehicle is on roof.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[setVehicleGravityPoint]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function sets a vehicle's gravity in the direction of a 3 dimensional coordinate with the strength specified.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Weapon functions === &lt;br /&gt;
*[[getJetpackWeaponsEnabled]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table of enabled weapons usable on a jetpack.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== XML functions ===&lt;br /&gt;
*[[getXMLNodes]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns all children of a XML node.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Utility ===&lt;br /&gt;
*[[Check]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks if its arguments are of the right type and calls the error-function if one is not.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[coroutine.resume]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function applies a fix for hidden coroutine error messages.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[callClientFunction]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to call any client-side function from the server's side.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[callServerFunction]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to call any server-side function from the client's side.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[animate]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to use interpolateBetween without render event and easily used.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getBanFromName]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This functions returns the ban of the given playername.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getCurrentFPS]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns the frames per second at which GTA: SA is running.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[IfElse]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns one of two values based on a boolean expression.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isCursorOnElement]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks whether the cursor is in a particular area.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isMouseInCircle]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks if a cursor position is in circular area or not.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isMouseInPosition]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to check whether the mouse cursor/pointer is within a rectangular position.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[iterElements]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns ''a time-saving'' iterator for your for-loops.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[vector3:compare]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This method checks whether two vectors match, with optional precision.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[thisCommandHandlersExist]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This method checks a string if this exist as command Handlers&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Useful Functions]]&lt;/div&gt;</summary>
		<author><name>Renkon</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Template:Useful_Functions&amp;diff=50537</id>
		<title>Template:Useful Functions</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Template:Useful_Functions&amp;diff=50537"/>
		<updated>2017-03-08T23:23:24Z</updated>

		<summary type="html">&lt;p&gt;Renkon: /* Data functions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== ACL functions ===&lt;br /&gt;
*[[aclGroupClone]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function clone a group to another group with/without ACLs and/or objects.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPlayerAcls]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table of all ACL groups on a player.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isPlayerInACL]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks if a player element is in an ACL group.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[renameAclGroup]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function gives an existing ACL group a new name.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Account functions ===&lt;br /&gt;
*[[setAccountName]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function is used to change an existing account's name.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[removeAccountData]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function is used to remove data from account .&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Camera functions ===&lt;br /&gt;
*[[smoothMoveCamera]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to create a cinematic camera flight.&lt;br /&gt;
&lt;br /&gt;
=== Cursor functions ===&lt;br /&gt;
*[[getCursorMoveOn]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks in which way the cursor is currently moving.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Drawing functions ===&lt;br /&gt;
*[[dxDrawAnimWindow]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function draws an animated 2D window on the screen.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawCircle]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function draws a number of 2D lines in order to achieve a circle shape on the screen.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawOctagon3D]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function creates a 3D Octagon&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawTriangle]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This is a function that will create a triangle with dx lines.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawLinedRectangle]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This is a function that will create a rectangle outline with dx lines.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawBorderedRectangle]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This is a function that will create a bordered rectangle .&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawGifImage]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function simulates the effect of a GIF image by using image sprites in 2D.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawImage3D]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function draws a 3D image in GTA world.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawImageOnElement]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function draws an image on any element.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawLoading]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function draws a loading bar on the screen.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawProgressBar]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function simulates a progress bar drawed using DirectDraw.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawRectangle3D]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function draws a 3D rectangle in GTA world.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawTextOnElement]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function draws a text on any element.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxGetFontSizeFromHeight]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function calculates the font size from given height.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxGetRealFontHeight]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function calculates the height of a font.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Effects functions ===&lt;br /&gt;
*[[attachEffect]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows you attach an effect to an element.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Elements functions === &lt;br /&gt;
*[[getElementSpeed]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns the specified element's speed in m/s, km/h or mph.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getElementsInDimension]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table of elements that are in the specified dimension.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getElementsWithinMarker]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table of elements that are within a marker's collision shape.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isElementInPhotograph]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks if an element is in the player's camera picture area.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isElementInRange]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to check if an element's range to a main point is within the maximum range.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isElementMoving]]&amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks if an element is moving.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isElementWithinAColShape]]&amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks if an element is within a collision shape element.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[multi_check]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks one element to many, handy and clean.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[setElementSpeed]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to set the speed of an element in kph or mph units.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Events ===&lt;br /&gt;
*[[onVehicleWeaponFire]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This code implements an event that is triggered when a player in a vehicle fires a vehicle's weapon.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Input functions ===&lt;br /&gt;
*[[bindControlKeys]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to bind each key bound to a control individually. Doing this bypasses a little MTA restriction.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getBoundControls]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table of control names that are bound to the specified key.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[unbindControlKeys]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to unbind each key bound to a control individually. Use this function with [[bindControlKeys]].&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Data functions === &lt;br /&gt;
*[[Byte2human]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function converts an integer (number of bytes) into a human-readable unit.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[capitalize]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function capitalizes a given string.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[convertNumber]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function converts and formats large numbers.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[convertServerTickToTimeStamp]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function converts server ticks to a unix timestamp.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[convertTextToSpeech]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function converts the provided text to a speech in the provided language which players can hear.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[findRotation]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function takes two points and returns the direction from point A to point B.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[FormatDate]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function formats a date on the basis of a format string and returns it.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getRealMonthM]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function gives you the real months name&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getRealMonthH]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function convert english months to arabic months&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[generateString]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function generates a random string with any characters.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[generateRandomASCIIString]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a random string which uses ASCII characters. &amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getAge]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function calculates the age of a given birthday.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getDistanceBetweenPointAndSegment2D]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function takes point coordinates and line (a segment) starting and ending coordinates. It returns the shortest distance between the point and the line.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getEasterDate]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns easter date monthday and month for a given year.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getKeyFromValueInTable]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns the key of the specified value in a table.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getOffsetFromXYZ]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to take an entity and a position and calculate the relative offset between them accounting for rotations.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPointFromDistanceRotation]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function finds a point based on a starting point, direction and distance.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getRGColorFromPercentage]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia', sans-serif; font-size:smaller;&amp;quot;&amp;gt;»This function returns two integers representing red and green colors according to the specified percentage.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getScreenRotationFromWorldPosition]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a screen relative rotation to a world position.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getTimestamp]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns the UNIX timestamp of a specified date and time.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isLeapYear]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a boolean representing if a given year is a leap year.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isValidMail]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks whether a provided e-mail string is valid.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[removeHex]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function is used to remove hex color codes from strings.&lt;br /&gt;
*[[RGBToHex]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a string representing the color in hexadecimal.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[toHex]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function converts a decimal number to a hexadecimal number, as a fix to be used client-side.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[secondsToTimeDesc]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function converts a plain seconds-integer into a user-friendly time description.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[string.count]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function counts the amount of occurences of a string in a string.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[string.explode]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function splits a string at a given separator pattern and returns a table with the pieces.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[switch]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows the value of a variable or expression to control the flow of program execution via a multiway branch.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[var dump]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function outputs information about one or more variables using outputConsole.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[wavelengthToRGBA]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function converts a physical wavelength of light to a RGBA color.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== GUI functions === &lt;br /&gt;
*[[centerWindow]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function centers a CEGUI window element responsively in any resolution.&amp;lt;/span&amp;gt;&lt;br /&gt;
=====Comboboxes=====&lt;br /&gt;
*[[guiComboBoxAdjustHeight]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function adjusts a CEGUI combobox element to have the correct height.&amp;lt;/span&amp;gt;&lt;br /&gt;
=====Gridlists=====&lt;br /&gt;
*[[getGridListRowIndexFromText]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns the GridList row index from the specified text.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[guiGridListGetSelectedText]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a string containing the inner text of a selected gridlist item.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[guiGridListAddPlayers]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function add all online players to a grid list.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isTextInGridList]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks if some text exist or not in the GridList.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Math functions ===&lt;br /&gt;
*[[mathNumber]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function is a workaround for the client-side floating-point precision of 24-bits.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[math.hypot]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns the Hypotenuse of the triangle given by sides x and y.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[math.percent]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a percentage from two number values.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[math.round]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» Rounds a number whereas the number of decimals to keep and the method may be set.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Ped functions ===&lt;br /&gt;
*[[getAlivePlayers (Client)|getAlivePlayers]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table of the alive players client-side.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getAlivePlayersInTeam]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table of the alive players in a team.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getOnlineAdmins]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table of all logged-in administrators.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPedMaxHealth]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a pedestrians's maximum health by converting it from their maximum health stat.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPedMaxOxygenLevel]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a ped's maximum oxygen level by converting it from their maximum underwater stamina stat.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPlayerFromNamePart]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a player from partial name.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPlayerFromSerial]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a player from their serial.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPlayersInGroup]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns all Players In Group .&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getGuestPlayers]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function gets a players not login or players Guest .&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getDimensionEmpty]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns id Dimension Empty .&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPlayersByData]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table of players that have the specified data name.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPlayersInPhotograph]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table of all players in photograph.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isPedAiming]]&amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks if a pedestrian is aiming their weapon.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isPedDrivingVehicle]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks if a specified pedestrian is driving a vehicle.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isPlayerInTeam]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks if a player is in a specified team.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isPedAimingNearPed]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This is similar to isPedAiming but uses a colshape to be more precise.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPedEyesPosition]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to get peds eyes position.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Resource functions ===&lt;br /&gt;
*[[getResourceSettings]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table of the resource settings.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getResourceScripts]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table of the resource scripts.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[refreshResource]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function refreshes your resource if you changed any of the files&lt;br /&gt;
&lt;br /&gt;
=== Sound functions ===&lt;br /&gt;
*[[isSoundFinished]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks if a sound element has finished.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[stopSoundSlowly]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function stop your sound element slowly.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Table functions ===&lt;br /&gt;
*[[rangeToTable]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function converts a string range to a table containing number values.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[setTableProtected]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function protects a table and makes it read-only.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[table.copy]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function copies a whole table and all the tables in that table.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[table.compare]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks whether two given tables are equal.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[table.empty]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks whether a table is empty.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[table.map]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function goes through a table and replaces every field with the return of the passed function, where the field's value is passed as first argument and optionally more arguments.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[table.merge]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function merges two or more tables together.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[table.random]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function retrieves a random value from a table.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[table.size]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns the absolute size of a table.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[table.removeValue]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function removes a specified value from a table.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Team functions ===&lt;br /&gt;
*[[getTeamFromColor]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a team element by the specified color.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getTeamWithFewestPlayers]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a team element with least players of all the specified teams.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Vehicle funcions === &lt;br /&gt;
*[[getRandomVehicle]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function gets a random vehicle.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getValidVehicleModels]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table of all valid vehicle models.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getVehicleRespawnPosition]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to get the respawn position of a vehicle.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getVehiclesCountByType]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns the amount of vehicles by the given type as an integer value.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isVehicleEmpty]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks whether a vehicle is empty.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isVehicleOccupied]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks if a specified vehicle is occupied.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isVehicleOnRoof]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks whether vehicle is on roof.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[setVehicleGravityPoint]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function sets a vehicle's gravity in the direction of a 3 dimensional coordinate with the strength specified.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Weapon functions === &lt;br /&gt;
*[[getJetpackWeaponsEnabled]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table of enabled weapons usable on a jetpack.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== XML functions ===&lt;br /&gt;
*[[getXMLNodes]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns all children of a XML node.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Utility ===&lt;br /&gt;
*[[Check]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks if its arguments are of the right type and calls the error-function if one is not.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[coroutine.resume]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function applies a fix for hidden coroutine error messages.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[callClientFunction]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to call any client-side function from the server's side.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[callServerFunction]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to call any server-side function from the client's side.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[createAnimation]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to use interpolateBetween without render event and easily used.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getBanFromName]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This functions returns the ban of the given playername.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getCurrentFPS]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns the frames per second at which GTA: SA is running.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[IfElse]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns one of two values based on a boolean expression.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isCursorOnElement]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks whether the cursor is in a particular area.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isMouseInCircle]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks if a cursor position is in circular area or not.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isMouseInPosition]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to check whether the mouse cursor/pointer is within a rectangular position.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[iterElements]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns ''a time-saving'' iterator for your for-loops.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[vector3:compare]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This method checks whether two vectors match, with optional precision.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Useful Functions]]&lt;/div&gt;</summary>
		<author><name>Renkon</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Byte2human&amp;diff=50536</id>
		<title>Byte2human</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Byte2human&amp;diff=50536"/>
		<updated>2017-03-08T23:21:27Z</updated>

		<summary type="html">&lt;p&gt;Renkon: Created page with &amp;quot;__NOTOC__ {{Useful Function}} This function lets you transform a number of bytes into a human readable unit.  ==Syntax==  &amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt; string byte2human ( int...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Useful Function}}&lt;br /&gt;
This function lets you transform a number of bytes into a human readable unit.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
string byte2human ( int bytes )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''bytes:''' The value which you want to get the human readable version.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns a string which shows the number transformed into a human-friendly string.&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server/Client-Side Script&amp;quot; class=&amp;quot;both&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 byte2human(bytes, si)&lt;br /&gt;
	local threshold = si and 1000 or 1024&lt;br /&gt;
	if (math.abs(bytes) &amp;lt; threshold) then&lt;br /&gt;
		return bytes .. &amp;quot; B&amp;quot;&lt;br /&gt;
	end&lt;br /&gt;
	local units = &lt;br /&gt;
	si and {&amp;quot;kB&amp;quot;, &amp;quot;MB&amp;quot;, &amp;quot;GB&amp;quot;, &amp;quot;TB&amp;quot;, &amp;quot;PB&amp;quot;, &amp;quot;EB&amp;quot;, &amp;quot;ZB&amp;quot;, &amp;quot;YB&amp;quot;}&lt;br /&gt;
	    or {&amp;quot;KiB&amp;quot;, &amp;quot;MiB&amp;quot;, &amp;quot;GiB&amp;quot;, &amp;quot;TiB&amp;quot;, &amp;quot;PiB&amp;quot;, &amp;quot;EiB&amp;quot;, &amp;quot;ZiB&amp;quot;, &amp;quot;YiB&amp;quot;}&lt;br /&gt;
	local unitIndex = 0&lt;br /&gt;
	repeat&lt;br /&gt;
		bytes = bytes / threshold&lt;br /&gt;
		unitIndex = unitIndex + 1&lt;br /&gt;
	until not (math.abs(bytes) &amp;gt;= threshold and unitIndex &amp;lt; #units)&lt;br /&gt;
	return math.simpleround(bytes, 2) .. &amp;quot; &amp;quot; .. units[unitIndex]&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;
'''Author: Renkon'''&lt;br /&gt;
(based on http://stackoverflow.com/a/14919494/2980812)&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Useful_Functions}}&lt;br /&gt;
[[:Category:Useful_Functions]]&lt;/div&gt;</summary>
		<author><name>Renkon</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=User:Renkon&amp;diff=50535</id>
		<title>User:Renkon</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=User:Renkon&amp;diff=50535"/>
		<updated>2017-03-08T23:17:55Z</updated>

		<summary type="html">&lt;p&gt;Renkon: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Who am I==&lt;br /&gt;
&lt;br /&gt;
I'm a 21 year-old boy from Argentina who fancies playing Multi Theft Auto. I started playing SA-MP back in 2007 and moved to MTA in late 2009. Since then I have never left the community (although I got registered in 2010). I'm currently active in FFS Gaming community and the forum itself.&lt;br /&gt;
&lt;br /&gt;
==Feedback==&lt;br /&gt;
&lt;br /&gt;
*Alexs_Steel approves this guy&lt;/div&gt;</summary>
		<author><name>Renkon</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Table.empty&amp;diff=50347</id>
		<title>Table.empty</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Table.empty&amp;diff=50347"/>
		<updated>2017-01-18T04:03:46Z</updated>

		<summary type="html">&lt;p&gt;Renkon: fixed how to check if its empty.. since current state would show {[false] = 0} as empty&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Useful Function}}&lt;br /&gt;
&amp;lt;lowercasetitle&amp;gt;&amp;lt;/lowercasetitle&amp;gt;&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function check is empty table or not.&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;boolean table.empty( table a )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
* '''a''': The table for check.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns the true if table is empty or false in otherwise. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;section name=&amp;quot;Code&amp;quot; class=&amp;quot;both&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 table.empty( a )&lt;br /&gt;
    if type( a ) ~= &amp;quot;table&amp;quot; then&lt;br /&gt;
        return false&lt;br /&gt;
    end&lt;br /&gt;
    &lt;br /&gt;
    return next(a) == nil&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;section name=&amp;quot;Example&amp;quot; class=&amp;quot;both&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;
print( 'empty = ' .. tostring( table.empty( { [0] = 1 } ) ) ) -- false&lt;br /&gt;
print( 'empty = ' .. tostring( table.empty( { [10] = 10, [2] = 2 } ) ) ) -- false&lt;br /&gt;
print( 'empty = ' .. tostring( table.empty( { } ) ) ) -- true&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Author: Kenix &amp;amp; Renkon&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Useful_Functions}}&lt;/div&gt;</summary>
		<author><name>Renkon</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Installing_and_Running_MTASA_Server_on_GNU_Linux&amp;diff=49755</id>
		<title>Installing and Running MTASA Server on GNU Linux</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Installing_and_Running_MTASA_Server_on_GNU_Linux&amp;diff=49755"/>
		<updated>2016-11-03T23:29:21Z</updated>

		<summary type="html">&lt;p&gt;Renkon: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Installation 64 bit ==&lt;br /&gt;
&lt;br /&gt;
=== Main binary ===&lt;br /&gt;
Download the latest stable 64 bit Linux binaries:&lt;br /&gt;
 rm -f multitheftauto_linux_x64-{{Current Version|full}}.tar.gz&lt;br /&gt;
 wget &amp;lt;nowiki&amp;gt;http&amp;lt;/nowiki&amp;gt;://linux.mtasa.com/dl/{{Current Version|fullnodots}}/multitheftauto_linux_x64-{{Current Version|full}}.tar.gz&lt;br /&gt;
&lt;br /&gt;
Unpack into a directory:&lt;br /&gt;
 tar -xf multitheftauto_linux_x64-{{Current Version|full}}.tar.gz&lt;br /&gt;
&lt;br /&gt;
=== Default config ===&lt;br /&gt;
Download the default config files:&lt;br /&gt;
 rm -f baseconfig-{{Current Version|full}}.tar.gz&lt;br /&gt;
 wget &amp;lt;nowiki&amp;gt;http&amp;lt;/nowiki&amp;gt;://linux.mtasa.com/dl/{{Current Version|fullnodots}}/baseconfig-{{Current Version|full}}.tar.gz&lt;br /&gt;
&lt;br /&gt;
Unpack and move into the deathmatch directory:&amp;lt;br/&amp;gt;&lt;br /&gt;
('''''Note:''' Only do this for new installations as it will overwrite any existing config files.)''&lt;br /&gt;
 tar -xf baseconfig-{{Current Version|full}}.tar.gz&lt;br /&gt;
 mv baseconfig/* multitheftauto_linux_x64-{{Current Version|full}}/mods/deathmatch&lt;br /&gt;
&lt;br /&gt;
Change to the MTA server install directory:&lt;br /&gt;
 cd multitheftauto_linux_x64-{{Current Version|full}}&lt;br /&gt;
&lt;br /&gt;
=== Test ===&lt;br /&gt;
You can now test if the server will start correctly:&lt;br /&gt;
 ./mta-server64&lt;br /&gt;
&lt;br /&gt;
=== Default resources ===&lt;br /&gt;
If you need the default resources:&lt;br /&gt;
Download the latest default resources zip from http://mirror.mtasa.com/mtasa/resources/&lt;br /&gt;
and unzip into '''mods/deathmatch/resources'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Make sure you are in the MTA server install directory when following this example:'''&lt;br /&gt;
 apt-get install unzip&lt;br /&gt;
 mkdir mods/deathmatch/resources&lt;br /&gt;
 cd mods/deathmatch/resources&lt;br /&gt;
 rm -f mtasa-resources-latest.zip&lt;br /&gt;
 wget &amp;lt;nowiki&amp;gt;http&amp;lt;/nowiki&amp;gt;://mirror.mtasa.com/mtasa/resources/mtasa-resources-latest.zip&lt;br /&gt;
 unzip mtasa-resources-latest.zip&lt;br /&gt;
 rm -f mtasa-resources-latest.zip&lt;br /&gt;
 cd ../../..&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Installation 32 bit ==&lt;br /&gt;
&lt;br /&gt;
=== Main binary===&lt;br /&gt;
Download the latest stable 32 bit Linux binaries:&lt;br /&gt;
 rm -f multitheftauto_linux-{{Current Version|full}}.tar.gz&lt;br /&gt;
 wget &amp;lt;nowiki&amp;gt;http&amp;lt;/nowiki&amp;gt;://linux.mtasa.com/dl/{{Current Version|fullnodots}}/multitheftauto_linux-{{Current Version|full}}.tar.gz&lt;br /&gt;
&lt;br /&gt;
Unpack into a directory:&lt;br /&gt;
 tar -xf multitheftauto_linux-{{Current Version|full}}.tar.gz&lt;br /&gt;
&lt;br /&gt;
=== Default config ===&lt;br /&gt;
Download the default config files:&lt;br /&gt;
 rm -f baseconfig-{{Current Version|full}}.tar.gz&lt;br /&gt;
 wget &amp;lt;nowiki&amp;gt;http&amp;lt;/nowiki&amp;gt;://linux.mtasa.com/dl/{{Current Version|fullnodots}}/baseconfig-{{Current Version|full}}.tar.gz&lt;br /&gt;
&lt;br /&gt;
Unpack and move into the deathmatch directory:&amp;lt;br/&amp;gt;&lt;br /&gt;
('''''Note:''' Only do this for new installations as it will overwrite any existing config files.)''&lt;br /&gt;
 tar -xf baseconfig-{{Current Version|full}}.tar.gz&lt;br /&gt;
 mv baseconfig/* multitheftauto_linux-{{Current Version|full}}/mods/deathmatch&lt;br /&gt;
&lt;br /&gt;
Change to the MTA server install directory:&lt;br /&gt;
 cd multitheftauto_linux-{{Current Version|full}}&lt;br /&gt;
&lt;br /&gt;
=== Test ===&lt;br /&gt;
You can now test if the server will start correctly:&lt;br /&gt;
 ./mta-server&lt;br /&gt;
&lt;br /&gt;
=== Default resources ===&lt;br /&gt;
If you need the default resources:&lt;br /&gt;
Download the latest default resources zip from http://mirror.mtasa.com/mtasa/resources/&lt;br /&gt;
and unzip into '''mods/deathmatch/resources'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Make sure you are in the MTA server install directory when following this example:'''&lt;br /&gt;
 apt-get install unzip&lt;br /&gt;
 mkdir mods/deathmatch/resources&lt;br /&gt;
 cd mods/deathmatch/resources&lt;br /&gt;
 rm -f mtasa-resources-latest.zip&lt;br /&gt;
 wget &amp;lt;nowiki&amp;gt;http&amp;lt;/nowiki&amp;gt;://mirror.mtasa.com/mtasa/resources/mtasa-resources-latest.zip&lt;br /&gt;
 unzip mtasa-resources-latest.zip&lt;br /&gt;
 rm -f mtasa-resources-latest.zip&lt;br /&gt;
 cd ../../..&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Running with 32 or 64 bit Linux==&lt;br /&gt;
=== Make sure your server libraries and stuff are up to date ===&lt;br /&gt;
On Debian/Ubuntu this is done with:&lt;br /&gt;
 apt-get update&lt;br /&gt;
 apt-get upgrade&lt;br /&gt;
&lt;br /&gt;
===Troubleshooting===&lt;br /&gt;
* If you get a problem with such as &amp;quot;libreadline.so.5: cannot open shared object file: No such file or directory.&amp;quot;, it can be solved on 32 bit Debian/Ubuntu by doing this:&lt;br /&gt;
&lt;br /&gt;
 apt-get install libreadline5&lt;br /&gt;
&lt;br /&gt;
* If you get a problem with such as &amp;quot;libncursesw.so.5 cannot open shared object file: No such file or directory&amp;quot;, it can be solved on 32 bit Debian/Ubuntu by doing this:&lt;br /&gt;
&lt;br /&gt;
 apt-get install libncursesw5&lt;br /&gt;
&lt;br /&gt;
'''Note:''' If you experience this issue on a 64-bit machine while trying to run the 32-bit MTA server, then you should install the following package on a 64-bit Debian/Ubuntu machine (as root):&lt;br /&gt;
&lt;br /&gt;
 apt-get install lib32ncursesw5&lt;br /&gt;
&lt;br /&gt;
You can find more 32-bit library alternatives on this page: [http://www.debian.org/distrib/packages#search_contents www.debian.org/distrib/packages#search_contents].&lt;br /&gt;
&lt;br /&gt;
== MySQL Troubleshooting==&lt;br /&gt;
* If you are using the inbuilt MySQL functions such as [[dbConnect]] and [[dbQuery]], you will need to have '''libmysqlclient.so.16''' installed.&lt;br /&gt;
* If you get a problem with such as &amp;quot;libmysqlclient.so.16: cannot open shared object file: No such file or directory&amp;quot;, it can be solved on Debian/Ubuntu by doing this:&lt;br /&gt;
&lt;br /&gt;
 apt-get install libmysqlclient16&lt;br /&gt;
&lt;br /&gt;
If that fails:&lt;br /&gt;
* For 32 bit Linux, download [http://nightly.mtasa.com/files/modules/32/libmysqlclient.so.16 32 bit libmysqlclient.so.16] and put it in '''/usr/lib/'''&lt;br /&gt;
* For 64 bit Linux, download [http://nightly.mtasa.com/files/modules/64/libmysqlclient.so.16 64 bit libmysqlclient.so.16] and put it in '''/usr/lib/'''&lt;br /&gt;
&lt;br /&gt;
==[Optional] Installing and Configuring an External Web Server==&lt;br /&gt;
Instructions on how to install and configure Nginx as an external web server for MTA is here: [[Installing and Configuring Nginx as an External Web Server]]&lt;br /&gt;
&lt;br /&gt;
== Server crashes ==&lt;br /&gt;
&lt;br /&gt;
If your Linux server crashes, please obtain a backtrace and post a report on our [http://bugs.mtasa.com/ Bug tracker]&lt;br /&gt;
&lt;br /&gt;
====To obtain a backtrace:====&lt;br /&gt;
===Do you have a core dump file in the the MTA server directory?===&lt;br /&gt;
It's usually called 'core', and usually over 100MB, and looks something like this:&lt;br /&gt;
 [[Image:Core.png]]&lt;br /&gt;
====If you have a core dump file in the the MTA server directory:====&lt;br /&gt;
*Install gdb. To install gdb on Debian, use this command:&lt;br /&gt;
 apt-get install gdb&lt;br /&gt;
*And from the MTA install directory do this command&lt;br /&gt;
 gdb mta-server -c core&lt;br /&gt;
*When gdb launches, do this command to get a  module list:&lt;br /&gt;
 i sh&lt;br /&gt;
*And then this command to get a backtrace:&lt;br /&gt;
 bt&lt;br /&gt;
*Save the output&lt;br /&gt;
*(To exit gdb, use the quit command)&lt;br /&gt;
&lt;br /&gt;
====If you do not have a core dump file in the the MTA server directory:====&lt;br /&gt;
*Install gdb. To install gdb on Debian, use this command:&lt;br /&gt;
 apt-get install gdb&lt;br /&gt;
*And from the MTA server directory start the mta-server like this:&lt;br /&gt;
 gdb mta-server -ex &amp;quot;set print thread-events off&amp;quot; --eval-command run&lt;br /&gt;
*Now wait for a crash. (Ignore any weird screen output in the meantime)&lt;br /&gt;
*When a crash occurs, do this command to get a module list:&lt;br /&gt;
 i sh&lt;br /&gt;
*And then this command to get a backtrace:&lt;br /&gt;
 bt&lt;br /&gt;
*Save the output&lt;br /&gt;
*(To exit gdb, use the quit command)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Server freezes''' ==&lt;br /&gt;
&lt;br /&gt;
If your Linux server freezes, please obtain a backtrace with thread information and post a report on our [http://bugs.mtasa.com/ Bug tracker]&lt;br /&gt;
&lt;br /&gt;
====To obtain a backtrace with thread information:====&lt;br /&gt;
*Install gdb. To install gdb on Debian, use this command:&lt;br /&gt;
 apt-get install gdb&lt;br /&gt;
*And from the MTA server directory start the mta-server like this:&lt;br /&gt;
 gdb mta-server -ex &amp;quot;set print thread-events off&amp;quot; --eval-command run&lt;br /&gt;
*Now wait for a freeze. (Ignore any weird screen output in the meantime)&lt;br /&gt;
*When a freeze occurs, press ctrl-c to start gdb&lt;br /&gt;
*Then do this command to get a module list:&lt;br /&gt;
 i sh&lt;br /&gt;
*And then this command to get a backtrace:&lt;br /&gt;
 bt&lt;br /&gt;
*And then this command to get thread information:&lt;br /&gt;
 info threads&lt;br /&gt;
*Save the output&lt;br /&gt;
*(To exit gdb, use the quit command)&lt;br /&gt;
&lt;br /&gt;
== Automatic installer ==&lt;br /&gt;
&lt;br /&gt;
=== Prerequisites ===&lt;br /&gt;
Make sure you have bash, unzip, tar and wget available on your server.&lt;br /&gt;
Also notice that for 64-bit servers the 64-bit binary will be installed, otherwise 32-bit binary will be.&lt;br /&gt;
&lt;br /&gt;
=== Source code ===&lt;br /&gt;
  #!/bin/bash -x&lt;br /&gt;
  #==============================================================================#&lt;br /&gt;
  #                                mtasa-install                                 #&lt;br /&gt;
  #------------------------------------------------------------------------------#&lt;br /&gt;
  #  This shellscript installs MTA:SA on your server. You can configure it and   #&lt;br /&gt;
  #  modify it as desired, you can even improve it if you want.                  #&lt;br /&gt;
  #==============================================================================#&lt;br /&gt;
   &lt;br /&gt;
  NUM_VERSION=undef&lt;br /&gt;
  FUL_VERSION=undef&lt;br /&gt;
  ARCH_TYPE=&amp;quot;&amp;quot;&lt;br /&gt;
   &lt;br /&gt;
  getServerVersion()&lt;br /&gt;
  {&lt;br /&gt;
      wget https://raw.githubusercontent.com/multitheftauto/mtasa-blue/master/Server/version.h # we need to find latest stable version here&lt;br /&gt;
      local MAJOR_VERSION=&amp;quot;$(cat version.h | grep &amp;quot;#define MTASA_VERSION_MAJOR&amp;quot; | awk '{ print $3 }' | sed 's/\r//g')&amp;quot;&lt;br /&gt;
      local MINOR_VERSION=&amp;quot;$(cat version.h | grep &amp;quot;#define MTASA_VERSION_MINOR&amp;quot; | awk '{ print $3 }' | sed 's/\r//g')&amp;quot;&lt;br /&gt;
      local MAINTENANCE_VERSION=&amp;quot;$(cat version.h | grep &amp;quot;#define MTASA_VERSION_MAINTENANCE&amp;quot; | awk '{ print $3 }' | sed 's/\r//g')&amp;quot;&lt;br /&gt;
      NUM_VERSION=&amp;quot;${MAJOR_VERSION}${MINOR_VERSION}${MAINTENANCE_VERSION}&amp;quot;&lt;br /&gt;
      FUL_VERSION=&amp;quot;${MAJOR_VERSION}.${MINOR_VERSION}.${MAINTENANCE_VERSION}&amp;quot;&lt;br /&gt;
      rm -f version.h&lt;br /&gt;
  }&lt;br /&gt;
   &lt;br /&gt;
  getArchitecture()&lt;br /&gt;
  {&lt;br /&gt;
      if ((1&amp;lt;&amp;lt;32)); then&lt;br /&gt;
          ARCH_TYPE=&amp;quot;_x64&amp;quot;&lt;br /&gt;
      fi&lt;br /&gt;
  }&lt;br /&gt;
   &lt;br /&gt;
  downloadFiles()&lt;br /&gt;
  {&lt;br /&gt;
      wget http://linux.mtasa.com/dl/${NUM_VERSION}/multitheftauto_linux${ARCH_TYPE}-${FUL_VERSION}.tar.gz&lt;br /&gt;
      wget http://linux.mtasa.com/dl/${NUM_VERSION}/baseconfig-${FUL_VERSION}.tar.gz&lt;br /&gt;
  }&lt;br /&gt;
   &lt;br /&gt;
  unpack()&lt;br /&gt;
  {&lt;br /&gt;
      tar -xf multitheftauto_linux${ARCH_TYPE}-${FUL_VERSION}.tar.gz&lt;br /&gt;
      tar -xf baseconfig-${FUL_VERSION}.tar.gz&lt;br /&gt;
  }&lt;br /&gt;
   &lt;br /&gt;
  moveConfig()&lt;br /&gt;
  {&lt;br /&gt;
      mv baseconfig/* multitheftauto_linux${ARCH_TYPE}-${FUL_VERSION}/mods/deathmatch&lt;br /&gt;
      rm -rf baseconfig&lt;br /&gt;
      cd multitheftauto_linux${ARCH_TYPE}-${FUL_VERSION}&lt;br /&gt;
  }&lt;br /&gt;
   &lt;br /&gt;
  installResources()&lt;br /&gt;
  {&lt;br /&gt;
      mkdir mods/deathmatch/resources&lt;br /&gt;
      cd mods/deathmatch/resources&lt;br /&gt;
      wget http://mirror.mtasa.com/mtasa/resources/mtasa-resources-latest.zip&lt;br /&gt;
      unzip mtasa-resources-latest.zip&lt;br /&gt;
      cd ../../..&lt;br /&gt;
  }&lt;br /&gt;
   &lt;br /&gt;
  clean()&lt;br /&gt;
  {&lt;br /&gt;
      rm -f ../multitheftauto_linux${ARCH_TYPE}-${FUL_VERSION}.tar.gz&lt;br /&gt;
      rm -f ../baseconfig-${FUL_VERSION}.tar.gz&lt;br /&gt;
      rm -f mods/deathmatch/resources/mtasa-resources-latest.zip&lt;br /&gt;
  }&lt;br /&gt;
   &lt;br /&gt;
  main()&lt;br /&gt;
  {&lt;br /&gt;
      getServerVersion&lt;br /&gt;
      getArchitecture&lt;br /&gt;
      clean&lt;br /&gt;
      downloadFiles&lt;br /&gt;
      unpack&lt;br /&gt;
      moveConfig&lt;br /&gt;
      installResources&lt;br /&gt;
      clean&lt;br /&gt;
   &lt;br /&gt;
      if ((1&amp;lt;&amp;lt;32)); then # 64 bits&lt;br /&gt;
          echo &amp;quot;Installation ready! Use ./mta-server64 to initialize server&amp;quot;&lt;br /&gt;
      else&lt;br /&gt;
          echo &amp;quot;Installation ready! Use ./mta-server to initialize server&amp;quot;&lt;br /&gt;
      fi&lt;br /&gt;
  }&lt;br /&gt;
   &lt;br /&gt;
  main # calling program entry point&lt;br /&gt;
&lt;br /&gt;
=== Procedure ===&lt;br /&gt;
To proceed with installation, save somewhere with read-write-execute access (777) the mtasa-install shell. Finally, proceed to execute it (./mtasa-install for example).&lt;/div&gt;</summary>
		<author><name>Renkon</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Installing_and_Running_MTASA_Server_on_GNU_Linux&amp;diff=49754</id>
		<title>Installing and Running MTASA Server on GNU Linux</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Installing_and_Running_MTASA_Server_on_GNU_Linux&amp;diff=49754"/>
		<updated>2016-11-03T23:27:02Z</updated>

		<summary type="html">&lt;p&gt;Renkon: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Installation 64 bit ==&lt;br /&gt;
&lt;br /&gt;
=== Main binary ===&lt;br /&gt;
Download the latest stable 64 bit Linux binaries:&lt;br /&gt;
 rm -f multitheftauto_linux_x64-{{Current Version|full}}.tar.gz&lt;br /&gt;
 wget &amp;lt;nowiki&amp;gt;http&amp;lt;/nowiki&amp;gt;://linux.mtasa.com/dl/{{Current Version|fullnodots}}/multitheftauto_linux_x64-{{Current Version|full}}.tar.gz&lt;br /&gt;
&lt;br /&gt;
Unpack into a directory:&lt;br /&gt;
 tar -xf multitheftauto_linux_x64-{{Current Version|full}}.tar.gz&lt;br /&gt;
&lt;br /&gt;
=== Default config ===&lt;br /&gt;
Download the default config files:&lt;br /&gt;
 rm -f baseconfig-{{Current Version|full}}.tar.gz&lt;br /&gt;
 wget &amp;lt;nowiki&amp;gt;http&amp;lt;/nowiki&amp;gt;://linux.mtasa.com/dl/{{Current Version|fullnodots}}/baseconfig-{{Current Version|full}}.tar.gz&lt;br /&gt;
&lt;br /&gt;
Unpack and move into the deathmatch directory:&amp;lt;br/&amp;gt;&lt;br /&gt;
('''''Note:''' Only do this for new installations as it will overwrite any existing config files.)''&lt;br /&gt;
 tar -xf baseconfig-{{Current Version|full}}.tar.gz&lt;br /&gt;
 mv baseconfig/* multitheftauto_linux_x64-{{Current Version|full}}/mods/deathmatch&lt;br /&gt;
&lt;br /&gt;
Change to the MTA server install directory:&lt;br /&gt;
 cd multitheftauto_linux_x64-{{Current Version|full}}&lt;br /&gt;
&lt;br /&gt;
=== Test ===&lt;br /&gt;
You can now test if the server will start correctly:&lt;br /&gt;
 ./mta-server64&lt;br /&gt;
&lt;br /&gt;
=== Default resources ===&lt;br /&gt;
If you need the default resources:&lt;br /&gt;
Download the latest default resources zip from http://mirror.mtasa.com/mtasa/resources/&lt;br /&gt;
and unzip into '''mods/deathmatch/resources'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Make sure you are in the MTA server install directory when following this example:'''&lt;br /&gt;
 apt-get install unzip&lt;br /&gt;
 mkdir mods/deathmatch/resources&lt;br /&gt;
 cd mods/deathmatch/resources&lt;br /&gt;
 rm -f mtasa-resources-latest.zip&lt;br /&gt;
 wget &amp;lt;nowiki&amp;gt;http&amp;lt;/nowiki&amp;gt;://mirror.mtasa.com/mtasa/resources/mtasa-resources-latest.zip&lt;br /&gt;
 unzip mtasa-resources-latest.zip&lt;br /&gt;
 rm -f mtasa-resources-latest.zip&lt;br /&gt;
 cd ../../..&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Installation 32 bit ==&lt;br /&gt;
&lt;br /&gt;
=== Main binary===&lt;br /&gt;
Download the latest stable 32 bit Linux binaries:&lt;br /&gt;
 rm -f multitheftauto_linux-{{Current Version|full}}.tar.gz&lt;br /&gt;
 wget &amp;lt;nowiki&amp;gt;http&amp;lt;/nowiki&amp;gt;://linux.mtasa.com/dl/{{Current Version|fullnodots}}/multitheftauto_linux-{{Current Version|full}}.tar.gz&lt;br /&gt;
&lt;br /&gt;
Unpack into a directory:&lt;br /&gt;
 tar -xf multitheftauto_linux-{{Current Version|full}}.tar.gz&lt;br /&gt;
&lt;br /&gt;
=== Default config ===&lt;br /&gt;
Download the default config files:&lt;br /&gt;
 rm -f baseconfig-{{Current Version|full}}.tar.gz&lt;br /&gt;
 wget &amp;lt;nowiki&amp;gt;http&amp;lt;/nowiki&amp;gt;://linux.mtasa.com/dl/{{Current Version|fullnodots}}/baseconfig-{{Current Version|full}}.tar.gz&lt;br /&gt;
&lt;br /&gt;
Unpack and move into the deathmatch directory:&amp;lt;br/&amp;gt;&lt;br /&gt;
('''''Note:''' Only do this for new installations as it will overwrite any existing config files.)''&lt;br /&gt;
 tar -xf baseconfig-{{Current Version|full}}.tar.gz&lt;br /&gt;
 mv baseconfig/* multitheftauto_linux-{{Current Version|full}}/mods/deathmatch&lt;br /&gt;
&lt;br /&gt;
Change to the MTA server install directory:&lt;br /&gt;
 cd multitheftauto_linux-{{Current Version|full}}&lt;br /&gt;
&lt;br /&gt;
=== Test ===&lt;br /&gt;
You can now test if the server will start correctly:&lt;br /&gt;
 ./mta-server&lt;br /&gt;
&lt;br /&gt;
=== Default resources ===&lt;br /&gt;
If you need the default resources:&lt;br /&gt;
Download the latest default resources zip from http://mirror.mtasa.com/mtasa/resources/&lt;br /&gt;
and unzip into '''mods/deathmatch/resources'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Make sure you are in the MTA server install directory when following this example:'''&lt;br /&gt;
 apt-get install unzip&lt;br /&gt;
 mkdir mods/deathmatch/resources&lt;br /&gt;
 cd mods/deathmatch/resources&lt;br /&gt;
 rm -f mtasa-resources-latest.zip&lt;br /&gt;
 wget &amp;lt;nowiki&amp;gt;http&amp;lt;/nowiki&amp;gt;://mirror.mtasa.com/mtasa/resources/mtasa-resources-latest.zip&lt;br /&gt;
 unzip mtasa-resources-latest.zip&lt;br /&gt;
 rm -f mtasa-resources-latest.zip&lt;br /&gt;
 cd ../../..&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Running with 32 or 64 bit Linux==&lt;br /&gt;
=== Make sure your server libraries and stuff are up to date ===&lt;br /&gt;
On Debian/Ubuntu this is done with:&lt;br /&gt;
 apt-get update&lt;br /&gt;
 apt-get upgrade&lt;br /&gt;
&lt;br /&gt;
===Troubleshooting===&lt;br /&gt;
* If you get a problem with such as &amp;quot;libreadline.so.5: cannot open shared object file: No such file or directory.&amp;quot;, it can be solved on 32 bit Debian/Ubuntu by doing this:&lt;br /&gt;
&lt;br /&gt;
 apt-get install libreadline5&lt;br /&gt;
&lt;br /&gt;
* If you get a problem with such as &amp;quot;libncursesw.so.5 cannot open shared object file: No such file or directory&amp;quot;, it can be solved on 32 bit Debian/Ubuntu by doing this:&lt;br /&gt;
&lt;br /&gt;
 apt-get install libncursesw5&lt;br /&gt;
&lt;br /&gt;
'''Note:''' If you experience this issue on a 64-bit machine while trying to run the 32-bit MTA server, then you should install the following package on a 64-bit Debian/Ubuntu machine (as root):&lt;br /&gt;
&lt;br /&gt;
 apt-get install lib32ncursesw5&lt;br /&gt;
&lt;br /&gt;
You can find more 32-bit library alternatives on this page: [http://www.debian.org/distrib/packages#search_contents www.debian.org/distrib/packages#search_contents].&lt;br /&gt;
&lt;br /&gt;
== MySQL Troubleshooting==&lt;br /&gt;
* If you are using the inbuilt MySQL functions such as [[dbConnect]] and [[dbQuery]], you will need to have '''libmysqlclient.so.16''' installed.&lt;br /&gt;
* If you get a problem with such as &amp;quot;libmysqlclient.so.16: cannot open shared object file: No such file or directory&amp;quot;, it can be solved on Debian/Ubuntu by doing this:&lt;br /&gt;
&lt;br /&gt;
 apt-get install libmysqlclient16&lt;br /&gt;
&lt;br /&gt;
If that fails:&lt;br /&gt;
* For 32 bit Linux, download [http://nightly.mtasa.com/files/modules/32/libmysqlclient.so.16 32 bit libmysqlclient.so.16] and put it in '''/usr/lib/'''&lt;br /&gt;
* For 64 bit Linux, download [http://nightly.mtasa.com/files/modules/64/libmysqlclient.so.16 64 bit libmysqlclient.so.16] and put it in '''/usr/lib/'''&lt;br /&gt;
&lt;br /&gt;
==[Optional] Installing and Configuring an External Web Server==&lt;br /&gt;
Instructions on how to install and configure Nginx as an external web server for MTA is here: [[Installing and Configuring Nginx as an External Web Server]]&lt;br /&gt;
&lt;br /&gt;
== Server crashes ==&lt;br /&gt;
&lt;br /&gt;
If your Linux server crashes, please obtain a backtrace and post a report on our [http://bugs.mtasa.com/ Bug tracker]&lt;br /&gt;
&lt;br /&gt;
====To obtain a backtrace:====&lt;br /&gt;
===Do you have a core dump file in the the MTA server directory?===&lt;br /&gt;
It's usually called 'core', and usually over 100MB, and looks something like this:&lt;br /&gt;
 [[Image:Core.png]]&lt;br /&gt;
====If you have a core dump file in the the MTA server directory:====&lt;br /&gt;
*Install gdb. To install gdb on Debian, use this command:&lt;br /&gt;
 apt-get install gdb&lt;br /&gt;
*And from the MTA install directory do this command&lt;br /&gt;
 gdb mta-server -c core&lt;br /&gt;
*When gdb launches, do this command to get a  module list:&lt;br /&gt;
 i sh&lt;br /&gt;
*And then this command to get a backtrace:&lt;br /&gt;
 bt&lt;br /&gt;
*Save the output&lt;br /&gt;
*(To exit gdb, use the quit command)&lt;br /&gt;
&lt;br /&gt;
====If you do not have a core dump file in the the MTA server directory:====&lt;br /&gt;
*Install gdb. To install gdb on Debian, use this command:&lt;br /&gt;
 apt-get install gdb&lt;br /&gt;
*And from the MTA server directory start the mta-server like this:&lt;br /&gt;
 gdb mta-server -ex &amp;quot;set print thread-events off&amp;quot; --eval-command run&lt;br /&gt;
*Now wait for a crash. (Ignore any weird screen output in the meantime)&lt;br /&gt;
*When a crash occurs, do this command to get a module list:&lt;br /&gt;
 i sh&lt;br /&gt;
*And then this command to get a backtrace:&lt;br /&gt;
 bt&lt;br /&gt;
*Save the output&lt;br /&gt;
*(To exit gdb, use the quit command)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Server freezes''' ==&lt;br /&gt;
&lt;br /&gt;
If your Linux server freezes, please obtain a backtrace with thread information and post a report on our [http://bugs.mtasa.com/ Bug tracker]&lt;br /&gt;
&lt;br /&gt;
====To obtain a backtrace with thread information:====&lt;br /&gt;
*Install gdb. To install gdb on Debian, use this command:&lt;br /&gt;
 apt-get install gdb&lt;br /&gt;
*And from the MTA server directory start the mta-server like this:&lt;br /&gt;
 gdb mta-server -ex &amp;quot;set print thread-events off&amp;quot; --eval-command run&lt;br /&gt;
*Now wait for a freeze. (Ignore any weird screen output in the meantime)&lt;br /&gt;
*When a freeze occurs, press ctrl-c to start gdb&lt;br /&gt;
*Then do this command to get a module list:&lt;br /&gt;
 i sh&lt;br /&gt;
*And then this command to get a backtrace:&lt;br /&gt;
 bt&lt;br /&gt;
*And then this command to get thread information:&lt;br /&gt;
 info threads&lt;br /&gt;
*Save the output&lt;br /&gt;
*(To exit gdb, use the quit command)&lt;br /&gt;
&lt;br /&gt;
== Automatic installer ==&lt;br /&gt;
&lt;br /&gt;
=== Prerequisites ===&lt;br /&gt;
Make sure you have bash, unzip, tar and wget available on your server.&lt;br /&gt;
Also notice that for 64-bit servers the 64-bit binary will be installed, otherwise 32-bit binary will be.&lt;br /&gt;
&lt;br /&gt;
=== Source code ===&lt;br /&gt;
  #!/bin/bash -x&lt;br /&gt;
  #==============================================================================#&lt;br /&gt;
  #                                mtasa-install                                 #&lt;br /&gt;
  #------------------------------------------------------------------------------#&lt;br /&gt;
  #  This shellscript installs MTA:SA on your server (working for RHEL, CentOS   #&lt;br /&gt;
  #  and Oracle Linux. You can configure it and modify it as desired, you can    #&lt;br /&gt;
  #  even improve it if you want.                                                #&lt;br /&gt;
  #==============================================================================#&lt;br /&gt;
   &lt;br /&gt;
  NUM_VERSION=undef&lt;br /&gt;
  FUL_VERSION=undef&lt;br /&gt;
  ARCH_TYPE=&amp;quot;&amp;quot;&lt;br /&gt;
   &lt;br /&gt;
  getServerVersion()&lt;br /&gt;
  {&lt;br /&gt;
      wget https://raw.githubusercontent.com/multitheftauto/mtasa-blue/master/Server/version.h # we need to find latest stable version here&lt;br /&gt;
      local MAJOR_VERSION=&amp;quot;$(cat version.h | grep &amp;quot;#define MTASA_VERSION_MAJOR&amp;quot; | awk '{ print $3 }' | sed 's/\r//g')&amp;quot;&lt;br /&gt;
      local MINOR_VERSION=&amp;quot;$(cat version.h | grep &amp;quot;#define MTASA_VERSION_MINOR&amp;quot; | awk '{ print $3 }' | sed 's/\r//g')&amp;quot;&lt;br /&gt;
      local MAINTENANCE_VERSION=&amp;quot;$(cat version.h | grep &amp;quot;#define MTASA_VERSION_MAINTENANCE&amp;quot; | awk '{ print $3 }' | sed 's/\r//g')&amp;quot;&lt;br /&gt;
      NUM_VERSION=&amp;quot;${MAJOR_VERSION}${MINOR_VERSION}${MAINTENANCE_VERSION}&amp;quot;&lt;br /&gt;
      FUL_VERSION=&amp;quot;${MAJOR_VERSION}.${MINOR_VERSION}.${MAINTENANCE_VERSION}&amp;quot;&lt;br /&gt;
      rm -f version.h&lt;br /&gt;
  }&lt;br /&gt;
   &lt;br /&gt;
  getArchitecture()&lt;br /&gt;
  {&lt;br /&gt;
      if ((1&amp;lt;&amp;lt;32)); then&lt;br /&gt;
          ARCH_TYPE=&amp;quot;_x64&amp;quot;&lt;br /&gt;
      fi&lt;br /&gt;
  }&lt;br /&gt;
   &lt;br /&gt;
  downloadFiles()&lt;br /&gt;
  {&lt;br /&gt;
      wget http://linux.mtasa.com/dl/${NUM_VERSION}/multitheftauto_linux${ARCH_TYPE}-${FUL_VERSION}.tar.gz&lt;br /&gt;
      wget http://linux.mtasa.com/dl/${NUM_VERSION}/baseconfig-${FUL_VERSION}.tar.gz&lt;br /&gt;
  }&lt;br /&gt;
   &lt;br /&gt;
  unpack()&lt;br /&gt;
  {&lt;br /&gt;
      tar -xf multitheftauto_linux${ARCH_TYPE}-${FUL_VERSION}.tar.gz&lt;br /&gt;
      tar -xf baseconfig-${FUL_VERSION}.tar.gz&lt;br /&gt;
  }&lt;br /&gt;
   &lt;br /&gt;
  moveConfig()&lt;br /&gt;
  {&lt;br /&gt;
      mv baseconfig/* multitheftauto_linux${ARCH_TYPE}-${FUL_VERSION}/mods/deathmatch&lt;br /&gt;
      rm -rf baseconfig&lt;br /&gt;
      cd multitheftauto_linux${ARCH_TYPE}-${FUL_VERSION}&lt;br /&gt;
  }&lt;br /&gt;
   &lt;br /&gt;
  installResources()&lt;br /&gt;
  {&lt;br /&gt;
      mkdir mods/deathmatch/resources&lt;br /&gt;
      cd mods/deathmatch/resources&lt;br /&gt;
      wget http://mirror.mtasa.com/mtasa/resources/mtasa-resources-latest.zip&lt;br /&gt;
      unzip mtasa-resources-latest.zip&lt;br /&gt;
      cd ../../..&lt;br /&gt;
  }&lt;br /&gt;
   &lt;br /&gt;
  clean()&lt;br /&gt;
  {&lt;br /&gt;
      rm -f ../multitheftauto_linux${ARCH_TYPE}-${FUL_VERSION}.tar.gz&lt;br /&gt;
      rm -f ../baseconfig-${FUL_VERSION}.tar.gz&lt;br /&gt;
      rm -f mods/deathmatch/resources/mtasa-resources-latest.zip&lt;br /&gt;
  }&lt;br /&gt;
   &lt;br /&gt;
  main()&lt;br /&gt;
  {&lt;br /&gt;
      getServerVersion&lt;br /&gt;
      getArchitecture&lt;br /&gt;
      clean&lt;br /&gt;
      downloadFiles&lt;br /&gt;
      unpack&lt;br /&gt;
      moveConfig&lt;br /&gt;
      installResources&lt;br /&gt;
      clean&lt;br /&gt;
   &lt;br /&gt;
      if ((1&amp;lt;&amp;lt;32)); then # 64 bits&lt;br /&gt;
          echo &amp;quot;Installation ready! Use ./mta-server64 to initialize server&amp;quot;&lt;br /&gt;
      else&lt;br /&gt;
          echo &amp;quot;Installation ready! Use ./mta-server to initialize server&amp;quot;&lt;br /&gt;
      fi&lt;br /&gt;
  }&lt;br /&gt;
   &lt;br /&gt;
  main # calling program entry point&lt;br /&gt;
&lt;br /&gt;
=== Procedure ===&lt;br /&gt;
To proceed with installation, save somewhere with read-write-execute access (777) the mtasa-install shell. Finally, proceed to execute it (./mtasa-install for example).&lt;/div&gt;</summary>
		<author><name>Renkon</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Installing_and_Running_MTASA_Server_on_GNU_Linux&amp;diff=49753</id>
		<title>Installing and Running MTASA Server on GNU Linux</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Installing_and_Running_MTASA_Server_on_GNU_Linux&amp;diff=49753"/>
		<updated>2016-11-03T23:23:48Z</updated>

		<summary type="html">&lt;p&gt;Renkon: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Installation 64 bit ==&lt;br /&gt;
&lt;br /&gt;
=== Main binary ===&lt;br /&gt;
Download the latest stable 64 bit Linux binaries:&lt;br /&gt;
 rm -f multitheftauto_linux_x64-{{Current Version|full}}.tar.gz&lt;br /&gt;
 wget &amp;lt;nowiki&amp;gt;http&amp;lt;/nowiki&amp;gt;://linux.mtasa.com/dl/{{Current Version|fullnodots}}/multitheftauto_linux_x64-{{Current Version|full}}.tar.gz&lt;br /&gt;
&lt;br /&gt;
Unpack into a directory:&lt;br /&gt;
 tar -xf multitheftauto_linux_x64-{{Current Version|full}}.tar.gz&lt;br /&gt;
&lt;br /&gt;
=== Default config ===&lt;br /&gt;
Download the default config files:&lt;br /&gt;
 rm -f baseconfig-{{Current Version|full}}.tar.gz&lt;br /&gt;
 wget &amp;lt;nowiki&amp;gt;http&amp;lt;/nowiki&amp;gt;://linux.mtasa.com/dl/{{Current Version|fullnodots}}/baseconfig-{{Current Version|full}}.tar.gz&lt;br /&gt;
&lt;br /&gt;
Unpack and move into the deathmatch directory:&amp;lt;br/&amp;gt;&lt;br /&gt;
('''''Note:''' Only do this for new installations as it will overwrite any existing config files.)''&lt;br /&gt;
 tar -xf baseconfig-{{Current Version|full}}.tar.gz&lt;br /&gt;
 mv baseconfig/* multitheftauto_linux_x64-{{Current Version|full}}/mods/deathmatch&lt;br /&gt;
&lt;br /&gt;
Change to the MTA server install directory:&lt;br /&gt;
 cd multitheftauto_linux_x64-{{Current Version|full}}&lt;br /&gt;
&lt;br /&gt;
=== Test ===&lt;br /&gt;
You can now test if the server will start correctly:&lt;br /&gt;
 ./mta-server64&lt;br /&gt;
&lt;br /&gt;
=== Default resources ===&lt;br /&gt;
If you need the default resources:&lt;br /&gt;
Download the latest default resources zip from http://mirror.mtasa.com/mtasa/resources/&lt;br /&gt;
and unzip into '''mods/deathmatch/resources'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Make sure you are in the MTA server install directory when following this example:'''&lt;br /&gt;
 apt-get install unzip&lt;br /&gt;
 mkdir mods/deathmatch/resources&lt;br /&gt;
 cd mods/deathmatch/resources&lt;br /&gt;
 rm -f mtasa-resources-latest.zip&lt;br /&gt;
 wget &amp;lt;nowiki&amp;gt;http&amp;lt;/nowiki&amp;gt;://mirror.mtasa.com/mtasa/resources/mtasa-resources-latest.zip&lt;br /&gt;
 unzip mtasa-resources-latest.zip&lt;br /&gt;
 rm -f mtasa-resources-latest.zip&lt;br /&gt;
 cd ../../..&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Installation 32 bit ==&lt;br /&gt;
&lt;br /&gt;
=== Main binary===&lt;br /&gt;
Download the latest stable 32 bit Linux binaries:&lt;br /&gt;
 rm -f multitheftauto_linux-{{Current Version|full}}.tar.gz&lt;br /&gt;
 wget &amp;lt;nowiki&amp;gt;http&amp;lt;/nowiki&amp;gt;://linux.mtasa.com/dl/{{Current Version|fullnodots}}/multitheftauto_linux-{{Current Version|full}}.tar.gz&lt;br /&gt;
&lt;br /&gt;
Unpack into a directory:&lt;br /&gt;
 tar -xf multitheftauto_linux-{{Current Version|full}}.tar.gz&lt;br /&gt;
&lt;br /&gt;
=== Default config ===&lt;br /&gt;
Download the default config files:&lt;br /&gt;
 rm -f baseconfig-{{Current Version|full}}.tar.gz&lt;br /&gt;
 wget &amp;lt;nowiki&amp;gt;http&amp;lt;/nowiki&amp;gt;://linux.mtasa.com/dl/{{Current Version|fullnodots}}/baseconfig-{{Current Version|full}}.tar.gz&lt;br /&gt;
&lt;br /&gt;
Unpack and move into the deathmatch directory:&amp;lt;br/&amp;gt;&lt;br /&gt;
('''''Note:''' Only do this for new installations as it will overwrite any existing config files.)''&lt;br /&gt;
 tar -xf baseconfig-{{Current Version|full}}.tar.gz&lt;br /&gt;
 mv baseconfig/* multitheftauto_linux-{{Current Version|full}}/mods/deathmatch&lt;br /&gt;
&lt;br /&gt;
Change to the MTA server install directory:&lt;br /&gt;
 cd multitheftauto_linux-{{Current Version|full}}&lt;br /&gt;
&lt;br /&gt;
=== Test ===&lt;br /&gt;
You can now test if the server will start correctly:&lt;br /&gt;
 ./mta-server&lt;br /&gt;
&lt;br /&gt;
=== Default resources ===&lt;br /&gt;
If you need the default resources:&lt;br /&gt;
Download the latest default resources zip from http://mirror.mtasa.com/mtasa/resources/&lt;br /&gt;
and unzip into '''mods/deathmatch/resources'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Make sure you are in the MTA server install directory when following this example:'''&lt;br /&gt;
 apt-get install unzip&lt;br /&gt;
 mkdir mods/deathmatch/resources&lt;br /&gt;
 cd mods/deathmatch/resources&lt;br /&gt;
 rm -f mtasa-resources-latest.zip&lt;br /&gt;
 wget &amp;lt;nowiki&amp;gt;http&amp;lt;/nowiki&amp;gt;://mirror.mtasa.com/mtasa/resources/mtasa-resources-latest.zip&lt;br /&gt;
 unzip mtasa-resources-latest.zip&lt;br /&gt;
 rm -f mtasa-resources-latest.zip&lt;br /&gt;
 cd ../../..&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Running with 32 or 64 bit Linux==&lt;br /&gt;
=== Make sure your server libraries and stuff are up to date ===&lt;br /&gt;
On Debian/Ubuntu this is done with:&lt;br /&gt;
 apt-get update&lt;br /&gt;
 apt-get upgrade&lt;br /&gt;
&lt;br /&gt;
===Troubleshooting===&lt;br /&gt;
* If you get a problem with such as &amp;quot;libreadline.so.5: cannot open shared object file: No such file or directory.&amp;quot;, it can be solved on 32 bit Debian/Ubuntu by doing this:&lt;br /&gt;
&lt;br /&gt;
 apt-get install libreadline5&lt;br /&gt;
&lt;br /&gt;
* If you get a problem with such as &amp;quot;libncursesw.so.5 cannot open shared object file: No such file or directory&amp;quot;, it can be solved on 32 bit Debian/Ubuntu by doing this:&lt;br /&gt;
&lt;br /&gt;
 apt-get install libncursesw5&lt;br /&gt;
&lt;br /&gt;
'''Note:''' If you experience this issue on a 64-bit machine while trying to run the 32-bit MTA server, then you should install the following package on a 64-bit Debian/Ubuntu machine (as root):&lt;br /&gt;
&lt;br /&gt;
 apt-get install lib32ncursesw5&lt;br /&gt;
&lt;br /&gt;
You can find more 32-bit library alternatives on this page: [http://www.debian.org/distrib/packages#search_contents www.debian.org/distrib/packages#search_contents].&lt;br /&gt;
&lt;br /&gt;
== MySQL Troubleshooting==&lt;br /&gt;
* If you are using the inbuilt MySQL functions such as [[dbConnect]] and [[dbQuery]], you will need to have '''libmysqlclient.so.16''' installed.&lt;br /&gt;
* If you get a problem with such as &amp;quot;libmysqlclient.so.16: cannot open shared object file: No such file or directory&amp;quot;, it can be solved on Debian/Ubuntu by doing this:&lt;br /&gt;
&lt;br /&gt;
 apt-get install libmysqlclient16&lt;br /&gt;
&lt;br /&gt;
If that fails:&lt;br /&gt;
* For 32 bit Linux, download [http://nightly.mtasa.com/files/modules/32/libmysqlclient.so.16 32 bit libmysqlclient.so.16] and put it in '''/usr/lib/'''&lt;br /&gt;
* For 64 bit Linux, download [http://nightly.mtasa.com/files/modules/64/libmysqlclient.so.16 64 bit libmysqlclient.so.16] and put it in '''/usr/lib/'''&lt;br /&gt;
&lt;br /&gt;
==[Optional] Installing and Configuring an External Web Server==&lt;br /&gt;
Instructions on how to install and configure Nginx as an external web server for MTA is here: [[Installing and Configuring Nginx as an External Web Server]]&lt;br /&gt;
&lt;br /&gt;
== Server crashes ==&lt;br /&gt;
&lt;br /&gt;
If your Linux server crashes, please obtain a backtrace and post a report on our [http://bugs.mtasa.com/ Bug tracker]&lt;br /&gt;
&lt;br /&gt;
====To obtain a backtrace:====&lt;br /&gt;
===Do you have a core dump file in the the MTA server directory?===&lt;br /&gt;
It's usually called 'core', and usually over 100MB, and looks something like this:&lt;br /&gt;
 [[Image:Core.png]]&lt;br /&gt;
====If you have a core dump file in the the MTA server directory:====&lt;br /&gt;
*Install gdb. To install gdb on Debian, use this command:&lt;br /&gt;
 apt-get install gdb&lt;br /&gt;
*And from the MTA install directory do this command&lt;br /&gt;
 gdb mta-server -c core&lt;br /&gt;
*When gdb launches, do this command to get a  module list:&lt;br /&gt;
 i sh&lt;br /&gt;
*And then this command to get a backtrace:&lt;br /&gt;
 bt&lt;br /&gt;
*Save the output&lt;br /&gt;
*(To exit gdb, use the quit command)&lt;br /&gt;
&lt;br /&gt;
====If you do not have a core dump file in the the MTA server directory:====&lt;br /&gt;
*Install gdb. To install gdb on Debian, use this command:&lt;br /&gt;
 apt-get install gdb&lt;br /&gt;
*And from the MTA server directory start the mta-server like this:&lt;br /&gt;
 gdb mta-server -ex &amp;quot;set print thread-events off&amp;quot; --eval-command run&lt;br /&gt;
*Now wait for a crash. (Ignore any weird screen output in the meantime)&lt;br /&gt;
*When a crash occurs, do this command to get a module list:&lt;br /&gt;
 i sh&lt;br /&gt;
*And then this command to get a backtrace:&lt;br /&gt;
 bt&lt;br /&gt;
*Save the output&lt;br /&gt;
*(To exit gdb, use the quit command)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Server freezes''' ==&lt;br /&gt;
&lt;br /&gt;
If your Linux server freezes, please obtain a backtrace with thread information and post a report on our [http://bugs.mtasa.com/ Bug tracker]&lt;br /&gt;
&lt;br /&gt;
====To obtain a backtrace with thread information:====&lt;br /&gt;
*Install gdb. To install gdb on Debian, use this command:&lt;br /&gt;
 apt-get install gdb&lt;br /&gt;
*And from the MTA server directory start the mta-server like this:&lt;br /&gt;
 gdb mta-server -ex &amp;quot;set print thread-events off&amp;quot; --eval-command run&lt;br /&gt;
*Now wait for a freeze. (Ignore any weird screen output in the meantime)&lt;br /&gt;
*When a freeze occurs, press ctrl-c to start gdb&lt;br /&gt;
*Then do this command to get a module list:&lt;br /&gt;
 i sh&lt;br /&gt;
*And then this command to get a backtrace:&lt;br /&gt;
 bt&lt;br /&gt;
*And then this command to get thread information:&lt;br /&gt;
 info threads&lt;br /&gt;
*Save the output&lt;br /&gt;
*(To exit gdb, use the quit command)&lt;br /&gt;
&lt;br /&gt;
== Automatic installer ==&lt;br /&gt;
&lt;br /&gt;
=== Prerequisites ===&lt;br /&gt;
Make sure you have bash, unzip, tar and wget available on your server.&lt;br /&gt;
Also notice that for 64-bit servers the 64-bit binary will be installed, otherwise 32-bit binary will be.&lt;br /&gt;
&lt;br /&gt;
=== Source code ===&lt;br /&gt;
  #!/bin/bash -x&lt;br /&gt;
  #==============================================================================#&lt;br /&gt;
  #                                mtasa-install                                 #&lt;br /&gt;
  #------------------------------------------------------------------------------#&lt;br /&gt;
  #  This shellscript installs MTA:SA on your server (working for RHEL, CentOS   #&lt;br /&gt;
  #  and Oracle Linux. You can configure it and modify it as desired, you can    #&lt;br /&gt;
  #  even improve it if you want.                                                #&lt;br /&gt;
  #==============================================================================#&lt;br /&gt;
   &lt;br /&gt;
  NUM_VERSION=undef&lt;br /&gt;
  FUL_VERSION=undef&lt;br /&gt;
  ARCH_TYPE=&amp;quot;&amp;quot;&lt;br /&gt;
   &lt;br /&gt;
  getServerVersion()&lt;br /&gt;
  {&lt;br /&gt;
      wget https://raw.githubusercontent.com/multitheftauto/mtasa-blue/master/Server/version.h # we need to find latest stable version here&lt;br /&gt;
      local MAJOR_VERSION=&amp;quot;$(cat version.h | grep &amp;quot;#define MTASA_VERSION_MAJOR&amp;quot; | awk '{ print $3 }' | sed 's/\r//g')&amp;quot;&lt;br /&gt;
      local MINOR_VERSION=&amp;quot;$(cat version.h | grep &amp;quot;#define MTASA_VERSION_MINOR&amp;quot; | awk '{ print $3 }' | sed 's/\r//g')&amp;quot;&lt;br /&gt;
      local MAINTENANCE_VERSION=&amp;quot;$(cat version.h | grep &amp;quot;#define MTASA_VERSION_MAINTENANCE&amp;quot; | awk '{ print $3 }' | sed 's/\r//g')&amp;quot;&lt;br /&gt;
      NUM_VERSION=&amp;quot;${MAJOR_VERSION}${MINOR_VERSION}${MAINTENANCE_VERSION}&amp;quot;&lt;br /&gt;
      FUL_VERSION=&amp;quot;${MAJOR_VERSION}.${MINOR_VERSION}.${MAINTENANCE_VERSION}&amp;quot;&lt;br /&gt;
      rm -f version.h&lt;br /&gt;
  }&lt;br /&gt;
   &lt;br /&gt;
  getArchitecture()&lt;br /&gt;
  {&lt;br /&gt;
      if ((1&amp;lt;&amp;lt;32)); then&lt;br /&gt;
          ARCH_TYPE=&amp;quot;_x64&amp;quot;&lt;br /&gt;
      fi&lt;br /&gt;
  }&lt;br /&gt;
   &lt;br /&gt;
  downloadFiles()&lt;br /&gt;
  {&lt;br /&gt;
      wget http://linux.mtasa.com/dl/${NUM_VERSION}/multitheftauto_linux${ARCH_TYPE}-${FUL_VERSION}.tar.gz&lt;br /&gt;
      wget http://linux.mtasa.com/dl/${NUM_VERSION}/baseconfig-${FUL_VERSION}.tar.gz&lt;br /&gt;
  }&lt;br /&gt;
   &lt;br /&gt;
  unpack()&lt;br /&gt;
  {&lt;br /&gt;
      tar -xf multitheftauto_linux${ARCH_TYPE}-${FUL_VERSION}.tar.gz&lt;br /&gt;
      tar -xf baseconfig-${FUL_VERSION}.tar.gz&lt;br /&gt;
  }&lt;br /&gt;
   &lt;br /&gt;
  moveConfig()&lt;br /&gt;
  {&lt;br /&gt;
      mv baseconfig/* multitheftauto_linux${ARCH_TYPE}-${FUL_VERSION}/mods/deathmatch&lt;br /&gt;
      rm -rf baseconfig&lt;br /&gt;
      cd multitheftauto_linux${ARCH_TYPE}-${FUL_VERSION}&lt;br /&gt;
  }&lt;br /&gt;
   &lt;br /&gt;
  installResources()&lt;br /&gt;
  {&lt;br /&gt;
      mkdir mods/deathmatch/resources&lt;br /&gt;
      cd mods/deathmatch/resources&lt;br /&gt;
      wget http://mirror.mtasa.com/mtasa/resources/mtasa-resources-latest.zip&lt;br /&gt;
      unzip mtasa-resources-latest.zip&lt;br /&gt;
      cd ../../..&lt;br /&gt;
  }&lt;br /&gt;
   &lt;br /&gt;
  clean()&lt;br /&gt;
  {&lt;br /&gt;
      rm -f ../multitheftauto_linux${ARCH_TYPE}-${FUL_VERSION}.tar.gz&lt;br /&gt;
      rm -f ../baseconfig-${FUL_VERSION}.tar.gz&lt;br /&gt;
      rm -f mods/deathmatch/resources/mtasa-resources-latest.zip&lt;br /&gt;
  }&lt;br /&gt;
   &lt;br /&gt;
  main()&lt;br /&gt;
  {&lt;br /&gt;
      getServerVersion&lt;br /&gt;
      getArchitecture&lt;br /&gt;
      clean&lt;br /&gt;
      downloadFiles&lt;br /&gt;
      unpack&lt;br /&gt;
      moveConfig&lt;br /&gt;
      installResources&lt;br /&gt;
      clean&lt;br /&gt;
   &lt;br /&gt;
      if ((1&amp;lt;&amp;lt;32)); then # 64 bits&lt;br /&gt;
          echo &amp;quot;Installation ready! Use ./mta-server64 to initialize server&amp;quot;&lt;br /&gt;
      else&lt;br /&gt;
          echo &amp;quot;Installation ready! Use ./mta-server to initialize server&amp;quot;&lt;br /&gt;
      fi&lt;br /&gt;
  }&lt;br /&gt;
   &lt;br /&gt;
  main # calling program entry point&lt;/div&gt;</summary>
		<author><name>Renkon</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=User:Renkon&amp;diff=38199</id>
		<title>User:Renkon</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=User:Renkon&amp;diff=38199"/>
		<updated>2014-01-07T03:37:10Z</updated>

		<summary type="html">&lt;p&gt;Renkon: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Who am I==&lt;br /&gt;
&lt;br /&gt;
I'm a 18 year-old boy from Argentina who fancies playing Multi Theft Auto. I started playing SA-MP back in 2007 and moved to MTA in late 2009. Since then I have never left the community (although I got registered in 2010). I'm currently active in Drunk Drivers Club community and the forum itself.&lt;br /&gt;
&lt;br /&gt;
==Services==&lt;br /&gt;
&lt;br /&gt;
At the moment I offer my scripting services for MTA:SA. If you are interested please go to http://forum.mtasa.com/viewtopic.php?f=5&amp;amp;t=68603 (my service's forum thread)&lt;/div&gt;</summary>
		<author><name>Renkon</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetVehicleNitroCount&amp;diff=38012</id>
		<title>SetVehicleNitroCount</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetVehicleNitroCount&amp;diff=38012"/>
		<updated>2014-01-02T06:36:54Z</updated>

		<summary type="html">&lt;p&gt;Renkon: typo&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Client function}}&lt;br /&gt;
{{New feature/item|3.0131|1.3.1|4993|&lt;br /&gt;
This function sets the nitro count to the [[vehicle]].&lt;br /&gt;
}}&lt;br /&gt;
{{Warning|Only works if the vehicle is streamed in}}&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;bool setVehicleNitroCount ( vehicle theVehicle, int count )&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theVehicle''' The [[vehicle]] which you want to set.&lt;br /&gt;
*'''count''' Nitro count you want to set (ranges from 0-100, 101 is infinite).&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the nitro count was set successfully to the vehicle, ''false'' otherwise.&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 function installs nitro in the vehicle and then sets the count to infinite when the player enters the vehicle.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function infiniteNitro(pPlayer)&lt;br /&gt;
	if pPlayer == localPlayer then&lt;br /&gt;
		if not getVehicleUpgradeOnSlot(source, 8) then -- Does the vehicle have nitro installed or not&lt;br /&gt;
			addVehicleUpgrade(source, 1010) -- Install nitrous&lt;br /&gt;
		end&lt;br /&gt;
		setVehicleNitroCount(source, 101) -- Set the nitro count to infinite&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onClientVehicleEnter&amp;quot;, root, infiniteNitro)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
{{Requirements|n/a|1.3.1-9.04993|}}&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Client_vehicle_functions}}&lt;/div&gt;</summary>
		<author><name>Renkon</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=DxDrawAnimWindow&amp;diff=37995</id>
		<title>DxDrawAnimWindow</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=DxDrawAnimWindow&amp;diff=37995"/>
		<updated>2013-12-23T01:10:12Z</updated>

		<summary type="html">&lt;p&gt;Renkon: Edited example, as it was wrong, so fixed it&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Useful Function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function is for creating and animating a dX Window.&lt;br /&gt;
* '''NOTE:''' This is made to be used clientside!.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;bool dxDrawAnimWindow ( string text, int height, int width, int color, string element font, string anim)&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
* '''text:''' The text of the window&lt;br /&gt;
* '''height:''' The height of the window&lt;br /&gt;
* '''width:''' The width of the window&lt;br /&gt;
* '''color:''' The color of the window&lt;br /&gt;
* '''font:''' A element or string representing the font.&lt;br /&gt;
* '''anim:''' The easing or animation type. See https://wiki.multitheftauto.com/wiki/Easing] For more Types-&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Clientside script&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 dxDrawAnimWindow(text,height,width,color,font,anim)&lt;br /&gt;
    local x,y = guiGetScreenSize()&lt;br /&gt;
 &lt;br /&gt;
    btwidth = width&lt;br /&gt;
    btheight = height/20&lt;br /&gt;
 &lt;br /&gt;
    local now = getTickCount()&lt;br /&gt;
    local elapsedTime = now - start&lt;br /&gt;
    local endTime = start + 1500&lt;br /&gt;
    local duration = endTime - start&lt;br /&gt;
    local progress = elapsedTime / duration&lt;br /&gt;
    local x1, y1, z1 = interpolateBetween ( 0, 0, 0, width, height, 255, progress, anim)&lt;br /&gt;
    local x2, y2, z2 = interpolateBetween ( 0, 0, 0, btwidth, btheight, btheight/11, progress, anim)&lt;br /&gt;
 &lt;br /&gt;
    posx = (x/2)-(x1/2)&lt;br /&gt;
    posy = (y/2)-(y1/2)&lt;br /&gt;
 &lt;br /&gt;
    dxDrawRectangle ( posx, posy-y2, x2, y2, color )&lt;br /&gt;
    dxDrawRectangle ( posx, posy, x1, y1, tocolor ( 0, 0, 0, 200 ) )&lt;br /&gt;
    dxDrawText ( text, 0, -(y1)-y2, x, y, tocolor ( 255, 255, 255, 255 ), z2,font,&amp;quot;center&amp;quot;,&amp;quot;center&amp;quot;)   &lt;br /&gt;
 &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;
==Use==&lt;br /&gt;
Always remeber to define the &amp;quot;start&amp;quot; value with getTickCount() and use onClientRender or onClientPreRender&lt;br /&gt;
&amp;lt;section name=&amp;quot;Clientside 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;function content()&lt;br /&gt;
     local color = tocolor ( 0, 0, 0, 200 )&lt;br /&gt;
     dxDrawAnimWindow ( &amp;quot;My Animated Window&amp;quot;, 520, 600, color, &amp;quot;default-bold&amp;quot;, &amp;quot;OutBounce&amp;quot;)&lt;br /&gt;
end&lt;br /&gt;
bindKey ( &amp;quot;F2&amp;quot;, &amp;quot;down&amp;quot;, main )&lt;br /&gt;
function main()&lt;br /&gt;
     start = getTickCount()&lt;br /&gt;
     addEventHandler ( &amp;quot;onClientRender&amp;quot;, getRootElement(), content )&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;
&lt;br /&gt;
Author: Bc#&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Useful_Functions}}&lt;/div&gt;</summary>
		<author><name>Renkon</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Template:Useful_Functions&amp;diff=37988</id>
		<title>Template:Useful Functions</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Template:Useful_Functions&amp;diff=37988"/>
		<updated>2013-12-22T22:04:53Z</updated>

		<summary type="html">&lt;p&gt;Renkon: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;*[[dxDrawAnimWindow]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» Create Animated Dx Window&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[callClientFunction]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to call any clientside function from the server's side.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[callServerFunction]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to call any server-side function from the client's side.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[centerWindow]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function center the window in any resolution.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[Check]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks if it's arguments are of the right types and calls the error-function if one isn't.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[convertNumber]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function converts large numbers and adds commas to it. (Example: 100000 -&amp;gt; 100,000)&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[coroutine.resume]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» Fix for hidden coroutine error messages&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawCircle]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function draws a 2D line in a circle shape on the screen.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawColorText]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function draws a dx text with #RRGGBB color codes support.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawGifImage]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function simulates the effect of a GIF image by using image sprites.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawImage3D]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function draws a 3D image.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawPartialCircle]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function draws a 2D line in a partial circle shape on the screen.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawRectangle3D]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function draws a 3D rectangle.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxGetFontSizeFromHeight]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function calculate a font size from given height for dxDraw.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxGetRealFontHeight]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» Accurately measures the pixel height of a font.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[findRotation]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» Takes two points and returns the direction from point A to point B.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[FormatDate]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» Formats a date on the basis of a format string and returns it.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[GenerateString]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» With this function you can generate a random string with any characters.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getAge]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function calculates the age of a birthday.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getAlivePlayers (Client)|getAlivePlayers]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns all the alive players by a client side, so you can store them into a Gridlist or something like that, faster.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getAlivePlayersInTeam]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table of the alive players in a team.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getBoundControls]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a list of control names that are bound to the specified key.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getCursorMoveOn]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks in which way the cursor is currently moving.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getDistanceBetweenPointAndSegment2D]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» Takes point coordinates and line (a segment) starting and ending coordinates. It returns the shortest distance between the point and the line.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getElementSpeed]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to get element speed in kph or mph units.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getElementsInDimension]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function gets the elements that are in the specified dimension.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getElementsWithinMarker]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function gets the elements that are in a markers colshape.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getJetpackWeaponsEnabled]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table of enabled weapons usable on a jetpack.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getOffsetFromXYZ]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to take an entity and a position and calculate the relative offset between them accounting for rotations.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getOnlineAdmins]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function will give the online admins.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getOnlineStaff]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» Returns all online staff, names separated by two spaces.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPlayersByData]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function gets players who have data name you passed to it.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPlayerFromNamePart]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to get player From his Name part.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPlayersInPhotograph]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function gets all the players in a photograph.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPlayerFromSerial]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function gets an online player from their serial.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPointFromDistanceRotation]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» Finds a point based on a starting point, direction and distance.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getResourceSettings]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table of the resource settings.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getRGColorFromPercentage]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia', sans-serif; font-size:smaller;&amp;quot;&amp;gt;»This function returns two integers representing Red and Green colors according to the percentage requested.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getTeamFromColor]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function gets a team from it's color. (Related to: [[getTeamFromName]])&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getTimestamp]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» With this function you can get the UNIX timestamp.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getValidVehicleModels]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table containing valid MTA Vehicle models.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getXMLNodes]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» Returns all children of a node&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getVehicleRespawnPosition]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to get the spawn position of a vehicle.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[guiComboBoxAdjustHeight]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» Adjusts the combobox to have a correct height.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[IfElse]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» Returns one of two values based on a boolean expression.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isElementInPhotograph]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks if an element was in the player's camera picture.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isElementInRange]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to check is the element's range to the main point is smaller than (or as big as) the maximum range.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isElementMoving]]&amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks if an element is moving.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isElementWithinAColShape]]&amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks if the [[element]] is in a [[colshape]].&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isPedAiming]]&amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks if a ped is aiming.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isPlayerInACL]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function will check to see if a player element is in an ACL group.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isPlayerInTeam]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function check if the player in the team.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isLeapYear]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» Checks if the given year is a leap year.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isVehicleOnRoof]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks whether vehicle is on roof.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isVehicleEmpty]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks whether a vehicle is empty.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[iterElements]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» Returns an iterator for your for loops saving time typing ipairs( getElementsByType( type ) ), instead you type: iterElements( type ).&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[mathNumber]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function is a workaround for the clientside floating-point precision of 24-bits&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[math.round]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» Rounds a number whereas the number of decimals to keep and the method may be set.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[multi_check]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks one element to many, handy and clean.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[onVehicleWeaponFire]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This code implements an event that is triggered when a player in a vehicle fires a vehicles weapon.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[RGBToHex]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a string representing the color in hexadecimal.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[setElementSpeed]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to set moving element speed in kph or mph units.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[setTableProtected]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» Protects a table and makes it read-only.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[setVehicleGravityPoint]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This clientside function sets a vehicle's gravity in the direction of a 3 dimensional coordinate with the strength specified.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[smoothMoveCamera]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This clientside function allows you to create a cinematic camera flight.&lt;br /&gt;
*[[string.count]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function counts a text from a text.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[string.explode]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function splits a string at a given separator pattern and returns a table with the pieces.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[switch]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allow the value of a variable or expression to control the flow of program execution via a multiway branch.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[table.copy]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function copies a whole table and all the tables in that table.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[table.compare]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function check if both tables is equal. &amp;lt;/span&amp;gt;&lt;br /&gt;
*[[table.empty]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function check is empty table or not.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[table.map]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function goes through a table and replaces every field with the return of the passed function, where the field's value is passed as first argument and optionally more arguments.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[table.merge]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» Merges two or more tables in the first.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[table.random]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function retrieves a random variable from a table.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[table.size]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» Finds the absolute size of a table.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[toHex]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function converts a decimal number to a hexadecimal number, as a fix to be used clientside.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[var dump]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function outputs information about one or more variables using outputConsole()&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[wavelengthToRGBA]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function converts a phisical wavelength of light to a RGBA color.&amp;lt;/span&amp;gt;&lt;br /&gt;
[[Category:Useful Functions]]&lt;/div&gt;</summary>
		<author><name>Renkon</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetRGColorFromPercentage&amp;diff=34207</id>
		<title>GetRGColorFromPercentage</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetRGColorFromPercentage&amp;diff=34207"/>
		<updated>2012-12-10T18:22:14Z</updated>

		<summary type="html">&lt;p&gt;Renkon: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Useful Function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function lets you get an RG Color depending on the percentage.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
int, int getRGColorFromPercentage ( int percentage )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''percentage:''' The value which you want to get the RGB from. It must be between 0 and 100.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns two integers, with red, and green values if percentage goes between 0 and 100. Returns false otherwise.&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server/Client-Side Script&amp;quot; class=&amp;quot;both&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 getRGColorFromPercentage(percentage)&lt;br /&gt;
    if not percentage or percentage and type(percentage) ~= &amp;quot;number&amp;quot; or percentage &amp;gt; 100 or percentage &amp;lt; 0 then outputDebugString( &amp;quot;Invalid argument @ 'getRGColorFromPercentage'&amp;quot;, 2 ) return false end&lt;br /&gt;
    if percentage &amp;gt; 50 then&lt;br /&gt;
	local temp = 100 - percentage&lt;br /&gt;
        return temp*5.1, 255&lt;br /&gt;
    elseif percentage == 50 then&lt;br /&gt;
	return 255, 255&lt;br /&gt;
    else&lt;br /&gt;
	return 255, percentage*5.1&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;
==Example==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Client-Side Example&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This example shows the vehicle health with a different color depending on its health in the bottom part of the screen.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local sW, sH = guiGetScreenSize()&lt;br /&gt;
&lt;br /&gt;
function showHealth()&lt;br /&gt;
     local health = getElementHealth(getPedOccupiedVehicle(localPlayer)) - 250&lt;br /&gt;
     -- When the car has got a health of 250, it turns into fire, so we remove 250 of the original health in order not to take it into account.&lt;br /&gt;
     if health &amp;lt; 0 then health = 0 end -- In case it goes negative, we set it as if it were 0.&lt;br /&gt;
     -- Now we need to make the conversion to a number between 0 to 100 knowing that health goes from 0 to 750.&lt;br /&gt;
     local percentage = math.floor((health*0.133333333333)+0.5) -- Transformation into percentage.&lt;br /&gt;
     -- We now use the function&lt;br /&gt;
     local r, g = getRGColorFromPercentage(percentage)&lt;br /&gt;
     -- We show it&lt;br /&gt;
     dxDrawText(&amp;quot;Health: &amp;quot;..percentage..&amp;quot;%&amp;quot;, sW/2-100, sH-45, sW/2+100, sH-15, tocolor(r, g, 0, 255), 1, &amp;quot;default&amp;quot;, &amp;quot;center&amp;quot;, &amp;quot;center&amp;quot;)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- We add the handler of the function when player enters a car.&lt;br /&gt;
addEventHandler(&amp;quot;onClientPlayerVehicleEnter&amp;quot;, localPlayer, &lt;br /&gt;
function()&lt;br /&gt;
    addEventHandler(&amp;quot;onClientPreRender&amp;quot;, root, showHealth)&lt;br /&gt;
end )&lt;br /&gt;
&lt;br /&gt;
-- We remove it when the player leaves a car.&lt;br /&gt;
addEventHandler(&amp;quot;onClientPlayerVehicleExit&amp;quot;, localPlayer, &lt;br /&gt;
function()&lt;br /&gt;
    removeEventHandler(&amp;quot;onClientPreRender&amp;quot;, root, showHealth)&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;
'''Author: Renkon'''&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Useful_Functions}}&lt;br /&gt;
[[:Category:Useful_Functions]]&lt;/div&gt;</summary>
		<author><name>Renkon</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetRGColorFromPercentage&amp;diff=34206</id>
		<title>GetRGColorFromPercentage</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetRGColorFromPercentage&amp;diff=34206"/>
		<updated>2012-12-10T02:15:55Z</updated>

		<summary type="html">&lt;p&gt;Renkon: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Useful Function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function lets you get an RG Color depending on the percentage.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
int, int getRGColorFromPercentage ( int percentage )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''percentage:''' The value which you want to get the RGB from. It must be between 0 and 100.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns two integers, with red, and green values if percentage goes between 0 and 100. Returns false otherwise.&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server/Client-Side Script&amp;quot; class=&amp;quot;both&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 getRGColorFromPercentage(percentage)&lt;br /&gt;
    if not percentage or percentage and type(percentage) ~= &amp;quot;number&amp;quot; or percentage &amp;gt; 100 or percentage &amp;lt; 0 then outputDebugString( &amp;quot;Invalid argument @ 'getRGColorFromPercentage'&amp;quot;, 2 ) return false end&lt;br /&gt;
    if percentage &amp;gt; 50 then&lt;br /&gt;
	local temp = 100 - percentage&lt;br /&gt;
        return temp*5.1, 255&lt;br /&gt;
    elseif percentage == 50 then&lt;br /&gt;
	return 255, 255&lt;br /&gt;
    else&lt;br /&gt;
	return 255, percentage*5.1&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;
==Example==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Client-Side Example&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This example shows the vehicle health with a different color depending on its health in the bottom part of the screen.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local sW, sH = guiGetScreenSize()&lt;br /&gt;
&lt;br /&gt;
function showHealth()&lt;br /&gt;
     local health = getElementHealth(getPedOccupiedVehicle(localPlayer)) - 250&lt;br /&gt;
     -- When the car has got a health of 250, it turns into fire, so we remove 250 of the original health in order not to take it into account.&lt;br /&gt;
     if health &amp;lt; 0 then health = 0 end -- In case it goes negative, we set it as if it were 0.&lt;br /&gt;
     -- Now we need to make the conversion to a number between 0 to 100 knowing that health goes from 0 to 750.&lt;br /&gt;
     local percentage = math.floor((health*0.133333333333)+0.5) -- Transformation into percentage.&lt;br /&gt;
     -- We now use the function&lt;br /&gt;
     local r, g = getRGColorFromPercentage(percentage)&lt;br /&gt;
     -- We show it&lt;br /&gt;
     dxDrawText(&amp;quot;Health: &amp;quot;..percentage..&amp;quot;%&amp;quot;, sW/2-100, sH-45, sW/2+100, sH-15, tocolor(r, g, 0, 255), 1, &amp;quot;default&amp;quot;, &amp;quot;center&amp;quot;, &amp;quot;center&amp;quot;)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- We add the handler of the function when player enters a car.&lt;br /&gt;
addEventHandler(&amp;quot;onClientPlayerVehicleEnter&amp;quot;, localPlayer, &lt;br /&gt;
function()&lt;br /&gt;
    addEventHandler(&amp;quot;onClientPreRender&amp;quot;, root, showHealth)&lt;br /&gt;
end )&lt;br /&gt;
&lt;br /&gt;
-- We remove it when the player leaves a car.&lt;br /&gt;
addEventHandler(&amp;quot;onClientPlayerVehicleEnter&amp;quot;, localPlayer, &lt;br /&gt;
function()&lt;br /&gt;
    removeEventHandler(&amp;quot;onClientPreRender&amp;quot;, root, showHealth)&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;
'''Author: Renkon'''&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Useful_Functions}}&lt;br /&gt;
[[:Category:Useful_Functions]]&lt;/div&gt;</summary>
		<author><name>Renkon</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetRGColorFromPercentage&amp;diff=34205</id>
		<title>GetRGColorFromPercentage</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetRGColorFromPercentage&amp;diff=34205"/>
		<updated>2012-12-10T02:07:34Z</updated>

		<summary type="html">&lt;p&gt;Renkon: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Useful Function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function lets you get an RG Color depending on the percentage.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
int, int getRGColorFromPercentage ( int percentage )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''percentage:''' The value which you want to get the RGB from. It must be between 0 and 100.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns two integers, with red, and green values if percentage goes between 0 and 100. Returns false otherwise.&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server/Client-Side Script&amp;quot; class=&amp;quot;both&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 getRGColorFromPercentage(percentage)&lt;br /&gt;
    if not percentage or percentage and type(percentage) ~= &amp;quot;number&amp;quot; or percentage &amp;gt; 100 or percentage &amp;lt; 0 then outputDebugString( &amp;quot;Invalid argument @ 'getRGColorFromPercentage'&amp;quot;, 2 ) return false end&lt;br /&gt;
    if percentage &amp;gt; 50 then&lt;br /&gt;
	local temp = 100 - percentage&lt;br /&gt;
        return temp*5.1, 255&lt;br /&gt;
    elseif percentage == 50 then&lt;br /&gt;
	return 255, 255&lt;br /&gt;
    else&lt;br /&gt;
	return 255, percentage*5.1&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;
==Example==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Client-Side Example&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This example shows the vehicle health with a different color depending on its health in the bottom part of the screen.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local sW, sH = guiGetScreenSize()&lt;br /&gt;
&lt;br /&gt;
function showHealth()&lt;br /&gt;
     local health = getElementHealth(getPedOccupiedVehicle(localPlayer)) - 250&lt;br /&gt;
     -- When the car has got a health of 250, it turns into fire, so we remove 250 of the original health in order not to take it into account.&lt;br /&gt;
     if health &amp;lt; 0 then health = 0 end -- In case it goes negative, we set it as if it were 0.&lt;br /&gt;
     -- Now we need to make the conversion to a number between 0 to 100 knowing that health goes from 0 to 750.&lt;br /&gt;
     local percentage = math.floor((health*0.133333333333)+0.5) -- Transformation into percentage.&lt;br /&gt;
     -- We now use the function&lt;br /&gt;
     local r, g = getRGColorFromPercentage(percentage)&lt;br /&gt;
     -- We show it&lt;br /&gt;
     dxDrawText(&amp;quot;Health: &amp;quot;..percentage..&amp;quot;%&amp;quot;, sW/2-100, sH-45, sW/2+100, sH-15, tocolor(r, g, 0, 255), 1, &amp;quot;default&amp;quot;, &amp;quot;center&amp;quot;, &amp;quot;center&amp;quot;)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- We add the handler of the function when player enters a car.&lt;br /&gt;
addEventHandler(&amp;quot;onClientPlayerVehicleEnter&amp;quot;, localPlayer, &lt;br /&gt;
function()&lt;br /&gt;
    addEventHandler(&amp;quot;onClientPreRender&amp;quot;, root, showHealth)&lt;br /&gt;
end )&lt;br /&gt;
&lt;br /&gt;
-- We remove it when the player leaves a car.&lt;br /&gt;
addEventHandler(&amp;quot;onClientPlayerVehicleEnter&amp;quot;, localPlayer, &lt;br /&gt;
function()&lt;br /&gt;
    removeEventHandler(&amp;quot;onClientPreRender&amp;quot;, root, showHealth)&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;
'''Author: Renkon'''&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Useful_Functions}}&lt;/div&gt;</summary>
		<author><name>Renkon</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetRGColorFromPercentage&amp;diff=34204</id>
		<title>GetRGColorFromPercentage</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetRGColorFromPercentage&amp;diff=34204"/>
		<updated>2012-12-10T02:05:55Z</updated>

		<summary type="html">&lt;p&gt;Renkon: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Useful Function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function lets you get an RG Color depending on the percentage.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
int, int getRGColorFromPercentage ( int percentage )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''percentage:''' The value which you want to get the RGB from. It must be between 0 and 100.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns two integers, with red, and green values if percentage goes between 0 and 100. Returns false otherwise.&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server/Client-Side Script&amp;quot; class=&amp;quot;both&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 getRGColorFromPercentage(percentage)&lt;br /&gt;
    if not percentage or percentage and type(percentage) ~= &amp;quot;number&amp;quot; or percentage &amp;gt; 100 or percentage &amp;lt; 0 then outputDebugString( &amp;quot;Invalid argument @ 'getRGColorFromPercentage'&amp;quot;, 2 ) return false end&lt;br /&gt;
    if percentage &amp;gt; 50 then&lt;br /&gt;
	local temp = 100 - percentage&lt;br /&gt;
        return temp*5.1, 255&lt;br /&gt;
    elseif percentage == 50 then&lt;br /&gt;
	return 255, 255&lt;br /&gt;
    else&lt;br /&gt;
	return 255, percentage*5.1&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;
==Example==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Client-Side Example&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This example shows a vehicle health with a different color depending on its health.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local sW, sH = guiGetScreenSize()&lt;br /&gt;
&lt;br /&gt;
function showHealth()&lt;br /&gt;
     local health = getElementHealth(getPedOccupiedVehicle(localPlayer)) - 250&lt;br /&gt;
     -- When the car has got a health of 250, it turns into fire, so we remove 250 of the original health in order not to take it into account.&lt;br /&gt;
     if health &amp;lt; 0 then health = 0 end -- In case it goes negative, we set it as if it were 0.&lt;br /&gt;
     -- Now we need to make the conversion to a number between 0 to 100 knowing that health goes from 0 to 750.&lt;br /&gt;
     local percentage = math.floor((health*0.133333333333)+0.5) -- Transformation into percentage.&lt;br /&gt;
     -- We now use the function&lt;br /&gt;
     local r, g = getRGColorFromPercentage(percentage)&lt;br /&gt;
     -- We show it&lt;br /&gt;
     dxDrawText(&amp;quot;Health: &amp;quot;..percentage..&amp;quot;%&amp;quot;, sW/2-100, sH-45, sW/2+100, sH-15, tocolor(r, g, 0, 255), 1, &amp;quot;default&amp;quot;, &amp;quot;center&amp;quot;, &amp;quot;center&amp;quot;)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- We add the handler of the function when player enters a car.&lt;br /&gt;
addEventHandler(&amp;quot;onClientPlayerVehicleEnter&amp;quot;, localPlayer, &lt;br /&gt;
function()&lt;br /&gt;
    addEventHandler(&amp;quot;onClientPreRender&amp;quot;, root, showHealth)&lt;br /&gt;
end )&lt;br /&gt;
&lt;br /&gt;
-- We remove it when the player leaves a car.&lt;br /&gt;
addEventHandler(&amp;quot;onClientPlayerVehicleEnter&amp;quot;, localPlayer, &lt;br /&gt;
function()&lt;br /&gt;
    removeEventHandler(&amp;quot;onClientPreRender&amp;quot;, root, showHealth)&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;
'''Author: Renkon'''&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Useful_Functions}}&lt;/div&gt;</summary>
		<author><name>Renkon</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetRGColorFromPercentage&amp;diff=34203</id>
		<title>GetRGColorFromPercentage</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetRGColorFromPercentage&amp;diff=34203"/>
		<updated>2012-12-10T02:01:13Z</updated>

		<summary type="html">&lt;p&gt;Renkon: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Useful Function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function lets you get an RG Color depending on the percentage.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
int, int getRGColorFromPercentage ( int percentage )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''percentage:''' The value which you want to get the RGB from. It must be between 0 and 100.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns two integers, with red, and green values if percentage goes between 0 and 100. Returns false otherwise.&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server/Client-Side Script&amp;quot; class=&amp;quot;both&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 getRGColorFromPercentage(percentage)&lt;br /&gt;
    if not percentage or percentage and type(percentage) ~= &amp;quot;number&amp;quot; or percentage &amp;gt; 100 or percentage &amp;lt; 0 then outputDebugString( &amp;quot;Invalid argument @ 'getRGColorFromPercentage'&amp;quot;, 2 ) return false end&lt;br /&gt;
    if percentage &amp;gt; 50 then&lt;br /&gt;
	local temp = 100 - percentage&lt;br /&gt;
        return temp*5.1, 255&lt;br /&gt;
    elseif percentage == 50 then&lt;br /&gt;
	return 255, 255&lt;br /&gt;
    else&lt;br /&gt;
	return 255, percentage*5.1&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;
==Example==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Client-Side Example&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This example shows a vehicle health with a different color depending on its health.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local sW, sH = guiGetScreenSize()&lt;br /&gt;
&lt;br /&gt;
function showHealth()&lt;br /&gt;
     local health = getElementHealth(getPedOccupiedVehicle(localPlayer)) - 250&lt;br /&gt;
     -- When the car has got a health of 250, it turns into fire, so we remove 250 of the original health in order not to take it into account.&lt;br /&gt;
     if health &amp;lt; 0 then health = 0 end -- In case it goes negative, we set it as if it were 0.&lt;br /&gt;
     -- Now we need to make the conversion to a number between 0 to 100 knowing that health goes from 0 to 750.&lt;br /&gt;
     local percentage = math.floor((health*0.133333333333)+0.5) -- Transformation into percentage.&lt;br /&gt;
     -- We now use the function&lt;br /&gt;
     local r, g = getRGColorFromPercentage(percentage)&lt;br /&gt;
     -- We show it&lt;br /&gt;
     dxDrawText(&amp;quot;Health: &amp;quot;..percentage..&amp;quot;%&amp;quot;, sW/2-100, sH-45, sW/2+100, sH-15, tocolor(r, g, 0, 255), 1, &amp;quot;default&amp;quot;, &amp;quot;center&amp;quot;, &amp;quot;center&amp;quot;)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- We add the handler of the function when player enters a car.&lt;br /&gt;
addEventHandler(&amp;quot;onClientPlayerVehicleEnter&amp;quot;, localPlayer, &lt;br /&gt;
function()&lt;br /&gt;
    addEventHandler(&amp;quot;onClientRender&amp;quot;, root, showHealth)&lt;br /&gt;
end )&lt;br /&gt;
&lt;br /&gt;
-- We remove it when the player leaves a car.&lt;br /&gt;
addEventHandler(&amp;quot;onClientPlayerVehicleEnter&amp;quot;, localPlayer, &lt;br /&gt;
function()&lt;br /&gt;
    removeEventHandler(&amp;quot;onClientRender&amp;quot;, root, showHealth)&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;
'''Author: Renkon'''&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Useful_Functions}}&lt;/div&gt;</summary>
		<author><name>Renkon</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetRGColorFromPercentage&amp;diff=34202</id>
		<title>GetRGColorFromPercentage</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetRGColorFromPercentage&amp;diff=34202"/>
		<updated>2012-12-10T01:49:42Z</updated>

		<summary type="html">&lt;p&gt;Renkon: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Useful Function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function lets you get an RG Color depending on the percentage.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
int, int getRGColorFromPercentage ( int percentage )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''percentage:''' The value which you want to get the RGB from. It must be between 0 and 100.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns two integers, with red, and green values if percentage goes between 0 and 100. Returns false otherwise.&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server/Client-Side Script&amp;quot; class=&amp;quot;both&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 getRGColorFromPercentage(percentage)&lt;br /&gt;
    if not percentage or percentage and type(percentage) ~= &amp;quot;number&amp;quot; or percentage &amp;gt; 100 or percentage &amp;lt; 0 then outputDebugString( &amp;quot;Invalid argument @ 'getRGColorFromPercentage'&amp;quot;, 2 ) return false end&lt;br /&gt;
    if percentage &amp;gt; 50 then&lt;br /&gt;
	local temp = 100 - percentage&lt;br /&gt;
        return temp*5.1, 255&lt;br /&gt;
    elseif percentage == 50 then&lt;br /&gt;
	return 255, 255&lt;br /&gt;
    else&lt;br /&gt;
	return 255, percentage*5.1&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;
==Example==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Client-Side Example&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This example shows a vehicle health with a different color depending on its health.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local sW, sH = guiGetScreenSize()&lt;br /&gt;
&lt;br /&gt;
function showHealth()&lt;br /&gt;
     local health = getElementHealth(getPedOccupiedVehicle(localPlayer)) - 250&lt;br /&gt;
     -- When the car has got a health of 250, it turns into fire, so we remove 250 of the original health in order not to take it into account.&lt;br /&gt;
     if health &amp;lt; 0 then health = 0 end -- In case it goes negative, we set it as if it were 0.&lt;br /&gt;
     -- Now we need to make the conversion to a number between 0 to 100 knowing that health goes from 0 to 750.&lt;br /&gt;
     local percentage = math.floor((health*0.133333333333)+0.5) -- Transformation into percentage.&lt;br /&gt;
     -- We now use the function&lt;br /&gt;
     local r, g = getRGColorFromPercentage(percentage)&lt;br /&gt;
     -- We show it&lt;br /&gt;
     dxDrawText(percentage..&amp;quot;%&amp;quot;, sW/2-100, sH-45, sW/2+100, sH-15, tocolor(r, g, 0, 255), 1, &amp;quot;default&amp;quot;, &amp;quot;center&amp;quot;, &amp;quot;center&amp;quot;)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- We add the handler of the function when player enters a car.&lt;br /&gt;
addEventHandler(&amp;quot;onClientPlayerVehicleEnter&amp;quot;, localPlayer, &lt;br /&gt;
function()&lt;br /&gt;
    addEventHandler(&amp;quot;onClientRender&amp;quot;, root, showHealth)&lt;br /&gt;
end )&lt;br /&gt;
&lt;br /&gt;
-- We remove it when the player leaves a car.&lt;br /&gt;
addEventHandler(&amp;quot;onClientPlayerVehicleEnter&amp;quot;, localPlayer, &lt;br /&gt;
function()&lt;br /&gt;
    removeEventHandler(&amp;quot;onClientRender&amp;quot;, root, showHealth)&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;
'''Author: Renkon'''&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Useful_Functions}}&lt;/div&gt;</summary>
		<author><name>Renkon</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetRGColorFromPercentage&amp;diff=34201</id>
		<title>GetRGColorFromPercentage</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetRGColorFromPercentage&amp;diff=34201"/>
		<updated>2012-12-10T01:48:53Z</updated>

		<summary type="html">&lt;p&gt;Renkon: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Useful Function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function lets you get an RG Color depending on the percentage.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
int, int getRGColorFromPercentage ( int percentage )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''percentage:''' The value which you want to get the RGB from. It must be between 0 and 100.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns two integers, with red, and green values if percentage goes between 0 and 100. Returns false otherwise.&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server/Client-Side Script&amp;quot; class=&amp;quot;both&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 getRGColorFromPercentage(percentage)&lt;br /&gt;
    if not percentage or percentage and type(percentage) ~= &amp;quot;number&amp;quot; or percentage &amp;gt; 100 or percentage &amp;lt; 0 then outputDebugString( &amp;quot;Invalid argument @ 'getRGColorFromPercentage'&amp;quot;, 2 ) return false end&lt;br /&gt;
    if percentage &amp;gt; 50 then&lt;br /&gt;
	local temp = 100 - percentage&lt;br /&gt;
        return temp*5.1, 255&lt;br /&gt;
    elseif percentage == 50 then&lt;br /&gt;
	return 255, 255&lt;br /&gt;
    else&lt;br /&gt;
	return 255, percentage*5.1&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;
==Example==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Client-Side Example&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This example shows a vehicle health with a different color depending on its health.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local sW, sH = guiGetScreenSize()&lt;br /&gt;
&lt;br /&gt;
function showHealth()&lt;br /&gt;
     local health = getElementHealth(getPedOccupiedVehicle(localPlayer)) - 250&lt;br /&gt;
     -- When the car has got a health of 250, it turns into fire, so we remove 250 of the original health in order not to take it into account.&lt;br /&gt;
     if health &amp;lt; 0 then health = 0 end -- In case it goes negative, we set it as if it were 0.&lt;br /&gt;
     -- Now we need to make the conversion to a number between 0 to 100 knowing that health goes from 0 to 750.&lt;br /&gt;
     local percentage = math.floor((health*0.133333333333/10)+0.5) -- Transformation into percentage.&lt;br /&gt;
     -- We now use the function&lt;br /&gt;
     local r, g = getRGColorFromPercentage(percentage)&lt;br /&gt;
     -- We show it&lt;br /&gt;
     dxDrawText(percentage..&amp;quot;%&amp;quot;, sW/2-100, sH-45, sW/2+100, sH-15, tocolor(r, g, 0, 255), 1, &amp;quot;default&amp;quot;, &amp;quot;center&amp;quot;, &amp;quot;center&amp;quot;)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- We add the handler of the function when player enters a car.&lt;br /&gt;
addEventHandler(&amp;quot;onClientPlayerVehicleEnter&amp;quot;, localPlayer, &lt;br /&gt;
function()&lt;br /&gt;
    addEventHandler(&amp;quot;onClientRender&amp;quot;, root, showHealth)&lt;br /&gt;
end )&lt;br /&gt;
&lt;br /&gt;
-- We remove it when the player leaves a car.&lt;br /&gt;
addEventHandler(&amp;quot;onClientPlayerVehicleEnter&amp;quot;, localPlayer, &lt;br /&gt;
function()&lt;br /&gt;
    removeEventHandler(&amp;quot;onClientRender&amp;quot;, root, showHealth)&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;
'''Author: Renkon'''&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Useful_Functions}}&lt;/div&gt;</summary>
		<author><name>Renkon</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetRGColorFromPercentage&amp;diff=34200</id>
		<title>GetRGColorFromPercentage</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetRGColorFromPercentage&amp;diff=34200"/>
		<updated>2012-12-10T01:48:02Z</updated>

		<summary type="html">&lt;p&gt;Renkon: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Useful Function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function lets you get an RG Color depending on the percentage.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
int, int getRGColorFromPercentage ( int percentage )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''percentage:''' The value which you want to get the RGB from. It must be between 0 and 100.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns two integers, with red, and green values if percentage goes between 0 and 100. Returns false otherwise.&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server/Client-Side Script&amp;quot; class=&amp;quot;both&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 getRGColorFromPercentage(percentage)&lt;br /&gt;
    if not percentage or percentage and type(percentage) ~= &amp;quot;number&amp;quot; or percentage &amp;gt; 100 or percentage &amp;lt; 0 then outputDebugString( &amp;quot;Invalid argument @ 'getRGColorFromPercentage'&amp;quot;, 2 ) return false end&lt;br /&gt;
    if percentage &amp;gt; 50 then&lt;br /&gt;
	local temp = 100 - percentage&lt;br /&gt;
        return temp*5.1, 255&lt;br /&gt;
    elseif percentage == 50 then&lt;br /&gt;
	return 255, 255&lt;br /&gt;
    else&lt;br /&gt;
	return 255, percentage*5.1&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;
==Example==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This example shows a vehicle health with a different color depending on its health.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local sW, sH = guiGetScreenSize()&lt;br /&gt;
&lt;br /&gt;
function showHealth()&lt;br /&gt;
     local health = getElementHealth(getPedOccupiedVehicle(localPlayer)) - 250&lt;br /&gt;
     -- When the car has got a health of 250, it turns into fire, so we remove 250 of the original health in order not to take it into account.&lt;br /&gt;
     if health &amp;lt; 0 then health = 0 end -- In case it goes negative, we set it as if it were 0.&lt;br /&gt;
     -- Now we need to make the conversion to a number between 0 to 100 knowing that health goes from 0 to 750.&lt;br /&gt;
     local percentage = math.floor((health*0.133333333333/10)+0.5) -- Transformation into percentage.&lt;br /&gt;
     -- We now use the function&lt;br /&gt;
     local r, g = getRGColorFromPercentage(percentage)&lt;br /&gt;
     -- We show it&lt;br /&gt;
     dxDrawText(percentage..&amp;quot;%&amp;quot;, sW/2-100, sH-45, sW/2+100, sH-15, tocolor(r, g, 0, 255), 1, &amp;quot;default&amp;quot;, &amp;quot;center&amp;quot;, &amp;quot;center&amp;quot;)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- We add the handler of the function when player enters a car.&lt;br /&gt;
addEventHandler(&amp;quot;onClientPlayerVehicleEnter&amp;quot;, localPlayer, &lt;br /&gt;
function()&lt;br /&gt;
    addEventHandler(&amp;quot;onClientRender&amp;quot;, root, showHealth)&lt;br /&gt;
end )&lt;br /&gt;
&lt;br /&gt;
-- We remove it when the player leaves a car.&lt;br /&gt;
addEventHandler(&amp;quot;onClientPlayerVehicleEnter&amp;quot;, localPlayer, &lt;br /&gt;
function()&lt;br /&gt;
    removeEventHandler(&amp;quot;onClientRender&amp;quot;, root, showHealth)&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;
'''Author: Renkon'''&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Useful_Functions}}&lt;/div&gt;</summary>
		<author><name>Renkon</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetRGColorFromPercentage&amp;diff=34199</id>
		<title>GetRGColorFromPercentage</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetRGColorFromPercentage&amp;diff=34199"/>
		<updated>2012-12-10T01:32:43Z</updated>

		<summary type="html">&lt;p&gt;Renkon: /* Code */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Useful Function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function lets you get an RG Color depending on the percentage.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
int, int getRGColorFromPercentage ( int percentage )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''percentage:''' The value which you want to get the RGB from. It must be between 0 and 100.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns two integers, with red, and green values if percentage goes between 0 and 100. Returns false otherwise.&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server/Client-Side Script&amp;quot; class=&amp;quot;both&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 getRGColorFromPercentage(percentage)&lt;br /&gt;
    if not percentage or percentage and type(percentage) ~= &amp;quot;number&amp;quot; or percentage &amp;gt; 100 or percentage &amp;lt; 0 then outputDebugString( &amp;quot;Invalid argument @ 'getRGColorFromPercentage'&amp;quot;, 2 ) return false end&lt;br /&gt;
    if percentage &amp;gt; 50 then&lt;br /&gt;
	local temp = 100 - percentage&lt;br /&gt;
        return temp*5.1, 255&lt;br /&gt;
    elseif percentage == 50 then&lt;br /&gt;
	return 255, 255&lt;br /&gt;
    else&lt;br /&gt;
	return 255, percentage*5.1&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;
'''Author: Renkon'''&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Useful_Functions}}&lt;/div&gt;</summary>
		<author><name>Renkon</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetRGColorFromPercentage&amp;diff=34198</id>
		<title>GetRGColorFromPercentage</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetRGColorFromPercentage&amp;diff=34198"/>
		<updated>2012-12-10T01:32:21Z</updated>

		<summary type="html">&lt;p&gt;Renkon: /* Code */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Useful Function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function lets you get an RG Color depending on the percentage.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
int, int getRGColorFromPercentage ( int percentage )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''percentage:''' The value which you want to get the RGB from. It must be between 0 and 100.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns two integers, with red, and green values if percentage goes between 0 and 100. Returns false otherwise.&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server/Client-Side Script&amp;quot; class=&amp;quot;both&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 getRGColorFromPercentage(percentage)&lt;br /&gt;
    if not percentage or percentage and type(percentage) ~= &amp;quot;number&amp;quot; or percentage &amp;gt; 100 or percentage &amp;lt; 0 then outputDebugString( &amp;quot;Invalid argument @ 'getRGColorFromPercentage'&amp;quot;, 2 ) return false end&lt;br /&gt;
    if percentage &amp;gt; 50 then&lt;br /&gt;
	local temp = 100 - percentage&lt;br /&gt;
        return temp*5.1, 255&lt;br /&gt;
    elseif percentage == 50 then&lt;br /&gt;
	return 255, 255&lt;br /&gt;
    else&lt;br /&gt;
	return 255, percentage*5.1&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Author: Renkon'''&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Useful_Functions}}&lt;/div&gt;</summary>
		<author><name>Renkon</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetRGColorFromPercentage&amp;diff=34197</id>
		<title>GetRGColorFromPercentage</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetRGColorFromPercentage&amp;diff=34197"/>
		<updated>2012-12-10T01:27:41Z</updated>

		<summary type="html">&lt;p&gt;Renkon: /* Code */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Useful Function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function lets you get an RG Color depending on the percentage.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
int, int getRGColorFromPercentage ( int percentage )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''percentage:''' The value which you want to get the RGB from. It must be between 0 and 100.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns two integers, with red, and green values if percentage goes between 0 and 100. Returns false otherwise.&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function getRGColorFromPercentage(percentage)&lt;br /&gt;
    if not percentage or percentage and type(percentage) ~= &amp;quot;number&amp;quot; or percentage &amp;gt; 100 or percentage &amp;lt; 0 then outputDebugString( &amp;quot;Invalid argument @ 'getRGColorFromPercentage'&amp;quot;, 2 ) return false end&lt;br /&gt;
    if percentage &amp;gt; 50 then&lt;br /&gt;
	local temp = 100 - percentage&lt;br /&gt;
        return temp*5.1, 255&lt;br /&gt;
    elseif percentage == 50 then&lt;br /&gt;
	return 255, 255&lt;br /&gt;
    else&lt;br /&gt;
	return 255, percentage*5.1&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Author: Renkon'''&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Useful_Functions}}&lt;/div&gt;</summary>
		<author><name>Renkon</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetRGColorFromPercentage&amp;diff=34196</id>
		<title>GetRGColorFromPercentage</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetRGColorFromPercentage&amp;diff=34196"/>
		<updated>2012-12-10T01:26:49Z</updated>

		<summary type="html">&lt;p&gt;Renkon: /* Syntax */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Useful Function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function lets you get an RG Color depending on the percentage.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
int, int getRGColorFromPercentage ( int percentage )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''percentage:''' The value which you want to get the RGB from. It must be between 0 and 100.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns two integers, with red, and green values if percentage goes between 0 and 100. Returns false otherwise.&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function getRGColorFromPercentage(percentage)&lt;br /&gt;
    if not percentage or percentage and type(percentage) ~= &amp;quot;number&amp;quot; then outputDebugString( &amp;quot;Invalid argument @ 'getRGColorFromPercentage'&amp;quot;, 2 ) return false end&lt;br /&gt;
    if percentage &amp;gt; 50 then&lt;br /&gt;
	local temp = 100 - percentage&lt;br /&gt;
        return temp*5.1, 255&lt;br /&gt;
    elseif percentage == 50 then&lt;br /&gt;
	return 255, 255&lt;br /&gt;
    else&lt;br /&gt;
	return 255, percentage*5.1&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Author: Renkon'''&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Useful_Functions}}&lt;/div&gt;</summary>
		<author><name>Renkon</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetRGColorFromPercentage&amp;diff=34195</id>
		<title>GetRGColorFromPercentage</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetRGColorFromPercentage&amp;diff=34195"/>
		<updated>2012-12-10T01:23:31Z</updated>

		<summary type="html">&lt;p&gt;Renkon: Created page with &amp;quot;{{Useful Function}} __NOTOC__ This function lets you get an RG Color depending on the percentage.  ==Syntax==  &amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt; int, int, int getRGColorFromPercentage ( int percentage...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Useful Function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function lets you get an RG Color depending on the percentage.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
int, int, int getRGColorFromPercentage ( int percentage )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''percentage:''' The value which you want to get the RGB from. It must be between 0 and 100.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns two integers, with red, and green values if percentage goes between 0 and 100. Returns false otherwise.&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function getRGColorFromPercentage(percentage)&lt;br /&gt;
    if not percentage or percentage and type(percentage) ~= &amp;quot;number&amp;quot; then outputDebugString( &amp;quot;Invalid argument @ 'getRGColorFromPercentage'&amp;quot;, 2 ) return false end&lt;br /&gt;
    if percentage &amp;gt; 50 then&lt;br /&gt;
	local temp = 100 - percentage&lt;br /&gt;
        return temp*5.1, 255&lt;br /&gt;
    elseif percentage == 50 then&lt;br /&gt;
	return 255, 255&lt;br /&gt;
    else&lt;br /&gt;
	return 255, percentage*5.1&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Author: Renkon'''&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Useful_Functions}}&lt;/div&gt;</summary>
		<author><name>Renkon</name></author>
	</entry>
</feed>