<?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=TAPL-93</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=TAPL-93"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/wiki/Special:Contributions/TAPL-93"/>
	<updated>2026-04-21T09:00:30Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Template:Client_player_functions&amp;diff=46755</id>
		<title>Template:Client player functions</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Template:Client_player_functions&amp;diff=46755"/>
		<updated>2016-02-25T21:03:52Z</updated>

		<summary type="html">&lt;p&gt;TAPL-93: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* [[forcePlayerMap]]&lt;br /&gt;
* [[getLocalPlayer]]&lt;br /&gt;
* [[givePlayerMoney]]&lt;br /&gt;
* [[takePlayerMoney]]&lt;br /&gt;
* [[showPlayerHudComponent]]&lt;br /&gt;
* [[setPlayerBlurLevel]]&lt;br /&gt;
* [[setPlayerMoney]]&lt;br /&gt;
* [[setPlayerNametagColor]]&lt;br /&gt;
* [[setPlayerNametagShowing]]&lt;br /&gt;
* [[setPlayerNametagText]]&lt;br /&gt;
* [[getPlayerBlurLevel]]&lt;br /&gt;
* [[getPlayerFromName]]&lt;br /&gt;
* [[getPlayerMapBoundingBox]]&lt;br /&gt;
* [[getPlayerMoney]]&lt;br /&gt;
* [[getPlayerName]]&lt;br /&gt;
* [[getPlayerNametagColor]]&lt;br /&gt;
* [[getPlayerNametagText]]&lt;br /&gt;
* [[getPlayerPing]]&lt;br /&gt;
* [[getPlayerSerial]]&lt;br /&gt;
* [[getPlayerTeam]]&lt;br /&gt;
* [[getPlayerWantedLevel]]&lt;br /&gt;
* [[isPlayerMapForced]]&lt;br /&gt;
* [[isPlayerMapVisible]]&lt;br /&gt;
* [[isPlayerNametagShowing]]&lt;br /&gt;
* [[isVoiceEnabled]]&lt;br /&gt;
* [[isPlayerHudComponentVisible]]&lt;br /&gt;
&amp;lt;noinclude&amp;gt;[[Category:Functions templates]]&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>TAPL-93</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=C%D0%B5%D1%80%D0%B8%D0%B9%D0%BD%D1%8B%D0%B9_%D0%BA%D0%BE%D0%B4&amp;diff=46754</id>
		<title>Cерийный код</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=C%D0%B5%D1%80%D0%B8%D0%B9%D0%BD%D1%8B%D0%B9_%D0%BA%D0%BE%D0%B4&amp;diff=46754"/>
		<updated>2016-02-24T07:02:48Z</updated>

		<summary type="html">&lt;p&gt;TAPL-93: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Серийные коды используются МТА и администраторами серверов, чтобы надежно идентифицировать компьютеры игроков.Они связывают программную и аппаратную конфигурацию.Серийные коды, имеют длинну 32 знака, и содержат буквы(латиница) и цифры.&lt;br /&gt;
