<?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=AirNewSCR</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=AirNewSCR"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/wiki/Special:Contributions/AirNewSCR"/>
	<updated>2026-04-19T14:27:09Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetAccountName&amp;diff=82648</id>
		<title>GetAccountName</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetAccountName&amp;diff=82648"/>
		<updated>2025-12-23T18:20:25Z</updated>

		<summary type="html">&lt;p&gt;AirNewSCR: Added a new example, and fixed wide spaces.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Server function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function retrieves the name of an [[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;
string getAccountName ( account theAccount )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
{{OOP||[[account]]:getName|name|}}&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theAccount:''' The account you wish to get the name of.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns a string containing the account's name, ''false'' if the account does not exist or an invalid argument was passed to the function.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
This example announces into the console when a player logs into his account.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function outputOnLogin ( previous_account, current_account, auto_login ) --when a player logs in&lt;br /&gt;
    outputConsole(getAccountName(previous_account)..&amp;quot; Logged into &amp;quot;..getAccountName(current_account)) -- announce it into the console&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onPlayerLogin&amp;quot;,root,outputOnLogin ) --add an event handler&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This example shows the account you are logged into.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addCommandHandler(&amp;quot;mylogin&amp;quot;, function(source)&lt;br /&gt;
    local account = getPlayerAccount(source)&lt;br /&gt;
    if account and not isGuestAccount(account) then&lt;br /&gt;
        local accountName = getAccountName(account)&lt;br /&gt;
        outputChatBox(&amp;quot;Your login is: &amp;quot;..accountName, source)&lt;br /&gt;
    else&lt;br /&gt;
        outputChatBox(&amp;quot;You are not logged in!&amp;quot;, source)&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;
{{Account_functions}}&lt;br /&gt;
&lt;br /&gt;
[[ru:getAccountName]]&lt;br /&gt;
[[es:getAccountName]]&lt;br /&gt;
[[ar:getAccountName]]&lt;br /&gt;
[[pl:GetAccountName]]&lt;br /&gt;
[[zh-cn:GetAccountName]]&lt;/div&gt;</summary>
		<author><name>AirNewSCR</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=FormatNumber&amp;diff=82155</id>
		<title>FormatNumber</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=FormatNumber&amp;diff=82155"/>
		<updated>2025-06-14T05:29:21Z</updated>

		<summary type="html">&lt;p&gt;AirNewSCR: Improved and optimized for performance and reliability issues, removed unnecessary codes.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Useful Function}} __NOTOC__&lt;br /&gt;
This function formats large numbers by adding separators for thousands. For example, 100000 becomes 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;&lt;br /&gt;
string formatNumber( int number, [ string sep = &amp;quot;.&amp;quot; ] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
* '''number''': The number to be formatted.&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
* '''sep''': A string used as the thousands separator. Default is '''&amp;quot;.&amp;quot;'''.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns a string containing the formatted number.&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Example 1: Shared&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 formatNumber(n, sep)&lt;br /&gt;
    assert(type(n) == &amp;quot;number&amp;quot;, &amp;quot;Bad argument @'formatNumber' [Expected number at argument 1, got &amp;quot;..type(n)..&amp;quot;]&amp;quot;)&lt;br /&gt;
    assert(not sep or type(sep) == &amp;quot;string&amp;quot;, &amp;quot;Bad argument @'formatNumber' [Expected string or nil at argument 2, got &amp;quot;..type(sep)..&amp;quot;]&amp;quot;)&lt;br /&gt;
    sep = sep or '.'&lt;br /&gt;
    local s = string.format(&amp;quot;%.0f&amp;quot;, n)&lt;br /&gt;
    repeat s, c = s:gsub(&amp;quot;^(-?%d+)(%d%d%d)&amp;quot;, &amp;quot;%1&amp;quot;..sep..&amp;quot;%2&amp;quot;) until c == 0&lt;br /&gt;
    return s&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Client&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This example 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 = formatNumber(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>AirNewSCR</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=HandlingGetABS&amp;diff=80932</id>
		<title>HandlingGetABS</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=HandlingGetABS&amp;diff=80932"/>
		<updated>2024-11-03T13:54:05Z</updated>

		<summary type="html">&lt;p&gt;AirNewSCR: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Server function}}&lt;br /&gt;
{{Disabled}}&lt;br /&gt;
Returns the ABS (Anti-lock Braking System) setting of a handling element or vehicle ID.&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 handlingGetABS ( handling theHandling )&lt;br /&gt;
bool handlingGetABS ( int vehicleID )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''theHandling:''' the handling of which you want to get the ABS setting, ''or''&lt;br /&gt;
*'''vehicleID:''' the vehicle ID of which you want to get the ABS setting.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
If you specified a handling element, returns its ABS setting if one is set (''true'' if ABS is active, ''false'' if not), or ''nil'' otherwise. If you specified a vehicle ID, returns the ABS setting that currently applies to vehicles of that ID. Returns ''false'' in case of failure.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
--TODO&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Handling_functions}}&lt;/div&gt;</summary>
		<author><name>AirNewSCR</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=HandlingGetSteeringLock&amp;diff=80931</id>
		<title>HandlingGetSteeringLock</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=HandlingGetSteeringLock&amp;diff=80931"/>
		<updated>2024-11-03T13:53:12Z</updated>

		<summary type="html">&lt;p&gt;AirNewSCR: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Server function}}&lt;br /&gt;
{{Disabled}}&lt;br /&gt;
Returns the steering lock of a handling element or vehicle ID (how strongly the car can steer).&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
float handlingGetSteeringLock ( handling theHandling )&lt;br /&gt;
float handlingGetSteeringLock ( int vehicleID )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''theHandling:''' the handling of which you want to get the steering lock, ''or''&lt;br /&gt;
*'''vehicleID:''' the vehicle ID of which you want to get the steering lock.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
If you specified a handling element, returns its steering lock if one is set, or ''nil'' otherwise. If you specified a vehicle ID, returns the steering lock that currently applies to vehicles of that ID. Returns ''false'' in case of failure.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
--TODO&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Handling_functions}}&lt;/div&gt;</summary>
		<author><name>AirNewSCR</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=HandlingGetEngineInertia&amp;diff=80930</id>
		<title>HandlingGetEngineInertia</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=HandlingGetEngineInertia&amp;diff=80930"/>
		<updated>2024-11-03T13:41:30Z</updated>

		<summary type="html">&lt;p&gt;AirNewSCR: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Server function}}&lt;br /&gt;
{{Disabled}}&lt;br /&gt;
Returns the engine interia of a handling element or vehicle ID. A higher inertia makes a slower car.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
float handlingGetEngineInertia ( handling theHandling )&lt;br /&gt;
float handlingGetEngineInertia ( int vehicleID )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''theHandling:''' the handling of which you want to get the inertia, ''or''&lt;br /&gt;
*'''vehicleID:''' the vehicle ID of which you want to get the inertia.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
If you specified a handling element, returns its inertia if one is set, or ''nil'' otherwise. If you specified a vehicle ID, returns the inertia that currently applies to vehicles of that ID. Returns ''false'' in case of failure.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
--TODO&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Handling_functions}}&lt;/div&gt;</summary>
		<author><name>AirNewSCR</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=HandlingSetEngineInertia&amp;diff=80929</id>
		<title>HandlingSetEngineInertia</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=HandlingSetEngineInertia&amp;diff=80929"/>
		<updated>2024-11-03T13:41:05Z</updated>

		<summary type="html">&lt;p&gt;AirNewSCR: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Server function}}&lt;br /&gt;
{{Disabled}}&lt;br /&gt;
Sets the engine inertia of a handling element. The higher this value, the slower the vehicle goes.&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 handlingSetEngineInertia ( handling theHandling, float inertia )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''theHandling:''' the handling of which you want to change the inertia.&lt;br /&gt;
*'''inertia:''' the inertia value to set.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' on success, ''false'' in case of failure.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
--TODO&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Handling_functions}}&lt;/div&gt;</summary>
		<author><name>AirNewSCR</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=UsePickup&amp;diff=80901</id>
		<title>UsePickup</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=UsePickup&amp;diff=80901"/>
		<updated>2024-10-24T14:20:41Z</updated>

		<summary type="html">&lt;p&gt;AirNewSCR: Is only server-side function&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Server function}}&lt;br /&gt;
This function is used to simulate the player using a pickup&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 usePickup ( pickup thePickup, player thePlayer )    &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
* '''thePickup''': The pickup element to be picked up/used.&lt;br /&gt;
* '''thePlayer''': The player to use the pickup.&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 gives a random player 100% armor by using a pickup.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local pickup = createPickup(3,3,3,1,100) -- Create a pickup for 100% armor&lt;br /&gt;
usePickup(pickup,getRandomPlayer()) -- Make a random player use the pickup (shall recieve 100% armor)&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;
{{Pickup functions}}&lt;/div&gt;</summary>
		<author><name>AirNewSCR</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetNearestElement&amp;diff=80815</id>
		<title>GetNearestElement</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetNearestElement&amp;diff=80815"/>
		<updated>2024-10-17T02:10:20Z</updated>

		<summary type="html">&lt;p&gt;AirNewSCR: added if element ~= player then in getNearestElement to prevent return player passed to call function&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Useful Function}}&lt;br /&gt;
&amp;lt;!-- i think you can use 'getElementsWithinRange', not need to this.--&amp;gt;&lt;br /&gt;
This function returns the nearest [[Element|element]] (of a specific type) to a [[Player|player]].&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;element getNearestElement( player thePlayer, string elementType, float distance)&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
* '''player''': The player who you want to get the nearest element from.&lt;br /&gt;
* '''type''': The type of the element you want to get. (&amp;quot;player&amp;quot;, &amp;quot;ped&amp;quot;, &amp;quot;object&amp;quot;, etc.)&lt;br /&gt;
* '''distance''': A number for the maximum distance the element can be from the player.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns an [[Element|element]] if it's within the specified '''distance''', ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Shared&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 getNearestElement(player, type, distance)&lt;br /&gt;
    local result = false&lt;br /&gt;
    local dist = nil&lt;br /&gt;
    if player and isElement(player) then&lt;br /&gt;
        local elements = getElementsWithinRange(Vector3(getElementPosition(player)), distance, type, getElementInterior(player), getElementDimension(player))&lt;br /&gt;
        for i = 1, #elements do&lt;br /&gt;
            local element = elements[i]&lt;br /&gt;
            if element ~= player then&lt;br /&gt;
                if not dist then&lt;br /&gt;
                    result = element&lt;br /&gt;
                    dist = getDistanceBetweenPoints3D(Vector3(getElementPosition(player)), Vector3(getElementPosition(element)))&lt;br /&gt;
                else&lt;br /&gt;
                    local newDist = getDistanceBetweenPoints3D(Vector3(getElementPosition(player)), Vector3(getElementPosition(element)))&lt;br /&gt;
                    if newDist &amp;lt;= dist then&lt;br /&gt;
                        result = element&lt;br /&gt;
                        dist = newDist&lt;br /&gt;
                    end&lt;br /&gt;
                end&lt;br /&gt;
            end&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
    return result&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;
This example outputs the name of the nearest vehicle within 300 metres.&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;
addCommandHandler(&amp;quot;findVehicle&amp;quot;, function()&lt;br /&gt;
    local nearestVehicle = getNearestElement(localPlayer, &amp;quot;vehicle&amp;quot;, 300) -- nearest vehicle within 300m&lt;br /&gt;
    if nearestVehicle then -- if there is a vehicle (true)&lt;br /&gt;
        outputChatBox(&amp;quot;#7aff69&amp;quot;..getVehicleName(nearestVehicle)..&amp;quot;#ffffff is the nearest vehicle!&amp;quot;,255,255,255,true)&lt;br /&gt;
    else -- no vehicle (false)&lt;br /&gt;
        outputChatBox(&amp;quot;There are#ff2e2e NO#ffffff vehicles nearby&amp;quot;,255,255,255,true)&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;
'''Modified version of''' [[GetNearestVehicle|getNearestVehicle]]&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Useful_Functions}}&lt;/div&gt;</summary>
		<author><name>AirNewSCR</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetPedRotation&amp;diff=80463</id>
		<title>SetPedRotation</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetPedRotation&amp;diff=80463"/>
		<updated>2024-09-08T04:57:59Z</updated>

		<summary type="html">&lt;p&gt;AirNewSCR: FileEX - read note and remove-it&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Server client function}}&lt;br /&gt;
&lt;br /&gt;
This function allows you to set the current rotation of the specified ped.&lt;br /&gt;
&lt;br /&gt;
{{Note|setPedRotation function is not obsolete, when using setElementRotation with NPCs they do not rotate correctly when making them walk, so FileEX stop stating that the function is obsolete when it is not!}}&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 setPedRotation ( ped thePed, float rotation [, bool conformPedRotation = false ] )         &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''thePed:''' The [[ped]] to set the rotation of&lt;br /&gt;
*'''rotation:''' A [[float]] specifying the desired rotation in degrees.&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments=== &lt;br /&gt;
{{New feature/item|3.0152|1.3.2|4680|&lt;br /&gt;
*'''conformPedRotation:''' A bool which should be set to ''true'' to ensure the ped rotation is correctly set in all circumstances. Failing to set this argument may result in the rotation being inverted when the ped is in the air and other inconsistencies. The default value of false is for backward compatibility with scripts which may depend upon the incorrect behaviour&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if successful, ''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 example allows a player to type the command 'disco', which will result in the player being rotated to a random direction every 1 second, infinite times.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;function discoTime ( )&lt;br /&gt;
     -- Randomly choose a new player rotation and set it&lt;br /&gt;
     newRotation = math.random ( 0, 360 )&lt;br /&gt;
     setPedRotation ( getLocalPlayer(), newRotation )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function initiateDiscoMode ( commandName )&lt;br /&gt;
     -- Trigger a random change in player rotation every second&lt;br /&gt;
     setTimer ( discoTime, 1000, 0 )&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler ( &amp;quot;disco&amp;quot;, initiateDiscoMode )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Changelog==&lt;br /&gt;
{{ChangelogHeader}}&lt;br /&gt;
{{ChangelogItem|1.3.1-9.04680|Added conformPedRotation argument}}&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Ped_functions}}&lt;br /&gt;
[[ru:setPedRotation]]&lt;/div&gt;</summary>
		<author><name>AirNewSCR</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetPedRotation&amp;diff=80458</id>
		<title>SetPedRotation</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetPedRotation&amp;diff=80458"/>
		<updated>2024-09-07T06:40:34Z</updated>

		<summary type="html">&lt;p&gt;AirNewSCR: Undo revision 80020 by FileEX (talk)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Server client function}}&lt;br /&gt;