&lt;br /&gt;
Серийные коды наиболее часто применяются для бана игроков, поскольку компьютер с [https://ru.wikipedia.org/wiki/IP-%D0%B0%D0%B4%D1%80%D0%B5%D1%81#.D0.A1.D1.82.D0.B0.D1.82.D0.B8.D1.87.D0.B5.D1.81.D0.BA.D0.B8.D0.B5_.28.D1.81.D1.82.D0.B0.D1.82.D0.B8.D1.87.D0.BD.D1.8B.D0.B5.29_.D0.B8_.D0.B4.D0.B8.D0.BD.D0.B0.D0.BC.D0.B8.D1.87.D0.B5.D1.81.D0.BA.D0.B8.D0.B5_IP-.D0.B0.D0.B4.D1.80.D0.B5.D1.81.D0.B0 динамическим IP], может изменять IP намеренно, сделав или пересоединившись через некоторое время, но ресурсы могут дать этим кодам новое применение.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Примечания==&lt;br /&gt;
Серийные коды это наиболее точная форма определения игроков в МТА. Тем не менее, вам не следует доверять им целиком: серийные коды могут быть подделаны, хотя сделать это довольно трудно, и в таком случае весьма вероятны ошибки клиента, и к глобальному бану, если для исправления этого обратятся за помощью. &lt;br /&gt;
Теоретически серийный код двух игроков может совпасть, но это крайне маловероятно. При этом, любой игрок может просто воспользоваться другим компьютером.&lt;br /&gt;
&lt;br /&gt;
==Связанные функции==&lt;br /&gt;
{{RU/Serial functions}}&lt;br /&gt;
&lt;br /&gt;
[[en:Serial]]&lt;br /&gt;
[[ru:Category:Scripting_Concepts]]&lt;/div&gt;</summary>
		<author><name>TAPL-93</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=C%D0%B5%D1%80%D0%B8%D0%B9%D0%BD%D1%8B%D0%B9_%D0%BA%D0%BE%D0%B4&amp;diff=46753</id>
		<title>Cерийный код</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=C%D0%B5%D1%80%D0%B8%D0%B9%D0%BD%D1%8B%D0%B9_%D0%BA%D0%BE%D0%B4&amp;diff=46753"/>
		<updated>2016-02-24T07:02:33Z</updated>

		<summary type="html">&lt;p&gt;TAPL-93: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Серийные коды используются МТА и администраторами серверов, чтобы надежно идентифицировать компьютеры игроков.Они связывают программную и аппаратную конфигурацию.Серийные коды, имеют длинну 32 знака, и содержат буквы(латиница) и цифры.&lt;br /&gt;
&lt;br /&gt;
Серийные коды наиболее часто применяются для бана игроков, поскольку компьютер с [https://ru.wikipedia.org/wiki/IP-%D0%B0%D0%B4%D1%80%D0%B5%D1%81#.D0.A1.D1.82.D0.B0.D1.82.D0.B8.D1.87.D0.B5.D1.81.D0.BA.D0.B8.D0.B5_.28.D1.81.D1.82.D0.B0.D1.82.D0.B8.D1.87.D0.BD.D1.8B.D0.B5.29_.D0.B8_.D0.B4.D0.B8.D0.BD.D0.B0.D0.BC.D0.B8.D1.87.D0.B5.D1.81.D0.BA.D0.B8.D0.B5_IP-.D0.B0.D0.B4.D1.80.D0.B5.D1.81.D0.B0 динамическим IP], может изменять IP намеренно, сделав или пересоединившись через некоторое время, но ресурсы могут дать этим кодам новое применение.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Примечания==&lt;br /&gt;
Серийные коды это наиболее точная форма определения игроков в МТА. Тем не менее, вам не следует доверять им целиком: серийные коды могут быть подделаны, хотя сделать это довольно трудно, и в таком случае весьма вероятны ошибки клиента, и к глобальному бану, если для исправления этого обратятся за помощью. &lt;br /&gt;
Теоретически серийный код двух игроков может совпасть, но это крайне маловероятно. При этом, любой игрок может просто воспользоваться другим компьютером.&lt;br /&gt;
&lt;br /&gt;
==Связанные функции==&lt;br /&gt;
{{RU/Serial functions}}&lt;br /&gt;
&lt;br /&gt;
[[en:Serial]]&lt;br /&gt;
[[Category:Scripting_Concepts]]&lt;/div&gt;</summary>
		<author><name>TAPL-93</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=C%D0%B5%D1%80%D0%B8%D0%B9%D0%BD%D1%8B%D0%B9_%D0%BA%D0%BE%D0%B4&amp;diff=46752</id>
		<title>Cерийный код</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=C%D0%B5%D1%80%D0%B8%D0%B9%D0%BD%D1%8B%D0%B9_%D0%BA%D0%BE%D0%B4&amp;diff=46752"/>
		<updated>2016-02-24T07:02:05Z</updated>

		<summary type="html">&lt;p&gt;TAPL-93: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Серийные коды используются МТА и администраторами серверов, чтобы надежно идентифицировать компьютеры игроков.Они связывают программную и аппаратную конфигурацию.Серийные коды, имеют длинну 32 знака, и содержат буквы(латиница) и цифры.&lt;br /&gt;
&lt;br /&gt;
Серийные коды наиболее часто применяются для бана игроков, поскольку компьютер с [https://ru.wikipedia.org/wiki/IP-%D0%B0%D0%B4%D1%80%D0%B5%D1%81#.D0.A1.D1.82.D0.B0.D1.82.D0.B8.D1.87.D0.B5.D1.81.D0.BA.D0.B8.D0.B5_.28.D1.81.D1.82.D0.B0.D1.82.D0.B8.D1.87.D0.BD.D1.8B.D0.B5.29_.D0.B8_.D0.B4.D0.B8.D0.BD.D0.B0.D0.BC.D0.B8.D1.87.D0.B5.D1.81.D0.BA.D0.B8.D0.B5_IP-.D0.B0.D0.B4.D1.80.D0.B5.D1.81.D0.B0 динамическим IP], может изменять IP намеренно, сделав или пересоединившись через некоторое время, но ресурсы могут дать этим кодам новое применение.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Примечания==&lt;br /&gt;
Серийные коды это наиболее точная форма определения игроков в МТА. Тем не менее, вам не следует доверять им целиком: серийные коды могут быть подделаны, хотя сделать это довольно трудно, и в таком случае весьма вероятны ошибки клиента, и к глобальному бану, если для исправления этого обратятся за помощью. &lt;br /&gt;
Теоретически серийный код двух игроков может совпасть, но это крайне маловероятно. При этом, любой игрок может просто воспользоваться другим компьютером.&lt;br /&gt;
&lt;br /&gt;
==Связанные функции==&lt;br /&gt;
{{RU/Serial functions}}&lt;br /&gt;
&lt;br /&gt;
[[en:Serial]]&lt;br /&gt;
[[ru:Category:Scripting_Concepts]]&lt;/div&gt;</summary>
		<author><name>TAPL-93</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetMarkerSize&amp;diff=46597</id>
		<title>SetMarkerSize</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetMarkerSize&amp;diff=46597"/>
		<updated>2016-02-10T03:08:43Z</updated>

		<summary type="html">&lt;p&gt;TAPL-93: Undo revision 46582 by Jaber (talk)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Server client function}}&lt;br /&gt;
This function sets the size of the specified marker.&lt;br /&gt;
&lt;br /&gt;
Setting negative value will &amp;quot;flip&amp;quot; the marker, do nothing or make it invisible: &lt;br /&gt;
* '''cylinder''' or '''arrow''': upside down&lt;br /&gt;
* '''ring''': inside out&lt;br /&gt;
* '''checkpoint''': disappear&lt;br /&gt;
* '''corona''': bigger&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool setMarkerSize ( marker theMarker, float size )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{OOP||[[Marker]]:setSize|size|getMarkerSize}}&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''theMarker:''' The [[marker]] that you wish to set the size of.&lt;br /&gt;
*'''size:''' A float representing new size of the marker.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if successful, ''false'' if failed.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This example creates a cylinder marker at the position 1000, 1000, 1000 and sets its size to ''2.5''.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
newmarker = createMarker ( 1000, 1000, 1000, &amp;quot;cylinder&amp;quot; )&lt;br /&gt;
setMarkerSize ( newmarker, 2.5 )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
===Client===&lt;br /&gt;
{{Client marker functions}}&lt;br /&gt;
===Server===&lt;br /&gt;
{{Marker functions}}&lt;/div&gt;</summary>
		<author><name>TAPL-93</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetBlipColor&amp;diff=46596</id>
		<title>SetBlipColor</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetBlipColor&amp;diff=46596"/>
		<updated>2016-02-10T03:07:39Z</updated>

		<summary type="html">&lt;p&gt;TAPL-93: Undo revision 46557 by Strong100 (talk)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Server client function}}&lt;br /&gt;
This function will let you change the color of a blip. This color is only applicable to the default blip icon ([[Image:Blipid0s.png|12px]], [[Image:Blipid0u.png|12px]] or [[Image:Blipid0d.png|12px]]). All other icons will ignore this.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;bool setBlipColor ( blip theBlip, int red, int green, int blue, int alpha )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{OOP||[[blip]]:setColor||getBlipColor|}}&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theBlip:''' The blip who's color you wish to set.&lt;br /&gt;
*'''red:''' The amount of red in the blip's color (0 - 255).&lt;br /&gt;
*'''green:''' The amount of green in the blip's color (0 - 255).&lt;br /&gt;
*'''blue:''' The amount of blue in the blip's color (0 - 255).&lt;br /&gt;
*'''alpha:''' The amount of alpha in the blip's color (0 - 255).  Alpha decides transparancy where 255 is opaque and 0 is transparent.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the blip's color was set successfully. Returns ''false'' if the blip passed to the function is invalid, or any of the colors are out of the valid range.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
This example will find all the blips that exist and set them all to white if they aren't white already.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- Retrieve a table containing all the blips that exist&lt;br /&gt;
local blips = getElementsByType ( &amp;quot;blip&amp;quot; )&lt;br /&gt;
-- Loop through the list, storing the blip from the table in the variable blipValue&lt;br /&gt;
for blipKey, blipValue in ipairs ( blips ) do&lt;br /&gt;
	-- Retrieve the blip's colors into the variables red, green, blue and alpha&lt;br /&gt;
	local red, green, blue, alpha = getBlipColor ( blipValue )&lt;br /&gt;
	-- If the blip's icon isn't white already&lt;br /&gt;
	if ( red ~= 255 or green ~= 255 or blue ~= 255 or alpha ~= 255 ) then&lt;br /&gt;
		-- Set the blip's color to white&lt;br /&gt;
		setBlipColor ( blipValue, 255, 255, 255, 255 )&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Blip_functions}}&lt;/div&gt;</summary>
		<author><name>TAPL-93</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetBlipColor&amp;diff=46595</id>
		<title>SetBlipColor</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetBlipColor&amp;diff=46595"/>
		<updated>2016-02-10T03:06:23Z</updated>

		<summary type="html">&lt;p&gt;TAPL-93: Undo revision 46558 by Strong100 (talk)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Server client function}}&lt;br /&gt;