This function allows you to set the current rotation of the specified ped.&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 setPedRotation ( ped thePed, float rotation [, bool conformPedRotation = false ] )         &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''thePed:''' The [[ped]] to set the rotation of&lt;br /&gt;
*'''rotation:''' A [[float]] specifying the desired rotation in degrees.&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments=== &lt;br /&gt;
{{New feature/item|3.0152|1.3.2|4680|&lt;br /&gt;
*'''conformPedRotation:''' A bool which should be set to ''true'' to ensure the ped rotation is correctly set in all circumstances. Failing to set this argument may result in the rotation being inverted when the ped is in the air and other inconsistencies. The default value of false is for backward compatibility with scripts which may depend upon the incorrect behaviour&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if successful, ''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 example allows a player to type the command 'disco', which will result in the player being rotated to a random direction every 1 second, infinite times.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;function discoTime ( )&lt;br /&gt;
     -- Randomly choose a new player rotation and set it&lt;br /&gt;
     newRotation = math.random ( 0, 360 )&lt;br /&gt;
     setPedRotation ( getLocalPlayer(), newRotation )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function initiateDiscoMode ( commandName )&lt;br /&gt;
     -- Trigger a random change in player rotation every second&lt;br /&gt;
     setTimer ( discoTime, 1000, 0 )&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler ( &amp;quot;disco&amp;quot;, initiateDiscoMode )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Changelog==&lt;br /&gt;
{{ChangelogHeader}}&lt;br /&gt;
{{ChangelogItem|1.3.1-9.04680|Added conformPedRotation argument}}&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Ped_functions}}&lt;br /&gt;
[[ru:setPedRotation]]&lt;/div&gt;</summary>
		<author><name>AirNewSCR</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetPedRotation&amp;diff=80019</id>
		<title>SetPedRotation</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetPedRotation&amp;diff=80019"/>
		<updated>2024-08-15T19:50:02Z</updated>

		<summary type="html">&lt;p&gt;AirNewSCR: Undo revision 44613 by AlexTMjugador (talk)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Server client function}}&lt;br /&gt;
This function allows you to set the current rotation of the specified ped.&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 setPedRotation ( ped thePed, float rotation [, bool conformPedRotation = false ] )         &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''thePed:''' The [[ped]] to set the rotation of&lt;br /&gt;
*'''rotation:''' A [[float]] specifying the desired rotation in degrees.&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments=== &lt;br /&gt;
{{New feature/item|3.0152|1.3.2|4680|&lt;br /&gt;
*'''conformPedRotation:''' A bool which should be set to ''true'' to ensure the ped rotation is correctly set in all circumstances. Failing to set this argument may result in the rotation being inverted when the ped is in the air and other inconsistencies. The default value of false is for backward compatibility with scripts which may depend upon the incorrect behaviour&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if successful, ''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 example allows a player to type the command 'disco', which will result in the player being rotated to a random direction every 1 second, infinite times.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;function discoTime ( )&lt;br /&gt;
     -- Randomly choose a new player rotation and set it&lt;br /&gt;
     newRotation = math.random ( 0, 360 )&lt;br /&gt;
     setPedRotation ( getLocalPlayer(), newRotation )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function initiateDiscoMode ( commandName )&lt;br /&gt;
     -- Trigger a random change in player rotation every second&lt;br /&gt;
     setTimer ( discoTime, 1000, 0 )&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler ( &amp;quot;disco&amp;quot;, initiateDiscoMode )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Changelog==&lt;br /&gt;
{{ChangelogHeader}}&lt;br /&gt;
{{ChangelogItem|1.3.1-9.04680|Added conformPedRotation argument}}&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Ped_functions}}&lt;br /&gt;
[[ru:setPedRotation]]&lt;/div&gt;</summary>
		<author><name>AirNewSCR</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=OnPlayerMarkerHit&amp;diff=79779</id>
		<title>OnPlayerMarkerHit</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=OnPlayerMarkerHit&amp;diff=79779"/>
		<updated>2024-07-06T14:54:41Z</updated>

		<summary type="html">&lt;p&gt;AirNewSCR: Many errors&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Server event}}&lt;br /&gt;
This event is triggered when a [[player]] hits a [[marker]].&lt;br /&gt;
{{Note|This event is triggered for &amp;lt;b&amp;gt;players&amp;lt;/b&amp;gt; only. Attaching this event to a marker does nothing.}}&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
marker markerHit, bool matchingDimension&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
*'''markerHit''': the [[marker]] the [[player]] hit.&lt;br /&gt;
*'''matchingDimension''': a [[boolean]] representing whether the [[player]] and the hit [[marker]] are in the same [[dimension]].&lt;br /&gt;
&lt;br /&gt;
==Source==&lt;br /&gt;
The [[event system#Event source|source]] of this event is the [[player]] that hit the marker.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
This example outputs when a player hits a marker.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addEventHandler('onPlayerMarkerHit', root, function(marker, matchingDimension)&lt;br /&gt;
    if not matchingDimension then return end -- checks if the dimension of the player who activated the marker is the same as the one the marker is in (in this case, if not, it will stop here)&lt;br /&gt;
    outputChatBox('You have just entered a marker!', source, 255, 255, 0) -- output something&lt;br /&gt;
end)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{See also/Server event|Player events}}&lt;/div&gt;</summary>
		<author><name>AirNewSCR</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=OnPlayerMarkerHit&amp;diff=79778</id>
		<title>OnPlayerMarkerHit</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=OnPlayerMarkerHit&amp;diff=79778"/>
		<updated>2024-07-06T14:52:50Z</updated>

		<summary type="html">&lt;p&gt;AirNewSCR: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Server event}}&lt;br /&gt;
This event is triggered when a [[player]] hits a [[marker]].&lt;br /&gt;
{{Note|This event is triggered for &amp;lt;b&amp;gt;players&amp;lt;/b&amp;gt; only. Attaching this event to a marker does nothing.}}&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
marker markerHit, bool matchingDimension&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
*'''markerHit''': the [[marker]] the [[player]] hit.&lt;br /&gt;
*'''matchingDimension''': a [[boolean]] representing whether the [[player]] and the hit [[marker]] are in the same [[dimension]].&lt;br /&gt;
&lt;br /&gt;
==Source==&lt;br /&gt;
The [[event system#Event source|source]] of this event is the [[player]] that hit the marker.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
This example outputs when a player hits a marker.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addEventHandler('onPlayerMarkerHit', root, function(marker, dimension)&lt;br /&gt;
    if not dimension then return end -- check if player is actually going into the marker&lt;br /&gt;
    outputChatBox('You have just entered a marker!', source, 255, 255, 0) -- output something&lt;br /&gt;
end)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{See also/Server event|Player events}}&lt;/div&gt;</summary>
		<author><name>AirNewSCR</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=OnPlayerMarkerHit&amp;diff=79777</id>
		<title>OnPlayerMarkerHit</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=OnPlayerMarkerHit&amp;diff=79777"/>
		<updated>2024-07-06T14:52:34Z</updated>

		<summary type="html">&lt;p&gt;AirNewSCR: Fixed variable name incorrect (change dim to dimension)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Server event}}&lt;br /&gt;
This event is triggered when a [[player]] hits a [[marker]].&lt;br /&gt;
{{Note|This event is triggered for &amp;lt;b&amp;gt;players&amp;lt;/b&amp;gt; only. Attaching this event to a marker does nothing.}}&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
marker markerHit, bool matchingDimension&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
*'''markerHit''': the [[marker]] the [[player]] hit.&lt;br /&gt;
*'''matchingDimension''': a [[boolean]] representing whether the [[player]] and the hit [[marker]] are in the same [[dimension]].&lt;br /&gt;
&lt;br /&gt;
==Source==&lt;br /&gt;
The [[event system#Event source|source]] of this event is the [[player]] that hit the marker.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
This example outputs when a player hits a marker.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addEventHandler('onPlayerMarkerHit', root, function(marker, dimension)&lt;br /&gt;
	if not dimension then return end -- check if player is actually going into the marker&lt;br /&gt;
	outputChatBox('You have just entered a marker!', source, 255, 255, 0) -- output something&lt;br /&gt;
end)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{See also/Server event|Player events}}&lt;/div&gt;</summary>
		<author><name>AirNewSCR</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=User:AirNewSCR&amp;diff=79653</id>
		<title>User:AirNewSCR</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=User:AirNewSCR&amp;diff=79653"/>
		<updated>2024-06-25T08:42:01Z</updated>

		<summary type="html">&lt;p&gt;AirNewSCR: Created page with &amp;quot;Discord: airnewscr&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Discord: airnewscr&lt;/div&gt;</summary>
		<author><name>AirNewSCR</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=TriggerClientEvent&amp;diff=79652</id>
		<title>TriggerClientEvent</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=TriggerClientEvent&amp;diff=79652"/>
		<updated>2024-06-25T08:36:53Z</updated>

		<summary type="html">&lt;p&gt;AirNewSCR: Added example 3 (with resourceRoot)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!--{{Needs_Checking|Something needs to be said about the steps required to help keep an event inside a resource. i.e. Setting 'theElement' to resourceRoot here, and setting the matching event handler's 'attachedTo' also to resourceRoot.}}&lt;br /&gt;
--&amp;gt;__NOTOC__&lt;br /&gt;
{{Server function}}&lt;br /&gt;
This function triggers an event previously registered on a client. This is the primary means of passing information between the server and the client. Clients have a similar [[triggerServerEvent]] function that can do the reverse. You can treat this function as if it was an asynchronous function call, using [[triggerServerEvent]] to pass back any returned information if necessary. &lt;br /&gt;
&lt;br /&gt;
Almost any data types can be passed as expected, including [[element]]s and complex nested [[table]]s. Non-element MTA data types like xmlNodes or resource pointers will not be able to be passed as they do not necessarily have a valid representation on the client.&lt;br /&gt;
&lt;br /&gt;
Events are sent reliably, so clients will receive them, but there may be (but shouldn't be) a significant delay before they are received. You should take this into account when using them.&lt;br /&gt;
&lt;br /&gt;
Keep in mind the bandwidth issues when using events - don't pass a large list of arguments unless you really need to. '''It is marginally more efficient to pass one large event than two smaller ones'''.&lt;br /&gt;
{{Important Note | Non-element MTA data types like xmlNodes or resource pointers will not be able to be passed as they do not necessarily have a valid representation on the client.}}&lt;br /&gt;
{{Note|It is marginally more efficient to pass one large event than two smaller ones.}}&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 triggerClientEvent ( [ table/element sendTo = getRootElement(), ] string name, element sourceElement [, arguments... ] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''name:''' The name of the event to trigger client side. You should register this event with [[addEvent]] and add at least one event handler using [[addEventHandler]].&lt;br /&gt;
*'''sourceElement:''' The element that is the [[Event system#Event handlers|source]] of the event.&lt;br /&gt;
{{Important Note|To save client CPU, you should avoid setting theElement to the [[root]] element where possible - it should be used as a last resort (rather questionable thing to do, limited to very specific tasks, if any). Using target element ([[player]] who should receive event, if expected to be delivered to particular one) is preferred and highly advisable. [[resourceRoot]] can also be used as alternative choice, if [[addEventHandler]] is bound to [[root]] element, or to [[resourceRoot]] when there is need to restrict event to single certain resource.}}&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments=== &lt;br /&gt;
{{OptionalArg}} &lt;br /&gt;
*'''sendTo:''' The event will be sent to all [[player]]s that are children of the specified element. By default this is the root element, and hence the event is sent to all players. If you specify a single player it will just be sent to that player. This argument can also be a table of player elements.&lt;br /&gt;
*'''arguments...:''' A list of arguments to trigger with the event. You can pass any lua data type (except functions). You can also pass [[element]]s.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the event trigger has been sent, ''false'' if invalid arguments were specified.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
===Example 1===&lt;br /&gt;
This example shows how you can pass a simple &amp;quot;Hello World&amp;quot; message from the server to the all the clients using an event.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section name=&amp;quot;Client&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function greetingHandler ( message )&lt;br /&gt;
    outputChatBox ( &amp;quot;The server says: &amp;quot; .. message )&lt;br /&gt;
end&lt;br /&gt;
addEvent( &amp;quot;onGreeting&amp;quot;, true )&lt;br /&gt;
addEventHandler( &amp;quot;onGreeting&amp;quot;, localPlayer, greetingHandler )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&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;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function greetingCommand ( playerSource, commandName )&lt;br /&gt;
    triggerClientEvent ( playerSource, &amp;quot;onGreeting&amp;quot;, playerSource, &amp;quot;Hello World!&amp;quot; )&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler ( &amp;quot;greet&amp;quot;, greetingCommand )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When the command &amp;quot;greet&amp;quot; is executed (by typing it in the server console or the player's console), the server's ''greetingCommand'' function is called. This triggers the client side event ''onGreeting'' with the string ''&amp;quot;Hello World!&amp;quot;''. This event is then handled by the ''greetingHandler'' function client side which then displays the message.&lt;br /&gt;
&lt;br /&gt;
===Example 2===&lt;br /&gt;
This example shows how you can pass a simple &amp;quot;Hello World&amp;quot; message from the server to '''a single''' client using an event.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section name=&amp;quot;Client&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function greetingHandler ( message )&lt;br /&gt;
    outputChatBox ( &amp;quot;The server says: &amp;quot; .. message )&lt;br /&gt;
end&lt;br /&gt;
addEvent( &amp;quot;onGreeting&amp;quot;, true )&lt;br /&gt;
addEventHandler( &amp;quot;onGreeting&amp;quot;, localPlayer, greetingHandler )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&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;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function greetingCommandOne ( playerSource, commandName, playerName )&lt;br /&gt;
    if playerName then&lt;br /&gt;
        local thePlayer = getPlayerFromName ( playerName )&lt;br /&gt;
        if thePlayer then&lt;br /&gt;
            triggerClientEvent ( thePlayer, &amp;quot;onGreeting&amp;quot;, thePlayer, &amp;quot;Hello World!&amp;quot; )&lt;br /&gt;
        else&lt;br /&gt;
            -- invalid player name specified&lt;br /&gt;
        end&lt;br /&gt;
    else&lt;br /&gt;
        -- No player name specified&lt;br /&gt;
    end &lt;br /&gt;
end&lt;br /&gt;
addCommandHandler ( &amp;quot;greet_one&amp;quot;, greetingCommandOne )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This works like the first example except an extra ''thePlayer'' argument is specified for triggerClientEvent.&lt;br /&gt;
&lt;br /&gt;
===Example 3===&lt;br /&gt;
This example uses resourceRoot to avoid being called by resources other than the same one that was created. (it can still be circumvented with [[getResourceRootElement]] but it makes it more difficult for cheating players).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section name=&amp;quot;Client&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function nameFunction(message)&lt;br /&gt;
    if source == resourceRoot then&lt;br /&gt;
        outputChatBox(message)&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
addEvent(&amp;quot;toClientSide&amp;quot;, true )&lt;br /&gt;
addEventHandler(&amp;quot;toClientSide&amp;quot;, resourceRoot, nameFunction)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&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;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function commandFunction(source)&lt;br /&gt;
    triggerClientEvent(source, &amp;quot;toClientSide&amp;quot;, resourceRoot, &amp;quot;Hello World!&amp;quot;)&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler(&amp;quot;cool&amp;quot;, commandFunction)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Changelog==&lt;br /&gt;
{{ChangelogHeader}}&lt;br /&gt;
{{ChangelogItem|1.3.0-9.04570|Added option to use a list of player elements for the 'sendTo' argument}}&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Event functions}}&lt;br /&gt;
[[ru:triggerClientEvent]]&lt;/div&gt;</summary>
		<author><name>AirNewSCR</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=TriggerServerEvent&amp;diff=79077</id>
		<title>TriggerServerEvent</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=TriggerServerEvent&amp;diff=79077"/>
		<updated>2024-04-18T22:11:21Z</updated>

		<summary type="html">&lt;p&gt;AirNewSCR: /* Removed 'localPlayer', changed to resourceRoot */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!--{{Needs_Checking|Something needs to be said about the steps required to help keep an event inside a resource. i.e. Setting 'theElement' to resourceRoot here, and setting the matching event handler's 'attachedTo' also to resourceRoot.}}--&amp;gt;__NOTOC__&lt;br /&gt;
{{Client function}}&lt;br /&gt;
This function triggers an event previously registered on the server. This is the primary means of passing information between the client and the server. Servers have a similar [[triggerClientEvent]] function that can do the reverse. You can treat this function as if it was an asynchronous function call, using [[triggerClientEvent]] to pass back any returned information if necessary.&lt;br /&gt;
&lt;br /&gt;
Almost any data types can be passed as expected, including [[element]]s and complex nested [[table]]s. Non-element MTA data types like xmlNodes or resource pointers will not be able to be passed as they do not necessarily have a valid representation on the client. '''Elements of the Vector or Matrix classes cannot be passed!'''&lt;br /&gt;
&lt;br /&gt;
Events are sent reliably, so the server will receive them, but there may be (but shouldn't be) a significant delay before they are received. You should take this into account when using them.&lt;br /&gt;
&lt;br /&gt;
Keep in mind the bandwidth issues when using events - don't pass a large list of arguments unless you really need to. '''It is marginally more efficient to pass one large event than two smaller ones'''.&lt;br /&gt;
{{Important Note|You should use the global variable [[Predefined_variables_list|''client'']] server-side instead of passing the [[localPlayer]] by parameter or source. Otherwise event faking (passing another player instead of the [[localPlayer]]) would be possible. For more information see: [[Script security]] article.}}&lt;br /&gt;
{{Note|It is marginally more efficient to pass one large event than two smaller ones.}}&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool triggerServerEvent ( string event, element theElement, [arguments...] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''event:''' The name of the event to trigger server-side. You should register this event with [[addEvent]] and add at least one event handler using [[addEventHandler]].&lt;br /&gt;
*'''theElement:''' The element that is the [[Event system#Event handlers|source]] of the event.&lt;br /&gt;
{{Note|To save server CPU, you should avoid setting '''theElement''' to the [[root element]] where possible - it should be used as a last resort (rather questionable thing to do, limited to very specific tasks, if any). Using [[localPlayer]] is preferred and highly advisable. [[GetThisResource|resourceRoot]] can also be used as alternative choice, if [[addEventHandler]] is bound to [[root]] element, or to [[resourceRoot]] when there is need to restrict event to single certain resource.}}&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments=== &lt;br /&gt;
*'''arguments...:''' A list of arguments to trigger with the event. You can pass any lua data type (except functions). You can also pass [[element]]s.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the event trigger has been sent, ''false'' if invalid arguments were specified or a client side element was a parameter.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
This example shows how you can pass some data from client to server.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section name=&amp;quot;Client&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function sendTestData()&lt;br /&gt;
    local dataToSend = &amp;quot;Hello, world!&amp;quot;&lt;br /&gt;
    triggerServerEvent(&amp;quot;onServerSendTestData&amp;quot;, resourceRoot, dataToSend)&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler(&amp;quot;data&amp;quot;, sendTestData)&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;Server&amp;quot; class=&amp;quot;server&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 onServerSendTestData(sentData)&lt;br /&gt;
    if (not client) then -- 'client' points to the player who triggered the event, and should be used as security measure (in order to prevent player faking)&lt;br /&gt;
      return false -- if this variable doesn't exists at the moment (for unknown reason, or it was the server who triggered this event), stop code execution&lt;br /&gt;
    end&lt;br /&gt;
    if (source ~= resourceRoot) then&lt;br /&gt;
      return false&lt;br /&gt;
    end&lt;br /&gt;
    local chatMessage = &amp;quot;Data sent from client: &amp;quot;..sentData&lt;br /&gt;
    outputChatBox(chatMessage, client) -- output data sent from client-side&lt;br /&gt;
end&lt;br /&gt;
addEvent(&amp;quot;onServerSendTestData&amp;quot;, true) -- 2nd argument should be set to true, in order to be triggered from counter side (in this case client-side)&lt;br /&gt;
addEventHandler(&amp;quot;onServerSendTestData&amp;quot;, resourceRoot, onServerSendTestData)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When the command '''data''' is executed (by typing it in the player's console or in chat: '''/data'''), '''sendTestData''' function is called. This triggers the server-side event ''onServerSendTestData'' with the string ''&amp;quot;Hello, world!&amp;quot;''. This event is then handled by function on server-side which displays the message.&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Client_event_functions}}&lt;br /&gt;
[[ru:triggerServerEvent]]&lt;/div&gt;</summary>
		<author><name>AirNewSCR</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetBanBySerial&amp;diff=78865</id>
		<title>GetBanBySerial</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetBanBySerial&amp;diff=78865"/>
		<updated>2024-02-21T16:22:06Z</updated>

		<summary type="html">&lt;p&gt;AirNewSCR: &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 ban if the serial is banned, otherwise false.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;ban getBanBySerial ( string serial )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
* '''serial''': The banned player serial.&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;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function getBanBySerial(serial)&lt;br /&gt;
    local result = false&lt;br /&gt;
    if serial then&lt;br /&gt;
        for _, ban in ipairs(getBans()) do&lt;br /&gt;
            if getBanSerial(ban) == serial then&lt;br /&gt;
                result = ban&lt;br /&gt;
                break&lt;br /&gt;
            end&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
    return result&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 removes the player's ban from the serial provided.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addCommandHandler(&amp;quot;unban&amp;quot;, function(source, _, serial)&lt;br /&gt;
    if not serial then&lt;br /&gt;
        outputChatBox(&amp;quot;The command is /unban serial&amp;quot;, source, 255, 0, 0)&lt;br /&gt;
        return&lt;br /&gt;
    end&lt;br /&gt;
    local ban = getBanBySerial(serial)&lt;br /&gt;
    if ban then&lt;br /&gt;
        removeBan(ban, source)&lt;br /&gt;
        outputChatBox(&amp;quot;The serial &amp;quot;..serial..&amp;quot; has been unbanned!&amp;quot;, source, 0, 255, 0)&lt;br /&gt;
    else&lt;br /&gt;
        outputChatBox(&amp;quot;This serial is not banned!&amp;quot;, source, 255, 0, 0)&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: AirNewSCR&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Useful_Functions}}&lt;/div&gt;</summary>
		<author><name>AirNewSCR</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Template:Useful_Functions&amp;diff=78864</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=78864"/>
		<updated>2024-02-21T16:19:28Z</updated>

		<summary type="html">&lt;p&gt;AirNewSCR: /* Utility */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
=== Table functions ===&lt;br /&gt;
*[[addTableChangeHandler]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function monitors the changes of a table.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getKeyFromValueInTable]] &amp;lt;span style=&amp;quot;color:gray; 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;
*[[getTableFromSql]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This functionality is used to obtain saved tables using the function ([https://wiki.multitheftauto.com/wiki/SetTableToSql SetTableToSql ]).&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isValueInTable]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns true if the value exists in the table, false if the value does not exist in the table.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[pairsByKeys]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function sort pairs table.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[rangeToTable]] &amp;lt;span style=&amp;quot;color:gray; 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-size:smaller;&amp;quot;&amp;gt;» This function protects a table and makes it read-only.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[setTableToSql]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function is used to save the table in the database (sql).&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[Sort_Functions]] &amp;lt;span style=&amp;quot;color:gray; 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;
*[[table.compare]] &amp;lt;span style=&amp;quot;color:gray; 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.copy]] &amp;lt;span style=&amp;quot;color:gray; 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.deepmerge]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function deep merges two tables. Every nested table will be correspondingly merged.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[table.element]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns a new table with only userdata content.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[table.flip]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns the table from the last value to the first value, such as reflection.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[table.fromString]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function converts string to a table.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[table.getRandomRows]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns random rows from table.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[table.map]] &amp;lt;span style=&amp;quot;color:gray; 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-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-size:smaller;&amp;quot;&amp;gt;» This function retrieves a random value from a table.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[table.removeValue]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function removes a specified value from a table.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[table.size]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns the absolute size of a table.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== ACL functions ===&lt;br /&gt;
*[[aclGroupClone]] &amp;lt;span style=&amp;quot;color:gray; 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-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;
*[[getPlayersInACLGroup]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns all players in an ACL group.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isPlayerInACL]] &amp;lt;span style=&amp;quot;color:gray; 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-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;
*[[getPlayerFromAccountName]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function is used to obtain a player by the name of his 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-size:smaller;&amp;quot;&amp;gt;» This function allows you to create a cinematic camera flight.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[sCamera]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» The function creates a speed camera in-game, fines speeding vehicles, and notifies the driver and take money from player based on vehicle speed.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Colshape functions ===&lt;br /&gt;
*[[createGarageColShape]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function creates a collision shape from the specified garage.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Cursor functions ===&lt;br /&gt;
*[[getCursorMovedOn]] &amp;lt;span style=&amp;quot;color:gray; 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;
*[[setCursorCenteredOnRectangle]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This functions will center the cursor inside a rectangle.&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-size:smaller;&amp;quot;&amp;gt;» This function draws an animated 2D window on the screen.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawBorderedRectangle]] &amp;lt;span style=&amp;quot;color:gray; 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;
*[[dxDrawBorderedText]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This is a function that will create a bordered text.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawDashedLine]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function draws a line with dashes.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawEditbox]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function draws a edit box across the screen - rendered for one frame. This should be used in conjunction with '''onClientRender''' in order to display continuously.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawGifImage]] &amp;lt;span style=&amp;quot;color:gray; 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-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-size:smaller;&amp;quot;&amp;gt;» This function draws an image on any element.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawLinedRectangle]] &amp;lt;span style=&amp;quot;color:gray; 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;
*[[dxDrawLoading]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function draws a loading bar on the screen.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawOctagon3D]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function creates a 3D Octagon&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawPolygon]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function draws a custom polygon on the screen.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawProgressBar]] &amp;lt;span style=&amp;quot;color:gray; 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-size:smaller;&amp;quot;&amp;gt;» This function draws a 3D rectangle in GTA world.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawRectangleOnPlayer]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function draws a 3D rectangle above the player.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawRing]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function draws a ring with dx lines.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawRombo]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function creates a Rhombus.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawSprite]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function draw a sprite in the 3D world.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawTextOnElement]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function draws a text on any element.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawTextOnRectangle]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» Esta funcion crea un rectangle con un texto dentro.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawTriangle]] &amp;lt;span style=&amp;quot;color:gray; 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;
*[[dxFade]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function fade-in or fade-out any dxDraw by gradually changing its alpha value.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxGetFontSizeFromHeight]] &amp;lt;span style=&amp;quot;color:gray; 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-size:smaller;&amp;quot;&amp;gt;» This function calculates the height of a font.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getScreenStartPositionFromBox]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function helps with getting the correct position for your dx-effects.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[wordWrap]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function breaks a long string into a table of separate lines limited to a specific length in pixels, for drawing separately.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[CreateRectangle3D]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This is a function that will create a 3d rectangle on the player screen.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[DxDrawBordered3DLine]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;»This function creates a bordered area with 3D dx lines.&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-size:smaller;&amp;quot;&amp;gt;» This function allows you attach an effect to an element.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[setScreenFlash]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function will make the screen flash(like a screenshot).&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Element functions === &lt;br /&gt;
*[[autoAttach]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function attaches one element into another at the same position and rotation they are.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[attachElementToBone]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to attach an element to ped bone accurately using new bone functions.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getElementDirectionCardialPoint]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns the direction of the element according to the ''wind rose''.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getElementSpeed]] &amp;lt;span style=&amp;quot;color:gray; 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;
*[[getElementUsingData]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns table elements that contains the elements data with the given key and value.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getElementZoneFullName]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to retrieve the zone full name of a element.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getElementsInDimension]] &amp;lt;span style=&amp;quot;color:gray; 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-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;
*[[getNearestElement]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns the nearest element (of a specific type) to a player.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isElementInAir]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function checks if an element is in air or not.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isElementInPhotograph]] &amp;lt;span style=&amp;quot;color:gray; 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-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-size:smaller;&amp;quot;&amp;gt;» This function checks if an element is moving.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isElementPlayer]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function checks whether the element is a player or not.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isElementWithinAColShape]] &amp;lt;span style=&amp;quot;color:gray; 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-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-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;
*[[getPositionInFrontOfElement]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns position in provided distance away from element, including element's rotation.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Events ===&lt;br /&gt;
*[[onClientPlayerTimeChange]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This code implements an event that is triggered when the player's real time change.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[onPlayerZoneChange]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This code implements an event that is triggered when the player enters a new area on the map.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[onVehicleWeaponFire]] &amp;lt;span style=&amp;quot;color:gray; 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-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-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-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;
*[[isCommandHandlerAdded]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to check if a command is added or not in the respective resource.&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-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-size:smaller;&amp;quot;&amp;gt;» This function capitalizes a given string.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[convertDate]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function converts date to another look.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[convertServerTickToTimeStamp]] &amp;lt;span style=&amp;quot;color:gray; 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-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;
*[[findRotation3D]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function takes two sets of XYZ coordinates. It returns the 3D direction from point A to point B.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[findRotation]] &amp;lt;span style=&amp;quot;color:gray; 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-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;
*[[formatNumber]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function formats large numbers by adding commas.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[generateRandomASCIIString]] &amp;lt;span style=&amp;quot;color:gray; 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;
*[[generateString]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function generates a random string with any characters.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getAge]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function calculates the age of a given birthday.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getDistanceBetweenElements]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» Returns the distance between two elements.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getDistanceBetweenPointAndSegment2D]] &amp;lt;span style=&amp;quot;color:gray; 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-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;
*[[getElementRelatedAngle]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns the related angle between one element to another. This is useful to check which side an element is to another.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getFreeDimension]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function get free dimension.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getOffsetFromXYZ]] &amp;lt;span style=&amp;quot;color:gray; 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-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;
*[[getRealMonth]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns the current month name&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-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-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;
*[[gradientString]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function transforms a string in a new coloured gradient string.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[hex2rgb]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function convert hex to rgb.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[hexColorToRGB]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function convert hex string/number to RGBA values.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isLeapYear]] &amp;lt;span style=&amp;quot;color:gray; 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-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-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-size:smaller;&amp;quot;&amp;gt;» This function returns a string representing the color in hexadecimal.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[RGBToHSV]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function convert RGB to HSV color space.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[RGBToDecimal]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function convert RGB to Decimal color.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[secondsToTimeDesc]] &amp;lt;span style=&amp;quot;color:gray; 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-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-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;
*[[string.insert]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function inserts a string within another string at a given position.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[splitMultiple]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function improves the split function so that multiple characters can be used as the split at character.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[switch]] &amp;lt;span style=&amp;quot;color:gray; 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;
*[[tocolor2rgba]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function convert tocolor to rgba.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[toHex]] &amp;lt;span style=&amp;quot;color:gray; 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;
*[[var dump]] &amp;lt;span style=&amp;quot;color:gray; 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-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-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;
*[[guiMoveElement]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function moves guiElement by/like using moveObject.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[guiSetStaticImageMovable]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to move a static image like a gui window.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isMouseOnGUICloseButton]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to check whether the mouse cursor/pointer is within a gui-window's native close button.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isMouseOnGuiElement]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to check whether or not your mouse is over a specific gui element, this is especially useful if the gui element has a parent. &amp;lt;/span&amp;gt;&lt;br /&gt;
=====Comboboxes=====&lt;br /&gt;
*[[guiComboBoxAdjustHeight]] &amp;lt;span style=&amp;quot;color:gray; 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;
&lt;br /&gt;
=====Gridlists=====&lt;br /&gt;
*[[convertGridListToText]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function converts grid list contents to text.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getGridListRowIndexFromText]] &amp;lt;span style=&amp;quot;color:gray; 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;
*[[guiGridListAddPlayers]] &amp;lt;span style=&amp;quot;color:gray; 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;
*[[guiGridListGetColumnIDFromTitle]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function gets a gridlist's column ID from the column title.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[guiGridListGetSelectedText]] &amp;lt;span style=&amp;quot;color:gray; 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;
*[[guiGridListSetColumnNonSortable]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function makes a gridlist column become non-sortable.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isTextInGridList]] &amp;lt;span style=&amp;quot;color:gray; 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;
=====Labels=====&lt;br /&gt;
*[[guiLabelAddEffect]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function add an effects to the gui-label like (shadow, outline).&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Marker functions ===&lt;br /&gt;
*[[createMarkerAttachedTo]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function creates a marker that is attached to an element.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Math functions ===&lt;br /&gt;
*[[math.clamp]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns the number between range of numbers or it's minimum or maximum.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[math.getBezierPoint]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» Get N-th order bezier point.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[math.hypot]] &amp;lt;span style=&amp;quot;color:gray; 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.isPointInPolygon]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» Check if point is inside polygon or not.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[math.lerp]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» Get val between two integer.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[math.percent]] &amp;lt;span style=&amp;quot;color:gray; 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.polygonArea]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» Compute area of any polygon.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[math.randomDiff]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» Generates a pseudo-random integer that's always different from the last random number generated.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[math.rotVecToEulerAngle]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» Rotation Vector To Euler Angle&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[math.round]] &amp;lt;span style=&amp;quot;color:gray; 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;
*[[mathNumber]] &amp;lt;span style=&amp;quot;color:gray; 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;
*[[reMap]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» Re-maps a number from one range to another.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[Math.percentProgress|math.percentProgress]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» Returns a percentage progress from two specific values.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[math.average]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns the simple arithmetic mean of multiple numbers.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[math.absin]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns a formula representing the just positive half of a sine wave.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Map functions ===&lt;br /&gt;
*[[assignLod]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function lets you conveniently generate and apply a LOD model to a mapping object.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getWorldPositionFromMapPosition]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function converts an F11 map position to world position.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Ped functions ===&lt;br /&gt;
*[[getAlivePlayersInTeam]] &amp;lt;span style=&amp;quot;color:gray; 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;
*[[getGuestPlayers]] &amp;lt;span style=&amp;quot;color:gray; 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;
*[[getOnlineAdmins]] &amp;lt;span style=&amp;quot;color:gray; 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;
*[[getPedEyesPosition]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to get peds eyes position.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPedGender]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to get peds their gender.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPedMaxHealth]] &amp;lt;span style=&amp;quot;color:gray; 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-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;
*[[getPedWeaponSkill]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns a ped's corresponding weapon skill level name.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPedHitBone]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function gets the approximate number of the bone where the ped is hit.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPlayerFromNamePart]] &amp;lt;span style=&amp;quot;color:gray; 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-size:smaller;&amp;quot;&amp;gt;» This function returns a player from their serial.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPlayersByData]] &amp;lt;span style=&amp;quot;color:gray; 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-size:smaller;&amp;quot;&amp;gt;» This function returns a table of all players in photograph.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPlayersInVehicles]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table of the players insides vehicles from a specified dimension.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isPedAiming]]&amp;lt;span style=&amp;quot;color:gray; 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;
*[[isPedAimingNearPed]] &amp;lt;span style=&amp;quot;color:gray; 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;
*[[isPedDiving]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This feature checks that pedestrian is diving in the water.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isPedDrivingVehicle]] &amp;lt;span style=&amp;quot;color:gray; 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;
*[[isPedNearbyWall]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function checks if player/ped is nearby a objects like buildings or walls.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isPlayerInTeam]] &amp;lt;span style=&amp;quot;color:gray; 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;
*[[setPedAttack]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function will make a ped attack a specified target.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[setPedFollow]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function will make a ped follow a specified target.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPlayerNameFromID]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function will get the player name from the ID element data.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Player functions ===&lt;br /&gt;
*[[countPlayersInRange]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns the number of players that are within a certain range of the specified coordinates.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPlayerPreviousAndNextWeapon]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns the player previous and next weapon.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPlayersInRange]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function make a table of players within certain range.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isPlayerActuallyInVehicle]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function checks if a player is actually in a vehicle instead of just in the process of entering.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isPlayerHitByVehicle]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function cancels event when a element is hit by a vehicle.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Resource functions ===&lt;br /&gt;
*[[getFilesInResourceFolder]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function gets a list of files that are inside a folder of a resource.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getResourceScripts]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table of the resource scripts.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getResourceSettings]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table of the resource settings.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getResourceSize]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns the size of a specified resource in kB(kilobyte)&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[refreshResource]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function refreshes your resource if you changed any of the files&lt;br /&gt;
*[[setResourcePriority]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function set resource download priority group.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Sound functions ===&lt;br /&gt;
*[[isSoundFinished]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function checks if a sound element has finished.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isSoundPlaying]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function checks if a sound element is playing or not.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[stopSoundSlowly]] &amp;lt;span style=&amp;quot;color:gray; 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;
=== Browser functions ===&lt;br /&gt;
*[[playVideo]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function plays a video on the screen.&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-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-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 functions ===&lt;br /&gt;
*[[findEmptyCarSeat]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function finds you the first empty seat in a vehicle.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getNearestVehicle]] &amp;lt;span style=&amp;quot;color:gray; 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;
*[[getRandomVehicle]] &amp;lt;span style=&amp;quot;color:gray; 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-size:smaller;&amp;quot;&amp;gt;» This function returns a table of all valid vehicle models.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getVehiclesCountByType]] &amp;lt;span style=&amp;quot;color:gray; 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;
*[[getVehicleTurnVelocityCenterOfMass]]&amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function gets a vehicle's turn velocity relative to the vehicle's center or mass.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isVehicleDoubleExhaust]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function checks is exhaust vehicle double.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isVehicleEmpty]] &amp;lt;span style=&amp;quot;color:gray; 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-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-size:smaller;&amp;quot;&amp;gt;» This function checks whether vehicle is on roof.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isVehicleOnFire]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function checks if the vehicle is on fire or not.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isVehicleReversing]] &amp;lt;span style=&amp;quot;color:gray; 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;
*[[isVehicleUpgraded]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function checks is vehicle upgraded by upgrade ID.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[setVehicleGravityPoint]] &amp;lt;span style=&amp;quot;color:gray; 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;
*[[setVehicleTurnVelocityCenterOfMass]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function sets a vehicle's turn velocity relative to the vehicle's center or mass.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[setVehicleHandlingFromText]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function sets a vehicle's handling from text.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[setVehicleWheelModel]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function changes the wheel model of the informed vehicle.&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-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;
=== Object functions ===&lt;br /&gt;
*[[getDynamicDoorObjectOpenRatio]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function tells you how open a dynamic door is in a range from 0 to 1.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isElementObject]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function tells you if an element is an object or no.&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-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;
=== Engine functions ===&lt;br /&gt;
*[[engineGetCOLsFromLibrary]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function gets the collision data from the col library.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[engineLoadIMGContainer]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function loads the IMG container.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Utility ===&lt;br /&gt;
*[[animate]] &amp;lt;span style=&amp;quot;color:gray; 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;
*[[callClientFunction]] &amp;lt;span style=&amp;quot;color:gray; 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-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;
*[[check]] &amp;lt;span style=&amp;quot;color:gray; 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;
*[[checkPassiveTimer]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to use passive timers in your conditions. For example you want to prevent players repeatedly using a command.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[coroutine.resume]] &amp;lt;span style=&amp;quot;color:gray; 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;
*[[compact]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function create table containing variables and their values.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getBanBySerial]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns the ban if the serial is banned.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getBanFromName]] &amp;lt;span style=&amp;quot;color:gray; 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-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;
*[[getSkinNameFromID]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns the name of the skin from the given id.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[IfElse]] &amp;lt;span style=&amp;quot;color:gray; 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;
*[[isCharInString]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This shared function allows you to check if a char specified is in a string value.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isLastExecuteInTimer]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function check if the execute is the last execute in the timer.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isMouseInCircle]] &amp;lt;span style=&amp;quot;color:gray; 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-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-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;
*[[PlotTrajectoryAtTime]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» Calculate projectile/water trajectory.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[preprocessor]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function allow you to use gcc macros.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[vector3:compare]] &amp;lt;span style=&amp;quot;color:gray; 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;
*[[svgCreateRoundedRectangle]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function creates a rectangle with rounded edges.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[debounce]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function is removing unwanted input noise.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;[[Category:Useful Functions]]&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>AirNewSCR</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetBanBySerial&amp;diff=78863</id>
		<title>GetBanBySerial</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetBanBySerial&amp;diff=78863"/>
		<updated>2024-02-21T16:17:33Z</updated>

		<summary type="html">&lt;p&gt;AirNewSCR: Created page with &amp;quot;{{Useful_Function}} &amp;lt;lowercasetitle/&amp;gt; __NOTOC__ This function returns the ban if the serial is banned, otherwise false.  ==Syntax== &amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;ban getBanBySerial ( string serial )&amp;lt;/syntaxhighlight&amp;gt;  ===Required Arguments=== * '''serial''': The banned player serial.  ==Code== &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; function getBanBySerial(serial)     local result = false     if serial then         for _, ban in ipai...&amp;quot;&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 ban if the serial is banned, otherwise false.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;ban getBanBySerial ( string serial )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
* '''serial''': The banned player serial.&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;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function getBanBySerial(serial)&lt;br /&gt;
    local result = false&lt;br /&gt;
    if serial then&lt;br /&gt;
        for _, ban in ipairs(getBans()) do&lt;br /&gt;
            if getBanSerial(ban) == serial then&lt;br /&gt;
                result = ban&lt;br /&gt;
                break&lt;br /&gt;
            end&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
    return result&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 removes the player's ban from the serial provided.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addCommandHandler(&amp;quot;unban&amp;quot;, function(source, _, serial)&lt;br /&gt;
    if not serial then&lt;br /&gt;
        outputChatBox(&amp;quot;The command is /unban serial&amp;quot;, source, 255, 0, 0)&lt;br /&gt;
        return&lt;br /&gt;
    end&lt;br /&gt;
    local ban = getBanBySerial(serial)&lt;br /&gt;
    if ban then&lt;br /&gt;
        removeBan(ban, source)&lt;br /&gt;
        outputChatBox(&amp;quot;The serial &amp;quot;..serial..&amp;quot; has been unbanned!&amp;quot;, source, 255, 0, 0)&lt;br /&gt;
    else&lt;br /&gt;
        outputChatBox(&amp;quot;This serial is not banned!&amp;quot;, source, 255, 0, 0)&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: AirNewSCR&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Useful_Functions}}&lt;/div&gt;</summary>
		<author><name>AirNewSCR</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetResourceRootElement&amp;diff=78672</id>
		<title>GetResourceRootElement</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetResourceRootElement&amp;diff=78672"/>
		<updated>2023-12-17T04:52:25Z</updated>

		<summary type="html">&lt;p&gt;AirNewSCR: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Shared function}}&lt;br /&gt;
{{Disabled}}&lt;br /&gt;
{{New feature/item|3.0160|1.6|7485|&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>AirNewSCR</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetResourceRootElement&amp;diff=78671</id>
		<title>GetResourceRootElement</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetResourceRootElement&amp;diff=78671"/>
		<updated>2023-12-17T04:52:17Z</updated>

		<summary type="html">&lt;p&gt;AirNewSCR: Replaced content with &amp;quot;__NOTOC__ {{Shared function}} {{Disabled}} {{New feature/item|3.0160|1.6|7485| Sets the track of a train }}&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Shared function}}&lt;br /&gt;
{{Disabled}}&lt;br /&gt;
{{New feature/item|3.0160|1.6|7485|&lt;br /&gt;
Sets the track of a train&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>AirNewSCR</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Installing_and_Running_MTASA_Server_on_GNU_Linux&amp;diff=78664</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=78664"/>
		<updated>2023-12-13T05:18:16Z</updated>

		<summary type="html">&lt;p&gt;AirNewSCR: Added another URL to download latest resources.&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.tar.gz&lt;br /&gt;
 wget &amp;lt;nowiki&amp;gt;https&amp;lt;/nowiki&amp;gt;://linux.mtasa.com/dl/multitheftauto_linux_x64.tar.gz&lt;br /&gt;
&lt;br /&gt;
Unpack into a directory:&lt;br /&gt;
 tar -xf multitheftauto_linux_x64.tar.gz&lt;br /&gt;
&lt;br /&gt;
=== Default config ===&lt;br /&gt;
Download the default config files:&lt;br /&gt;
 rm -f baseconfig.tar.gz&lt;br /&gt;
 wget &amp;lt;nowiki&amp;gt;https&amp;lt;/nowiki&amp;gt;://linux.mtasa.com/dl/baseconfig.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.tar.gz&lt;br /&gt;
 mv baseconfig/* multitheftauto_linux_x64/mods/deathmatch&lt;br /&gt;
&lt;br /&gt;
Change to the MTA server install directory:&lt;br /&gt;
 cd multitheftauto_linux_x64&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;
If your server comes up with issues such as:&lt;br /&gt;
 libtinfo.so.5: cannot open shared object file: No such file or directory&lt;br /&gt;
you may have either a newer or older version of the Shared Object file. &lt;br /&gt;
In such cases, it is warranted to create a symbolic link with that same name to the newer or older Shared Object file, with for example:&lt;br /&gt;
 sudo ln -s /usr/lib/libtinfo.so.6 /usr/lib/libtinfo.so.5&lt;br /&gt;
Of course, the location of these files could depend on your distribution of GNU/Linux; refer to your distribution's documentation on the location of the files.&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 https://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;
&lt;br /&gt;
 wget &amp;lt;nowiki&amp;gt;https&amp;lt;/nowiki&amp;gt;://mirror.mtasa.com/mtasa/resources/mtasa-resources-latest.zip&lt;br /&gt;
 '''OR'''&lt;br /&gt;
 wget &amp;lt;nowiki&amp;gt;https&amp;lt;/nowiki&amp;gt;://mirror.multitheftauto.com/mtasa/resources/mtasa-resources-latest.zip&lt;br /&gt;
&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;
== 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.tar.gz&lt;br /&gt;
 wget &amp;lt;nowiki&amp;gt;https&amp;lt;/nowiki&amp;gt;://linux.mtasa.com/dl/multitheftauto_linux.tar.gz&lt;br /&gt;
&lt;br /&gt;
Unpack into a directory:&lt;br /&gt;
 tar -xf multitheftauto_linux.tar.gz&lt;br /&gt;
&lt;br /&gt;
=== Default config ===&lt;br /&gt;
Download the default config files:&lt;br /&gt;
 rm -f baseconfig.tar.gz&lt;br /&gt;
 wget &amp;lt;nowiki&amp;gt;https&amp;lt;/nowiki&amp;gt;://linux.mtasa.com/dl/baseconfig.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.tar.gz&lt;br /&gt;
 mv baseconfig/* multitheftauto_linux/mods/deathmatch&lt;br /&gt;
&lt;br /&gt;
Change to the MTA server install directory:&lt;br /&gt;
 cd multitheftauto_linux&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 https://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;
&lt;br /&gt;
 wget &amp;lt;nowiki&amp;gt;https&amp;lt;/nowiki&amp;gt;://mirror.mtasa.com/mtasa/resources/mtasa-resources-latest.zip&lt;br /&gt;
 '''OR'''&lt;br /&gt;
 wget &amp;lt;nowiki&amp;gt;https&amp;lt;/nowiki&amp;gt;://mirror.multitheftauto.com/mtasa/resources/mtasa-resources-latest.zip&lt;br /&gt;
&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: [https://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 [https://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 [https://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 [https://github.com/multitheftauto/mtasa-blue/issues 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 -ex &amp;quot;set print thread-events off&amp;quot; --eval-command run --args mta-server -q&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 [https://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 -ex &amp;quot;set print thread-events off&amp;quot; --eval-command run --args mta-server -q&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;
 ARCH_TYPE=&amp;quot;&amp;quot;&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 https://linux.mtasa.com/dl/multitheftauto_linux${ARCH_TYPE}.tar.gz&lt;br /&gt;
     wget https://linux.mtasa.com/dl/baseconfig.tar.gz&lt;br /&gt;
 }&lt;br /&gt;
  &lt;br /&gt;
 unpack()&lt;br /&gt;
 {&lt;br /&gt;
     tar -xf multitheftauto_linux${ARCH_TYPE}.tar.gz&lt;br /&gt;
     tar -xf baseconfig.tar.gz&lt;br /&gt;
 }&lt;br /&gt;
  &lt;br /&gt;
 moveConfig()&lt;br /&gt;
 {&lt;br /&gt;
     mv baseconfig/* multitheftauto_linux${ARCH_TYPE}/mods/deathmatch&lt;br /&gt;
     rm -rf baseconfig&lt;br /&gt;
     cd multitheftauto_linux${ARCH_TYPE}&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 https://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}.tar.gz&lt;br /&gt;
     rm -f ../baseconfig.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;
     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;br /&gt;
&lt;br /&gt;
=== Alternative way to install server ===&lt;br /&gt;
https://linuxgsm.com/lgsm/mtaserver/&lt;/div&gt;</summary>
		<author><name>AirNewSCR</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetCameraDrunkLevel&amp;diff=77187</id>
		<title>SetCameraDrunkLevel</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetCameraDrunkLevel&amp;diff=77187"/>
		<updated>2023-07-21T19:16:58Z</updated>

		<summary type="html">&lt;p&gt;AirNewSCR: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Client function}}{{Important Note|This function usually presents bugs when trying to return the state to 0 (normal).}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
{{New feature/item|3.0161|1.6.0|21795|This function sets the camera drunk level (as seen on the ''Are you going to San Fierro?'' singleplayer mission). This function was renamed from [[setCameraShakeLevel]].}}&lt;br /&gt;
&lt;br /&gt;
Drunk effect is a wavy motion of the camera depicting the player being drunk. This function used to be called [[setCameraShakeLevel]] which has since been deprecated.&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 setCameraDrunkLevel ( int shakeLevel )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required arguments===&lt;br /&gt;
*'''drunkLevel''': an integer between 0 and 255, which represents the camera drunk intensity level.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the camera drunk level was changed, ''false'' if the required argument is incorrect or missing.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This example adds a ''/camdrunk'' command which allows any player to manually change its camera drunk level.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addCommandHandler( &amp;quot;camdrunk&amp;quot;,&lt;br /&gt;
    function( _, level )&lt;br /&gt;
        local level = math.floor( level )&lt;br /&gt;
        if level and level &amp;gt;= 0 and level &amp;lt;= 255 then&lt;br /&gt;
            setCameraDrunkLevel( level )&lt;br /&gt;
            outputChatBox( &amp;quot;Camera drunk level updated to &amp;quot; .. level .. &amp;quot;.&amp;quot; )&lt;br /&gt;
        else&lt;br /&gt;
            outputChatBox( &amp;quot;Camera drunk level must be between 0 and 255.&amp;quot; )&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
{{Client_camera_functions}}&lt;/div&gt;</summary>
		<author><name>AirNewSCR</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetCameraDrunkLevel&amp;diff=77186</id>
		<title>SetCameraDrunkLevel</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetCameraDrunkLevel&amp;diff=77186"/>
		<updated>2023-07-21T19:15:39Z</updated>

		<summary type="html">&lt;p&gt;AirNewSCR: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Client function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
{{Important Note|This function usually presents bugs when trying to return the state to 0 (normal).}}&lt;br /&gt;
{{New feature/item|3.0161|1.6.0|21795|This function sets the camera drunk level (as seen on the ''Are you going to San Fierro?'' singleplayer mission). This function was renamed from [[setCameraShakeLevel]].}}&lt;br /&gt;
&lt;br /&gt;
Drunk effect is a wavy motion of the camera depicting the player being drunk. This function used to be called [[setCameraShakeLevel]] which has since been deprecated.&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 setCameraDrunkLevel ( int shakeLevel )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required arguments===&lt;br /&gt;
*'''drunkLevel''': an integer between 0 and 255, which represents the camera drunk intensity level.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the camera drunk level was changed, ''false'' if the required argument is incorrect or missing.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This example adds a ''/camdrunk'' command which allows any player to manually change its camera drunk level.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addCommandHandler( &amp;quot;camdrunk&amp;quot;,&lt;br /&gt;
    function( _, level )&lt;br /&gt;
        local level = math.floor( level )&lt;br /&gt;
        if level and level &amp;gt;= 0 and level &amp;lt;= 255 then&lt;br /&gt;
            setCameraDrunkLevel( level )&lt;br /&gt;
            outputChatBox( &amp;quot;Camera drunk level updated to &amp;quot; .. level .. &amp;quot;.&amp;quot; )&lt;br /&gt;
        else&lt;br /&gt;
            outputChatBox( &amp;quot;Camera drunk level must be between 0 and 255.&amp;quot; )&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
{{Client_camera_functions}}&lt;/div&gt;</summary>
		<author><name>AirNewSCR</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=HandlingSetBrakeDeceleration&amp;diff=77168</id>
		<title>HandlingSetBrakeDeceleration</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=HandlingSetBrakeDeceleration&amp;diff=77168"/>
		<updated>2023-07-13T20:26:58Z</updated>

		<summary type="html">&lt;p&gt;AirNewSCR: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Server function}}&lt;br /&gt;
{{Disabled}}&lt;br /&gt;
Sets the brake deceleration of a handling element. This determines how strongly a vehicle can lock its wheels when braking. High values will allow cars to immediately lock their wheels and cause skidding. Low values will merely slow down the wheels.&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 handlingSetBrakeDeceleration ( handling theHandling, float deceleration )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''theHandling:''' the handling of which you want to change the brake deceleration.&lt;br /&gt;
*'''deceleration:''' the brake decelertion to set.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' on success, ''false'' in case of failure.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
Select a player and damage its vehicle's brakes&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function damageBreaks()&lt;br /&gt;
    local player = getPlayerFromName(&amp;quot;David&amp;quot;) -- get a player&lt;br /&gt;
    local vehicle = getPedOccupiedVehicle(player) -- get the vehicle David is in&lt;br /&gt;
    handlingSetBrakeDeceleration(vehicle, 0.08) -- reduce brake's strength&lt;br /&gt;
    outputChatBox(&amp;quot;Your brakes are damaged. Drive careful!&amp;quot;, player, 255, 0, 0)&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Handling_functions}}&lt;/div&gt;</summary>
		<author><name>AirNewSCR</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Template:Useful_Functions&amp;diff=77159</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=77159"/>
		<updated>2023-07-10T16:47:24Z</updated>

		<summary type="html">&lt;p&gt;AirNewSCR: /* Vehicle functions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
=== Table functions ===&lt;br /&gt;
*[[addTableChangeHandler]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function monitors the changes of a table.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getTableFromSql]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This functionality is used to obtain saved tables using the function ([https://wiki.multitheftauto.com/wiki/SetTableToSql SetTableToSql ]).&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isValueInTable]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns true if the value exists in the table, false if the value does not exist in the table.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[pairsByKeys]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function sort pairs table.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[rangeToTable]] &amp;lt;span style=&amp;quot;color:gray; 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-size:smaller;&amp;quot;&amp;gt;» This function protects a table and makes it read-only.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[setTableToSql]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function is used to save the table in the database (sql).&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[Sort_Functions]] &amp;lt;span style=&amp;quot;color:gray; 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;
*[[table.compare]] &amp;lt;span style=&amp;quot;color:gray; 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.copy]] &amp;lt;span style=&amp;quot;color:gray; 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.deepmerge]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function deep merges two tables. Every nested table will be correspondingly merged.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[table.element]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns a new table with only userdata content.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[table.empty]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function checks whether a table is empty.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[table.fromString]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function converts string to a table.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[table.getRandomRows]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns random rows from table.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[table.map]] &amp;lt;span style=&amp;quot;color:gray; 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-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-size:smaller;&amp;quot;&amp;gt;» This function retrieves a random value from a table.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[table.removeValue]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function removes a specified value from a table.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[table.size]] &amp;lt;span style=&amp;quot;color:gray; 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.toString]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function converts table to a string.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== ACL functions ===&lt;br /&gt;
*[[aclGroupClone]] &amp;lt;span style=&amp;quot;color:gray; 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;
*[[getAccountsRanks]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function is used to detect the account name groups and put them in the chat.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPlayerAcls]] &amp;lt;span style=&amp;quot;color:gray; 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;
*[[getPlayersInACLGroup]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns all players in an ACL group.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isPlayerInACL]] &amp;lt;span style=&amp;quot;color:gray; 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-size:smaller;&amp;quot;&amp;gt;» This function gives an existing ACL group a new name.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isPlayerACLAdmin]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function checks if a player element belong to Admin group in ACL&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Account functions ===&lt;br /&gt;
*[[getPlayerFromAccountName]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function is used to obtain a player by the name of his 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-size:smaller;&amp;quot;&amp;gt;» This function allows you to create a cinematic camera flight.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Colshape functions ===&lt;br /&gt;
*[[createGarageColShape]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function creates a collision shape from the specified garage.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Cursor functions ===&lt;br /&gt;
*[[getCursorMovedOn]] &amp;lt;span style=&amp;quot;color:gray; 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-size:smaller;&amp;quot;&amp;gt;» This function draws an animated 2D window on the screen.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawBorderedRectangle]] &amp;lt;span style=&amp;quot;color:gray; 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;
*[[dxDrawBorderedText]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This is a function that will create a bordered text.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawDashedLine]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function draws a line with dashes.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawGifImage]] &amp;lt;span style=&amp;quot;color:gray; 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-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-size:smaller;&amp;quot;&amp;gt;» This function draws an image on any element.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawLinedRectangle]] &amp;lt;span style=&amp;quot;color:gray; 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;
*[[dxDrawLoading]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function draws a loading bar on the screen.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawOctagon3D]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function creates a 3D Octagon&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawPolygon]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function draws a custom polygon on the screen.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawProgressBar]] &amp;lt;span style=&amp;quot;color:gray; 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-size:smaller;&amp;quot;&amp;gt;» This function draws a 3D rectangle in GTA world.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawRectangleOnPlayer]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function draws a 3D rectangle above the player.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawRing]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function draws a ring with dx lines.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawRombo]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function creates a Rhombus.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawSprite]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function draw a sprite in the 3D world.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawTextOnElement]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function draws a text on any element.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawTextOnRectangle]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» Esta funcion crea un rectangle con un texto dentro.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawTriangle]] &amp;lt;span style=&amp;quot;color:gray; 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;
*[[dxGetFontSizeFromHeight]] &amp;lt;span style=&amp;quot;color:gray; 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-size:smaller;&amp;quot;&amp;gt;» This function calculates the height of a font.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getScreenStartPositionFromBox]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function helps with getting the correct position for your dx-effects.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[wordWrap]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function breaks a long string into a table of separate lines limited to a specific length in pixels, for drawing separately.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[CreateRectangle3D]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This is a function that will create a 3d rectangle on the player screen.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[DxDrawBordered3DLine]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;»This function creates a bordered area with 3D dx lines.&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-size:smaller;&amp;quot;&amp;gt;» This function allows you attach an effect to an element.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[setScreenFlash]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function will make the screen flash(like a screenshot).&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Element functions === &lt;br /&gt;
*[[autoAttach]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function attaches one element into another at the same position and rotation they are.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isElementPlayer]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function checks whether the element is a player or not.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[attachElementToBone]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to attach an element to ped bone accurately using new bone functions.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getElementsInDimension]] &amp;lt;span style=&amp;quot;color:gray; 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;
*[[getElementSpeed]] &amp;lt;span style=&amp;quot;color:gray; 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;
*[[getElementsWithinMarker]] &amp;lt;span style=&amp;quot;color:gray; 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;
*[[getElementUsingData]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns table elements that contains the elements data with the given key and value.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getNearestElement]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns the nearest element (of a specific type) to a player.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isElementInPhotograph]] &amp;lt;span style=&amp;quot;color:gray; 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-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-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-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;
*[[isElementInAir]]&amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function checks if an element is in air or not.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[multi_check]] &amp;lt;span style=&amp;quot;color:gray; 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-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;
*[[getElementDirectionCardialPoint]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns the direction of the element according to the ''wind rose''.&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-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-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-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-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;
*[[isCommandHandlerAdded]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to check if a command is added or not in the respective resource.&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-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-size:smaller;&amp;quot;&amp;gt;» This function capitalizes a given string.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[convertDate]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function converts date to another look.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[convertServerTickToTimeStamp]] &amp;lt;span style=&amp;quot;color:gray; 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-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;
*[[findRotation3D]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function takes two sets of XYZ coordinates. It returns the 3D direction from point A to point B.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[findRotation]] &amp;lt;span style=&amp;quot;color:gray; 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-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;
*[[formatNumber]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function formats large numbers by adding commas.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[generateRandomASCIIString]] &amp;lt;span style=&amp;quot;color:gray; 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;
*[[generateString]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function generates a random string with any characters.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getAge]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function calculates the age of a given birthday.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getDistanceBetweenElements]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» Returns the distance between two elements.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getDistanceBetweenPointAndSegment2D]] &amp;lt;span style=&amp;quot;color:gray; 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-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;
*[[getElementRelatedAngle]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns the related angle between one element to another. This is useful to check which side an element is to another.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getFreeDimension]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function get free dimension.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getKeyFromValueInTable]] &amp;lt;span style=&amp;quot;color:gray; 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-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-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;
*[[getRealMonth]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns the current month name&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-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-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;
*[[gradientString]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function transforms a string in a new coloured gradient string.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[hex2rgb]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function convert hex to rgb.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[hexColorToRGB]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function convert hex string/number to RGBA values.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isLeapYear]] &amp;lt;span style=&amp;quot;color:gray; 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-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-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-size:smaller;&amp;quot;&amp;gt;» This function returns a string representing the color in hexadecimal.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[RGBToHSV]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function convert RGB to HSV color space.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[RGBToDecimal]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function convert RGB to Decimal color.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[secondsToTimeDesc]] &amp;lt;span style=&amp;quot;color:gray; 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-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-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;
*[[string.insert]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function inserts a string within another string at a given position.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[switch]] &amp;lt;span style=&amp;quot;color:gray; 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;
*[[tocolor2rgba]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function convert tocolor to rgba.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[toHex]] &amp;lt;span style=&amp;quot;color:gray; 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;
*[[var dump]] &amp;lt;span style=&amp;quot;color:gray; 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-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-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;
*[[guiMoveElement]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function moves guiElement by/like using moveObject.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[guiSetStaticImageMovable]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to move a static image like a gui window.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isMouseOnGUICloseButton]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to check whether the mouse cursor/pointer is within a gui-window's native close button.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isMouseOnGuiElement]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to check whether or not your mouse is over a specific gui element, this is especially useful if the gui element has a parent. &amp;lt;/span&amp;gt;&lt;br /&gt;
=====Comboboxes=====&lt;br /&gt;
*[[guiComboBoxAdjustHeight]] &amp;lt;span style=&amp;quot;color:gray; 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;
&lt;br /&gt;
=====Gridlists=====&lt;br /&gt;
*[[convertGridListToText]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function converts grid list contents to text.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getGridListRowIndexFromText]] &amp;lt;span style=&amp;quot;color:gray; 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;
*[[guiGridListAddPlayers]] &amp;lt;span style=&amp;quot;color:gray; 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;
*[[guiGridListGetColumnIDFromTitle]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function gets a gridlist's column ID from the column title.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[guiGridListGetSelectedText]] &amp;lt;span style=&amp;quot;color:gray; 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;
*[[guiGridListSetColumnNonSortable]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function makes a gridlist column become non-sortable.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isTextInGridList]] &amp;lt;span style=&amp;quot;color:gray; 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;
=====Labels=====&lt;br /&gt;
*[[guiLabelAddEffect]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function add an effects to the gui-label like (shadow, outline).&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Marker functions ===&lt;br /&gt;
*[[createMarkerAttachedTo]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function creates a marker that is attached to an element.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Math functions ===&lt;br /&gt;
*[[math.clamp]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns the number between range of numbers or it's minimum or maximum.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[math.getBezierPoint]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» Get N-th order bezier point.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[math.hypot]] &amp;lt;span style=&amp;quot;color:gray; 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.isPointInPolygon]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» Check if point is inside polygon or not.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[math.lerp]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» Get val between two integer.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[math.percent]] &amp;lt;span style=&amp;quot;color:gray; 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.polygonArea]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» Compute area of any polygon.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[math.randomDiff]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» Generates a pseudo-random integer that's always different from the last random number generated.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[math.rotVecToEulerAngle]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» Rotation Vector To Euler Angle&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[math.round]] &amp;lt;span style=&amp;quot;color:gray; 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;
*[[mathNumber]] &amp;lt;span style=&amp;quot;color:gray; 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;
*[[reMap]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» Re-maps a number from one range to another.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[Math.percentProgress|math.percentProgress]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» Returns a percentage progress from two specific values.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[math.average]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns the simple arithmetic mean of multiple numbers.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Map functions ===&lt;br /&gt;
*[[assignLod]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function lets you conveniently generate and apply a LOD model to a mapping object.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getWorldPositionFromMapPosition]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function converts an F11 map position to world position.&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-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-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;
*[[getGuestPlayers]] &amp;lt;span style=&amp;quot;color:gray; 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;
*[[getOnlineAdmins]] &amp;lt;span style=&amp;quot;color:gray; 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;
*[[getPedEyesPosition]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to get peds eyes position.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPedGender]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to get peds their gender.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPedMaxHealth]] &amp;lt;span style=&amp;quot;color:gray; 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-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;
*[[getPedWeaponSkill]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns a ped's corresponding weapon skill level name.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPedHitBone]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function gets the approximate number of the bone where the ped is hit.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPlayerFromNamePart]] &amp;lt;span style=&amp;quot;color:gray; 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-size:smaller;&amp;quot;&amp;gt;» This function returns a player from their serial.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPlayersByData]] &amp;lt;span style=&amp;quot;color:gray; 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-size:smaller;&amp;quot;&amp;gt;» This function returns a table of all players in photograph.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPlayersInVehicles]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table of the players insides vehicles from a specified dimension.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isPedAiming]]&amp;lt;span style=&amp;quot;color:gray; 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;
*[[isPedAimingNearPed]] &amp;lt;span style=&amp;quot;color:gray; 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;
*[[isPedDiving]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This feature checks that pedestrian is diving in the water.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isPedDrivingVehicle]] &amp;lt;span style=&amp;quot;color:gray; 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-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;
*[[setPedAttack]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function will make a ped attack a specified target.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[setPedFollow]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function will make a ped follow a specified target.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPlayerNameFromID]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function will get the player name from the ID element data.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Player functions ===&lt;br /&gt;
*[[countPlayersInRange]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns the number of players that are within a certain range of the specified coordinates.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPlayerPreviousAndNextWeapon]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns the player previous and next weapon.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPlayersInRange]]&amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function make a table of players within certain range.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isPlayerActuallyInVehicle]]&amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function checks if a player is actually in a vehicle instead of just in the process of entering.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isPlayerHitByVehicle]]&amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function cancels event when a element is hit by a vehicle.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[warpToPlayer]]&amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function make player warp to another player.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Resource functions ===&lt;br /&gt;
*[[getFilesInResourceFolder]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function gets a list of files that are inside a folder of a resource.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getResourceScripts]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table of the resource scripts.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getResourceSettings]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table of the resource settings.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getResourceSize]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns the size of a specified resource in kB(kilobyte)&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[refreshResource]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function refreshes your resource if you changed any of the files&lt;br /&gt;
*[[setResourcePriority]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function set resource download priority group.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Sound functions ===&lt;br /&gt;
*[[isSoundFinished]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function checks if a sound element has finished.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isSoundPlaying]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function checks if a sound element is playing or not.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[stopSoundSlowly]] &amp;lt;span style=&amp;quot;color:gray; 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;
=== Browser functions ===&lt;br /&gt;
*[[playVideo]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function plays a video on the screen.&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-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-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 functions ===&lt;br /&gt;
*[[findEmptyCarSeat]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function finds you the first empty seat in a vehicle.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getNearestVehicle]] &amp;lt;span style=&amp;quot;color:gray; 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;
*[[getRandomVehicle]] &amp;lt;span style=&amp;quot;color:gray; 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-size:smaller;&amp;quot;&amp;gt;» This function returns a table of all valid vehicle models.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getVehiclesCountByType]] &amp;lt;span style=&amp;quot;color:gray; 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;
*[[getVehicleTurnVelocityCenterOfMass]]&amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function gets a vehicle's turn velocity relative to the vehicle's center or mass.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isVehicleDoubleExhaust]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function checks is exhaust vehicle double.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isVehicleEmpty]] &amp;lt;span style=&amp;quot;color:gray; 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-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-size:smaller;&amp;quot;&amp;gt;» This function checks whether vehicle is on roof.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isVehicleOnFire]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function checks if the vehicle is on fire or not.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isVehicleReversing]] &amp;lt;span style=&amp;quot;color:gray; 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;
*[[isVehicleUpgraded]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function checks is vehicle upgraded by upgrade ID.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[setVehicleGravityPoint]] &amp;lt;span style=&amp;quot;color:gray; 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;
*[[setVehicleTurnVelocityCenterOfMass]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function sets a vehicle's turn velocity relative to the vehicle's center or mass.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[setVehicleHandlingFromText]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function sets a vehicle's handling from text.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[setVehicleWheelModel]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function changes the wheel model of the informed vehicle.&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-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;
=== Object functions ===&lt;br /&gt;
*[[getDynamicDoorObjectOpenRatio]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function tells you how open a dynamic door is in a range from 0 to 1.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isElementObject]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function tells you if an element is an object or no.&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-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;
=== Engine functions ===&lt;br /&gt;
*[[engineGetCOLsFromLibrary]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function gets the collision data from the col library.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[engineLoadIMGContainer]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function loads the IMG container.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Utility ===&lt;br /&gt;
*[[animate]] &amp;lt;span style=&amp;quot;color:gray; 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;
*[[callClientFunction]] &amp;lt;span style=&amp;quot;color:gray; 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-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;
*[[check]] &amp;lt;span style=&amp;quot;color:gray; 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;
*[[checkPassiveTimer]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to use passive timers in your conditions. For example you want to prevent players repeatedly using a command.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[coroutine.resume]] &amp;lt;span style=&amp;quot;color:gray; 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;
*[[compact]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function create table containing variables and their values.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getBanFromName]] &amp;lt;span style=&amp;quot;color:gray; 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-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;
*[[getSkinNameFromID]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns the name of the skin from the given id.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[IfElse]] &amp;lt;span style=&amp;quot;color:gray; 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;
*[[isCharInString]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This shared function allows you to check if a char specified is in a string value.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isMouseInCircle]] &amp;lt;span style=&amp;quot;color:gray; 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-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-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;
*[[PlotTrajectoryAtTime]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» Calculate projectile/water trajectory.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[preprocessor]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function allow you to use gcc macros.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[vector3:compare]] &amp;lt;span style=&amp;quot;color:gray; 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;
*[[svgCreateRoundedRectangle]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function creates a rectangle with rounded edges.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;[[Category:Useful Functions]]&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>AirNewSCR</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetVehicleWheelModel&amp;diff=77158</id>
		<title>SetVehicleWheelModel</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetVehicleWheelModel&amp;diff=77158"/>
		<updated>2023-07-10T16:47:19Z</updated>

		<summary type="html">&lt;p&gt;AirNewSCR: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Useful_Function}} __NOTOC__&lt;br /&gt;
This function changes the wheel model of the informed vehicle.&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
int setVehicleWheelModel(element veh, int wheelId)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Required arguments==&lt;br /&gt;
* '''veh''': The vehicle you want to change the wheel.&lt;br /&gt;
* '''wheelId''': The ID of the new wheel you want.&lt;br /&gt;
&lt;br /&gt;
==Returns==&lt;br /&gt;
Returns the ID of the new wheel if successfully changed, otherwise it returns false.&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server/Clientside 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;
validWheels = {[1025] = true, [1073] = true, [1074] = true, [1075] = true, [1076] = true, [1077] = true, [1078] = true, [1079] = true, [1080] = true, [1081] = true, [1082] = true, [1083] = true, [1084] = true, [1085] = true, [1096] = true, [1097] = true, [1098] = true}&lt;br /&gt;
&lt;br /&gt;
function setVehicleWheelModel(veh, wheelId)&lt;br /&gt;
    if veh and isElement(veh) then&lt;br /&gt;
        if validWheels[tonumber(wheelId)] then&lt;br /&gt;
            local success = addVehicleUpgrade(veh, tonumber(wheelId))&lt;br /&gt;
            if success then&lt;br /&gt;
                return wheelId&lt;br /&gt;
            end&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;
'''Author:''' AirNewSCR&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;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addCommandHandler(&amp;quot;wset&amp;quot;, function(player, _, wheelId)&lt;br /&gt;
    if wheelId and tonumber(wheelId) then&lt;br /&gt;
        local veh = getPedOccupiedVehicle(player)&lt;br /&gt;
        if veh and isElement(veh) then&lt;br /&gt;
            local result = setVehicleWheelModel(veh, wheelId)&lt;br /&gt;
            if result then&lt;br /&gt;
                outputChatBox(&amp;quot;Wheel id is now &amp;quot;..result, player, 0, 255, 0)&lt;br /&gt;
            else&lt;br /&gt;
                outputChatBox(&amp;quot;Error!&amp;quot;, player, 255, 0, 0)&lt;br /&gt;
            end&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
end)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Useful_Functions}}&lt;/div&gt;</summary>
		<author><name>AirNewSCR</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Template:Useful_Functions&amp;diff=77157</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=77157"/>
		<updated>2023-07-10T16:46:08Z</updated>

		<summary type="html">&lt;p&gt;AirNewSCR: /* Vehicle functions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
=== Table functions ===&lt;br /&gt;
*[[addTableChangeHandler]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function monitors the changes of a table.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getTableFromSql]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This functionality is used to obtain saved tables using the function ([https://wiki.multitheftauto.com/wiki/SetTableToSql SetTableToSql ]).&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isValueInTable]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns true if the value exists in the table, false if the value does not exist in the table.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[pairsByKeys]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function sort pairs table.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[rangeToTable]] &amp;lt;span style=&amp;quot;color:gray; 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-size:smaller;&amp;quot;&amp;gt;» This function protects a table and makes it read-only.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[setTableToSql]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function is used to save the table in the database (sql).&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[Sort_Functions]] &amp;lt;span style=&amp;quot;color:gray; 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;
*[[table.compare]] &amp;lt;span style=&amp;quot;color:gray; 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.copy]] &amp;lt;span style=&amp;quot;color:gray; 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.deepmerge]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function deep merges two tables. Every nested table will be correspondingly merged.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[table.element]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns a new table with only userdata content.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[table.empty]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function checks whether a table is empty.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[table.fromString]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function converts string to a table.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[table.getRandomRows]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns random rows from table.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[table.map]] &amp;lt;span style=&amp;quot;color:gray; 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-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-size:smaller;&amp;quot;&amp;gt;» This function retrieves a random value from a table.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[table.removeValue]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function removes a specified value from a table.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[table.size]] &amp;lt;span style=&amp;quot;color:gray; 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.toString]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function converts table to a string.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== ACL functions ===&lt;br /&gt;
*[[aclGroupClone]] &amp;lt;span style=&amp;quot;color:gray; 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;
*[[getAccountsRanks]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function is used to detect the account name groups and put them in the chat.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPlayerAcls]] &amp;lt;span style=&amp;quot;color:gray; 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;
*[[getPlayersInACLGroup]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns all players in an ACL group.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isPlayerInACL]] &amp;lt;span style=&amp;quot;color:gray; 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-size:smaller;&amp;quot;&amp;gt;» This function gives an existing ACL group a new name.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isPlayerACLAdmin]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function checks if a player element belong to Admin group in ACL&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Account functions ===&lt;br /&gt;
*[[getPlayerFromAccountName]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function is used to obtain a player by the name of his 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-size:smaller;&amp;quot;&amp;gt;» This function allows you to create a cinematic camera flight.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Colshape functions ===&lt;br /&gt;
*[[createGarageColShape]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function creates a collision shape from the specified garage.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Cursor functions ===&lt;br /&gt;
*[[getCursorMovedOn]] &amp;lt;span style=&amp;quot;color:gray; 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-size:smaller;&amp;quot;&amp;gt;» This function draws an animated 2D window on the screen.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawBorderedRectangle]] &amp;lt;span style=&amp;quot;color:gray; 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;
*[[dxDrawBorderedText]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This is a function that will create a bordered text.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawDashedLine]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function draws a line with dashes.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawGifImage]] &amp;lt;span style=&amp;quot;color:gray; 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-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-size:smaller;&amp;quot;&amp;gt;» This function draws an image on any element.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawLinedRectangle]] &amp;lt;span style=&amp;quot;color:gray; 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;
*[[dxDrawLoading]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function draws a loading bar on the screen.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawOctagon3D]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function creates a 3D Octagon&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawPolygon]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function draws a custom polygon on the screen.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawProgressBar]] &amp;lt;span style=&amp;quot;color:gray; 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-size:smaller;&amp;quot;&amp;gt;» This function draws a 3D rectangle in GTA world.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawRectangleOnPlayer]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function draws a 3D rectangle above the player.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawRing]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function draws a ring with dx lines.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawRombo]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function creates a Rhombus.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawSprite]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function draw a sprite in the 3D world.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawTextOnElement]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function draws a text on any element.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawTextOnRectangle]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» Esta funcion crea un rectangle con un texto dentro.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawTriangle]] &amp;lt;span style=&amp;quot;color:gray; 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;
*[[dxGetFontSizeFromHeight]] &amp;lt;span style=&amp;quot;color:gray; 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-size:smaller;&amp;quot;&amp;gt;» This function calculates the height of a font.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getScreenStartPositionFromBox]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function helps with getting the correct position for your dx-effects.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[wordWrap]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function breaks a long string into a table of separate lines limited to a specific length in pixels, for drawing separately.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[CreateRectangle3D]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This is a function that will create a 3d rectangle on the player screen.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[DxDrawBordered3DLine]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;»This function creates a bordered area with 3D dx lines.&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-size:smaller;&amp;quot;&amp;gt;» This function allows you attach an effect to an element.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[setScreenFlash]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function will make the screen flash(like a screenshot).&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Element functions === &lt;br /&gt;
*[[autoAttach]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function attaches one element into another at the same position and rotation they are.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isElementPlayer]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function checks whether the element is a player or not.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[attachElementToBone]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to attach an element to ped bone accurately using new bone functions.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getElementsInDimension]] &amp;lt;span style=&amp;quot;color:gray; 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;
*[[getElementSpeed]] &amp;lt;span style=&amp;quot;color:gray; 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;
*[[getElementsWithinMarker]] &amp;lt;span style=&amp;quot;color:gray; 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;
*[[getElementUsingData]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns table elements that contains the elements data with the given key and value.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getNearestElement]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns the nearest element (of a specific type) to a player.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isElementInPhotograph]] &amp;lt;span style=&amp;quot;color:gray; 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-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-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-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;
*[[isElementInAir]]&amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function checks if an element is in air or not.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[multi_check]] &amp;lt;span style=&amp;quot;color:gray; 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-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;
*[[getElementDirectionCardialPoint]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns the direction of the element according to the ''wind rose''.&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-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-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-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-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;
*[[isCommandHandlerAdded]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to check if a command is added or not in the respective resource.&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-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-size:smaller;&amp;quot;&amp;gt;» This function capitalizes a given string.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[convertDate]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function converts date to another look.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[convertServerTickToTimeStamp]] &amp;lt;span style=&amp;quot;color:gray; 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-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;
*[[findRotation3D]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function takes two sets of XYZ coordinates. It returns the 3D direction from point A to point B.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[findRotation]] &amp;lt;span style=&amp;quot;color:gray; 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-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;
*[[formatNumber]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function formats large numbers by adding commas.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[generateRandomASCIIString]] &amp;lt;span style=&amp;quot;color:gray; 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;
*[[generateString]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function generates a random string with any characters.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getAge]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function calculates the age of a given birthday.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getDistanceBetweenElements]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» Returns the distance between two elements.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getDistanceBetweenPointAndSegment2D]] &amp;lt;span style=&amp;quot;color:gray; 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-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;
*[[getElementRelatedAngle]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns the related angle between one element to another. This is useful to check which side an element is to another.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getFreeDimension]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function get free dimension.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getKeyFromValueInTable]] &amp;lt;span style=&amp;quot;color:gray; 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-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-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;
*[[getRealMonth]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns the current month name&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-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-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;
*[[gradientString]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function transforms a string in a new coloured gradient string.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[hex2rgb]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function convert hex to rgb.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[hexColorToRGB]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function convert hex string/number to RGBA values.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isLeapYear]] &amp;lt;span style=&amp;quot;color:gray; 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-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-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-size:smaller;&amp;quot;&amp;gt;» This function returns a string representing the color in hexadecimal.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[RGBToHSV]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function convert RGB to HSV color space.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[RGBToDecimal]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function convert RGB to Decimal color.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[secondsToTimeDesc]] &amp;lt;span style=&amp;quot;color:gray; 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-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-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;
*[[string.insert]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function inserts a string within another string at a given position.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[switch]] &amp;lt;span style=&amp;quot;color:gray; 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;
*[[tocolor2rgba]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function convert tocolor to rgba.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[toHex]] &amp;lt;span style=&amp;quot;color:gray; 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;
*[[var dump]] &amp;lt;span style=&amp;quot;color:gray; 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-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-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;
*[[guiMoveElement]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function moves guiElement by/like using moveObject.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[guiSetStaticImageMovable]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to move a static image like a gui window.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isMouseOnGUICloseButton]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to check whether the mouse cursor/pointer is within a gui-window's native close button.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isMouseOnGuiElement]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to check whether or not your mouse is over a specific gui element, this is especially useful if the gui element has a parent. &amp;lt;/span&amp;gt;&lt;br /&gt;
=====Comboboxes=====&lt;br /&gt;
*[[guiComboBoxAdjustHeight]] &amp;lt;span style=&amp;quot;color:gray; 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;
&lt;br /&gt;
=====Gridlists=====&lt;br /&gt;
*[[convertGridListToText]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function converts grid list contents to text.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getGridListRowIndexFromText]] &amp;lt;span style=&amp;quot;color:gray; 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;
*[[guiGridListAddPlayers]] &amp;lt;span style=&amp;quot;color:gray; 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;
*[[guiGridListGetColumnIDFromTitle]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function gets a gridlist's column ID from the column title.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[guiGridListGetSelectedText]] &amp;lt;span style=&amp;quot;color:gray; 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;
*[[guiGridListSetColumnNonSortable]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function makes a gridlist column become non-sortable.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isTextInGridList]] &amp;lt;span style=&amp;quot;color:gray; 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;
=====Labels=====&lt;br /&gt;
*[[guiLabelAddEffect]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function add an effects to the gui-label like (shadow, outline).&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Marker functions ===&lt;br /&gt;
*[[createMarkerAttachedTo]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function creates a marker that is attached to an element.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Math functions ===&lt;br /&gt;
*[[math.clamp]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns the number between range of numbers or it's minimum or maximum.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[math.getBezierPoint]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» Get N-th order bezier point.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[math.hypot]] &amp;lt;span style=&amp;quot;color:gray; 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.isPointInPolygon]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» Check if point is inside polygon or not.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[math.lerp]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» Get val between two integer.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[math.percent]] &amp;lt;span style=&amp;quot;color:gray; 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.polygonArea]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» Compute area of any polygon.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[math.randomDiff]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» Generates a pseudo-random integer that's always different from the last random number generated.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[math.rotVecToEulerAngle]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» Rotation Vector To Euler Angle&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[math.round]] &amp;lt;span style=&amp;quot;color:gray; 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;
*[[mathNumber]] &amp;lt;span style=&amp;quot;color:gray; 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;
*[[reMap]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» Re-maps a number from one range to another.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[Math.percentProgress|math.percentProgress]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» Returns a percentage progress from two specific values.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[math.average]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns the simple arithmetic mean of multiple numbers.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Map functions ===&lt;br /&gt;
*[[assignLod]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function lets you conveniently generate and apply a LOD model to a mapping object.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getWorldPositionFromMapPosition]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function converts an F11 map position to world position.&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-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-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;
*[[getGuestPlayers]] &amp;lt;span style=&amp;quot;color:gray; 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;
*[[getOnlineAdmins]] &amp;lt;span style=&amp;quot;color:gray; 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;
*[[getPedEyesPosition]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to get peds eyes position.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPedGender]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to get peds their gender.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPedMaxHealth]] &amp;lt;span style=&amp;quot;color:gray; 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-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;
*[[getPedWeaponSkill]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns a ped's corresponding weapon skill level name.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPedHitBone]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function gets the approximate number of the bone where the ped is hit.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPlayerFromNamePart]] &amp;lt;span style=&amp;quot;color:gray; 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-size:smaller;&amp;quot;&amp;gt;» This function returns a player from their serial.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPlayersByData]] &amp;lt;span style=&amp;quot;color:gray; 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-size:smaller;&amp;quot;&amp;gt;» This function returns a table of all players in photograph.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPlayersInVehicles]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table of the players insides vehicles from a specified dimension.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isPedAiming]]&amp;lt;span style=&amp;quot;color:gray; 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;
*[[isPedAimingNearPed]] &amp;lt;span style=&amp;quot;color:gray; 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;
*[[isPedDiving]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This feature checks that pedestrian is diving in the water.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isPedDrivingVehicle]] &amp;lt;span style=&amp;quot;color:gray; 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-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;
*[[setPedAttack]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function will make a ped attack a specified target.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[setPedFollow]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function will make a ped follow a specified target.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPlayerNameFromID]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function will get the player name from the ID element data.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Player functions ===&lt;br /&gt;
*[[countPlayersInRange]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns the number of players that are within a certain range of the specified coordinates.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPlayerPreviousAndNextWeapon]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns the player previous and next weapon.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPlayersInRange]]&amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function make a table of players within certain range.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isPlayerActuallyInVehicle]]&amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function checks if a player is actually in a vehicle instead of just in the process of entering.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isPlayerHitByVehicle]]&amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function cancels event when a element is hit by a vehicle.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[warpToPlayer]]&amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function make player warp to another player.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Resource functions ===&lt;br /&gt;
*[[getFilesInResourceFolder]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function gets a list of files that are inside a folder of a resource.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getResourceScripts]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table of the resource scripts.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getResourceSettings]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table of the resource settings.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getResourceSize]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns the size of a specified resource in kB(kilobyte)&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[refreshResource]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function refreshes your resource if you changed any of the files&lt;br /&gt;
*[[setResourcePriority]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function set resource download priority group.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Sound functions ===&lt;br /&gt;
*[[isSoundFinished]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function checks if a sound element has finished.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isSoundPlaying]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function checks if a sound element is playing or not.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[stopSoundSlowly]] &amp;lt;span style=&amp;quot;color:gray; 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;
=== Browser functions ===&lt;br /&gt;
*[[playVideo]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function plays a video on the screen.&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-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-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 functions ===&lt;br /&gt;
*[[findEmptyCarSeat]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function finds you the first empty seat in a vehicle.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getNearestVehicle]] &amp;lt;span style=&amp;quot;color:gray; 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;
*[[getRandomVehicle]] &amp;lt;span style=&amp;quot;color:gray; 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-size:smaller;&amp;quot;&amp;gt;» This function returns a table of all valid vehicle models.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getVehiclesCountByType]] &amp;lt;span style=&amp;quot;color:gray; 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;
*[[getVehicleTurnVelocityCenterOfMass]]&amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function gets a vehicle's turn velocity relative to the vehicle's center or mass.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isVehicleDoubleExhaust]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function checks is exhaust vehicle double.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isVehicleEmpty]] &amp;lt;span style=&amp;quot;color:gray; 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-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-size:smaller;&amp;quot;&amp;gt;» This function checks whether vehicle is on roof.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isVehicleOnFire]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function checks if the vehicle is on fire or not.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isVehicleReversing]] &amp;lt;span style=&amp;quot;color:gray; 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;
*[[isVehicleUpgraded]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function checks is vehicle upgraded by upgrade ID.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[setVehicleGravityPoint]] &amp;lt;span style=&amp;quot;color:gray; 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;
*[[setVehicleTurnVelocityCenterOfMass]]&amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function sets a vehicle's turn velocity relative to the vehicle's center or mass.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[setVehicleHandlingFromText]]&amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function sets a vehicle's handling from text.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[setVehicleWheelModel]]&amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function changes the wheel model of the informed vehicle.&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-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;
=== Object functions ===&lt;br /&gt;
*[[getDynamicDoorObjectOpenRatio]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function tells you how open a dynamic door is in a range from 0 to 1.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isElementObject]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function tells you if an element is an object or no.&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-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;
=== Engine functions ===&lt;br /&gt;
*[[engineGetCOLsFromLibrary]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function gets the collision data from the col library.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[engineLoadIMGContainer]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function loads the IMG container.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Utility ===&lt;br /&gt;
*[[animate]] &amp;lt;span style=&amp;quot;color:gray; 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;
*[[callClientFunction]] &amp;lt;span style=&amp;quot;color:gray; 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-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;
*[[check]] &amp;lt;span style=&amp;quot;color:gray; 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;
*[[checkPassiveTimer]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to use passive timers in your conditions. For example you want to prevent players repeatedly using a command.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[coroutine.resume]] &amp;lt;span style=&amp;quot;color:gray; 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;
*[[compact]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function create table containing variables and their values.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getBanFromName]] &amp;lt;span style=&amp;quot;color:gray; 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-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;
*[[getSkinNameFromID]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function returns the name of the skin from the given id.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[IfElse]] &amp;lt;span style=&amp;quot;color:gray; 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;
*[[isCharInString]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This shared function allows you to check if a char specified is in a string value.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isMouseInCircle]] &amp;lt;span style=&amp;quot;color:gray; 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-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-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;
*[[PlotTrajectoryAtTime]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» Calculate projectile/water trajectory.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[preprocessor]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function allow you to use gcc macros.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[vector3:compare]] &amp;lt;span style=&amp;quot;color:gray; 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;
*[[svgCreateRoundedRectangle]] &amp;lt;span style=&amp;quot;color:gray; font-size:smaller;&amp;quot;&amp;gt;» This function creates a rectangle with rounded edges.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;[[Category:Useful Functions]]&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>AirNewSCR</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetVehicleWheelModel&amp;diff=77156</id>
		<title>SetVehicleWheelModel</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetVehicleWheelModel&amp;diff=77156"/>
		<updated>2023-07-10T16:45:13Z</updated>

		<summary type="html">&lt;p&gt;AirNewSCR: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Useful_Function}} __NOTOC__&lt;br /&gt;
This function changes the wheel model of the informed vehicle.&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
int setVehicleWheelsModel(element veh, int wheelId)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Required arguments==&lt;br /&gt;
* '''veh''': The vehicle you want to change the wheel.&lt;br /&gt;
* '''wheelId''': The ID of the new wheel you want.&lt;br /&gt;
&lt;br /&gt;
==Returns==&lt;br /&gt;
Returns the ID of the new wheel if successfully changed, otherwise it returns false.&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server/Clientside 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;
validWheels = {[1025] = true, [1073] = true, [1074] = true, [1075] = true, [1076] = true, [1077] = true, [1078] = true, [1079] = true, [1080] = true, [1081] = true, [1082] = true, [1083] = true, [1084] = true, [1085] = true, [1096] = true, [1097] = true, [1098] = true}&lt;br /&gt;
&lt;br /&gt;
function setVehicleWheelModel(veh, wheelId)&lt;br /&gt;
    if veh and isElement(veh) then&lt;br /&gt;
        if validWheels[tonumber(wheelId)] then&lt;br /&gt;
            local success = addVehicleUpgrade(veh, tonumber(wheelId))&lt;br /&gt;
            if success then&lt;br /&gt;
                return wheelId&lt;br /&gt;
            end&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;
'''Author:''' AirNewSCR&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;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addCommandHandler(&amp;quot;wset&amp;quot;, function(player, _, wheelId)&lt;br /&gt;
    if wheelId and tonumber(wheelId) then&lt;br /&gt;
        local veh = getPedOccupiedVehicle(player)&lt;br /&gt;
        if veh and isElement(veh) then&lt;br /&gt;
            local result = setVehicleWheelModel(veh, wheelId)&lt;br /&gt;
            if result then&lt;br /&gt;
                outputChatBox(&amp;quot;Wheel id is now &amp;quot;..result, player, 0, 255, 0)&lt;br /&gt;
            else&lt;br /&gt;
                outputChatBox(&amp;quot;Error!&amp;quot;, player, 255, 0, 0)&lt;br /&gt;
            end&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
end)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Useful_Functions}}&lt;/div&gt;</summary>
		<author><name>AirNewSCR</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetVehicleWheelModel&amp;diff=77155</id>
		<title>SetVehicleWheelModel</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetVehicleWheelModel&amp;diff=77155"/>
		<updated>2023-07-10T02:57:07Z</updated>

		<summary type="html">&lt;p&gt;AirNewSCR: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Useful_Function}} __NOTOC__&lt;br /&gt;
This function changes the wheel model of the informed vehicle.&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
int setVehicleWheelsModel(element veh, int wheelId)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Required arguments==&lt;br /&gt;
* '''veh''': The vehicle you want to change the wheel.&lt;br /&gt;
* '''wheelId''': The ID of the new wheel you want.&lt;br /&gt;
&lt;br /&gt;
==Returns==&lt;br /&gt;
Returns the ID of the new wheel if successfully changed, otherwise it returns false.&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server/Clientside 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;
validWheels = {[1025] = true, [1073] = true, [1074] = true, [1075] = true, [1076] = true, [1077] = true, [1078] = true, [1079] = true, [1080] = true, [1081] = true, [1082] = true, [1083] = true, [1084] = true, [1085] = true, [1096] = true, [1097] = true, [1098] = true}&lt;br /&gt;
&lt;br /&gt;
function setVehicleWheelsModel(veh, wheelId)&lt;br /&gt;
    if veh and isElement(veh) then&lt;br /&gt;
        if validWheels[tonumber(wheelId)] then&lt;br /&gt;
            local success = addVehicleUpgrade(veh, tonumber(wheelId))&lt;br /&gt;
            if success then&lt;br /&gt;
                return wheelId&lt;br /&gt;
            end&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;
'''Author:''' AirNewSCR&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;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addCommandHandler(&amp;quot;wset&amp;quot;, function(player, _, wheelId)&lt;br /&gt;
    if wheelId and tonumber(wheelId) then&lt;br /&gt;
        local veh = getPedOccupiedVehicle(player)&lt;br /&gt;
        if veh and isElement(veh) then&lt;br /&gt;
            local result = setVehicleWheelsModel(veh, wheelId)&lt;br /&gt;
            if result then&lt;br /&gt;
                outputChatBox(&amp;quot;Wheel id is now &amp;quot;..result, player, 0, 255, 0)&lt;br /&gt;
            else&lt;br /&gt;
                outputChatBox(&amp;quot;Error!&amp;quot;, player, 255, 0, 0)&lt;br /&gt;
            end&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
end)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Useful_Functions}}&lt;/div&gt;</summary>
		<author><name>AirNewSCR</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetVehicleWheelModel&amp;diff=77154</id>
		<title>SetVehicleWheelModel</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetVehicleWheelModel&amp;diff=77154"/>
		<updated>2023-07-10T02:56:39Z</updated>

		<summary type="html">&lt;p&gt;AirNewSCR: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Useful_Function}} __NOTOC__&lt;br /&gt;
This function changes the wheel model of the informed vehicle.&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
int setVehicleWheelsModel(element veh, int wheelId)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Required arguments==&lt;br /&gt;
* '''veh''': The vehicle you want to change the wheel.&lt;br /&gt;
* '''wheelId''': The ID of the new wheel you want.&lt;br /&gt;
&lt;br /&gt;
==Returns==&lt;br /&gt;
Returns the ID of the new wheel if successfully changed, otherwise it returns false.&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server/Clientside 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;
validWheels = {[1025] = true, [1073] = true, [1074] = true, [1075] = true, [1076] = true, [1077] = true, [1078] = true, [1079] = true, [1080] = true, [1081] = true, [1082] = true, [1083] = true, [1084] = true, [1085] = true, [1096] = true, [1097] = true, [1098] = true}&lt;br /&gt;
&lt;br /&gt;
function setVehicleWheelsModel(veh, wheelId)&lt;br /&gt;
    if veh and isElement(veh) then&lt;br /&gt;
        if validWheels[tonumber(wheelId)] then&lt;br /&gt;
            local success = addVehicleUpgrade(veh, tonumber(wheelId))&lt;br /&gt;
            if success then&lt;br /&gt;
                return wheelId&lt;br /&gt;
            end&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;
'''Author:''' AirNewSCR&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;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addCommandHandler(&amp;quot;wset&amp;quot;, function(player, _, wheelId)&lt;br /&gt;
    if wheelId and tonumber(wheelId) then&lt;br /&gt;
        local veh = getPedOccupiedVehicle(player)&lt;br /&gt;
        if veh and isElement(veh) then&lt;br /&gt;
            local result = setVehicleWheelsModel(veh, wheelId)&lt;br /&gt;
            if result then&lt;br /&gt;
                outputChatBox(&amp;quot;Wheel id is now 1000&amp;quot;, player, 0, 255, 0)&lt;br /&gt;
            else&lt;br /&gt;
                outputChatBox(&amp;quot;Error!&amp;quot;, player, 255, 0, 0)&lt;br /&gt;
            end&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
end)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Useful_Functions}}&lt;/div&gt;</summary>
		<author><name>AirNewSCR</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetVehicleWheelModel&amp;diff=77153</id>
		<title>SetVehicleWheelModel</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetVehicleWheelModel&amp;diff=77153"/>
		<updated>2023-07-10T02:55:26Z</updated>

		<summary type="html">&lt;p&gt;AirNewSCR: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Useful_Function}} __NOTOC__&lt;br /&gt;
This function changes the wheel model of the informed vehicle.&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
int setVehicleWheelsModel(element veh, int wheelId)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Required arguments==&lt;br /&gt;
* '''veh''': The vehicle you want to change the wheel.&lt;br /&gt;
* '''wheelId''': The ID of the new wheel you want.&lt;br /&gt;
&lt;br /&gt;
==Returns==&lt;br /&gt;
Returns the ID of the new wheel if successfully changed, otherwise it returns false.&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server/Clientside 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;
validWheels = {[1025] = true, [1073] = true, [1074] = true, [1075] = true, [1076] = true, [1077] = true, [1078] = true, [1079] = true, [1080] = true, [1081] = true, [1082] = true, [1083] = true, [1084] = true, [1085] = true, [1096] = true, [1097] = true, [1098] = true}&lt;br /&gt;
&lt;br /&gt;
function setVehicleWheelsModel(veh, wheelId)&lt;br /&gt;
    if veh and isElement(veh) then&lt;br /&gt;
        if validWheels[tonumber(wheelId)] then&lt;br /&gt;
            local success = addVehicleUpgrade(veh, tonumber(wheelId))&lt;br /&gt;
            if success then&lt;br /&gt;
                return wheelId&lt;br /&gt;
            end&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;
'''Author:''' AirNewSCR&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;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addCommandHandler(&amp;quot;wset&amp;quot;, function(player, _, wheelId)&lt;br /&gt;
    if wheelId and tonumber(wheelId) then&lt;br /&gt;
        local veh = getPedOccupiedVehicle(player)&lt;br /&gt;
        if veh and isElement(veh) then&lt;br /&gt;
            local result = setVehicleWheelsModel(veh, wheelId)&lt;br /&gt;
            if result then&lt;br /&gt;
                outputChatBox(&amp;quot;Wheel id is now 1000&amp;quot;, player, 0, 255, 0)&lt;br /&gt;
            else&lt;br /&gt;
                outputChatBox(&amp;quot;Error!&amp;quot;, player, 255, 0, 0)&lt;br /&gt;
            end&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Useful_Functions}}&lt;/div&gt;</summary>
		<author><name>AirNewSCR</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetVehicleWheelModel&amp;diff=77152</id>
		<title>SetVehicleWheelModel</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetVehicleWheelModel&amp;diff=77152"/>
		<updated>2023-07-10T02:38:44Z</updated>

		<summary type="html">&lt;p&gt;AirNewSCR: /* Code */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Code==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server/Clientside 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;
validWheels = {[1025] = true, [1073] = true, [1074] = true, [1075] = true, [1076] = true, [1077] = true, [1078] = true, [1079] = true, [1080] = true, [1081] = true, [1082] = true, [1083] = true, [1084] = true, [1085] = true, [1096] = true, [1097] = true, [1098] = true}&lt;br /&gt;
&lt;br /&gt;
function setVehicleWheelsModel(veh, model)&lt;br /&gt;
    if veh and isElement(veh) then&lt;br /&gt;
        if validWheels[tonumber(model)] then&lt;br /&gt;
            addVehicleUpgrade(veh, tonumber(model))&lt;br /&gt;
            return true&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;/div&gt;</summary>
		<author><name>AirNewSCR</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetNearestElement&amp;diff=76809</id>
		<title>GetNearestElement</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetNearestElement&amp;diff=76809"/>
		<updated>2023-04-30T19:37:11Z</updated>

		<summary type="html">&lt;p&gt;AirNewSCR: for better processing without using getElementsByType, avoiding a large &amp;quot;for&amp;quot; that can cause server delay.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Useful Function}}&lt;br /&gt;
This function returns the nearest [[Element|element]] (of a specific type) to a [[Player|player]].&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;element getNearestElement( player thePlayer, string elementType, float distance)&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
* '''player''': The player who you want to get the nearest element from.&lt;br /&gt;
* '''type''': The type of the element you want to get. (&amp;quot;player&amp;quot;, &amp;quot;ped&amp;quot;, &amp;quot;object&amp;quot;, etc.)&lt;br /&gt;
* '''distance''': A number for the maximum distance the element can be from the player.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns an [[Element|element]] if it's within the specified '''distance''', ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server/Clientside 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 getNearestElement(player, type, distance)&lt;br /&gt;
	local result = false&lt;br /&gt;
	local dist = nil&lt;br /&gt;
	if player and isElement(player) then&lt;br /&gt;
		local elements = getElementsWithinRange(Vector3(getElementPosition(player)), distance, type, getElementInterior(player), getElementDimension(player))&lt;br /&gt;
		for i = 1, #elements do&lt;br /&gt;
			local element = elements[i]&lt;br /&gt;
			if not dist then&lt;br /&gt;
				result = element&lt;br /&gt;
				dist = getDistanceBetweenPoints3D(Vector3(getElementPosition(player)), Vector3(getElementPosition(element)))&lt;br /&gt;
			else&lt;br /&gt;
				local newDist = getDistanceBetweenPoints3D(Vector3(getElementPosition(player)), Vector3(getElementPosition(element)))&lt;br /&gt;
				if newDist &amp;lt;= dist then&lt;br /&gt;
					result = element&lt;br /&gt;
					dist = newDist&lt;br /&gt;
				end&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	return result&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;
&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 outputs the name of the nearest vehicle within 300 metres.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addCommandHandler(&amp;quot;findVehicle&amp;quot;, function()&lt;br /&gt;
    local nearestVehicle = getNearestElement(localPlayer, &amp;quot;vehicle&amp;quot;, 300) -- nearest vehicle within 300m&lt;br /&gt;
    if nearestVehicle then -- if there is a vehicle (true)&lt;br /&gt;
        outputChatBox(&amp;quot;#7aff69&amp;quot;..getVehicleName(nearestVehicle)..&amp;quot;#ffffff is the nearest vehicle!&amp;quot;,255,255,255,true)&lt;br /&gt;
    else -- no vehicle (false)&lt;br /&gt;
        outputChatBox(&amp;quot;There are#ff2e2e NO#ffffff vehicles nearby&amp;quot;,255,255,255,true)&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;
Modified version of [[GetNearestVehicle|getNearestVehicle]]&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Useful_Functions}}&lt;/div&gt;</summary>
		<author><name>AirNewSCR</name></author>
	</entry>
</feed>