This function will let you change the color of a blip. This color is only applicable to the default blip icon ([[Image:Blipid0s.png|12px]], [[Image:Blipid0u.png|12px]] or [[Image:Blipid0d.png|12px]]). All other icons will ignore this.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;bool setBlipColor ( blip theBlip, int red, int green, int blue, int alpha )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{OOP||[[blip]]:setColor||getBlipColor|}}&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theBlip:''' The blip who's color you wish to set.&lt;br /&gt;
*'''red:''' The amount of red in the blip's color (0 - 255).&lt;br /&gt;
*'''green:''' The amount of green in the blip's color (0 - 255).&lt;br /&gt;
*'''blue:''' The amount of blue in the blip's color (0 - 255).&lt;br /&gt;
*'''alpha:''' The amount of alpha in the blip's color (0 - 255).  Alpha decides transparancy where 255 is opaque and 0 is transparent.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the blip's color was set successfully. Returns ''false'' if the blip passed to the function is invalid, or any of the colors are out of the valid range.&lt;br /&gt;
&lt;br /&gt;
==مثال== &lt;br /&gt;
هذا المثال سوف يجد كل العلامات وتلوينهم باللون الأبيض , اذا لم تكن بيضاء بالفعل . &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local blips = getElementsByType ( &amp;quot;blip&amp;quot; )&lt;br /&gt;
for blipKey, blipValue in ipairs ( blips ) do&lt;br /&gt;
	local red, green, blue, alpha = getBlipColor ( blipValue )&lt;br /&gt;
	if ( red ~= 255 or green ~= 255 or blue ~= 255 or alpha ~= 255 ) then&lt;br /&gt;
		setBlipColor ( blipValue, 255, 255, 255, 255 )&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Blip_functions}}&lt;/div&gt;</summary>
		<author><name>TAPL-93</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetBlipColor&amp;diff=46594</id>
		<title>SetBlipColor</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetBlipColor&amp;diff=46594"/>
		<updated>2016-02-10T03:06:04Z</updated>

		<summary type="html">&lt;p&gt;TAPL-93: Undo revision 46556 by Strong100 (talk)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Server client function}}&lt;br /&gt;
This function will let you change the color of a blip. This color is only applicable to the default blip icon ([[Image:Blipid0s.png|12px]], [[Image:Blipid0u.png|12px]] or [[Image:Blipid0d.png|12px]]). All other icons will ignore this.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;bool setBlipColor ( blip theBlip, int red, int green, int blue, int alpha )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{OOP||[[blip]]:setColor||getBlipColor|}}&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theBlip:''' The blip who's color you wish to set.&lt;br /&gt;
*'''red:''' The amount of red in the blip's color (0 - 255).&lt;br /&gt;
*'''green:''' The amount of green in the blip's color (0 - 255).&lt;br /&gt;
*'''blue:''' The amount of blue in the blip's color (0 - 255).&lt;br /&gt;
*'''alpha:''' The amount of alpha in the blip's color (0 - 255).  Alpha decides transparancy where 255 is opaque and 0 is transparent.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the blip's color was set successfully. Returns ''false'' if the blip passed to the function is invalid, or any of the colors are out of the valid range.&lt;br /&gt;
&lt;br /&gt;
==مثال== &lt;br /&gt;
هذا المثال يجلب جميع العلامات الموجودة , ويقوم بتلوينها الى اللون الإبيض اذا لم تكن بيضاء بالفعل .&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local blips = getElementsByType ( &amp;quot;blip&amp;quot; )&lt;br /&gt;
for blipKey, blipValue in ipairs ( blips ) do&lt;br /&gt;
	local red, green, blue, alpha = getBlipColor ( blipValue )&lt;br /&gt;
	if ( red ~= 255 or green ~= 255 or blue ~= 255 or alpha ~= 255 ) then&lt;br /&gt;
		setBlipColor ( blipValue, 255, 255, 255, 255 )&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Blip_functions}}&lt;/div&gt;</summary>
		<author><name>TAPL-93</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetBlipColor&amp;diff=46593</id>
		<title>SetBlipColor</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetBlipColor&amp;diff=46593"/>
		<updated>2016-02-10T03:01:04Z</updated>

		<summary type="html">&lt;p&gt;TAPL-93: Undo revision 46555 by Strong100 (talk)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Server client function}}&lt;br /&gt;
This function will let you change the color of a blip. This color is only applicable to the default blip icon ([[Image:Blipid0s.png|12px]], [[Image:Blipid0u.png|12px]] or [[Image:Blipid0d.png|12px]]). All other icons will ignore this.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;bool setBlipColor ( blip theBlip, int red, int green, int blue, int alpha )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{OOP||[[blip]]:setColor||getBlipColor|}}&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theBlip:''' The blip who's color you wish to set.&lt;br /&gt;
*'''red:''' The amount of red in the blip's color (0 - 255).&lt;br /&gt;
*'''green:''' The amount of green in the blip's color (0 - 255).&lt;br /&gt;
*'''blue:''' The amount of blue in the blip's color (0 - 255).&lt;br /&gt;
*'''alpha:''' The amount of alpha in the blip's color (0 - 255).  Alpha decides transparancy where 255 is opaque and 0 is transparent.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns : &amp;quot;true&amp;quot; اذا تم بنجاح &amp;quot;false&amp;quot; اذا لم يتم بنجاح&lt;br /&gt;
&lt;br /&gt;
==مثال== &lt;br /&gt;
هذا المثال يجلب جميع العلامات الموجودة , ويقوم بتلوينها الى اللون الإبيض اذا لم تكن بيضاء بالفعل .&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local blips = getElementsByType ( &amp;quot;blip&amp;quot; )&lt;br /&gt;
for blipKey, blipValue in ipairs ( blips ) do&lt;br /&gt;
	local red, green, blue, alpha = getBlipColor ( blipValue )&lt;br /&gt;
	if ( red ~= 255 or green ~= 255 or blue ~= 255 or alpha ~= 255 ) then&lt;br /&gt;
		setBlipColor ( blipValue, 255, 255, 255, 255 )&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Blip_functions}}&lt;/div&gt;</summary>
		<author><name>TAPL-93</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Template:Elements&amp;diff=45809</id>
		<title>Template:Elements</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Template:Elements&amp;diff=45809"/>
		<updated>2015-09-01T05:59:12Z</updated>

		<summary type="html">&lt;p&gt;TAPL-93: Undo revision 45699 by VenadHD (talk)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* [[Element/Player|Player]]&lt;br /&gt;
* [[Element/Ped|Ped]]&lt;br /&gt;
* [[Element/Vehicle|Vehicle]]&lt;br /&gt;
* [[Element/Object|Object]]&lt;br /&gt;
* [[Element/Pickup|Pickup]]&lt;br /&gt;
* [[Element/Marker|Marker]]&lt;br /&gt;
* [[Element/Collision shape|Collision shape]]&lt;br /&gt;
* [[Element/Blip|Blip]]&lt;br /&gt;
* [[Element/Radar area|Radar area]]&lt;br /&gt;
* [[Element/Projectile|Projectile]]&lt;br /&gt;
* [[Element/Team|Team]]&lt;br /&gt;
* [[Element/Console|Server console]]&lt;br /&gt;
* [[GUI widgets]]:&lt;br /&gt;
&amp;lt;ul&amp;gt;{{GUI_widgets}}&amp;lt;/ul&amp;gt;&lt;br /&gt;
* [[Element/TXD|TXD]]&lt;br /&gt;
* [[Element/DFF|DFF]]&lt;br /&gt;
* [[Element/COL|COL]]&lt;br /&gt;
&amp;lt;!--* [[Element/IFP|IFP]]--&amp;gt;&lt;br /&gt;
* [[Element/Sound|Sound]]&lt;br /&gt;
{{New items|3.0110|1.1|&lt;br /&gt;
* [[Element/Material|Material]]&lt;br /&gt;
** [[Element/Texture|Texture]]&lt;br /&gt;
** [[Element/Shader|Shader]]&lt;br /&gt;
* [[Element/DX font|DX font]]&lt;br /&gt;
* [[Element/GUI font|GUI font]]&lt;br /&gt;
* [[Element/Weapon|Weapon]]&lt;br /&gt;
{{New items|3.0135|1.3.5|&lt;br /&gt;
* [[Element/Camera|Camera]]&lt;br /&gt;
}}&lt;br /&gt;
{{New items|3.0140|1.4|&lt;br /&gt;
* [[Element/Effect|Effect]]&lt;br /&gt;
}}&lt;br /&gt;
}}&lt;br /&gt;
{{New items|3.0141|1.4.1|&lt;br /&gt;
* [[Element/Browser|Browser]]&lt;br /&gt;
}}&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
[[ru:Template:Elements]]&lt;br /&gt;
[[es:Template:Elements]]&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>TAPL-93</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetPlayerFromSerial&amp;diff=45774</id>
		<title>GetPlayerFromSerial</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetPlayerFromSerial&amp;diff=45774"/>
		<updated>2015-08-21T07:48:20Z</updated>

		<summary type="html">&lt;p&gt;TAPL-93: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Useful Function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function gets an '''online''' player from their [[serial]].&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;player getPlayerFromSerial ( string serial )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
* '''serial''': A string determining the serial of player you want to get.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns a [[player]] element if the specified [[serial]] is owned by an existent player on the server, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Code==&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;&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function getPlayerFromSerial ( serial )&lt;br /&gt;
    assert ( type ( serial ) == &amp;quot;string&amp;quot; and #serial == 32, &amp;quot;getPlayerFromSerial - invalid serial&amp;quot; )&lt;br /&gt;
    for index, player in ipairs ( getElementsByType ( &amp;quot;player&amp;quot; ) ) do&lt;br /&gt;
        if ( getPlayerSerial ( player ) == serial ) then&lt;br /&gt;
            return player&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
    return false&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This example gets a player name from random serial and outputs it in chatbox.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
outputChatBox( getPlayerName ( getPlayerFromSerial( &amp;quot;AE9EP68QXKHW55LQIAL9C77Q9VJHA00M&amp;quot; ) ) )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Author: Tete&lt;br /&gt;
&lt;br /&gt;
Hint: This function can be useful for building up a serial-based system.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Useful_Functions}}&lt;/div&gt;</summary>
		<author><name>TAPL-93</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Changes_in_1.5&amp;diff=45455</id>
		<title>Changes in 1.5</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Changes_in_1.5&amp;diff=45455"/>
		<updated>2015-07-15T10:52:09Z</updated>

		<summary type="html">&lt;p&gt;TAPL-93: Duplicate&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Changelogs}}&lt;br /&gt;
&lt;br /&gt;
== Main Additions / Changes ==&lt;br /&gt;
* Added a built-in web browser into MTA (''CEF'') which can be controlled by scripts using a new [[Element/Browser|browser]] element.&lt;br /&gt;
* Added light functions&lt;br /&gt;
&lt;br /&gt;
== Scripting ==&lt;br /&gt;
&lt;br /&gt;
=== Scripting: New functions ===&lt;br /&gt;
&lt;br /&gt;
====Client====&lt;br /&gt;
*[[createBrowser]]&lt;br /&gt;
*[[executeBrowserJavascript]]&lt;br /&gt;
*[[focusBrowser]]&lt;br /&gt;
*[[isBrowserFocused]]&lt;br /&gt;
*[[getBrowserProperty]]&lt;br /&gt;
*[[getBrowserTitle]]&lt;br /&gt;
*[[getBrowserURL]]&lt;br /&gt;
*[[injectBrowserMouseDown]]&lt;br /&gt;
*[[injectBrowserMouseMove]]&lt;br /&gt;
*[[injectBrowserMouseUp]]&lt;br /&gt;
*[[injectBrowserMouseWheel]]&lt;br /&gt;
*[[isBrowserLoading]]&lt;br /&gt;
*[[isBrowserDomainBlocked]]&lt;br /&gt;
*[[loadBrowserURL]]&lt;br /&gt;
*[[requestBrowserDomains]]&lt;br /&gt;
*[[setBrowserProperty]]&lt;br /&gt;
*[[setBrowserRenderingPaused]]&lt;br /&gt;
*[[setBrowserVolume]]&lt;br /&gt;
*[[createLight]]&lt;br /&gt;
*[[getLightType]]&lt;br /&gt;
*[[getLightRadius]]&lt;br /&gt;
*[[getLightColor]]&lt;br /&gt;
*[[getLightDirection]]&lt;br /&gt;
*[[setLightRadius]]&lt;br /&gt;
*[[setLightColor]]&lt;br /&gt;
*[[setLightDirection]]&lt;br /&gt;
*[[getCameraFieldOfView]]&lt;br /&gt;
*[[setCameraFieldOfView]]&lt;br /&gt;
*[[getPedOccupiedVehicleSeat]]&lt;br /&gt;
*[[getCameraShakeLevel]]&lt;br /&gt;
*[[setCameraShakeLevel]]&lt;br /&gt;
&lt;br /&gt;
==== Server ====&lt;br /&gt;
* None yet&lt;br /&gt;
&lt;br /&gt;
==== Shared (''Client &amp;amp; Server side'') ====&lt;br /&gt;
* None yet&lt;br /&gt;
&lt;br /&gt;
=== Scripting: New Events ===&lt;br /&gt;
&lt;br /&gt;
==== Client ====&lt;br /&gt;
*[[onClientBrowserCreated]]&lt;br /&gt;
*[[onClientBrowserDocumentReady]]&lt;br /&gt;
*[[onClientBrowserLoadingStart]]&lt;br /&gt;
*[[onClientBrowserLoadingFailed]]&lt;br /&gt;
*[[onClientBrowserNavigate]]&lt;br /&gt;
*[[onClientBrowserPopup]]&lt;br /&gt;
*[[onClientBrowserCursorChange]]&lt;br /&gt;
*[[onClientBrowserTooltip]]&lt;br /&gt;
*[[onClientBrowserInputFocusChanged]]&lt;br /&gt;
*[[onClientBrowserWhistelistChange]]&lt;br /&gt;
*[[onClientPlayerNetworkStatus]]&lt;br /&gt;
*[[onClientBrowserResourceBlocked]]&lt;br /&gt;
&lt;br /&gt;
==== Server ====&lt;br /&gt;
*[[onPlayerNetworkStatus]]&lt;br /&gt;
&lt;br /&gt;
=== Scripting: Changes, Bugfixes and Additions ===&lt;br /&gt;
* Added ''throttled'' parameter to [[playSound]] and [[playSound3D]]&lt;br /&gt;
* Added resource meta option &amp;lt;download_priority_group&amp;gt; to allow certain client resources to download and start earlier or later than other resources when a player first connects to a server.&lt;br /&gt;
* Added number of simultaneous render targets capability to [[dxGetStatus]].&lt;br /&gt;
* Added an option to [[addAccount]] to check for case insensitive name clashes.&lt;br /&gt;
&lt;br /&gt;
== Client ==&lt;br /&gt;
&lt;br /&gt;
=== Client: Additions ===&lt;br /&gt;
* Enabled low fragmentation heap for XP to reduce memory allocation problems.&lt;br /&gt;
* Added automatic TXD resizing for 32 bit OS users to help fix low memory crashes.&lt;br /&gt;
* Added quality argument to dxCreateFont.&lt;br /&gt;
* Added FOV setting in the Video tab.&lt;br /&gt;
* Added support for multiple render targets in shaders.&lt;br /&gt;
* Adds the ability to complete nicknames in the chatbox when the tab key is pressed.&lt;br /&gt;
* Synced server side peds weapons with clients.&lt;br /&gt;
* Added fix for bullet sync not applying damage to the local player during network interruptions by applying remote calculated damage.&lt;br /&gt;
&lt;br /&gt;
=== Client: Bugfixes &amp;amp; Changes ===&lt;br /&gt;
* Moved client log and config files to MTA\log and MTA\config&lt;br /&gt;
* Removed BASS error messages for players&lt;br /&gt;
* Tweaked streaming memory size calculation&lt;br /&gt;
&lt;br /&gt;
== Server ==&lt;br /&gt;
&lt;br /&gt;
=== Server: Additions ===&lt;br /&gt;
* Added server shutdown disconnect message&lt;br /&gt;
&lt;br /&gt;
=== Server: Bugfixes &amp;amp; Changes ===&lt;br /&gt;
* Set 64 bit modules directory to &amp;quot;x64/modules&amp;quot;&lt;br /&gt;
* Fixed server ignoring module initialization failure&lt;br /&gt;
* Fixed [[getAccountData]] leaking memory&lt;br /&gt;
* Fixed [[removeBan]] crashing the server under certain circumstances&lt;br /&gt;
* Fixed HTTP stats being wrong sometimes&lt;br /&gt;
* Fixed sync issues when destroying a vehicle while exitting&lt;br /&gt;
* Added reload to the default start-up list.&lt;br /&gt;
&lt;br /&gt;
== Resources ==&lt;br /&gt;
* None yet&lt;br /&gt;
&lt;br /&gt;
== Editor ==&lt;br /&gt;
* None yet&lt;br /&gt;
&lt;br /&gt;
== Extra information ==&lt;br /&gt;
''More detailed information available on [https://bugs.multitheftauto.com/changelog_page.php Bug tracker Changelog] and Google Code repositories:&lt;br /&gt;
:* [https://code.google.com/p/mtasa-blue/source/list MTA: SA Blue]&lt;br /&gt;
:* [https://code.google.com/p/mtasa-resources/source/list MTA: SA Official Resources]&lt;br /&gt;
&lt;br /&gt;
[[Category:Changelog]]&lt;br /&gt;
[[Category:Incomplete]]&lt;/div&gt;</summary>
		<author><name>TAPL-93</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Template:Useful_Functions&amp;diff=45427</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=45427"/>
		<updated>2015-07-10T15:46:28Z</updated>

		<summary type="html">&lt;p&gt;TAPL-93: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&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;
*[[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;
*[[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;
*[[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;
*[[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;
*[[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;
*[[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;
*[[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;
*[[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;
*[[dxDrawEmptyRec]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function draws an empty 2D rectangle on the screen.&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;
*[[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;
*[[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;
*[[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;
*[[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;
*[[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;
*[[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;
*[[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;
*[[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;
*[[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;» 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;
*[[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;
*[[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;
*[[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;
*[[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;
*[[getOnlineStaff]] &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 of all logged-in administrators separated by two whitespace characters.&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;
*[[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;
*[[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;
*[[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;
*[[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;
*[[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;
*[[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;
*[[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;
*[[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;
*[[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;
*[[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;
*[[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;
*[[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;
*[[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;
*[[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;
*[[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;
*[[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;
*[[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;
*[[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;
*[[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;
*[[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;
*[[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;
*[[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.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;
*[[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 vehicle's weapon.&amp;lt;/span&amp;gt;&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;
*[[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;
*[[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;
*[[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;
*[[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;
*[[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;
*[[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;
*[[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;
*[[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;
*[[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;
*[[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;
*[[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;
*[[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;
*[[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;
*[[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;
*[[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;
*[[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;
[[Category:Useful Functions]]&lt;/div&gt;</summary>
		<author><name>TAPL-93</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetGridListRowIndexFromText&amp;diff=45376</id>
		<title>GetGridListRowIndexFromText</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetGridListRowIndexFromText&amp;diff=45376"/>
		<updated>2015-07-02T08:39:18Z</updated>

		<summary type="html">&lt;p&gt;TAPL-93: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Useful Function}}&lt;br /&gt;
&amp;lt;lowercasetitle/&amp;gt;&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function returns the GridList row index from the specified text.&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;int getGridListRowIndexFromText (element gridList, string text, int columnIndex)&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required arguments===&lt;br /&gt;
* '''gridList''': The grid list element.&lt;br /&gt;
* '''text''': The text that you want to retrieve his index.&lt;br /&gt;
* '''columnIndex''': The ID of the column.&lt;br /&gt;
&lt;br /&gt;
===Return===&lt;br /&gt;
Returns the row index (0 for the first element, 1 for the second, etc...), or false if the text doesn't exist.&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Client&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function getGridListRowIndexFromText(gridList, text, column)&lt;br /&gt;
  for i=0, guiGridListGetRowCount(gridList)-1 do&lt;br /&gt;
    if (guiGridListGetItemText(gridList, i, column) == text) then&lt;br /&gt;
      return i&lt;br /&gt;
	end&lt;br /&gt;
     end&lt;br /&gt;
   return 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;
==Example==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Example&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local fruits = {&amp;quot;Apple&amp;quot;,&amp;quot;Banana&amp;quot;,&amp;quot;Orange&amp;quot;,&amp;quot;Melon&amp;quot;,&amp;quot;Pear&amp;quot;}&lt;br /&gt;
&lt;br /&gt;
addEventHandler(&amp;quot;onClientResourceStart&amp;quot;, resourceRoot,&lt;br /&gt;
function ()&lt;br /&gt;
    fruitsList = guiCreateGridList(0.80, 0.10, 0.15, 0.60, true)&lt;br /&gt;
    local column = guiGridListAddColumn(fruitsList, &amp;quot;Fruits&amp;quot;, 0.85)&lt;br /&gt;
    if (column) then&lt;br /&gt;
      for i, v in ipairs(fruits) do&lt;br /&gt;
        local row = guiGridListAddRow(fruitsList)&lt;br /&gt;
            guiGridListSetItemText(fruitsList, row, column, tostring(v), false, false)&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
end)&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
function getIndex()&lt;br /&gt;
  local index = getGridListRowIndexFromText(fruitsList,&amp;quot;Orange&amp;quot;,1)&lt;br /&gt;
    if index then &lt;br /&gt;
      outputChatBox(&amp;quot;Row index: &amp;quot;..index,255,0,0)&lt;br /&gt;
    end &lt;br /&gt;
end &lt;br /&gt;
addCommandHandler(&amp;quot;find&amp;quot;,getIndex)&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;
&lt;br /&gt;
Author: Walid&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Useful_Functions}}&lt;/div&gt;</summary>
		<author><name>TAPL-93</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=StopSound&amp;diff=45360</id>
		<title>StopSound</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=StopSound&amp;diff=45360"/>
		<updated>2015-06-23T02:59:13Z</updated>

		<summary type="html">&lt;p&gt;TAPL-93: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Client function}}&lt;br /&gt;
Stops the sound playback for specified [[sound]] [[element]]. The sound element is also destroyed.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;bool stopSound ( element theSound )&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
{{OOP||[[sound]]:stop}}&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theSound:''' the [[sound]] [[element]] you want to stop playing.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the sound was successfully stopped, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function startMySound()&lt;br /&gt;
    sound = playSound( &amp;quot;sound.mp3&amp;quot;, true )&lt;br /&gt;
end&lt;br /&gt;
addEventHandler( &amp;quot;onClientResourceStart&amp;quot;, getResourceRootElement(), startMySound )&lt;br /&gt;
&lt;br /&gt;
function stopMySound()&lt;br /&gt;
    stopSound( sound )&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler ( &amp;quot;stopsound&amp;quot;, stopMySound ) --using the command 'stopsound' will stop the sound&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Client_audio_functions}}&lt;br /&gt;
[[AR:stopSound]]&lt;/div&gt;</summary>
		<author><name>TAPL-93</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Template:Client_utility_functions&amp;diff=44806</id>
		<title>Template:Client utility functions</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Template:Client_utility_functions&amp;diff=44806"/>
		<updated>2015-03-19T21:56:09Z</updated>

		<summary type="html">&lt;p&gt;TAPL-93: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* [[base64Encode]]&lt;br /&gt;
* [[base64Decode]]&lt;br /&gt;
{{Bit_functions}}&lt;br /&gt;
{{New items|3.0140|1.4|&lt;br /&gt;
* [[downloadFile]]&lt;br /&gt;
}}&lt;br /&gt;
* [[fromJSON]]&lt;br /&gt;
* [[getDistanceBetweenPoints2D]]&lt;br /&gt;
* [[getDistanceBetweenPoints3D]]&lt;br /&gt;
* [[getEasingValue]]&lt;br /&gt;
* [[getColorFromString]]&lt;br /&gt;
* [[getDevelopmentMode]]&lt;br /&gt;
* [[getFPSLimit]]&lt;br /&gt;
{{New items|3.0140|1.4|&lt;br /&gt;
* [[getLocalization]]&lt;br /&gt;
}}&lt;br /&gt;
* [[getNetworkStats]]&lt;br /&gt;
* [[getNetworkUsageData]]&lt;br /&gt;
* [[getPerformanceStats]]&lt;br /&gt;
* [[getRealTime]]&lt;br /&gt;
* [[getTickCount]]&lt;br /&gt;
* [[getTimers]]&lt;br /&gt;
* [[getTimerDetails]]&lt;br /&gt;
* [[gettok]]&lt;br /&gt;
* [[getVersion]]&lt;br /&gt;
{{New feature/item|3.0141|1.4.1|6791|&lt;br /&gt;
* [[hash]]&lt;br /&gt;
}}&lt;br /&gt;
* [[interpolateBetween]]&lt;br /&gt;
* [[isTimer]]&lt;br /&gt;
* [[killTimer]]&lt;br /&gt;
* [[md5]]&lt;br /&gt;
{{New feature/item|3.0135|1.3.5|6056|&lt;br /&gt;
* [[pregFind]]&lt;br /&gt;
* [[pregReplace]]&lt;br /&gt;
* [[pregMatch]]&lt;br /&gt;
}}&lt;br /&gt;
* [[resetTimer]]&lt;br /&gt;
* [[setClipboard]]&lt;br /&gt;
* [[setDevelopmentMode]]&lt;br /&gt;
* [[setFPSLimit]]&lt;br /&gt;
* [[setTimer]]&lt;br /&gt;
* [[sha256]]&lt;br /&gt;
* [[split]]&lt;br /&gt;
* [[teaEncode]]&lt;br /&gt;
* [[teaDecode]]&lt;br /&gt;
* [[tocolor]]&lt;br /&gt;
* [[toJSON]]&lt;br /&gt;
* [[utfChar]]&lt;br /&gt;
* [[utfCode]]&lt;br /&gt;
* [[utfLen]]&lt;br /&gt;
* [[utfSeek]]&lt;br /&gt;
* [[utfSub]]&lt;br /&gt;
* [[addDebugHook]]&lt;br /&gt;
* [[removeDebugHook]]&lt;br /&gt;
&amp;lt;noinclude&amp;gt;[[Category:Functions templates]]&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>TAPL-93</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetElementDistanceFromCentreOfMassToBaseOfModel&amp;diff=44707</id>
		<title>GetElementDistanceFromCentreOfMassToBaseOfModel</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetElementDistanceFromCentreOfMassToBaseOfModel&amp;diff=44707"/>
		<updated>2015-02-20T17:06:45Z</updated>

		<summary type="html">&lt;p&gt;TAPL-93: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Client function}}&lt;br /&gt;
This function is used to retrieve the distance between a [[element]]'s centre of mass to the base of the model. This can be used to calculate the position the [[element]] has to be set to, to have it on ground level.&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
float getElementDistanceFromCentreOfMassToBaseOfModel ( element theElement )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{OOP||[[element]]:getDistanceFromCentreOfMassToBaseOfModel|distanceFromCentreOfMassToBaseOfModel}}&lt;br /&gt;
&lt;br /&gt;
===Required Parameters===&lt;br /&gt;
'''theElement:''' The element you want to retrieve the value of.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns a ''float'' with the distance, or ''false'' if the element is invalid.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This example outputs the value for the local player.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local distance = getElementDistanceFromCentreOfMassToBaseOfModel(localPlayer)&lt;br /&gt;
outputChatBox(tostring(distance))&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Client element functions}}&lt;/div&gt;</summary>
		<author><name>TAPL-93</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetAccountPassword&amp;diff=44706</id>
		<title>SetAccountPassword</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetAccountPassword&amp;diff=44706"/>
		<updated>2015-02-20T16:49:50Z</updated>

		<summary type="html">&lt;p&gt;TAPL-93: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Server function}}&lt;br /&gt;
This function sets the password of the specified [[account]].&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool setAccountPassword ( account theAccount, string password )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
{{OOP||[[account]]:setPassword|password|}}&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theAccount:''' the account whos password you want to set&lt;br /&gt;
*'''password:''' the password&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the password was set correctly, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
===Limits===&lt;br /&gt;
* Minimal account password length is 1 character.&lt;br /&gt;
* Maximum account password length is 30 characters.&lt;br /&gt;
* Account password can not be equal to &amp;quot;*****&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
&amp;lt;!-- Explain what the example is in a single sentance --&amp;gt;&lt;br /&gt;
This example allows a user to change their password with a command.&lt;br /&gt;
&amp;lt;!-- Add the code below, an emphasis should be on making it clear, not optimized. You could provide two versions if you wish, one clear and well commented, the other optimized --&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function ChangePlayerPassword(player, command, oldpass, newpass)&lt;br /&gt;
	-- get the account the player is currently logged into&lt;br /&gt;
	local account = getPlayerAccount(player)&lt;br /&gt;
	if (account) then&lt;br /&gt;
		-- if its only a guest account, do not allow the password to be changed&lt;br /&gt;
		if (isGuestAccount(account)) then&lt;br /&gt;
			outputChatBox(&amp;quot;You must be logged into an account to change your password.&amp;quot;, player) &lt;br /&gt;
			-- end the function&lt;br /&gt;
			return&lt;br /&gt;
		end&lt;br /&gt;
		&lt;br /&gt;
		-- check that the old password is correct&lt;br /&gt;
		local password_check = getAccount(getAccountName(account), oldpass)&lt;br /&gt;
		if (password_check) then&lt;br /&gt;
			-- check the length of the new password&lt;br /&gt;
			if (string.len(newpass)&amp;gt;=5) then&lt;br /&gt;
				setAccountPassword(account,newpass)&lt;br /&gt;
			else&lt;br /&gt;
				outputChatBox(&amp;quot;Your new password must be at least 5 characters long.&amp;quot;, player)&lt;br /&gt;
			end&lt;br /&gt;
		else&lt;br /&gt;
			outputChatBox(&amp;quot;Old password invalid.&amp;quot;, player)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler(&amp;quot;changepass&amp;quot;, ChangePlayerPassword)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Account functions}}&lt;br /&gt;
&lt;br /&gt;
[[ar:setAccountPassword]]&lt;br /&gt;
[[es:setAccountPassword]]&lt;/div&gt;</summary>
		<author><name>TAPL-93</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=FormatNumber&amp;diff=44696</id>
		<title>FormatNumber</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=FormatNumber&amp;diff=44696"/>
		<updated>2015-02-17T18:09:10Z</updated>

		<summary type="html">&lt;p&gt;TAPL-93: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Useful Function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function converts large numbers and adds commas to it. (Example: 100000 -&amp;gt; 100.000)&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;string convertNumber( int/string number )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
* '''number''': The number to be converted.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns a string containing the converted number.&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 convertNumber ( number )  &lt;br /&gt;
	local formatted = number  &lt;br /&gt;
	while true do      &lt;br /&gt;
		formatted, k = string.gsub(formatted, &amp;quot;^(-?%d+)(%d%d%d)&amp;quot;, '%1,%2')    &lt;br /&gt;
		if ( k==0 ) then      &lt;br /&gt;
			break   &lt;br /&gt;
		end  &lt;br /&gt;
	end  &lt;br /&gt;
	return formatted&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Client&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This example converts a player's money, and outputs it to the chatbox when they type 'money' into the console:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function convertPlayerMoney()&lt;br /&gt;
	local pMoney = getPlayerMoney()&lt;br /&gt;
	local convertedMoney = convertNumber(pMoney)&lt;br /&gt;
	outputChatBox(convertedMoney)&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler(&amp;quot;money&amp;quot;, convertPlayerMoney)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Useful_Functions}}&lt;/div&gt;</summary>
		<author><name>TAPL-93</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetElementSpeed&amp;diff=44382</id>
		<title>SetElementSpeed</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetElementSpeed&amp;diff=44382"/>
		<updated>2015-02-08T17:51:17Z</updated>

		<summary type="html">&lt;p&gt;TAPL-93: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Useful Function}}&lt;br /&gt;
This function allows you to set '''moving''' element speed in kph or mph units.&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool setElementSpeed (element theElement, [ int/string unit=&amp;quot;kph&amp;quot;, int speed=0 ])&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
* '''theElement''': Element you want to set speed of&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
{{OptionalArg}}&lt;br /&gt;
* '''unit''': Units in which speed should be set. This can be 1 or &amp;quot;mph&amp;quot; for mph, any other value for kph.&lt;br /&gt;
* '''speed''': Speed in selected unit&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
{{RequiredFunctions|getElementSpeed}}&lt;br /&gt;
&amp;lt;section name=&amp;quot;Function source&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 setElementSpeed(element, unit, speed)&lt;br /&gt;
	if (unit == nil) then unit = 0 end&lt;br /&gt;
	if (speed == nil) then speed = 0 end&lt;br /&gt;
	speed = tonumber(speed)&lt;br /&gt;
	local acSpeed = getElementSpeed(element, unit)&lt;br /&gt;
	if (acSpeed~=false) then -- if true - element is valid, no need to check again&lt;br /&gt;
		local diff = speed/acSpeed&lt;br /&gt;
		if diff ~= diff then return end -- if the number is a 'NaN' return end.&lt;br /&gt;
		local x,y,z = getElementVelocity(element)&lt;br /&gt;
		setElementVelocity(element,x*diff,y*diff,z*diff)&lt;br /&gt;
		return true&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	return 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;
==Example==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server-side example&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This example adds command that set player vehicle speed to provided one (in predefined unit kph). Note: It doesn't care if player is driver or passenger.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addCommandHandler(&amp;quot;setmyspeed&amp;quot;,&lt;br /&gt;
function (player, cmd, arg1)&lt;br /&gt;
  local veh = getPedOccupiedVehicle(player)&lt;br /&gt;
  if (veh) then&lt;br /&gt;
    setElementSpeed(veh, &amp;quot;kph&amp;quot;, tonumber(arg1))&lt;br /&gt;
  else&lt;br /&gt;
    outputChatBox(&amp;quot;You have to sit in vehicle&amp;quot;, player)&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
By '''varez'''.&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Useful_Functions}}&lt;/div&gt;</summary>
		<author><name>TAPL-93</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetElementSpeed&amp;diff=44381</id>
		<title>SetElementSpeed</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetElementSpeed&amp;diff=44381"/>
		<updated>2015-02-08T17:49:35Z</updated>

		<summary type="html">&lt;p&gt;TAPL-93: Blanked the page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>TAPL-93</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetKeyFromValueInTable&amp;diff=44187</id>
		<title>GetKeyFromValueInTable</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetKeyFromValueInTable&amp;diff=44187"/>
		<updated>2015-02-01T08:35:29Z</updated>

		<summary type="html">&lt;p&gt;TAPL-93: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Useful Function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function can be used to find the key of a specified value in a specified table. &lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;element/int/float/string getKeyFromValueInTable(table theTable, mixed searchFor )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
* '''theTable''': The table where to look for the specified value.&lt;br /&gt;
* '''searchFor''': The string/number/element to find the key of.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns the key of the searched value, or ''false'' if not found.&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Function source&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 getKeyFromValueInTable(a, b)&lt;br /&gt;
    for k,v in pairs(a) do&lt;br /&gt;
        if v == b then&lt;br /&gt;
           return k&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
    return false&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
Author: MrTasty&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This example output the cost of the item specified by the player who entered the command.&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' This is not the most efficient way, as it won't allow you to have more than 1 item of the same cost.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
shopItems = {&lt;br /&gt;
    --[PRICE] = &amp;quot;ITEM NAME&amp;quot;,&lt;br /&gt;
    [10] = &amp;quot;Sprunk Soda&amp;quot;,&lt;br /&gt;
    [12] = &amp;quot;eCola&amp;quot;,&lt;br /&gt;
    [17] = &amp;quot;Pisswasser&amp;quot;,&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
addCommandHandler(&amp;quot;getcostof&amp;quot;, function(player, command, item)&lt;br /&gt;
    if item then&lt;br /&gt;
        local cost = getKeyFromValueInTable(shopItems, item) --Find the key (the price in this case) of entered item name&lt;br /&gt;
        if cost then&lt;br /&gt;
            outputChatBox(item..&amp;quot; costs $&amp;quot;..cost, player, 255, 0, 0) --If the cost was found, output it to the command executor&lt;br /&gt;
        else&lt;br /&gt;
            outputChatBox(item..&amp;quot; is not available in our shop.&amp;quot;, player, 255, 0, 0) --If it wasn't, tell the command executor that the item does not have a cost (ie: not in the shop)&lt;br /&gt;
        end&lt;br /&gt;
    else&lt;br /&gt;
        outputChatBox(&amp;quot;Syntax error. Valid syntax is: /&amp;quot;..command..&amp;quot; &amp;lt;item name&amp;gt;&amp;quot;, player, 255, 0, 0) --Output valid syntax in case the executor did not specify the item name to search for&lt;br /&gt;
    end&lt;br /&gt;
end)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Useful_Functions}}&lt;/div&gt;</summary>
		<author><name>TAPL-93</name></author>
	</entry>
</feed>