<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.multitheftauto.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=TAPL</id>
	<title>Multi Theft Auto: Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.multitheftauto.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=TAPL"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/wiki/Special:Contributions/TAPL"/>
	<updated>2026-04-25T04:50:59Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=OnClientDoubleClick&amp;diff=39413</id>
		<title>OnClientDoubleClick</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=OnClientDoubleClick&amp;diff=39413"/>
		<updated>2014-04-19T15:12:31Z</updated>

		<summary type="html">&lt;p&gt;TAPL: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Client event}}&lt;br /&gt;
__NOTOC__ &lt;br /&gt;
This event triggers whenever the user double-clicks his mouse.  This is linked to the GTA world, as appose to GUI for which [[onClientGUIDoubleClick]] is to be used.  This event allows detection of click positions of the 3D world.&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;string button, int absoluteX, int absoluteY, float worldX, float worldY, float worldZ, element clickedWorld&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* '''button''':  This refers the button used to click on the mouse, can be ''left'', ''right'', or ''middle'&lt;br /&gt;
* '''absoluteX''': This refers to the 2D ''x coordinate'' the user clicked on his screen, and is an ''absolute'' position in pixels.&lt;br /&gt;
* '''absoluteY''': This refers to the 2D ''y coordinate'' the user clicked on his screen, and is an ''absolute'' position in pixels.&lt;br /&gt;
* '''worldX''': This represents the 3D ''x coordinate'' the player clicked on the screen, and is relative to the GTA world.&lt;br /&gt;
* '''worldY''': This represents the 3D ''y coordinate'' the player clicked on the screen, and is relative to the GTA world.&lt;br /&gt;
* '''worldZ''': This represents the 3D ''z coordinate'' the player clicked on the screen, and is relative to the GTA world.&lt;br /&gt;
* '''clickedWorld''': This represents any physical [[entity]] elements that were clicked. If the player clicked on no MTA element, it's set to false.&lt;br /&gt;
&lt;br /&gt;
==Source==&lt;br /&gt;
The [[event system#Event source|source]] of this event is the client's [[root element]].&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function onMyMouseDoubleClick (button, absoluteX, absoluteY, worldX, worldY,  worldZ, clickedWorld)&lt;br /&gt;
	if button == &amp;quot;left&amp;quot; then &lt;br /&gt;
		playSoundFrontEnd(40)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onClientDoubleClick&amp;quot;, root, onMyMouseDoubleClick)&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
===GUI events===&lt;br /&gt;
{{GUI_events}}&lt;br /&gt;
===Client event functions===&lt;br /&gt;
{{Client_event_functions}}&lt;/div&gt;</summary>
		<author><name>TAPL</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetElementParent&amp;diff=39348</id>
		<title>SetElementParent</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetElementParent&amp;diff=39348"/>
		<updated>2014-04-12T08:55:20Z</updated>

		<summary type="html">&lt;p&gt;TAPL: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Server client function}}&lt;br /&gt;
__NOTOC__ &lt;br /&gt;
This function is used for setting an element as the parent of another element.&lt;br /&gt;
{{Important Note|The client-side version of this function can only be used on client-created elements. It cannot be used to modify the parent of server side elements.}}&lt;br /&gt;
{{Note|This function does not change when an element will be destroyed - Elements are always destroyed when the resource that created them is stopped.}}&lt;br /&gt;
{{Note|When an element is destroyed, its parent becomes the new parent of its children.}}&lt;br /&gt;
{{Note|setElementParent only works if new parent is the root element, map root, or ancestor of map root}}&lt;br /&gt;
{{Tip|This function does not affect the child elements position. To attach elements use the function [[attachElements]].}}&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool setElementParent ( element theElement, element parent )  &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theElement:''' The element that you wish to set the parent of.&lt;br /&gt;
*'''parent:''' The element you wish to be the parent of ''theElement''.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if both [[element]]s are valid, ''false'' otherwise.&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 sets the parent of each spawnpoint to a dummy element:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
dummyElem = createElement ( &amp;quot;spawngroup&amp;quot;, &amp;quot;Group of spawn points&amp;quot; ) -- create a dummy element&lt;br /&gt;
local spawnpoints = getElementsByType ( &amp;quot;spawnpoint&amp;quot; ) -- get a table of spawn point elements&lt;br /&gt;
for k,v in ipairs (spawnpoints) do -- loop through the table of spawn points&lt;br /&gt;
   setElementParent ( v, dummyElem ) -- set the dummy element as the parent of the spawn point&lt;br /&gt;
end&lt;br /&gt;
-- all of the spawn points are now children of 'dummyElem'&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is the equivalent of:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;spawngroup id=&amp;quot;Group of spawn points&amp;quot;&amp;gt;&lt;br /&gt;
   &amp;lt;spawnpoint id=&amp;quot;spawnpoint_0&amp;quot; posX=&amp;quot;2507.8715820313&amp;quot; posY=&amp;quot;2772.6071777344&amp;quot; posZ=&amp;quot;10.8203125&amp;quot; rot=&amp;quot;270&amp;quot; skin=&amp;quot;285&amp;quot;/&amp;gt;&lt;br /&gt;
   &amp;lt;spawnpoint id=&amp;quot;spawnpoint_1&amp;quot; posX=&amp;quot;2508.060546875&amp;quot; posY=&amp;quot;2780.3647460938&amp;quot; posZ=&amp;quot;10.8203125&amp;quot; rot=&amp;quot;270&amp;quot; skin=&amp;quot;285&amp;quot;/&amp;gt;&lt;br /&gt;
   &amp;lt;spawnpoint id=&amp;quot;spawnpoint_2&amp;quot; posX=&amp;quot;2508.0053710938&amp;quot; posY=&amp;quot;2776.2897949219&amp;quot; posZ=&amp;quot;10.8203125&amp;quot; rot=&amp;quot;270&amp;quot; skin=&amp;quot;285&amp;quot;/&amp;gt;&lt;br /&gt;
   &amp;lt;spawnpoint id=&amp;quot;spawnpoint_3&amp;quot; posX=&amp;quot;2510.6899414063&amp;quot; posY=&amp;quot;2778.3745117188&amp;quot; posZ=&amp;quot;10.8203125&amp;quot; rot=&amp;quot;270&amp;quot; skin=&amp;quot;285&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/spawngroup&amp;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;
{{element functions}}&lt;/div&gt;</summary>
		<author><name>TAPL</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=OnClientGUIClick&amp;diff=38422</id>
		<title>OnClientGUIClick</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=OnClientGUIClick&amp;diff=38422"/>
		<updated>2014-01-16T08:47:26Z</updated>

		<summary type="html">&lt;p&gt;TAPL: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Client event}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This event happens when any gui-element clicked&lt;br /&gt;
{{Note|The '''player''' who clicked the gui-element is always the [[localPlayer]].}}&lt;br /&gt;
&lt;br /&gt;
==Parameters== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
string button, string state, int absoluteX, int absoluteY&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
*'''button:''' the name of the button which will be clicked , it can be ''left'', ''right'', ''middle''&lt;br /&gt;
*'''state:''' the state of the mouse button, will be ''down'' if the mouse button was pushed, or ''up'' if it was released.  '''Please note currently only the ''up'' state is supported.'''&lt;br /&gt;
*'''absoluteX:''' the X position of the mouse cursor, in pixels, measured from the left side of the screen.&lt;br /&gt;
*'''absoluteY:''' the Y position of the mouse cursor, in pixels, measured from the top of the screen.&lt;br /&gt;
&lt;br /&gt;
==Source==&lt;br /&gt;
The [[event system#Event source|source]] of this event is the GUI element that was clicked.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
This example creates an edit box alongside an &amp;quot;Output!&amp;quot; button. When the button is clicked with the left mouse button, it will output the message in the edit box into the chat box.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- When client's resource starts, create the GUI&lt;br /&gt;
function initGUI( )&lt;br /&gt;
    -- Create our button&lt;br /&gt;
    btnOutput = guiCreateButton( 0.7, 0.1, 0.2, 0.1, &amp;quot;Output!&amp;quot;, true )&lt;br /&gt;
&lt;br /&gt;
    -- And attach our button to the outputEditBox function&lt;br /&gt;
    addEventHandler ( &amp;quot;onClientGUIClick&amp;quot;, btnOutput, outputEditBox, false )&lt;br /&gt;
&lt;br /&gt;
    -- Create an edit box and define it as &amp;quot;editBox&amp;quot;.&lt;br /&gt;
    editBox = guiCreateEdit( 0.3, 0.1, 0.4, 0.1, &amp;quot;Type your message here!&amp;quot;, true )&lt;br /&gt;
    guiEditSetMaxLength ( editBox, 128 ) -- The max chatbox text length is 128, so force this&lt;br /&gt;
end&lt;br /&gt;
addEventHandler( &amp;quot;onClientResourceStart&amp;quot;, getResourceRootElement( getThisResource( ) ), initGUI )&lt;br /&gt;
&lt;br /&gt;
-- Setup our function to output the message to the chatbox&lt;br /&gt;
function outputEditBox ( button )&lt;br /&gt;
    if button == &amp;quot;left&amp;quot; then&lt;br /&gt;
        local text = guiGetText ( editBox )-- Get the text from the edit box&lt;br /&gt;
        outputChatBox ( text ) -- Output that text&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;
===GUI events===&lt;br /&gt;
{{GUI_events}}&lt;br /&gt;
===Client event functions===&lt;br /&gt;
{{Client_event_functions}}&lt;/div&gt;</summary>
		<author><name>TAPL</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=CreateObject&amp;diff=38153</id>
		<title>CreateObject</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=CreateObject&amp;diff=38153"/>
		<updated>2014-01-03T20:28:45Z</updated>

		<summary type="html">&lt;p&gt;TAPL: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Server client function}}&lt;br /&gt;
Creates an object in the GTA world.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;object createObject ( int modelid, float x, float y, float z, [ float rx, float ry, float rz, bool isLowLOD = false ] )&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''modelid:''' A whole integer specifying the GTASA object model ID.&lt;br /&gt;
*'''x:''' A floating point number representing the X coordinate on the map.&lt;br /&gt;
*'''y:''' A floating point number representing the Y coordinate on the map.&lt;br /&gt;
*'''z:''' A floating point number representing the Z coordinate on the map.&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments=== &lt;br /&gt;
{{OptionalArg}} &lt;br /&gt;
*'''rx:''' A floating point number representing the rotation about the X axis in degrees.&lt;br /&gt;
*'''ry:''' A floating point number representing the rotation about the Y axis in degrees.&lt;br /&gt;
*'''rz:''' A floating point number representing the rotation about the Z axis in degrees.&lt;br /&gt;
{{New items|3.0120|1.2|&lt;br /&gt;
*'''isLowLOD:''' A bool value specifying if the object will be low LOD. A low LOD object has no collision and a longer draw distance.&lt;br /&gt;
}}&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns the [[object]] element if creation was successful, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
&lt;br /&gt;
&amp;lt;section name=&amp;quot;Example1&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This example creates an object when the resource starts:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function mapLoad ( name )&lt;br /&gt;
   -- create an object at a specified position with a specified rotation&lt;br /&gt;
   createObject ( 1337, 5540.6654, 1020.55122, 1240.545, 90, 0, 0 )&lt;br /&gt;
end&lt;br /&gt;
addEventHandler ( &amp;quot;onResourceStart&amp;quot;, getRootElement(), mapLoad )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section name=&amp;quot;Example2&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This example creates an object near player who write createObject:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- this function is called whenever someone types 'createObject' in the console:&lt;br /&gt;
function consoleCreateObject ( thePlayer, commandName )&lt;br /&gt;
   if ( thePlayer ) then&lt;br /&gt;
      local x, y, z = getElementPosition ( thePlayer ) -- get the player's position&lt;br /&gt;
      -- create a Object next to the player:&lt;br /&gt;
      local theObject = createObject ( 980, x + 2, y + 2, z, 0, 0, 0 )&lt;br /&gt;
      if ( theObject ) then -- check if the Obeject was created successfully&lt;br /&gt;
         outputConsole ( &amp;quot;Object created successfully&amp;quot;, thePlayer )&lt;br /&gt;
      else&lt;br /&gt;
         outputConsole ( &amp;quot;Failed to create Object&amp;quot;, thePlayer )&lt;br /&gt;
      end&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler ( &amp;quot;createObject&amp;quot;, consoleCreateObject )&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;
{{Object functions}}&lt;br /&gt;
&lt;br /&gt;
[[de:createObject]]&lt;/div&gt;</summary>
		<author><name>TAPL</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetPlayerFromPartialName&amp;diff=37461</id>
		<title>GetPlayerFromPartialName</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetPlayerFromPartialName&amp;diff=37461"/>
		<updated>2013-10-29T19:46:33Z</updated>

		<summary type="html">&lt;p&gt;TAPL: /* Returns */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Useful Function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function allows you to get player From his Name part.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
player getPlayerFromNamePart ( string Name )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
* '''Name''': A string containing the name part of the player you want to reference&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns a [[player]] if the Name part is exist, ''nil'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;function getPlayerFromNamePart(name)&lt;br /&gt;
    local name = name and name:gsub(&amp;quot;#%x%x%x%x%x%x&amp;quot;, &amp;quot;&amp;quot;):lower() or nil&lt;br /&gt;
    if name then&lt;br /&gt;
        for _, player in ipairs(getElementsByType(&amp;quot;player&amp;quot;)) do&lt;br /&gt;
            local name_ = getPlayerName(player):gsub(&amp;quot;#%x%x%x%x%x%x&amp;quot;, &amp;quot;&amp;quot;):lower()&lt;br /&gt;
            if name_:find(name, 1, true) then&lt;br /&gt;
                return player&lt;br /&gt;
            end&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
end&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Author: TAPL'''&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Useful_Functions}}&lt;/div&gt;</summary>
		<author><name>TAPL</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Resource:Exp_system&amp;diff=37322</id>
		<title>Resource:Exp system</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Resource:Exp_system&amp;diff=37322"/>
		<updated>2013-10-16T21:05:03Z</updated>

		<summary type="html">&lt;p&gt;TAPL: Double 'with'&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Resource page}}&lt;br /&gt;
A level/experience system made from scratch by [[User:Castillo|Castillo]].&amp;lt;br&amp;gt;&lt;br /&gt;
It uses SQLite to save level and experience.&lt;br /&gt;
&lt;br /&gt;
=Exported Functions=&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;
This function is used to get a player level.&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 getPlayerLevel ( player thePlayer )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Required Arguments== &lt;br /&gt;
*'''thePlayer''': The player element you wish you get the level.&lt;br /&gt;
&lt;br /&gt;
==Returns==&lt;br /&gt;
Returns a number with the level of the player.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addCommandHandler ( &amp;quot;mylevel&amp;quot;,&lt;br /&gt;
	function ( thePlayer )&lt;br /&gt;
                local myLevel = exports.exp_system:getPlayerLevel ( thePlayer )&lt;br /&gt;
		outputChatBox ( &amp;quot;Your level is: &amp;quot;.. myLevel, thePlayer )&lt;br /&gt;
	end&lt;br /&gt;
)&lt;br /&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;
This function is used to set a player level.&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 setPlayerLevel ( player thePlayer, int theLevel )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Required Arguments== &lt;br /&gt;
*'''thePlayer''': The player element you wish you set the level.&lt;br /&gt;
*'''theLevel''': The level you want to set.&lt;br /&gt;
&lt;br /&gt;
==Returns==&lt;br /&gt;
Returns a bool, whether the level was set successfully or not.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addCommandHandler ( &amp;quot;setmylevel&amp;quot;,&lt;br /&gt;
	function ( thePlayer, commandName, theLevel )&lt;br /&gt;
                local theLevel = tonumber ( theLevel ) or 1&lt;br /&gt;
		exports.exp_system:setPlayerLevel ( thePlayer, theLevel )&lt;br /&gt;
	end&lt;br /&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;
This function is used to get a player experience.&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 getPlayerEXP ( player thePlayer )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Required Arguments== &lt;br /&gt;
*'''thePlayer''': The player element you wish you get the experience.&lt;br /&gt;
&lt;br /&gt;
==Returns==&lt;br /&gt;
Returns a number with with the experience of the player.&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addCommandHandler ( &amp;quot;myexp&amp;quot;,&lt;br /&gt;
	function ( thePlayer )&lt;br /&gt;
                local myExp = exports.exp_system:getPlayerEXP ( thePlayer )&lt;br /&gt;
		outputChatBox ( &amp;quot;Your experience is: &amp;quot;.. myExp, thePlayer )&lt;br /&gt;
	end&lt;br /&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;
This function is used to set a player experience.&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 setPlayerEXP ( player thePlayer, int theExperience )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Required Arguments== &lt;br /&gt;
*'''thePlayer''': The player element you wish you set the experience.&lt;br /&gt;
*'''theExperience''': The exprience you want to set.&lt;br /&gt;
&lt;br /&gt;
==Returns==&lt;br /&gt;
Returns a bool, whether the experience was set successfully or not.&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addCommandHandler ( &amp;quot;setmyexp&amp;quot;,&lt;br /&gt;
	function ( thePlayer, commandName, theExp )&lt;br /&gt;
                local theExp = tonumber ( theExp ) or 0&lt;br /&gt;
		exports.exp_system:setPlayerEXP ( thePlayer, theExp )&lt;br /&gt;
	end&lt;br /&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;
This function is used to give a player experience.&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 addPlayerEXP ( player thePlayer, int theExperience )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Required Arguments== &lt;br /&gt;
*'''thePlayer''': The player element you wish you to give the experience.&lt;br /&gt;
*'''theExperience''': The exprience you want to give.&lt;br /&gt;
&lt;br /&gt;
==Returns==&lt;br /&gt;
Returns a bool, whether the experience was given successfully or not.&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addEvent ( &amp;quot;onZombieWasted&amp;quot;, true )&lt;br /&gt;
addEventHandler ( &amp;quot;onZombieWasted&amp;quot;, root,&lt;br /&gt;
	function ( theKiller )&lt;br /&gt;
		exports.exp_system:addPlayerEXP ( theKiller, 5 )&lt;br /&gt;
	end&lt;br /&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;
This function is used to get an account level.&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 getAccountLevel ( account theAccount )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Required Arguments== &lt;br /&gt;
*'''theAccount''': The player element you wish you get the level.&lt;br /&gt;
&lt;br /&gt;
==Returns==&lt;br /&gt;
Returns a number with with the level of the account.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addCommandHandler ( &amp;quot;mylevel&amp;quot;,&lt;br /&gt;
	function ( thePlayer )&lt;br /&gt;
		local account = getPlayerAccount ( thePlayer )&lt;br /&gt;
                local myExp = exports.exp_system:getAccountLevel ( account )&lt;br /&gt;
		outputChatBox ( &amp;quot;Your account level is: &amp;quot;.. myLevel, thePlayer )&lt;br /&gt;
	end&lt;br /&gt;
)&lt;br /&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;
This function is used to set an account level.&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 setAccountLevel ( account theAccount, int theLevel )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Required Arguments== &lt;br /&gt;
*'''theAccount''': The player element you wish you set the level.&lt;br /&gt;
*'''theLevel''': The level you want to set.&lt;br /&gt;
&lt;br /&gt;
==Returns==&lt;br /&gt;
Returns a bool, whether the level was set successfully or not.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addCommandHandler ( &amp;quot;setmylevel&amp;quot;,&lt;br /&gt;
	function ( thePlayer, commandName, theLevel )&lt;br /&gt;
		local account = getPlayerAccount ( thePlayer )&lt;br /&gt;
                local theLevel = tonumber ( theLevel ) or 1&lt;br /&gt;
		exports.exp_system:setAccountLevel ( account, theLevel )&lt;br /&gt;
	end&lt;br /&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;
This function is used to get an account experience.&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 getAccountEXP ( account theAccount )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Required Arguments== &lt;br /&gt;
*'''theAccount''': The player element you wish you get the experience.&lt;br /&gt;
&lt;br /&gt;
==Returns==&lt;br /&gt;
Returns a number with with the experience of the player.&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addCommandHandler ( &amp;quot;myexp&amp;quot;,&lt;br /&gt;
	function ( thePlayer )&lt;br /&gt;
		local account = getPlayerAccount ( thePlayer )&lt;br /&gt;
                local myExp = exports.exp_system:getAccountEXP ( account )&lt;br /&gt;
		outputChatBox ( &amp;quot;Your account experience is: &amp;quot;.. myExp, thePlayer )&lt;br /&gt;
	end&lt;br /&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;
This function is used to set an account experience.&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 setAccountEXP ( account theAccount, int theExperience )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Required Arguments== &lt;br /&gt;
*'''theAccount''': The player element you wish you set the experience.&lt;br /&gt;
*'''theExperience''': The exprience you want to set.&lt;br /&gt;
&lt;br /&gt;
==Returns==&lt;br /&gt;
Returns a bool, whether the experience was set successfully or not.&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addCommandHandler ( &amp;quot;setmyexp&amp;quot;,&lt;br /&gt;
	function ( thePlayer, commandName, theExp )&lt;br /&gt;
		local account = getPlayerAccount ( thePlayer )&lt;br /&gt;
                local theExp = tonumber ( theExp ) or 0&lt;br /&gt;
		exports.exp_system:setAccountEXP ( account, theExp )&lt;br /&gt;
	end&lt;br /&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;
This function is used to refresh the levels.&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 loadLevelsFromXML( )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Required Arguments== &lt;br /&gt;
*'''None'''&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addCommandHandler ( &amp;quot;refreshlevels&amp;quot;,&lt;br /&gt;
	function ( )&lt;br /&gt;
		exports.exp_system:loadLevelsFromXML ( )&lt;br /&gt;
	end&lt;br /&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;
This function is used to obtain the name and experience required of a level.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
getLevelData ( int theLevel )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Required Arguments== &lt;br /&gt;
*'''theLevel'''&lt;br /&gt;
&lt;br /&gt;
==Returns==&lt;br /&gt;
Returns the name of the level and the experience required.&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addCommandHandler ( &amp;quot;getleveldata&amp;quot;,&lt;br /&gt;
	function ( thePlayer )&lt;br /&gt;
		local level = exports.exp_system:getPlayerLevel ( thePlayer )&lt;br /&gt;
		local name, expreq = exports.exp_system:getLevelData ( level )&lt;br /&gt;
		outputChatBox ( name ..&amp;quot;: &amp;quot;.. expreq, thePlayer )&lt;br /&gt;
	end&lt;br /&gt;
)&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Custom Events=&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;
This event is called when a player level changes.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
event onPlayerChangeLevel&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Parameters== &lt;br /&gt;
*'''oldLevel''': The player old level.&lt;br /&gt;
*'''newLevel''': The player new level.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Add the event's source in the section below --&amp;gt;&lt;br /&gt;
==Source==&lt;br /&gt;
The [[event system#Event source|source]] of this event is the [[player]] whose level changed.&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;
This event is called when a player level UP.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
event onPlayerLevelUP&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Parameters== &lt;br /&gt;
*'''oldLevel''': The player old level.&lt;br /&gt;
*'''newLevel''': The player new level.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Add the event's source in the section below --&amp;gt;&lt;br /&gt;
==Source==&lt;br /&gt;
The [[event system#Event source|source]] of this event is the [[player]] who leveled UP.&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=See also=&lt;br /&gt;
[http://community.mtasa.com/index.php?p=resources&amp;amp;s=details&amp;amp;id=1253 Download page]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Resource]]&lt;/div&gt;</summary>
		<author><name>TAPL</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetPlayerFromPartialName&amp;diff=37314</id>
		<title>GetPlayerFromPartialName</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetPlayerFromPartialName&amp;diff=37314"/>
		<updated>2013-10-15T13:00:06Z</updated>

		<summary type="html">&lt;p&gt;TAPL: Fixed colorcode.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Useful Function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function allows you to get player From his Name part.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
player getPlayerFromNamePart ( string Name )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
* '''Name''': A string containing the name part of the player you want to reference&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns a [[player]] if the Name part is exist, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;function getPlayerFromNamePart(name)&lt;br /&gt;
    local name = name and name:gsub(&amp;quot;#%x%x%x%x%x%x&amp;quot;, &amp;quot;&amp;quot;):lower() or nil&lt;br /&gt;
    if name then&lt;br /&gt;
        for _, player in ipairs(getElementsByType(&amp;quot;player&amp;quot;)) do&lt;br /&gt;
            local name_ = getPlayerName(player):gsub(&amp;quot;#%x%x%x%x%x%x&amp;quot;, &amp;quot;&amp;quot;):lower()&lt;br /&gt;
            if name_:find(name, 1, true) then&lt;br /&gt;
                return player&lt;br /&gt;
            end&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
end&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Author: TAPL'''&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Useful_Functions}}&lt;/div&gt;</summary>
		<author><name>TAPL</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GuiGridListSetVerticalScrollPosition&amp;diff=37207</id>
		<title>GuiGridListSetVerticalScrollPosition</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GuiGridListSetVerticalScrollPosition&amp;diff=37207"/>
		<updated>2013-09-20T10:52:28Z</updated>

		<summary type="html">&lt;p&gt;TAPL: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{client function}}&lt;br /&gt;
This function is used to set the vertical scroll position from a grid list&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 guiGridListSetVerticalScrollPosition( element guiGridlist, float fPosition )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''guiGridlist''': The grid list you want to set the vertical scroll position from&lt;br /&gt;
*'''fPosition''': A float representing the vertical scroll position (0-100)&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the vertical scroll position was set, or ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
{{Requirements|n/a|1.3.2}}&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;
{{GUI_functions}}&lt;/div&gt;</summary>
		<author><name>TAPL</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=OnClientWeaponFire&amp;diff=37024</id>
		<title>OnClientWeaponFire</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=OnClientWeaponFire&amp;diff=37024"/>
		<updated>2013-09-02T17:09:44Z</updated>

		<summary type="html">&lt;p&gt;TAPL: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Client event}}&lt;br /&gt;
__NOTOC__ &lt;br /&gt;
This event will be triggered once a client fires his weapon.&lt;br /&gt;
{{Note|This event is only for custom weapons that were created with [[createWeapon]], for player held weapons use [[onClientPlayerWeaponFire]].}}&lt;br /&gt;
&lt;br /&gt;
==Parameters== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
element hitElement, float posX,  float posY, float posZ, float normalX, float normalY, float normalZ, int materialType, int lighting, int pieceHit&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
*'''hitElement:''' the element that was hit&lt;br /&gt;
*'''posX:''' the position it will hit&lt;br /&gt;
*'''posY:''' the position it will hit&lt;br /&gt;
*'''posZ:''' the position it will hit&lt;br /&gt;
*'''normalX:''' the normal it hit ( see processLineOfSight )&lt;br /&gt;
*'''normalY:''' the normal it hit ( see processLineOfSight )&lt;br /&gt;
*'''normalZ:''' the normal it hit ( see processLineOfSight )&lt;br /&gt;
*'''materialType:''' the material type it hit ( see processLineOfSight )&lt;br /&gt;
*'''lighting:''' the lighting of the entity it hit ( see processLineOfSight )&lt;br /&gt;
*'''pieceHit:''' the piece of the entity it hit ( see processLineOfSight )&lt;br /&gt;
&lt;br /&gt;
==Source==&lt;br /&gt;
The [[event system#Event source|source]] of this event is the weapon that was fired.&lt;br /&gt;
&lt;br /&gt;
==Cancel Effect==&lt;br /&gt;
If this event was [[Event system#Canceling|canceled]], then the weapon will not fire.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
This example prevents the player from firing a Deagle.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function noDeagle()&lt;br /&gt;
	local weaponID = getElementModel(source) &lt;br /&gt;
	-- Gets the ID of the weapon.&lt;br /&gt;
	if weaponID == 24 then &lt;br /&gt;
		-- If the weapon ID is of the Deagle's then cancel the event.&lt;br /&gt;
		cancelEvent() &lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onClientWeaponFire&amp;quot;, getRootElement(), noDeagle)&lt;br /&gt;
-- Attach the event 'onClientWeaponFire' to the function.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
===Client event functions===&lt;br /&gt;
{{Client_event_functions}}&lt;/div&gt;</summary>
		<author><name>TAPL</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetWeaponOwner&amp;diff=36868</id>
		<title>SetWeaponOwner</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetWeaponOwner&amp;diff=36868"/>
		<updated>2013-08-09T13:52:36Z</updated>

		<summary type="html">&lt;p&gt;TAPL: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Client function}}&lt;br /&gt;
Sets the owner (a player) of the custom weapon.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;bool setWeaponOwner ( theWeapon, player theOwner )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
* '''theWeapon:''' The weapon to set the owner of&lt;br /&gt;
* '''theOwner:''' The weapon owner&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' on success, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
{{Requirements|n/a|1.3.0-9.04555|}}&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Client weapon creation functions}}&lt;/div&gt;</summary>
		<author><name>TAPL</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetValidPedModels&amp;diff=35467</id>
		<title>GetValidPedModels</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetValidPedModels&amp;diff=35467"/>
		<updated>2013-04-18T13:25:16Z</updated>

		<summary type="html">&lt;p&gt;TAPL: Undo revision 33844 by Socialz (talk)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Server client function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function returns all valid ped models.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
table getValidPedModels ( )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns a [[table]] with all valid ped models.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This example will get if the specified skin is a valid skin or not.&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 isValidSkin( thePlayer, command, specifiedSkin )  -- Define the function&lt;br /&gt;
    if ( specifiedSkin ) then -- If skin specified&lt;br /&gt;
        local allSkins = getValidPedModels ( ) -- Get valid skin IDs&lt;br /&gt;
        local result = false -- Define result, it is currently false&lt;br /&gt;
        for key, skin in ipairs( allSkins ) do -- Check all skins&lt;br /&gt;
            if skin == tonumber( specifiedSkin ) then -- If skin equals specified one, it is valid&lt;br /&gt;
                result = skin -- So set it as result&lt;br /&gt;
                break --stop looping through a table after we found the skin&lt;br /&gt;
            end&lt;br /&gt;
        end&lt;br /&gt;
        if ( result ) then -- If we got results&lt;br /&gt;
            outputChatBox( tostring( skin ) .. &amp;quot; is a valid skin ID.&amp;quot;, thePlayer, 0, 255, 0 ) -- It is valid, output it&lt;br /&gt;
        else -- If we didn't get results&lt;br /&gt;
            outputChatBox( specifiedSkin .. &amp;quot; is not a valid skin ID.&amp;quot;, thePlayer, 0, 255, 0 ) -- No result, it is not valid&lt;br /&gt;
        end&lt;br /&gt;
    else -- If no skin specified&lt;br /&gt;
        outputChatBox( &amp;quot;Please specify a skin ID to check!&amp;quot;, thePlayer, 255, 0, 0 ) -- Tell it to the player&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler(&amp;quot;checkskin&amp;quot;,isValidSkin) -- bind 'checkskin' command to 'isValidSkin' function&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;
{{Ped functions}}&lt;/div&gt;</summary>
		<author><name>TAPL</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=User_talk:TAPL&amp;diff=35349</id>
		<title>User talk:TAPL</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=User_talk:TAPL&amp;diff=35349"/>
		<updated>2013-04-13T11:19:36Z</updated>

		<summary type="html">&lt;p&gt;TAPL: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Why did you do this &amp;quot;http://wiki.multitheftauto.com/index.php?title=CreateTeam&amp;amp;diff=next&amp;amp;oldid=34673&amp;quot; ? --[[User:X86dev|X86dev]] 08:20, 29 January 2013 (UTC)&lt;br /&gt;
&lt;br /&gt;
Because colors arguments are optional. --[[User:TAPL|TAPL]] 11:15, 13 April 2013 (UTC)&lt;/div&gt;</summary>
		<author><name>TAPL</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=User_talk:TAPL&amp;diff=35348</id>
		<title>User talk:TAPL</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=User_talk:TAPL&amp;diff=35348"/>
		<updated>2013-04-13T11:15:32Z</updated>

		<summary type="html">&lt;p&gt;TAPL: /* Because colors arguments are optional. */ new section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Why did you do this &amp;quot;http://wiki.multitheftauto.com/index.php?title=CreateTeam&amp;amp;diff=next&amp;amp;oldid=34673&amp;quot; ? --[[User:X86dev|X86dev]] 08:20, 29 January 2013 (UTC)&lt;br /&gt;
&lt;br /&gt;
Because colors arguments are optional.&lt;br /&gt;
&lt;br /&gt;
== Because colors arguments are optional. ==&lt;br /&gt;
&lt;br /&gt;
.&lt;/div&gt;</summary>
		<author><name>TAPL</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=User_talk:TAPL&amp;diff=35347</id>
		<title>User talk:TAPL</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=User_talk:TAPL&amp;diff=35347"/>
		<updated>2013-04-13T11:14:49Z</updated>

		<summary type="html">&lt;p&gt;TAPL: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Why did you do this &amp;quot;http://wiki.multitheftauto.com/index.php?title=CreateTeam&amp;amp;diff=next&amp;amp;oldid=34673&amp;quot; ? --[[User:X86dev|X86dev]] 08:20, 29 January 2013 (UTC)&lt;br /&gt;
&lt;br /&gt;
Because colors arguments are optional.&lt;/div&gt;</summary>
		<author><name>TAPL</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GuiGridListRemoveColumn&amp;diff=35346</id>
		<title>GuiGridListRemoveColumn</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GuiGridListRemoveColumn&amp;diff=35346"/>
		<updated>2013-04-13T11:07:40Z</updated>

		<summary type="html">&lt;p&gt;TAPL: 6 years have passed and no one has noticed this mistake?&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Client function}}&lt;br /&gt;
__NOTOC__ &lt;br /&gt;
This allows you to delete columns that exist in grid lists.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;!-- NOTE: don't use 'special' names for variable names, e.g. you shouldn't be writing things like 'player player, vehicle vehicle', instead write something like 'player thePlayer, vehicle vehicleToGetInto'. This is less confusing and prevents the syntax highlighting being odd --&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool guiGridListRemoveColumn ( element gridList, int columnIndex )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''gridList:''' The grid list you want to remove a column from&lt;br /&gt;
*'''columnIndex:''' Column ID&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the grid list column was successfully removed, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
This example creates a grid list and adds 4 columns to it when the script starts. After 3 seconds, it randomly deletes a column and outputs to the chat box which column was deleted.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;function deleteColumn ()&lt;br /&gt;
        --Choose randomly which column to delete, output the chosen column into the chat box, and delete the column&lt;br /&gt;
    	randomDeletion = math.random ( 1, 4 )   &lt;br /&gt;
		if randomDeletion == 1 then&lt;br /&gt;
		        outputChatBox ( &amp;quot;Removing column A&amp;quot; )&lt;br /&gt;
		        guiGridListRemoveColumn ( myGridList, columnA )&lt;br /&gt;
		elseif randomDeletion == 2 then    &lt;br /&gt;
		        outputChatBox ( &amp;quot;Removing column B&amp;quot; )&lt;br /&gt;
		        guiGridListRemoveColumn ( myGridList, columnB )&lt;br /&gt;
		elseif randomDeletion == 3 then&lt;br /&gt;
		        outputChatBox ( &amp;quot;Removing column C&amp;quot; )&lt;br /&gt;
		        guiGridListRemoveColumn ( myGridList, columnC )&lt;br /&gt;
		else&lt;br /&gt;
		        outputChatBox ( &amp;quot;Removing column D&amp;quot; )&lt;br /&gt;
		        guiGridListRemoveColumn ( myGridList, columnD )&lt;br /&gt;
		end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function clientsideResourceStart ()&lt;br /&gt;
	--Create a gridlist&lt;br /&gt;
    	myGridList = guiCreateGridList ( 0.30, 0.10, 0.5, 0.60, true ) &lt;br /&gt;
    	--Create 4 columns for myGridList&lt;br /&gt;
	columnA = guiGridListAddColumn ( myGridList, &amp;quot;columnA Title&amp;quot;, 0.25 ) &lt;br /&gt;
	columnB = guiGridListAddColumn ( myGridList, &amp;quot;columnB Title&amp;quot;, 0.25 )&lt;br /&gt;
	columnC = guiGridListAddColumn ( myGridList, &amp;quot;columnC Title&amp;quot;, 0.25 )&lt;br /&gt;
    	columnD = guiGridListAddColumn ( myGridList, &amp;quot;columnD Title&amp;quot;, 0.25 )	&lt;br /&gt;
   	--Set a timer to trigger the deleteColumn function 3 seconds after the script starts&lt;br /&gt;
        setTimer ( deleteColumn, 3000, 1 )&lt;br /&gt;
end&lt;br /&gt;
addEventHandler ( &amp;quot;onClientResourceStart&amp;quot;, getRootElement(), clientsideResourceStart )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Issues==&lt;br /&gt;
{{Issues|&lt;br /&gt;
{{Issue|5620|guiGridListAddColumn returns wrong index after deleting columns }}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
&amp;lt;!-- Change FunctionArea to the area that this function is in on the main function list page, e.g. Server, Player, Vehicle etc --&amp;gt;&lt;br /&gt;
{{GUI functions}}&lt;/div&gt;</summary>
		<author><name>TAPL</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=CreateTeam&amp;diff=34674</id>
		<title>CreateTeam</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=CreateTeam&amp;diff=34674"/>
		<updated>2013-01-28T22:46:57Z</updated>

		<summary type="html">&lt;p&gt;TAPL: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Server function}}&lt;br /&gt;
This function is for creating a new [[team]], which can be used to group players. Players will not join the team until they are respawned.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
team createTeam ( string teamName, [int colorR = 255, int colorG = 255, int colorB = 255] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''teamName:''' A string representing the teams name.&lt;br /&gt;
===Optional Arguments=== &lt;br /&gt;
*'''colorR:''' An integer representing the red color value.&lt;br /&gt;
*'''colorG:''' An integer representing the green color value.&lt;br /&gt;
*'''colorB:''' An integer representing the blue color value.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns a team element if it was successfully created, ''false'' if invalid arguments are passed or a team with that name already exists.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
'''Example 1:''' This example creates a new team for a player, then adds him to it.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function gimmeATeam ( source, commandName, teamName )&lt;br /&gt;
  local newTeam = createTeam ( teamName ) -- create a new team with the specified name&lt;br /&gt;
  if newTeam then -- if it was successfully created&lt;br /&gt;
    setPlayerTeam ( source, newTeam ) -- add the player to the new team&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler(&amp;quot;giveteam&amp;quot;, gimmeATeam)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example 2:''' This example creates two teams, one for Admin and one for Freeroamers, when the resource this script is in is started.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function createTeamsOnStart ()&lt;br /&gt;
	teamAdmmin = createTeam ( &amp;quot;Admin&amp;quot;, 0, 255, 0 ) --change the 3 numbers(0,255,0), the first number is ColourR, the second is ColourG, and the last one is ColourB&lt;br /&gt;
	teamFreeroamers = createTeam ( &amp;quot;Freeroamer&amp;quot;, 200, 0, 100 )&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onResourceStart&amp;quot;, resourceRoot, createTeamsOnStart) --we attach the function to this resource's root element&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example 3:''' This example creates a team for Admin and when an admin logs in, he will be set in the Admin team.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function createAdminTeamOnStart ()&lt;br /&gt;
	AdminTeam = createTeam ( &amp;quot;Admin&amp;quot;, 0, 255, 0 )-- create a new team and name it 'Admin'&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onResourceStart&amp;quot;, resourceRoot, createAdminTeamOnStart) -- add an event handler&lt;br /&gt;
&lt;br /&gt;
function setAdminTeam()&lt;br /&gt;
if isObjectInACLGroup(&amp;quot;user.&amp;quot;..getAccountName(getPlayerAccount(source)), aclGetGroup(&amp;quot;Admin&amp;quot;)) then -- if he is admin&lt;br /&gt;
   setPlayerTeam(source, AdminTeam) -- set him to admin team&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onPlayerLogin&amp;quot;,getRootElement(),setAdminTeam) -- add an event handler&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Team_functions}}&lt;/div&gt;</summary>
		<author><name>TAPL</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=CreateTeam&amp;diff=34673</id>
		<title>CreateTeam</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=CreateTeam&amp;diff=34673"/>
		<updated>2013-01-28T22:43:41Z</updated>

		<summary type="html">&lt;p&gt;TAPL: colors is optional.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Server function}}&lt;br /&gt;
This function is for creating a new [[team]], which can be used to group players. Players will not join the team until they are respawned.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
team createTeam ( string teamName, [int colorR = 255, int colorG = 255, int colorB = 255] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''teamName:''' A string representing the teams name.&lt;br /&gt;
===Optional Arguments=== &lt;br /&gt;
{{OptionalArg}} &lt;br /&gt;
*'''colorR:''' An integer representing the red color value.&lt;br /&gt;
*'''colorG:''' An integer representing the green color value.&lt;br /&gt;
*'''colorB:''' An integer representing the blue color value.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns a team element if it was successfully created, ''false'' if invalid arguments are passed or a team with that name already exists.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
'''Example 1:''' This example creates a new team for a player, then adds him to it.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function gimmeATeam ( source, commandName, teamName )&lt;br /&gt;
  local newTeam = createTeam ( teamName ) -- create a new team with the specified name&lt;br /&gt;
  if newTeam then -- if it was successfully created&lt;br /&gt;
    setPlayerTeam ( source, newTeam ) -- add the player to the new team&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler(&amp;quot;giveteam&amp;quot;, gimmeATeam)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example 2:''' This example creates two teams, one for Admin and one for Freeroamers, when the resource this script is in is started.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function createTeamsOnStart ()&lt;br /&gt;
	teamAdmmin = createTeam ( &amp;quot;Admin&amp;quot;, 0, 255, 0 ) --change the 3 numbers(0,255,0), the first number is ColourR, the second is ColourG, and the last one is ColourB&lt;br /&gt;
	teamFreeroamers = createTeam ( &amp;quot;Freeroamer&amp;quot;, 200, 0, 100 )&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onResourceStart&amp;quot;, resourceRoot, createTeamsOnStart) --we attach the function to this resource's root element&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example 3:''' This example creates a team for Admin and when an admin logs in, he will be set in the Admin team.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function createAdminTeamOnStart ()&lt;br /&gt;
	AdminTeam = createTeam ( &amp;quot;Admin&amp;quot;, 0, 255, 0 )-- create a new team and name it 'Admin'&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onResourceStart&amp;quot;, resourceRoot, createAdminTeamOnStart) -- add an event handler&lt;br /&gt;
&lt;br /&gt;
function setAdminTeam()&lt;br /&gt;
if isObjectInACLGroup(&amp;quot;user.&amp;quot;..getAccountName(getPlayerAccount(source)), aclGetGroup(&amp;quot;Admin&amp;quot;)) then -- if he is admin&lt;br /&gt;
   setPlayerTeam(source, AdminTeam) -- set him to admin team&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onPlayerLogin&amp;quot;,getRootElement(),setAdminTeam) -- add an event handler&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Team_functions}}&lt;/div&gt;</summary>
		<author><name>TAPL</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Server_Manual&amp;diff=33716</id>
		<title>Server Manual</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Server_Manual&amp;diff=33716"/>
		<updated>2012-10-07T11:14:51Z</updated>

		<summary type="html">&lt;p&gt;TAPL: default port is 22003 not 22004&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
==Getting started==&lt;br /&gt;
It is much easier than it looks to get a server up and running for your internet or LAN buddies; follow this wiki article and you will hopefully be on your way to hosting your own MTA:SA server in no time!&lt;br /&gt;
&lt;br /&gt;
==Installing the server==&lt;br /&gt;
The dedicated server application is available in different flavours depending on the platform of the server.&lt;br /&gt;
&lt;br /&gt;
===Linux installation===&lt;br /&gt;
There are different ways of getting a Linux server up and running:&lt;br /&gt;
* [http://linux.mtasa.com Getting a precompiled package]&lt;br /&gt;
* [[Building MTASA Server on GNU Linux]]&lt;br /&gt;
&lt;br /&gt;
===FreeBSD installation===&lt;br /&gt;
&lt;br /&gt;
You can run MTA:SA under FreeBSD using Linux emulation.&lt;br /&gt;
* Enable [http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/linuxemu-lbc-install.html Linux binary compatibility]&lt;br /&gt;
* Install following packages or compile them from ports: hs-terminfo, linux_base-f10, linux-f10-sqlite3&lt;br /&gt;
* Install [http://linux.mtasa.com/ Linux precompiled package]&lt;br /&gt;
&lt;br /&gt;
===Windows installation===&lt;br /&gt;
Installation of the MTA:SA server on Windows is easy as pie.&lt;br /&gt;
*Go to the [http://mtasa.com/ download page] and download the installer.&lt;br /&gt;
*Once the installer is downloaded, open it.&lt;br /&gt;
*Select a folder where you want to install the server.&lt;br /&gt;
*Click Install.&lt;br /&gt;
*Done!&lt;br /&gt;
&lt;br /&gt;
''For a full explanation of acl.xml (access control list) read: [[Access_Control_List|Access Control List]]''&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Configuring your server==&lt;br /&gt;
The Multi Theft Auto dedicated server is initially configurable through it's console window, from within the game, and from a webbrowser. In order to make use of the two last options, it is necessary to add at least one administrator user to your configuration file.&lt;br /&gt;
&lt;br /&gt;
===General configuration===&lt;br /&gt;
All general configuration options can be found in the 'mods/deathmatch/[[Server_mtaserver.conf|'''mtaserver.conf''']]' file and can be opened by any regular text editor.&lt;br /&gt;
&lt;br /&gt;
This file is fairly straightforward; every variable has a [[Server_mtaserver.conf|description of what to do with it and how to change it]].&lt;br /&gt;
&lt;br /&gt;
===Port forwarding===&lt;br /&gt;
If you run your server on your own private computer, and you have an router between the internet and your computer. You need to forward 3 ports.&lt;br /&gt;
&lt;br /&gt;
First of all open the file 'mods/deathmatch/[[Server_mtaserver.conf|'''mtaserver.conf''']]' and search for the next lines:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;serverport&amp;gt;22003&amp;lt;/serverport&amp;gt; &lt;br /&gt;
&amp;lt;httpport&amp;gt;22005&amp;lt;/httpport&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The ports are needed to setup the server correctly. We explain later how to set them, but first if you want your server to appear in the server browser there is another port we need, and that is the ASE port. &lt;br /&gt;
(quick example for how to turn ASE on or off):&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;ase&amp;gt;1&amp;lt;/ase&amp;gt; &amp;lt;!-- 0 = off, 1 = on --&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now we going to forward the ports in your router, which is not needed if you already have all ports open, or if you don't have a router with a firewall. If so, skip this part.&lt;br /&gt;
&lt;br /&gt;
If you don't know how port forwarding works in your router, go to the [http://portforward.com/ Port Forward website], find your router model there, and follow the instructions there.&lt;br /&gt;
&lt;br /&gt;
In almost every router you can set the port type: UDP or TCP. The following list will explain which port type is needed for what:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Main server port: UDP&lt;br /&gt;
&lt;br /&gt;
HTTP Port: TCP&lt;br /&gt;
&lt;br /&gt;
ASE Port: UDP (this is needed if you want your server to appear in the server list)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The ASE port is also simple to get:&lt;br /&gt;
&lt;br /&gt;
ASE port = Main server port + 123&lt;br /&gt;
&lt;br /&gt;
So, if you have the main server port set to 22003, then the ASE port will be 22126.&lt;br /&gt;
&lt;br /&gt;
Good luck!&lt;br /&gt;
&lt;br /&gt;
''In the latest version of the server, you can check the port status by using the server command [[Server_Commands#openports|openports]].''&lt;br /&gt;
&lt;br /&gt;
===Client Checks===&lt;br /&gt;
&lt;br /&gt;
The MTA server can be configured to disable the anti-cheat. It can also allow specific or all files to be modified (e.g. carmods.dat), and make sure clients are of a minimum version.&lt;br /&gt;
&lt;br /&gt;
All of these settings are within the file 'mods/deathmatch/[[Server_mtaserver.conf|'''mtaserver.conf''']]'. See the [[Anti-cheat_guide|Anti-cheat guide]] for more details.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to force a minimum client version, search for the following line:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;minclientversion&amp;gt;&amp;lt;/minclientversion&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Accepted values look like: 1.1.1-9.02320&lt;br /&gt;
&lt;br /&gt;
===Adding administrators===&lt;br /&gt;
It is strongly recommended to add at least one administrator to your server in order to make use of the built-in webserver to easily maintain and configure your server. This administrator will then also be able to log-in from within the game and control the server.&lt;br /&gt;
&lt;br /&gt;
To add an administrator to your server, follow these steps:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;While the server is running, add a new account by typing '''[[Server_Commands#addaccount|addaccount name password]]''' into the server window. For example, to add user BennyLava you could type:&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin: 10px 10px 10px 10px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
addaccount BennyLava 123password&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin: 10px 10px 10px 20px;&amp;quot;&amp;gt;&lt;br /&gt;
''Note: If you do not have access to the server window, and the 'admin' resource is running, you can add  the example account by issuing the chatbox command '''/register BennyLava 123password'''''&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The server should display a message confirming the account has been added.&lt;br /&gt;
&amp;lt;li&amp;gt;Next, shutdown the server by typing '''shutdown''' into the server window.&lt;br /&gt;
&amp;lt;li&amp;gt;Make sure your server is stopped; if your server is still running, the following changes you make will be overwritten&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Open the file 'mods/deathmatch/'acl.xml'''' with any text editor&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Add the account to the ''Admin'' group by using the XML-syntax below&lt;br /&gt;
&amp;lt;div style=&amp;quot;padding: 10px&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;acl&amp;gt;&lt;br /&gt;
  ...&lt;br /&gt;
  &amp;lt;group name=&amp;quot;Admin&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;acl name=&amp;quot;Admin&amp;quot;/&amp;gt;&lt;br /&gt;
    ...&lt;br /&gt;
    &amp;lt;object name=&amp;quot;user.BennyLava&amp;quot; /&amp;gt;&lt;br /&gt;
  &amp;lt;/group&amp;gt;&lt;br /&gt;
  ...&lt;br /&gt;
&amp;lt;/acl&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You're done! You can add as many administrators or users as you want this way, take a look at some of the other groups and ACLs for example. The ACL is also accessible through the [[Access_Control_List|Lua scripting engine]].&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is recommended to take a look at the web interface, we will explain how to do this below.&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
'''Note''': There are also ways to add accounts and edit rights for the server while it's running. &amp;quot;[[Server_Commands#addaccount|addaccount &amp;lt;user&amp;gt; &amp;lt;password&amp;gt;]]&amp;quot; is an internal command to add accounts, but you will have to use the web interface to add these accounts to specific groups/ACLs!&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Using the web interface===&lt;br /&gt;
The dedicated server comes with a few Lua [[resources]] that provide a nice little web interface to your server. This can be used to easily maintain your server, as it allows you to add users, start/stop resources, and more.&lt;br /&gt;
&lt;br /&gt;
The web interface resources are enabled by default and are served through the built-in HTTP web server. To make sure the built-in HTTP web server runs on a port you like (22005 by default), follow these steps:&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Make sure your server is stopped&lt;br /&gt;
&amp;lt;li&amp;gt;Open the file 'mods/deathmatch/[[Server_mtaserver.conf|'''mtaserver.conf''']]' with any text editor&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Verify that the HTTP server is enabled:&lt;br /&gt;
&amp;lt;div style=&amp;quot;padding: 10px&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;httpserver&amp;gt;1&amp;lt;/httpserver&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Change the HTTP server port to your liking:&lt;br /&gt;
&amp;lt;div style=&amp;quot;padding: 10px&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;httpport&amp;gt;22005&amp;lt;/httpport&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Save and close the configuration file&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Start your server&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If you happened to have changed the start-up resources in your configuration file, make sure the following resources are started:&lt;br /&gt;
&lt;br /&gt;
# resourcebrowser&lt;br /&gt;
# resourcemanager&lt;br /&gt;
# webadmin&lt;br /&gt;
# webmap&lt;br /&gt;
&lt;br /&gt;
These are automatically started in the default configuration file, in case you just installed your server.&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Open a web browser (Internet Explorer 6 or 7 are NOT supported; use [http://www.mozilla.com/firefox Mozilla Firefox], [http://www.google.com/chrome Google Chrome], [http://www.apple.com/safari/download Apple Safari], [http://www.opera.com Opera] or others) and navigate to the HTTP server URL: '''http://server:port/'''. For example, If you are running a local server on HTTP port 22005, use '''http://127.0.0.1:22005/'''.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Enter the username and password of the administrator you added in the previous section.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
You should now be able to maintain your server from the web interface.&lt;br /&gt;
&lt;br /&gt;
=== Configuring an external web server ===&lt;br /&gt;
The built-in web server is also used to serve files that are required by resources running on your server to any player that is connected to your server. For example, if you are running a game script with a scripted graphical user interface, or custom models, these need to be transferred to every connected player in order to function properly. This is done by either the built-in web server, or an external web server (that is usually a bit faster) but needs to be set up separately.&lt;br /&gt;
&lt;br /&gt;
For performance or consistency reasons during the game, you could choose to make use of such an external web server if you have one set up. The external web server needs to be accessible for the public, so any client will be able to download the necessary client-side files in order to join and play on your server.&lt;br /&gt;
&lt;br /&gt;
To enable downloading off an external web server, you should configure the [[Server_mtaserver.conf#httpdownloadurl|httpdownloadurl]] tag in your server configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;padding: 10px&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;	&lt;br /&gt;
&amp;lt;httpdownloadurl&amp;gt;http://www.myserver.tld/directory/here&amp;lt;/httpdownloadurl&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Since all the default resources provided with the dedicated server are zipped, and are normally automatically extracted by the built-in web server, you now have to provide a way for the clients to download the compressed files to their computers. To configure MTA to maintain a copy of only your unzipped client resources, set [[Server_mtaserver.conf#httpautoclientfiles|httpautoclientfiles]] in your server configuration: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;padding: 10px&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;httpautoclientfiles&amp;gt;1&amp;lt;/httpautoclientfiles&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now when you launch the server, the directory '''&amp;lt;SERVER&amp;gt;/mods/deathmatch/resource-cache/http-client-files''' will contain the correct client files for hosting on an external web server. If the web server is on the same machine, you can simply link the appropriate web server directory to '''http-client-files'''. If the web server is on a separate machine, ensure it has access to '''http-client-files''' via a network path, or maintain a remote copy using synchronization software.&lt;br /&gt;
&lt;br /&gt;
'''Note 1''': Please try to avoid any special characters (e.g. ~, !) in your download URLs.&amp;lt;br /&amp;gt;&lt;br /&gt;
'''Note 2''': Please do not use a trailing slash in your download URL (e.g. ''hxxp://www.myserver.tld/directory'' rather than ''hxxp://www.myserver.tld/directory/'')&lt;br /&gt;
&lt;br /&gt;
==Starting your server==&lt;br /&gt;
Begin by making sure that you have finished all configuration of your server, starting your server is the last stage so everything must be ready!&lt;br /&gt;
&lt;br /&gt;
To start your server double click on MTA Server.exe, make sure you allow it through any firewalls and forward ports where necessary.&lt;br /&gt;
&lt;br /&gt;
==Installing/Updating resources on your server==&lt;br /&gt;
Resources can come in two formats, either a ZIP format or just a normal folder with the script files inside it. The MTA:SA server supports both these methods.&lt;br /&gt;
&lt;br /&gt;
# Move or copy the new resource to your &amp;lt;SERVER&amp;gt;\mods\deathmatch\resources folder.&lt;br /&gt;
# In the server window type in the command [[Server_Commands#refresh|refresh]], this will re-scan the resources folder and update the live resources where necessary.&lt;br /&gt;
&lt;br /&gt;
==Uninstalling resources==&lt;br /&gt;
Resources can easily be removed from your server if you no longer want them.&lt;br /&gt;
&lt;br /&gt;
# Delete the ZIP file or the folder of the resource you wish to uninstall&lt;br /&gt;
# In the server window type in the command &amp;quot;refresh&amp;quot; (without the quotes), this will re-scan the resources folder and update the live resources where necessary.&lt;br /&gt;
&lt;br /&gt;
==Administrating your server==&lt;br /&gt;
You can start resources by typing the command &amp;quot;start resourcename&amp;quot; in the server console, or stop ones with &amp;quot;stop resourcename&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
It's also possible to execute these and other admin commands from the in-game console (which you can bring up with the ` key or F8); for this to work, you first need to log in with the command &amp;quot;[[Server_Commands#login|login username password]]&amp;quot;. Additionally, you can press the p key to bring up the admin panel: this is a graphical interface which allows you to easily kick or ban misbehaving players, among others.&lt;br /&gt;
&lt;br /&gt;
For further commands, type [[Server_Commands#help|help]] in a console.&lt;br /&gt;
&lt;br /&gt;
==Starting a map/gamemode==&lt;br /&gt;
See the commands section of the documentation for [[Resource:Map manager|mapmanager]] for more information.&lt;br /&gt;
&lt;br /&gt;
==Useful Notes==&lt;br /&gt;
&lt;br /&gt;
# You may also update the resources while in-game as long as you have the correct access levels by typing &amp;quot;refresh&amp;quot; in the clients console or &amp;quot;/refresh&amp;quot; in the chat window. This may cause a second of lag if you have many resources.&lt;br /&gt;
# In the above instructions, &amp;lt;SERVER&amp;gt; is the path to your server's main directory. In most cases this is C:\Program Files\MTA San Andreas\server&lt;br /&gt;
# You can choose a different config file for the server to use by passing it in the command line after a --config argument, e.g. mtaserver.exe --config anotherconfig.cfg.&lt;br /&gt;
# Do not be alarmed by the warning regarding the parsing of the settings.xml file. This happens because your server installation is still clean and unused.&lt;br /&gt;
&lt;br /&gt;
====Need further help?====&lt;br /&gt;
Why not pop over to our [http://forum.mtasa.com/ Forums] or join us on [irc://irc.multitheftauto.com/mta IRC] (irc.multitheftauto.com #mta - [http://www.mirc.com mIRC])&lt;br /&gt;
&lt;br /&gt;
[[es:Manual del Servidor]]&lt;br /&gt;
[[de:Server Anleitung]]&lt;br /&gt;
[[it:Manuale del Server]]&lt;br /&gt;
[[nl:Server Manual]]&lt;br /&gt;
[[ru:Server Manual]]&lt;br /&gt;
[[pl:Server Manual]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Support]]&lt;/div&gt;</summary>
		<author><name>TAPL</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetWeaponState&amp;diff=33707</id>
		<title>GetWeaponState</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetWeaponState&amp;diff=33707"/>
		<updated>2012-10-06T09:12:53Z</updated>

		<summary type="html">&lt;p&gt;TAPL: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Client function}}&lt;br /&gt;
{{Needs Example}}&lt;br /&gt;
Get the state of the custom weapon.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;string getWeaponState ( weapon theWeapon )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
* '''theWeapon:''' The [[weapon]] to get the target of.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns a [[string]] indicating the weapon state, ''false'' otherwise.&lt;br /&gt;
&amp;lt;div style=&amp;quot;border:3px solid red;margin-bottom:3px;padding-left:5px;&amp;quot;&amp;gt;&amp;lt;div style=&amp;quot;float:right;padding-right:5px;font-weight:bold;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
* '''reloading''': The weapon is reloading&lt;br /&gt;
* '''firing''': The weapon will constantly fire ( unless any shooting blocking flags are set ) according to its assigned firing rate&lt;br /&gt;
* '''ready''': The weapon is idle&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
TODO&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;
==Requirements==&lt;br /&gt;
{{Requirements|n/a|1.3.0-9.04555|}}&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Client weapon creation functions}}&lt;/div&gt;</summary>
		<author><name>TAPL</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetWeaponTarget&amp;diff=33706</id>
		<title>GetWeaponTarget</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetWeaponTarget&amp;diff=33706"/>
		<updated>2012-10-06T09:12:49Z</updated>

		<summary type="html">&lt;p&gt;TAPL: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Client function}}&lt;br /&gt;
{{Needs Example}}&lt;br /&gt;
Get the target of the custom weapon.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;element getWeaponTarget ( weapon theWeapon )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
* '''theWeapon:''' The weapon to get the target of.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns the ''target element'' of the custom weapon, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
TODO&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;
==Requirements==&lt;br /&gt;
{{Requirements|n/a|1.3.0-9.04555|}}&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Client weapon creation functions}}&lt;/div&gt;</summary>
		<author><name>TAPL</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=IsElementCollidableWith&amp;diff=33705</id>
		<title>IsElementCollidableWith</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=IsElementCollidableWith&amp;diff=33705"/>
		<updated>2012-10-06T09:11:33Z</updated>

		<summary type="html">&lt;p&gt;TAPL: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Client function}}&lt;br /&gt;
{{Needs Example}} &lt;br /&gt;
__NOTOC__ &lt;br /&gt;
This function can be used to check whether specified element is collidable with another element.&amp;lt;br&amp;gt;&lt;br /&gt;
'''Note:''' You can only use this function with the element types listed below.&lt;br /&gt;
*[[Player]]&lt;br /&gt;
*[[Ped]]&lt;br /&gt;
*[[Vehicle]]&lt;br /&gt;
*[[Object]]&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 isElementCollidableWith ( element theElement, element withElement ) &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theElement:''' The [[element]] which colliding you want to get&lt;br /&gt;
*'''withElement:''' The other [[element]] which colliding with the first entity you want to get&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the elements collide with eachother, ''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;
&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;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Client element functions}}&lt;/div&gt;</summary>
		<author><name>TAPL</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=DxDrawMaterialLine3D&amp;diff=33704</id>
		<title>DxDrawMaterialLine3D</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=DxDrawMaterialLine3D&amp;diff=33704"/>
		<updated>2012-10-06T09:06:59Z</updated>

		<summary type="html">&lt;p&gt;TAPL: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Client function}}&lt;br /&gt;
{{Needs Example}} &lt;br /&gt;
{{New feature/item|4.0140|1.3.0|3931|&lt;br /&gt;
This function draws a textured 3D line between two points in the 3D world - rendered for one frame.  This should be used in conjunction with [[onClientPreRender]] in order to display continuously.&lt;br /&gt;
&lt;br /&gt;
The 3D line with a large width value effectively becomes a rectangle, so it it possible to construct basic shapes such as boxes with several large width lines and the appropriate values for 'faceToward'.&lt;br /&gt;
&lt;br /&gt;
3D lines are drawn at a particular place in the [[Game_Processing_Order|game processing order]], so use [[onClientPreRender]] for drawing if you are attaching them to world elements.&lt;br /&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;
bool dxDrawMaterialLine3D ( float startX, float startY, float startZ, float endX, float endY, float endZ,&lt;br /&gt;
                            element material, int width, [, int color = white, float faceTowardX, float faceTowardY, float faceTowardZ ] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
* '''startX/Y/Z:''' The start position of the 3D line, representing a coordinate in the GTA world.&lt;br /&gt;
* '''endX/Y/Z:''' The end position of the 3D line, representing a coordinate in the GTA world.&lt;br /&gt;
* '''material:''' A [[material]] to draw the line with.&lt;br /&gt;
* '''width:''' The width/thickness of the line in GTA world units. (This is 1/75th of the width used in dxDrawLine3D)&lt;br /&gt;
&lt;br /&gt;
==Optional Arguments==&lt;br /&gt;
{{OptionalArg}}&lt;br /&gt;
* '''color:''' An [[int|integer]] of the hex color, produced using [[tocolor]] or 0xAARRGGBB (AA = alpha, RR = red, GG = green, BB = blue).&lt;br /&gt;
* '''faceTowardX/Y/Z:''' The direction the front of the line should face towards. If this is not set, the front of the line always faces toward the camera.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns a ''true'' if the operation was 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;
&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;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
{{Requirements|n/a|1.3.0-9.03931|}}&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Drawing_functions}}&lt;br /&gt;
[[Category:Needs Example]]&lt;/div&gt;</summary>
		<author><name>TAPL</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=DxGetBlendMode&amp;diff=33703</id>
		<title>DxGetBlendMode</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=DxGetBlendMode&amp;diff=33703"/>
		<updated>2012-10-06T09:06:50Z</updated>

		<summary type="html">&lt;p&gt;TAPL: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Client function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function returns the current blend mode for the dxDraw functions. The blend mode is set using [[dxSetBlendMode]]&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 dxGetBlendMode ( )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==Returns==&lt;br /&gt;
Returns the current blend mode, which can be one of:&lt;br /&gt;
*'''blend'''&lt;br /&gt;
*'''add'''&lt;br /&gt;
*'''modulate_add'''&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;
==Requirements==&lt;br /&gt;
{{Requirements|n/a|1.3.0-9.03782|}}&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Drawing_functions}}&lt;br /&gt;
[[Category:Needs Example]]&lt;/div&gt;</summary>
		<author><name>TAPL</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=DxSetPixelColor&amp;diff=33702</id>
		<title>DxSetPixelColor</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=DxSetPixelColor&amp;diff=33702"/>
		<updated>2012-10-06T09:06:40Z</updated>

		<summary type="html">&lt;p&gt;TAPL: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Client function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function sets the color of a single pixel for [[Texture_pixels|pixels]] contained in a string. It only works with ''''plain'''' format pixels.&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 dxSetPixelColor ( string pixels, int x, int y, int r, int g, int b [, int a = 255 ] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''pixels :''' The pixels to use&lt;br /&gt;
*'''x:''' The X coordinate for the pixel&lt;br /&gt;
*'''y:''' The Y coordinate for the pixel&lt;br /&gt;
*'''r:''' The red channel for the color (0-255)&lt;br /&gt;
*'''g:''' The green channel for the color (0-255)&lt;br /&gt;
*'''b:''' The blue channel for the color (0-255)&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
*'''a:''' The alpha channel for the color (0-255)&lt;br /&gt;
&lt;br /&gt;
==Returns==&lt;br /&gt;
Returns true if successful, or ''false'' if invalid arguments were passed to the function.&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;
==Requirements==&lt;br /&gt;
{{Requirements|n/a|1.3|}}&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Drawing_functions}}&lt;br /&gt;
[[Category:Needs Example]]&lt;/div&gt;</summary>
		<author><name>TAPL</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=DxGetPixelColor&amp;diff=33701</id>
		<title>DxGetPixelColor</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=DxGetPixelColor&amp;diff=33701"/>
		<updated>2012-10-06T09:06:19Z</updated>

		<summary type="html">&lt;p&gt;TAPL: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Client function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function gets the color of a single pixel from [[Texture_pixels|pixels]] contained in a string. It only works with ''''plain'''' format pixels.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
int dxGetPixelColor ( string pixels, int x, int y )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''pixels :''' The pixels to use&lt;br /&gt;
*'''x:''' The X coordinate for the pixel&lt;br /&gt;
*'''y:''' The Y coordinate for the pixel&lt;br /&gt;
&lt;br /&gt;
==Returns==&lt;br /&gt;
Returns the color of pixel if successful, or ''false'' if invalid arguments were passed to the function.&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;
==Requirements==&lt;br /&gt;
{{Requirements|n/a|1.3|}}&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Drawing_functions}}&lt;br /&gt;
[[Category:Needs Example]]&lt;/div&gt;</summary>
		<author><name>TAPL</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=DxConvertPixels&amp;diff=33700</id>
		<title>DxConvertPixels</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=DxConvertPixels&amp;diff=33700"/>
		<updated>2012-10-06T09:06:15Z</updated>

		<summary type="html">&lt;p&gt;TAPL: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Client function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function converts [[Texture_pixels|pixels]] from one format to another.&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 dxConvertPixels ( string pixels, string newFormat [, int quality = 80 ] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''pixels :''' The pixels to convert the format of&lt;br /&gt;
*'''newFormat :''' The new format required (''''plain'''' or ''''png'''' or ''''jpeg'''')&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
*'''quality :''' The quality of the returned pixels if the new format is ''''jpeg''''&lt;br /&gt;
&lt;br /&gt;
==Returns==&lt;br /&gt;
Returns a copy of the pixels in the new format, or ''false'' if invalid arguments were passed to the function.&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;
==Requirements==&lt;br /&gt;
{{Requirements|n/a|1.3|}}&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Drawing_functions}}&lt;br /&gt;
[[Category:Needs Example]]&lt;/div&gt;</summary>
		<author><name>TAPL</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=DxGetPixelsFormat&amp;diff=33699</id>
		<title>DxGetPixelsFormat</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=DxGetPixelsFormat&amp;diff=33699"/>
		<updated>2012-10-06T09:06:12Z</updated>

		<summary type="html">&lt;p&gt;TAPL: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Client function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function returns the format of [[Texture_pixels|pixels]] contained in a string.&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 dxGetPixelsFormat ( string pixels )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''pixels :''' The pixels to get the format of&lt;br /&gt;
&lt;br /&gt;
==Returns==&lt;br /&gt;
Returns the format of the pixels if successful, ''false'' if invalid arguments were passed to the function.&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;
==Requirements==&lt;br /&gt;
{{Requirements|n/a|1.3|}}&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Drawing_functions}}&lt;br /&gt;
[[Category:Needs Example]]&lt;/div&gt;</summary>
		<author><name>TAPL</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=DxGetPixelsSize&amp;diff=33698</id>
		<title>DxGetPixelsSize</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=DxGetPixelsSize&amp;diff=33698"/>
		<updated>2012-10-06T09:06:08Z</updated>

		<summary type="html">&lt;p&gt;TAPL: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Client function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function gets the dimensions of [[Texture_pixels|pixels]] contained in a string. It works with all pixel formats.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
int int dxGetPixelsSize ( string pixels )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''pixels :''' The pixels to get the dimensions of&lt;br /&gt;
&lt;br /&gt;
==Returns==&lt;br /&gt;
Returns width and height of the pixels if successful, ''false'' if invalid arguments were passed to the function.&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;
==Requirements==&lt;br /&gt;
{{Requirements|n/a|1.3|}}&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Drawing_functions}}&lt;br /&gt;
[[Category:Needs Example]]&lt;/div&gt;</summary>
		<author><name>TAPL</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=DxSetTexturePixels&amp;diff=33697</id>
		<title>DxSetTexturePixels</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=DxSetTexturePixels&amp;diff=33697"/>
		<updated>2012-10-06T09:05:50Z</updated>

		<summary type="html">&lt;p&gt;TAPL: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Client function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function sets the [[Texture_pixels|pixels]] of a [[texture]] element. It can be used with a standard texture, render target or screen source. Only ''''plain'''' format pixels please.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
''Performance note:&lt;br /&gt;
*''This function is slow and not something you want to be doing once a frame.''&lt;br /&gt;
*''It is very slow when setting pixels to a render target or screen source.''&lt;br /&gt;
*''And is very slow indeed if the texture format is not ''' 'argb' ''' ''&lt;br /&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;
bool dxSetTexturePixels ( [ int surfaceIndex = 0, ] element texture, string pixels [, int x = 0, int y = 0, int width = 0, int height = 0 ] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''texture :''' The texture element to set the pixels of&lt;br /&gt;
*'''pixels :''' The ''''plain'''' format pixels to use&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
{{New feature/item|4.0130|1.3|4021|&lt;br /&gt;
*'''surfaceIndex:''' Desired slice to set if the texture is a volume texture, or desired face to set if the texture is a cube map. &amp;lt;nowiki&amp;gt;(Cube map faces: 0=+X 1=-X 2=+Y 3=-Y 4=+Z 5=-Z)&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
By default the pixels are set starting at the top left corner of the texture. To set a different region, define a rectangular area using all four of these optional arguments:&lt;br /&gt;
*'''x:''' Rectangle left position&lt;br /&gt;
*'''y:''' Rectangle top position&lt;br /&gt;
*'''width:''' Rectangle width&lt;br /&gt;
*'''height :''' Rectangle height&lt;br /&gt;
&lt;br /&gt;
==Returns==&lt;br /&gt;
Returns a string if successful, ''false'' if invalid arguments were passed to the function.&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;
==Requirements==&lt;br /&gt;
{{Requirements|n/a|1.3|}}&lt;br /&gt;
&lt;br /&gt;
==Changelog==&lt;br /&gt;
{{ChangelogHeader}}&lt;br /&gt;
{{ChangelogItem|1.3.0-9.04021|Added surfaceIndex argument}}&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Drawing_functions}}&lt;br /&gt;
[[Category:Needs Example]]&lt;/div&gt;</summary>
		<author><name>TAPL</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=DxGetTexturePixels&amp;diff=33696</id>
		<title>DxGetTexturePixels</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=DxGetTexturePixels&amp;diff=33696"/>
		<updated>2012-10-06T09:05:35Z</updated>

		<summary type="html">&lt;p&gt;TAPL: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Client function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function fetches the [[Texture_pixels|pixels]] from a [[texture]] element. It can be used with a standard texture, render target or screen source.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
''Performance note:&lt;br /&gt;
*''This function is slow and not something you want to be doing once a frame.''&lt;br /&gt;
*''It is slower when reading pixels from a render target or screen source.''&lt;br /&gt;
*''And is very slow indeed if the texture format is not ''' 'argb' ''' ''&lt;br /&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 dxGetTexturePixels ( [ int surfaceIndex = 0, ] element texture [, int x = 0, int y = 0, int width = 0, int height = 0 ] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''texture :''' The texture element to get the pixels from&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
{{New feature/item|4.0130|1.3|4021|&lt;br /&gt;
*'''surfaceIndex:''' Desired slice to get if the texture is a volume texture, or desired face to get if the texture is a cube map. &amp;lt;nowiki&amp;gt;(Cube map faces: 0=+X 1=-X 2=+Y 3=-Y 4=+Z 5=-Z)&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
By default the pixels from the whole texture is returned. To get only a portion of the texture, define a rectangular area using all four of these optional arguments:&lt;br /&gt;
*'''x:''' Rectangle left position&lt;br /&gt;
*'''y:''' Rectangle top position&lt;br /&gt;
*'''width:''' Rectangle width&lt;br /&gt;
*'''height :''' Rectangle height&lt;br /&gt;
&lt;br /&gt;
==Returns==&lt;br /&gt;
Returns a ''''plain'''' format pixels string if successful, ''false'' if invalid arguments were passed to the function.&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;
==Requirements==&lt;br /&gt;
{{Requirements|n/a|1.3|}}&lt;br /&gt;
&lt;br /&gt;
==Changelog==&lt;br /&gt;
{{ChangelogHeader}}&lt;br /&gt;
{{ChangelogItem|1.3.0-9.04021|Added surfaceIndex argument}}&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Drawing_functions}}&lt;br /&gt;
[[Category:Needs Example]]&lt;/div&gt;</summary>
		<author><name>TAPL</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=DxSetTestMode&amp;diff=33695</id>
		<title>DxSetTestMode</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=DxSetTestMode&amp;diff=33695"/>
		<updated>2012-10-06T09:05:21Z</updated>

		<summary type="html">&lt;p&gt;TAPL: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Client function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function is used for testing scripts written using [[guiCreateFont]], [[dxCreateFont]], [[dxCreateShader]] and [[dxCreateRenderTarget]]&lt;br /&gt;
&lt;br /&gt;
Each one of the 3 test modes should be used in turn to help highlight any potential problems.&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 dxSetTestMode ( string testMode )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''testMode :''' The test mode to be set. It can be one of the following values:&lt;br /&gt;
**'''none :''' Test mode disabled&lt;br /&gt;
**'''no_mem:''' Simulate no free video memory available for MTA.&lt;br /&gt;
**'''low_mem:''' Simulate little free video memory available for MTA.&lt;br /&gt;
**'''no_shader:''' Simulate shaders failing validation.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the test mode was successfully set, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Drawing_functions}}&lt;br /&gt;
[[Category:Needs Example]]&lt;/div&gt;</summary>
		<author><name>TAPL</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=DxSetShaderTransform&amp;diff=33694</id>
		<title>DxSetShaderTransform</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=DxSetShaderTransform&amp;diff=33694"/>
		<updated>2012-10-06T09:05:04Z</updated>

		<summary type="html">&lt;p&gt;TAPL: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Client function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function applies a 3D transformation to a [[shader]] element when it is draw with [[dxDrawImage]].&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 dxSetShaderTransform ( element shader,&lt;br /&gt;
                            float rotationX, float rotationY, float rotationZ,&lt;br /&gt;
                          [ float rotationCenterOffsetX = 0, float rotationCenterOffsetY = 0, float rotationCenterOffsetZ = 0,&lt;br /&gt;
                            bool bRotationCenterOffsetOriginIsScreen = false,&lt;br /&gt;
                            float perspectiveCenterOffsetX = 0, float perspectiveCenterOffsetY = 0,&lt;br /&gt;
                            bool bPerspectiveCenterOffsetOriginIsScreen = false ] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''shader:''' The shader element whose transformation is to be changed&lt;br /&gt;
*'''rotationX:''' Rotation angle in degrees around the X axis (Left,right). This will make the shader rotate along its width.&lt;br /&gt;
*'''rotationY:''' Rotation angle in degrees around the Y axis (Up,down). This will make the shader rotate along its height.&lt;br /&gt;
*'''rotationZ:''' Rotation angle in degrees around the Z axis (In,out). This will make the shader rotate in a similar way to the rotation argument in [[dxDrawImage]].&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments=== &lt;br /&gt;
*'''rotationCenterOffsetX :''' The center of rotation offset X position in screen relative units.&lt;br /&gt;
*'''rotationCenterOffsetY :''' The center of rotation offset Y position in screen relative units.&lt;br /&gt;
*'''rotationCenterOffsetZ :''' The center of rotation offset Z position in screen relative units.&lt;br /&gt;
*'''bRotationCenterOffsetOriginIsScreen :''' Set to [[boolean|true]] if the center of rotation origin should be the center of the screen rather than the center of the image.&lt;br /&gt;
*'''perspectiveCenterOffsetX :''' The center of perspective offset X position in screen relative units.&lt;br /&gt;
*'''perspectiveCenterOffsetY :''' The center of perspective offset Y position in screen relative units.&lt;br /&gt;
*'''bPerspectiveCenterOffsetOriginIsScreen :''' Set to [[boolean|true]] if the center of perspective origin should be the center of the screen rather than the center of the image.&lt;br /&gt;
&lt;br /&gt;
To convert screen relative units into screen pixel coordinates, ''multiply'' by the screen size. Conversely, to convert screen pixel coordinates to screen relative units, '''''divide''''' by the screen size.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the shader element's transform was successfully changed, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
{{Requirements|n/a|1.2.0-9.03618|}}&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Drawing_functions}}&lt;br /&gt;
[[Category:Needs Example]]&lt;/div&gt;</summary>
		<author><name>TAPL</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=DxDrawImageSection&amp;diff=33693</id>
		<title>DxDrawImageSection</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=DxDrawImageSection&amp;diff=33693"/>
		<updated>2012-10-06T09:03:52Z</updated>

		<summary type="html">&lt;p&gt;TAPL: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Client function}} &lt;br /&gt;
Differing from [[dxDrawImage]], this function only draws a part of an image on the screen for a single frame. In order for the image to stay visible continuously, you need to call this function with the same parameters on each frame update (see [[onClientRender]]).&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 dxDrawImageSection ( float posX, float posY, float width, float height, float u, float v, float usize, float vsize, mixed image, &lt;br /&gt;
[ float rotation = 0, float rotationCenterOffsetX = 0, float rotationCenterOffsetY = 0, int color = white, bool postGUI = false ] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''posX:''' the absolute X coordinate of the top left corner of the image&lt;br /&gt;
*'''posY:''' the absolute Y coordinate of the top left corner of the image&lt;br /&gt;
*'''width:''' the absolute width of the image&lt;br /&gt;
*'''height:''' the absolute height of the image&lt;br /&gt;
*'''u:''' the absolute X coordinate of the top left corner of the section which should be drawn from image&lt;br /&gt;
*'''v:''' the absolute Y coordinate of the top left corner of the section which should be drawn from image&lt;br /&gt;
*'''usize:''' the absolute width of the image section&lt;br /&gt;
*'''vsize:''' the absolute height of the image section&lt;br /&gt;
*'''image:''' Either a [[material]] element or a [[filepath]] of the image which is going to be drawn. (.dds images are also supported). Image files should ideally have dimensions that are a power of two, to prevent possible blurring.&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
*'''rotation:''' the rotation, in degrees for the image.&lt;br /&gt;
*'''rotationCenterOffsetX:''' the absolute X offset from the image center for which to rotate the image from.&lt;br /&gt;
*'''rotationCenterOffsetY:''' the absolute Y offset from the image center for which to rotate the image from.&lt;br /&gt;
*'''color:''' the color of the image, a value produced by [[tocolor]] or hexadecimal number in format: 0xAARRGGBB (AA = alpha, RR = red, GG = green, BB = blue).&lt;br /&gt;
*'''postgui :''' A bool representing whether the image should be drawn on top of or behind any ingame GUI (rendered by CEGUI).&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;
&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;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Drawing_functions}}&lt;br /&gt;
[[Category:Needs Example]]&lt;/div&gt;</summary>
		<author><name>TAPL</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetSoundFFTData&amp;diff=33692</id>
		<title>GetSoundFFTData</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetSoundFFTData&amp;diff=33692"/>
		<updated>2012-10-06T09:00:12Z</updated>

		<summary type="html">&lt;p&gt;TAPL: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Client function}}&lt;br /&gt;
{{Needs Example}}&lt;br /&gt;
{{New feature/item|4.0140|1.3.0|4125|&lt;br /&gt;
This function gets the FFT data for an audio stream which is a table of floats representing the current audio frame.&lt;br /&gt;
This allows things like visualisations.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;table getSoundFFTData ( element sound, int iSamples [, int iBands = 0 ] )&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''sound:''' A sound element that is created using [[playSound]] or [[playSound3D]]. Streams are also supported&lt;br /&gt;
*'''iSamples:''' Allowed samples are 128, 256, 512, 1024, 2048, 4096, 8092 and 16184&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
*'''iBands:''' Post processing option&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns a table of floats representing the current audio frame.&lt;br /&gt;
Returns false if the sound is not playing yet or hasn't buffered in the&lt;br /&gt;
case of streams.&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;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- not done yet&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;
{{Client_audio_functions}}&lt;br /&gt;
[[Category:Needs Example]]&lt;/div&gt;</summary>
		<author><name>TAPL</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetSoundProperties&amp;diff=33691</id>
		<title>SetSoundProperties</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetSoundProperties&amp;diff=33691"/>
		<updated>2012-10-06T08:59:29Z</updated>

		<summary type="html">&lt;p&gt;TAPL: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Client function}}&lt;br /&gt;
{{New feature/item|4.0140|1.3.0|4097|&lt;br /&gt;
This function edit's the properties of a specific [[sound]].&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;bool setSoundProperties(element sound, float fSampleRate, float fTempo, float fPitch, bool bReverse )&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''sound:''' A sound element that is created using [[playSound]] or [[playSound3D]]&lt;br /&gt;
&lt;br /&gt;
*'''fSampleRate:''' A float that defines the new sound's [http://en.wikipedia.org/wiki/Sampling_rate sample rate]&lt;br /&gt;
&lt;br /&gt;
*'''fTempo:''' A float that defines the new sound [http://en.wikipedia.org/wiki/Tempo tempo]&lt;br /&gt;
&lt;br /&gt;
*'''fPitch:''' A float that defines the new sound [http://en.wikipedia.org/wiki/Pitch_%28music%29 pitch]&lt;br /&gt;
&lt;br /&gt;
*'''bReverse:''' A boolean representing whether the sound will be reversed or not.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns true if the properties sucessfully set, 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;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- not done yet&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;
{{Client_audio_functions}}&lt;br /&gt;
[[Category:Needs Example]]&lt;/div&gt;</summary>
		<author><name>TAPL</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetSoundProperties&amp;diff=33690</id>
		<title>GetSoundProperties</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetSoundProperties&amp;diff=33690"/>
		<updated>2012-10-06T08:59:18Z</updated>

		<summary type="html">&lt;p&gt;TAPL: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Client function}}&lt;br /&gt;
{{New feature/item|4.0140|1.3.0|4097|&lt;br /&gt;
This function gets the properties of a specific [[sound]].&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;float, float, float, bool getSoundProperties( element sound )&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''sound:''' A sound element that is created using [[playSound]] or [[playSound3D]]&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
This function returns 3 floats and a boolean value:&lt;br /&gt;
&lt;br /&gt;
The first float is the sound's [http://en.wikipedia.org/wiki/Sampling_rate sample rate], the second one the sound's [http://en.wikipedia.org/wiki/Tempo tempo], and the third one the [http://en.wikipedia.org/wiki/Pitch_%28music%29 pitch] of the sound. The boolean representing whether the sound is reversed or not.&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;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- not done yet&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;
{{Client_audio_functions}}&lt;br /&gt;
[[Category:Needs Example]]&lt;/div&gt;</summary>
		<author><name>TAPL</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetSoundBPM&amp;diff=33689</id>
		<title>GetSoundBPM</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetSoundBPM&amp;diff=33689"/>
		<updated>2012-10-06T08:58:56Z</updated>

		<summary type="html">&lt;p&gt;TAPL: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Client function}}&lt;br /&gt;
{{New feature/item|4.0140|1.3.0|4145|&lt;br /&gt;
This function gets the beats per minute of a specific [[sound]] element.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;int getSoundBPM( element sound )&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''sound:''' A sound element that is created using [[playSound]] or [[playSound3D]]&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns the beats per minute of the given sound.&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;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- not done yet&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
{{Requirements|n/a|1.3.0-9.04162|}}&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Client_audio_functions}}&lt;br /&gt;
[[Category:Needs Example]]&lt;/div&gt;</summary>
		<author><name>TAPL</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=StopSound&amp;diff=33688</id>
		<title>StopSound</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=StopSound&amp;diff=33688"/>
		<updated>2012-10-06T08:58:05Z</updated>

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

		<summary type="html">&lt;p&gt;TAPL: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Client function}}&lt;br /&gt;
This function is used to return the volume level of the specified [[sound]] element.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;float getSoundVolume ( element theSound )&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theSound:''' The [[sound]] element which volume you want to return. &lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns a [[float]] representing the volume level of the [[sound]] element, ''false'' if invalid arguments were passed.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
TODO&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;
--TODO&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;
{{Client_audio_functions}}&lt;br /&gt;
[[Category:Needs Example]]&lt;/div&gt;</summary>
		<author><name>TAPL</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetSoundPosition&amp;diff=33686</id>
		<title>GetSoundPosition</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetSoundPosition&amp;diff=33686"/>
		<updated>2012-10-06T08:56:13Z</updated>

		<summary type="html">&lt;p&gt;TAPL: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Client function}}&lt;br /&gt;
This function is used to return the current seek position of the specified [[sound]] element.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;int getSoundPosition ( element theSound )&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theSound:''' The [[sound]] element which seek position you want to return.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns an [[int]]eger value indicating the seek position of the [[sound]] element in milliseconds.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
TODO&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;
--TODO&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;
{{Client_audio_functions}}&lt;br /&gt;
[[Category:Needs Example]]&lt;/div&gt;</summary>
		<author><name>TAPL</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetSoundLength&amp;diff=33685</id>
		<title>GetSoundLength</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetSoundLength&amp;diff=33685"/>
		<updated>2012-10-06T08:55:07Z</updated>

		<summary type="html">&lt;p&gt;TAPL: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Client function}}&lt;br /&gt;
This function is used to return the playback length of the specified [[sound]] element.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;float getSoundLength ( element theSound )&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theSound:''' The [[sound]] element which length you want to return.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns an [[float]] value indicating the playback length of the [[sound]] element in seconds.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
TODO&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;
--TODO&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;
{{Client_audio_functions}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Needs Example]]&lt;/div&gt;</summary>
		<author><name>TAPL</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Template:AR/Player_functions&amp;diff=33650</id>
		<title>Template:AR/Player functions</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Template:AR/Player_functions&amp;diff=33650"/>
		<updated>2012-09-29T19:35:36Z</updated>

		<summary type="html">&lt;p&gt;TAPL: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* [[AR/forcePlayerMap|forcePlayerMap]]&lt;br /&gt;
* [[AR/getAlivePlayers|getAlivePlayers]]&lt;br /&gt;
* [[AR/getDeadPlayers|getDeadPlayers]]&lt;br /&gt;
* [[AR/getPlayerAnnounceValue|getPlayerAnnounceValue]]&lt;br /&gt;
* [[AR/getPlayerBlurLevel|getPlayerBlurLevel]]&lt;br /&gt;
* [[AR/getPlayerCount|getPlayerCount]]&lt;br /&gt;
* [[AR/getPlayerMoney|getPlayerMoney]]&lt;br /&gt;
* [[AR/getPlayerNametagColor|getPlayerNametagColor]]&lt;br /&gt;
* [[AR/getPlayerNametagText|getPlayerNametagText]]&lt;br /&gt;
* [[AR/getPlayerPing|getPlayerPing]]&lt;br /&gt;
* [[AR/getPlayerTeam|getPlayerTeam]]&lt;br /&gt;
* [[AR/getPlayerVersion|getPlayerVersion]]&lt;br /&gt;
* [[AR/getPlayerWantedLevel|getPlayerWantedLevel]]&lt;br /&gt;
* [[AR/getRandomPlayer|getRandomPlayer]]&lt;br /&gt;
* [[AR/givePlayerMoney|givePlayerMoney]]&lt;br /&gt;
* [[AR/isPlayerMapForced|isPlayerMapForced]]&lt;br /&gt;
* [[AR/isPlayerMuted|isPlayerMuted]]&lt;br /&gt;
* [[AR/isPlayerNametagShowing|isPlayerNametagShowing]]&lt;br /&gt;
* [[AR/setPlayerAnnounceValue|setPlayerAnnounceValue]]&lt;br /&gt;
* [[AR/setPlayerBlurLevel|setPlayerBlurLevel]]&lt;br /&gt;
* [[AR/setPlayerMoney|setPlayerMoney]]&lt;br /&gt;
* [[AR/setPlayerMuted|setPlayerMuted]]&lt;br /&gt;
* [[AR/setPlayerNametagColor|setPlayerNametagColor]]&lt;br /&gt;
* [[AR/setPlayerNametagShowing|setPlayerNametagShowing]]&lt;br /&gt;
* [[AR/setPlayerNametagText|setPlayerNametagText]]&lt;br /&gt;
* [[AR/setPlayerTeam|setPlayerTeam]]&lt;br /&gt;
* [[AR/setPlayerWantedLevel|setPlayerWantedLevel]]&lt;br /&gt;
* [[AR/showPlayerHudComponent|showPlayerHudComponent]]&lt;br /&gt;
* [[AR/spawnPlayer|spawnPlayer]]&lt;br /&gt;
* [[AR/takePlayerMoney|takePlayerMoney]]&lt;br /&gt;
* [[AR/getPlayerFromName|getPlayerFromName]]&lt;br /&gt;
* [[AR/getPlayerIP|getPlayerIP]]&lt;br /&gt;
* [[AR/getPlayerName|getPlayerName]]&lt;br /&gt;
* [[AR/redirectPlayer|redirectPlayer]]&lt;br /&gt;
* [[AR/setPlayerName|setPlayerName]]&lt;br /&gt;
{{New items|3.0120|1.2|&lt;br /&gt;
* [[AR/getPlayerIdleTime|getPlayerIdleTime]]&lt;br /&gt;
* [[AR/resendPlayerModInfo|resendPlayerModInfo]]&lt;br /&gt;
}}&lt;br /&gt;
* [[AR/isVoiceEnabled|isVoiceEnabled]]&lt;br /&gt;
* [[AR/setPlayerVoiceBroadcastTo|setPlayerVoiceBroadcastTo]]&lt;br /&gt;
* [[AR/setPlayerVoiceIgnoreFrom|setPlayerVoiceIgnoreFrom]]&lt;br /&gt;
{{New items|3.0130|1.3|&lt;br /&gt;
* [[AR/takePlayerScreenShot|takePlayerScreenShot]]&lt;br /&gt;
}}&lt;br /&gt;
&amp;lt;noinclude&amp;gt;[[Category:Functions templates]]&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>TAPL</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=CreateBlip&amp;diff=33648</id>
		<title>CreateBlip</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=CreateBlip&amp;diff=33648"/>
		<updated>2012-09-29T15:38:43Z</updated>

		<summary type="html">&lt;p&gt;TAPL: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Server client function}}&lt;br /&gt;
This function creates a [[blip]] [[element]], which is displayed as an icon on the client's radar.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&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;
blip createBlip ( float x, float y, float z, [int icon=0, int size=2, int r=255, int g=0, int b=0, int a=255, &lt;br /&gt;
int ordering=0, float visibleDistance=99999.0, visibleTo = getRootElement()] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''x:''' The x position of the blip, in world coordinates.&lt;br /&gt;
*'''y:''' The y position of the blip, in world coordinates.&lt;br /&gt;
*'''z:''' The z position of the blip, in world coordinates.&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments=== &lt;br /&gt;
{{OptionalArg}} &lt;br /&gt;
*'''icon:''' The icon that the radar blips should be. Valid values are:&lt;br /&gt;
{{Blip_Icons}}&lt;br /&gt;
*'''size:''' The size of the radar blip. Only applicable to the ''Marker'' icon. Default is 2.&lt;br /&gt;
*'''r:''' The amount of red in the blip's color (0 - 255). Only applicable to the ''Marker'' icon. Default is 255. &lt;br /&gt;
*'''g:''' The amount of green in the blip's color (0 - 255). Only applicable to the ''Marker'' icon. Default is 0.&lt;br /&gt;
*'''b:''' The amount of blue in the blip's color (0 - 255). Only applicable to the ''Marker'' icon. Default is 0.&lt;br /&gt;
*'''a:''' The amount of alpha in the blip's color (0 - 255). Only applicable to the ''Marker'' icon. Default is 255.&lt;br /&gt;
{{New feature/item|3|1.0||&lt;br /&gt;
*'''ordering:''' This defines the blip's Z-level ordering (-32768 - 32767). Default is 0.&lt;br /&gt;
*'''visibleDistance:''' The maximum distance from the camera at which the blip is still visible&lt;br /&gt;
}}&lt;br /&gt;
*'''visibleTo:''' What elements can see the blip. Defaults to visible to everyone. See [[visibility]].&lt;br /&gt;
&amp;lt;/section&amp;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;
blip createBlip ( float x, float y, float z, [int icon=0, int size=2, int r=255, int g=0, int b=0, int a=255, &lt;br /&gt;
int ordering=0, float visibleDistance ] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''x:''' The x position of the blip, in world coordinates.&lt;br /&gt;
*'''y:''' The y position of the blip, in world coordinates.&lt;br /&gt;
*'''z:''' The z position of the blip, in world coordinates.&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments=== &lt;br /&gt;
{{OptionalArg}} &lt;br /&gt;
*'''icon:''' The icon that the radar blips should be. Valid values are:&lt;br /&gt;
{{Blip_Icons}}&lt;br /&gt;
*'''size:''' The size of the radar blip. Only applicable to the ''Marker'' icon. Default is 2.&lt;br /&gt;
*'''r:''' The amount of red in the blip's color (0 - 255). Only applicable to the ''Marker'' icon. Default is 255. &lt;br /&gt;
*'''g:''' The amount of green in the blip's color (0 - 255). Only applicable to the ''Marker'' icon. Default is 0.&lt;br /&gt;
*'''b:''' The amount of blue in the blip's color (0 - 255). Only applicable to the ''Marker'' icon. Default is 0.&lt;br /&gt;
*'''a:''' The amount of alpha in the blip's color (0 - 255). Only applicable to the ''Marker'' icon. Default is 255.&lt;br /&gt;
{{New feature/item|3|1.0||&lt;br /&gt;
*'''ordering:''' This defines the blip's Z-level ordering (-32768 - 32767). Default is 0.&lt;br /&gt;
*'''visibleDistance:''' The maximum distance from the camera at which the blip is still visible&lt;br /&gt;
}}&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Returns==&lt;br /&gt;
Returns an [[element]] of the [[blip]] if it was created successfully, ''false'' otherwise.&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;
'''Example 1:''' This example creates a radar blip at a random player's position and makes it so that it is only visible to that player.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- Pick a random player&lt;br /&gt;
myPlayer = getRandomPlayer ()&lt;br /&gt;
-- Retrieve the player's position and store it in the variables x, y and z&lt;br /&gt;
x,y,z = getElementPosition ( myPlayer )&lt;br /&gt;
-- Create a radar blip at the player's position, with a 'cash' icon and only visible to the player&lt;br /&gt;
myBlip = createBlip ( x, y, z, 51, 0, 0, 0, 255, myPlayer )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example 2:''' This example attaches a blip to a player. You can attach a blip to an element by just setting the blip's parent to that element.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- Pick a random player&lt;br /&gt;
myPlayer = getRandomPlayer ()&lt;br /&gt;
-- Create a radar blip in the middle of the map&lt;br /&gt;
myBlip = createBlip ( 0, 0, 0 )&lt;br /&gt;
-- Make the player the parent of the blip, so that the blip follows the player around&lt;br /&gt;
setElementParent ( myBlip, myPlayer )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example 3:''' This example creates a blip at 0 , 0 , 0&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
--creates a blip at 0 , 0 , 0&lt;br /&gt;
createBlip ( 0 , 0 , 0 , 37 )&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;
{{Blip_functions}}&lt;br /&gt;
&lt;br /&gt;
[[AR:createBlip]]&lt;br /&gt;
[[es:createBlip]]&lt;/div&gt;</summary>
		<author><name>TAPL</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=CreateBlip&amp;diff=33647</id>
		<title>CreateBlip</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=CreateBlip&amp;diff=33647"/>
		<updated>2012-09-29T15:38:14Z</updated>

		<summary type="html">&lt;p&gt;TAPL: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Server client function}}&lt;br /&gt;
This function creates a [[blip]] [[element]], which is displayed as an icon on the client's radar.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&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;
blip createBlip ( float x, float y, float z, [int icon=0, int size=2, int r=255, int g=0, int b=0, int a=255, &lt;br /&gt;
int ordering=0, float visibleDistance=99999.0, visibleTo = getRootElement()] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''x:''' The x position of the blip, in world coordinates.&lt;br /&gt;
*'''y:''' The y position of the blip, in world coordinates.&lt;br /&gt;
*'''z:''' The z position of the blip, in world coordinates.&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments=== &lt;br /&gt;
{{OptionalArg}} &lt;br /&gt;
*'''icon:''' The icon that the radar blips should be. Valid values are:&lt;br /&gt;
{{Blip_Icons}}&lt;br /&gt;
*'''size:''' The size of the radar blip. Only applicable to the ''Marker'' icon. Default is 2.&lt;br /&gt;
*'''r:''' The amount of red in the blip's color (0 - 255). Only applicable to the ''Marker'' icon. Default is 255. &lt;br /&gt;
*'''g:''' The amount of green in the blip's color (0 - 255). Only applicable to the ''Marker'' icon. Default is 0.&lt;br /&gt;
*'''b:''' The amount of blue in the blip's color (0 - 255). Only applicable to the ''Marker'' icon. Default is 0.&lt;br /&gt;
*'''a:''' The amount of alpha in the blip's color (0 - 255). Only applicable to the ''Marker'' icon. Default is 255.&lt;br /&gt;
{{New feature/item|3|1.0||&lt;br /&gt;
*'''ordering:''' This defines the blip's Z-level ordering (-32768 - 32767). Default is 0.&lt;br /&gt;
*'''visibleDistance:''' The maximum distance from the camera at which the blip is still visible&lt;br /&gt;
}}&lt;br /&gt;
*'''visibleTo:''' What elements can see the blip. Defaults to visible to everyone. See [[visibility]].&lt;br /&gt;
&amp;lt;/section&amp;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;
blip createBlip ( float x, float y, float z, [int icon=0, int size=2, int r=255, int g=0, int b=0, int a=255, &lt;br /&gt;
int ordering=0, float visibleDistance ] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''x:''' The x position of the blip, in world coordinates.&lt;br /&gt;
*'''y:''' The y position of the blip, in world coordinates.&lt;br /&gt;
*'''z:''' The z position of the blip, in world coordinates.&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments=== &lt;br /&gt;
{{OptionalArg}} &lt;br /&gt;
*'''icon:''' The icon that the radar blips should be. Valid values are:&lt;br /&gt;
{{Blip_Icons}}&lt;br /&gt;
*'''size:''' The size of the radar blip. Only applicable to the ''Marker'' icon. Default is 2.&lt;br /&gt;
*'''r:''' The amount of red in the blip's color (0 - 255). Only applicable to the ''Marker'' icon. Default is 255. &lt;br /&gt;
*'''g:''' The amount of green in the blip's color (0 - 255). Only applicable to the ''Marker'' icon. Default is 0.&lt;br /&gt;
*'''b:''' The amount of blue in the blip's color (0 - 255). Only applicable to the ''Marker'' icon. Default is 0.&lt;br /&gt;
*'''a:''' The amount of alpha in the blip's color (0 - 255). Only applicable to the ''Marker'' icon. Default is 255.&lt;br /&gt;
{{New feature/item|3|1.0||&lt;br /&gt;
*'''ordering:''' This defines the blip's Z-level ordering (-32768 - 32767). Default is 0.&lt;br /&gt;
*'''visibleDistance:''' The maximum distance from the camera at which the blip is still visible&lt;br /&gt;
}}&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Returns==&lt;br /&gt;
Returns an [[element]] of the [[blip]] if it was created successfully, ''false'' otherwise.&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;
'''Example 1:''' This example creates a radar blip at a random player's position and makes it so that it is only visible to that player.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- Pick a random player&lt;br /&gt;
myPlayer = getRandomPlayer ()&lt;br /&gt;
-- Retrieve the player's position and store it in the variables x, y and z&lt;br /&gt;
x,y,z = getElementPosition ( myPlayer )&lt;br /&gt;
-- Create a radar blip at the player's position, with a 'cash' icon and only visible to the player&lt;br /&gt;
myBlip = createBlip ( x, y, z, 51, 0, 0, 0, 255, myPlayer )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example 2:''' This example attaches a blip to a player. You can attach a blip to an element by just setting the blip's parent to that element.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- Pick a random player&lt;br /&gt;
myPlayer = getRandomPlayer ()&lt;br /&gt;
-- Create a radar blip in the middle of the map&lt;br /&gt;
myBlip = createBlip ( 0, 0, 0 )&lt;br /&gt;
-- Make the player the parent of the blip, so that the blip follows the player around&lt;br /&gt;
setElementParent ( myBlip, myPlayer )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example 3:''' This example creates a blip at 0 , 0 , 0&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
--creates a blip at 0 , 0 , 0&lt;br /&gt;
createBlip ( 0 , 0 , 0 , 37 )&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;
{{Blip_functions}}&lt;br /&gt;
&lt;br /&gt;
[[AR:CreateBlip]]&lt;br /&gt;
[[es:CreateBlip]]&lt;/div&gt;</summary>
		<author><name>TAPL</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Template:AR/Blip_functions&amp;diff=33646</id>
		<title>Template:AR/Blip functions</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Template:AR/Blip_functions&amp;diff=33646"/>
		<updated>2012-09-29T15:35:09Z</updated>

		<summary type="html">&lt;p&gt;TAPL: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;*[[AR/createBlip|createBlip]]&lt;br /&gt;
*[[AR/createBlipAttachedTo|createBlipAttachedTo]]&lt;br /&gt;
*[[AR/getBlipColor|getBlipColor]]&lt;br /&gt;
*[[AR/getBlipIcon|getBlipIcon]]&lt;br /&gt;
*[[AR/getBlipSize|getBlipSize]]&lt;br /&gt;
*[[AR/setBlipColor|setBlipColor]]&lt;br /&gt;
*[[AR/setBlipIcon|setBlipIcon]]&lt;br /&gt;
*[[AR/setBlipSize|setBlipSize]]&lt;br /&gt;
*[[AR/getBlipOrdering|getBlipOrdering]]&lt;br /&gt;
*[[AR/setBlipOrdering|setBlipOrdering]]&lt;br /&gt;
{{New items|3.0110|1.1|&lt;br /&gt;
*[[AR/getBlipVisibleDistance|getBlipVisibleDistance]]&lt;br /&gt;
*[[AR/setBlipVisibleDistance|setBlipVisibleDistance]]&lt;br /&gt;
}}&lt;br /&gt;
&amp;lt;noinclude&amp;gt;[[Category:Functions templates]]&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>TAPL</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=AR/Server_Scripting_Functions&amp;diff=33645</id>
		<title>AR/Server Scripting Functions</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=AR/Server_Scripting_Functions&amp;diff=33645"/>
		<updated>2012-09-29T15:35:03Z</updated>

		<summary type="html">&lt;p&gt;TAPL: /* Announcement functions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;pageclass class=&amp;quot;server&amp;quot;&amp;gt;&amp;lt;/pageclass&amp;gt;&lt;br /&gt;
{{Adding_Pages_to_Categories_and_Templates}}&lt;br /&gt;
This page lists all the '''server-side''' scripting functions that have been implemented and are available as native functions. To request a function or event, use [[Requested Functions and Events]] or http://bugs.mtasa.com.&lt;br /&gt;
&lt;br /&gt;
Please note that the scripting functions can also be extended by loading in dynamic modules that provide new functionality, such as utility functions. These scripting functions are non-native and require the module to be loaded in order to work.&lt;br /&gt;
&lt;br /&gt;
Head over to [[Modules]] for a list of non-native serverside functions and modules that are available.&lt;br /&gt;
&lt;br /&gt;
For more functions, check the [[Useful_Functions|useful functions page]].&lt;br /&gt;
&lt;br /&gt;
'''Client-side scripting functions can be found here: [[Client Scripting Functions]].'''&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
==Account functions==&lt;br /&gt;
{{AR/Account_functions}}&lt;br /&gt;
&lt;br /&gt;
==ACL functions==&lt;br /&gt;
{{AR/ACL_functions}}&lt;br /&gt;
&lt;br /&gt;
==Admin functions==&lt;br /&gt;
{{AR/Admin_functions}}&lt;br /&gt;
&lt;br /&gt;
==Audio functions==&lt;br /&gt;
{{AR/Audio_functions}}&lt;br /&gt;
&lt;br /&gt;
==Blip functions==&lt;br /&gt;
{{AR/Blip_functions}}&lt;br /&gt;
&lt;br /&gt;
==Camera functions==&lt;br /&gt;
{{AR/Camera functions}}&lt;br /&gt;
&lt;br /&gt;
==Collision shape functions==&lt;br /&gt;
{{AR/Collision shape functions}}&lt;br /&gt;
&lt;br /&gt;
==Clothes and body functions==&lt;br /&gt;
{{AR/Clothes and body functions}}&lt;br /&gt;
&lt;br /&gt;
==Cursor functions==&lt;br /&gt;
{{AR/Cursor_functions}}&lt;br /&gt;
&lt;br /&gt;
==Element functions==&lt;br /&gt;
{{AR/Element functions}}&lt;br /&gt;
&lt;br /&gt;
==Event functions==&lt;br /&gt;
{{AR/Event_functions}}&lt;br /&gt;
&lt;br /&gt;
==Explosion functions==&lt;br /&gt;
{{AR/Explosion_functions}}&lt;br /&gt;
&lt;br /&gt;
==File functions==&lt;br /&gt;
{{AR/File_functions}}&lt;br /&gt;
&lt;br /&gt;
==HTTP functions==&lt;br /&gt;
{{AR/HTTP_functions}}&lt;br /&gt;
&lt;br /&gt;
==Input functions==&lt;br /&gt;
{{AR/Input_functions}}&lt;br /&gt;
&lt;br /&gt;
==Map functions==&lt;br /&gt;
{{AR/Map_functions}}&lt;br /&gt;
&lt;br /&gt;
==Marker functions==&lt;br /&gt;
{{AR/Marker functions}}&lt;br /&gt;
&lt;br /&gt;
==Module functions==&lt;br /&gt;
{{AR/Module functions}}&lt;br /&gt;
&lt;br /&gt;
==Object functions==&lt;br /&gt;
{{AR/Object functions}}&lt;br /&gt;
&lt;br /&gt;
==Ped functions==&lt;br /&gt;
{{AR/Ped_functions}}&lt;br /&gt;
&lt;br /&gt;
==Pickup functions==&lt;br /&gt;
{{AR/Pickup functions}}&lt;br /&gt;
&lt;br /&gt;
==Player functions==&lt;br /&gt;
{{AR/Player functions}}&lt;br /&gt;
&lt;br /&gt;
==Radar area functions==&lt;br /&gt;
{{AR/Radar area functions}}&lt;br /&gt;
&lt;br /&gt;
==Resource functions==&lt;br /&gt;
{{AR/Resource functions}}&lt;br /&gt;
&lt;br /&gt;
==Serial functions==&lt;br /&gt;
{{AR/Serial functions}}&lt;br /&gt;
&lt;br /&gt;
==Server functions==&lt;br /&gt;
{{AR/Server functions}}&lt;br /&gt;
&lt;br /&gt;
==Settings registry functions==&lt;br /&gt;
{{AR/Settings registry functions}}&lt;br /&gt;
&lt;br /&gt;
==SQL functions==&lt;br /&gt;
{{AR/SQL_functions}}&lt;br /&gt;
&lt;br /&gt;
==Team functions==&lt;br /&gt;
{{AR/Team functions}}&lt;br /&gt;
&lt;br /&gt;
==Text functions==&lt;br /&gt;
{{AR/Text functions}}&lt;br /&gt;
&lt;br /&gt;
==Utility functions==&lt;br /&gt;
{{AR/Utility functions}}&lt;br /&gt;
&lt;br /&gt;
==Vehicle functions==&lt;br /&gt;
{{AR/Vehicle functions}}&lt;br /&gt;
&lt;br /&gt;
==Water functions==&lt;br /&gt;
{{AR/Water functions}}&lt;br /&gt;
&lt;br /&gt;
==Weapon functions==&lt;br /&gt;
{{AR/Weapon functions}}&lt;br /&gt;
&lt;br /&gt;
==World functions==&lt;br /&gt;
{{AR/World functions}}&lt;br /&gt;
&lt;br /&gt;
==XML functions==&lt;br /&gt;
{{AR/XML functions}}&lt;br /&gt;
&lt;br /&gt;
[[en:Server Scripting Functions]]&lt;br /&gt;
[[es:Funciones_del_Server]]&lt;br /&gt;
[[de:Server-Seitige Scripting Funktionen]]&lt;/div&gt;</summary>
		<author><name>TAPL</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=AR/Server_Scripting_Functions&amp;diff=33644</id>
		<title>AR/Server Scripting Functions</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=AR/Server_Scripting_Functions&amp;diff=33644"/>
		<updated>2012-09-29T15:33:28Z</updated>

		<summary type="html">&lt;p&gt;TAPL: /* Blip functions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;pageclass class=&amp;quot;server&amp;quot;&amp;gt;&amp;lt;/pageclass&amp;gt;&lt;br /&gt;
{{Adding_Pages_to_Categories_and_Templates}}&lt;br /&gt;
This page lists all the '''server-side''' scripting functions that have been implemented and are available as native functions. To request a function or event, use [[Requested Functions and Events]] or http://bugs.mtasa.com.&lt;br /&gt;
&lt;br /&gt;
Please note that the scripting functions can also be extended by loading in dynamic modules that provide new functionality, such as utility functions. These scripting functions are non-native and require the module to be loaded in order to work.&lt;br /&gt;
&lt;br /&gt;
Head over to [[Modules]] for a list of non-native serverside functions and modules that are available.&lt;br /&gt;
&lt;br /&gt;
For more functions, check the [[Useful_Functions|useful functions page]].&lt;br /&gt;
&lt;br /&gt;
'''Client-side scripting functions can be found here: [[Client Scripting Functions]].'''&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
==Account functions==&lt;br /&gt;
{{AR/Account_functions}}&lt;br /&gt;
&lt;br /&gt;
==ACL functions==&lt;br /&gt;
{{AR/ACL_functions}}&lt;br /&gt;
&lt;br /&gt;
==Admin functions==&lt;br /&gt;
{{AR/Admin_functions}}&lt;br /&gt;
&lt;br /&gt;
==Audio functions==&lt;br /&gt;
{{AR/Audio_functions}}&lt;br /&gt;
&lt;br /&gt;
==Announcement functions==&lt;br /&gt;
{{AR/Announce_functions}}&lt;br /&gt;
&lt;br /&gt;
*[[AR/createBlip|createBlip]]&lt;br /&gt;
*[[AR/createBlipAttachedTo|createBlipAttachedTo]]&lt;br /&gt;
*[[AR/getBlipColor|getBlipColor]]&lt;br /&gt;
*[[AR/getBlipIcon|getBlipIcon]]&lt;br /&gt;
*[[AR/getBlipSize|getBlipSize]]&lt;br /&gt;
*[[AR/setBlipColor|setBlipColor]]&lt;br /&gt;
*[[AR/setBlipIcon|setBlipIcon]]&lt;br /&gt;
*[[AR/setBlipSize|setBlipSize]]&lt;br /&gt;
*[[AR/getBlipOrdering|getBlipOrdering]]&lt;br /&gt;
*[[AR/setBlipOrdering|setBlipOrdering]]&lt;br /&gt;
{{New items|3.0110|1.1|&lt;br /&gt;
*[[AR/getBlipVisibleDistance|getBlipVisibleDistance]]&lt;br /&gt;
*[[AR/setBlipVisibleDistance|setBlipVisibleDistance]]&lt;br /&gt;
}}&lt;br /&gt;
&amp;lt;noinclude&amp;gt;[[Category:Functions templates]]&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Camera functions==&lt;br /&gt;
{{AR/Camera functions}}&lt;br /&gt;
&lt;br /&gt;
==Collision shape functions==&lt;br /&gt;
{{AR/Collision shape functions}}&lt;br /&gt;
&lt;br /&gt;
==Clothes and body functions==&lt;br /&gt;
{{AR/Clothes and body functions}}&lt;br /&gt;
&lt;br /&gt;
==Cursor functions==&lt;br /&gt;
{{AR/Cursor_functions}}&lt;br /&gt;
&lt;br /&gt;
==Element functions==&lt;br /&gt;
{{AR/Element functions}}&lt;br /&gt;
&lt;br /&gt;
==Event functions==&lt;br /&gt;
{{AR/Event_functions}}&lt;br /&gt;
&lt;br /&gt;
==Explosion functions==&lt;br /&gt;
{{AR/Explosion_functions}}&lt;br /&gt;
&lt;br /&gt;
==File functions==&lt;br /&gt;
{{AR/File_functions}}&lt;br /&gt;
&lt;br /&gt;
==HTTP functions==&lt;br /&gt;
{{AR/HTTP_functions}}&lt;br /&gt;
&lt;br /&gt;
==Input functions==&lt;br /&gt;
{{AR/Input_functions}}&lt;br /&gt;
&lt;br /&gt;
==Map functions==&lt;br /&gt;
{{AR/Map_functions}}&lt;br /&gt;
&lt;br /&gt;
==Marker functions==&lt;br /&gt;
{{AR/Marker functions}}&lt;br /&gt;
&lt;br /&gt;
==Module functions==&lt;br /&gt;
{{AR/Module functions}}&lt;br /&gt;
&lt;br /&gt;
==Object functions==&lt;br /&gt;
{{AR/Object functions}}&lt;br /&gt;
&lt;br /&gt;
==Ped functions==&lt;br /&gt;
{{AR/Ped_functions}}&lt;br /&gt;
&lt;br /&gt;
==Pickup functions==&lt;br /&gt;
{{AR/Pickup functions}}&lt;br /&gt;
&lt;br /&gt;
==Player functions==&lt;br /&gt;
{{AR/Player functions}}&lt;br /&gt;
&lt;br /&gt;
==Radar area functions==&lt;br /&gt;
{{AR/Radar area functions}}&lt;br /&gt;
&lt;br /&gt;
==Resource functions==&lt;br /&gt;
{{AR/Resource functions}}&lt;br /&gt;
&lt;br /&gt;
==Serial functions==&lt;br /&gt;
{{AR/Serial functions}}&lt;br /&gt;
&lt;br /&gt;
==Server functions==&lt;br /&gt;
{{AR/Server functions}}&lt;br /&gt;
&lt;br /&gt;
==Settings registry functions==&lt;br /&gt;
{{AR/Settings registry functions}}&lt;br /&gt;
&lt;br /&gt;
==SQL functions==&lt;br /&gt;
{{AR/SQL_functions}}&lt;br /&gt;
&lt;br /&gt;
==Team functions==&lt;br /&gt;
{{AR/Team functions}}&lt;br /&gt;
&lt;br /&gt;
==Text functions==&lt;br /&gt;
{{AR/Text functions}}&lt;br /&gt;
&lt;br /&gt;
==Utility functions==&lt;br /&gt;
{{AR/Utility functions}}&lt;br /&gt;
&lt;br /&gt;
==Vehicle functions==&lt;br /&gt;
{{AR/Vehicle functions}}&lt;br /&gt;
&lt;br /&gt;
==Water functions==&lt;br /&gt;
{{AR/Water functions}}&lt;br /&gt;
&lt;br /&gt;
==Weapon functions==&lt;br /&gt;
{{AR/Weapon functions}}&lt;br /&gt;
&lt;br /&gt;
==World functions==&lt;br /&gt;
{{AR/World functions}}&lt;br /&gt;
&lt;br /&gt;
==XML functions==&lt;br /&gt;
{{AR/XML functions}}&lt;br /&gt;
&lt;br /&gt;
[[en:Server Scripting Functions]]&lt;br /&gt;
[[es:Funciones_del_Server]]&lt;br /&gt;
[[de:Server-Seitige Scripting Funktionen]]&lt;/div&gt;</summary>
		<author><name>TAPL</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Template:AR/Blip_functions&amp;diff=33643</id>
		<title>Template:AR/Blip functions</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Template:AR/Blip_functions&amp;diff=33643"/>
		<updated>2012-09-29T15:33:23Z</updated>

		<summary type="html">&lt;p&gt;TAPL: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Blip functions==&lt;br /&gt;
{{AR/Blip_functions}}&lt;/div&gt;</summary>
		<author><name>TAPL</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=AR/createBlip&amp;diff=33642</id>
		<title>AR/createBlip</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=AR/createBlip&amp;diff=33642"/>
		<updated>2012-09-29T15:31:35Z</updated>

		<summary type="html">&lt;p&gt;TAPL: /* See Also */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Server client function}}&lt;br /&gt;
This function creates a [[blip]] [[element]], which is displayed as an icon on the client's radar.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&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;
blip createBlip ( float x, float y, float z, [int icon=0, int size=2, int r=255, int g=0, int b=0, int a=255, &lt;br /&gt;
int ordering=0, float visibleDistance=99999.0, visibleTo = getRootElement()] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''x:''' The x position of the blip, in world coordinates.&lt;br /&gt;
*'''y:''' The y position of the blip, in world coordinates.&lt;br /&gt;
*'''z:''' The z position of the blip, in world coordinates.&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments=== &lt;br /&gt;
{{OptionalArg}} &lt;br /&gt;
*'''icon:''' The icon that the radar blips should be. Valid values are:&lt;br /&gt;
{{Blip_Icons}}&lt;br /&gt;
*'''size:''' The size of the radar blip. Only applicable to the ''Marker'' icon. Default is 2.&lt;br /&gt;
*'''r:''' The amount of red in the blip's color (0 - 255). Only applicable to the ''Marker'' icon. Default is 255. &lt;br /&gt;
*'''g:''' The amount of green in the blip's color (0 - 255). Only applicable to the ''Marker'' icon. Default is 0.&lt;br /&gt;
*'''b:''' The amount of blue in the blip's color (0 - 255). Only applicable to the ''Marker'' icon. Default is 0.&lt;br /&gt;
*'''a:''' The amount of alpha in the blip's color (0 - 255). Only applicable to the ''Marker'' icon. Default is 255.&lt;br /&gt;
{{New feature/item|3|1.0||&lt;br /&gt;
*'''ordering:''' This defines the blip's Z-level ordering (-32768 - 32767). Default is 0.&lt;br /&gt;
*'''visibleDistance:''' The maximum distance from the camera at which the blip is still visible&lt;br /&gt;
}}&lt;br /&gt;
*'''visibleTo:''' What elements can see the blip. Defaults to visible to everyone. See [[visibility]].&lt;br /&gt;
&amp;lt;/section&amp;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;
blip createBlip ( float x, float y, float z, [int icon=0, int size=2, int r=255, int g=0, int b=0, int a=255, &lt;br /&gt;
int ordering=0, float visibleDistance ] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''x:''' The x position of the blip, in world coordinates.&lt;br /&gt;
*'''y:''' The y position of the blip, in world coordinates.&lt;br /&gt;
*'''z:''' The z position of the blip, in world coordinates.&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments=== &lt;br /&gt;
{{OptionalArg}} &lt;br /&gt;
*'''icon:''' The icon that the radar blips should be. Valid values are:&lt;br /&gt;
{{Blip_Icons}}&lt;br /&gt;
*'''size:''' The size of the radar blip. Only applicable to the ''Marker'' icon. Default is 2.&lt;br /&gt;
*'''r:''' The amount of red in the blip's color (0 - 255). Only applicable to the ''Marker'' icon. Default is 255. &lt;br /&gt;
*'''g:''' The amount of green in the blip's color (0 - 255). Only applicable to the ''Marker'' icon. Default is 0.&lt;br /&gt;
*'''b:''' The amount of blue in the blip's color (0 - 255). Only applicable to the ''Marker'' icon. Default is 0.&lt;br /&gt;
*'''a:''' The amount of alpha in the blip's color (0 - 255). Only applicable to the ''Marker'' icon. Default is 255.&lt;br /&gt;
{{New feature/item|3|1.0||&lt;br /&gt;
*'''ordering:''' This defines the blip's Z-level ordering (-32768 - 32767). Default is 0.&lt;br /&gt;
*'''visibleDistance:''' The maximum distance from the camera at which the blip is still visible&lt;br /&gt;
}}&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Returns==&lt;br /&gt;
Returns an [[element]] of the [[blip]] if it was created successfully, ''false'' otherwise.&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;
'''Example 1:''' This example creates a radar blip at a random player's position and makes it so that it is only visible to that player.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- Pick a random player&lt;br /&gt;
myPlayer = getRandomPlayer ()&lt;br /&gt;
-- Retrieve the player's position and store it in the variables x, y and z&lt;br /&gt;
x,y,z = getElementPosition ( myPlayer )&lt;br /&gt;
-- Create a radar blip at the player's position, with a 'cash' icon and only visible to the player&lt;br /&gt;
myBlip = createBlip ( x, y, z, 51, 0, 0, 0, 255, myPlayer )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example 2:''' This example attaches a blip to a player. You can attach a blip to an element by just setting the blip's parent to that element.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- Pick a random player&lt;br /&gt;
myPlayer = getRandomPlayer ()&lt;br /&gt;
-- Create a radar blip in the middle of the map&lt;br /&gt;
myBlip = createBlip ( 0, 0, 0 )&lt;br /&gt;
-- Make the player the parent of the blip, so that the blip follows the player around&lt;br /&gt;
setElementParent ( myBlip, myPlayer )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example 3:''' This example creates a blip at 0 , 0 , 0&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
--creates a blip at 0 , 0 , 0&lt;br /&gt;
createBlip ( 0 , 0 , 0 , 37 )&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;
{{AR/Blip_functions}}&lt;br /&gt;
&lt;br /&gt;
[[en:CreateBlip]]&lt;/div&gt;</summary>
		<author><name>TAPL</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=AR/createBlip&amp;diff=33641</id>
		<title>AR/createBlip</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=AR/createBlip&amp;diff=33641"/>
		<updated>2012-09-29T15:31:05Z</updated>

		<summary type="html">&lt;p&gt;TAPL: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Server client function}}&lt;br /&gt;
This function creates a [[blip]] [[element]], which is displayed as an icon on the client's radar.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&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;
blip createBlip ( float x, float y, float z, [int icon=0, int size=2, int r=255, int g=0, int b=0, int a=255, &lt;br /&gt;
int ordering=0, float visibleDistance=99999.0, visibleTo = getRootElement()] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''x:''' The x position of the blip, in world coordinates.&lt;br /&gt;
*'''y:''' The y position of the blip, in world coordinates.&lt;br /&gt;
*'''z:''' The z position of the blip, in world coordinates.&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments=== &lt;br /&gt;
{{OptionalArg}} &lt;br /&gt;
*'''icon:''' The icon that the radar blips should be. Valid values are:&lt;br /&gt;
{{Blip_Icons}}&lt;br /&gt;
*'''size:''' The size of the radar blip. Only applicable to the ''Marker'' icon. Default is 2.&lt;br /&gt;
*'''r:''' The amount of red in the blip's color (0 - 255). Only applicable to the ''Marker'' icon. Default is 255. &lt;br /&gt;
*'''g:''' The amount of green in the blip's color (0 - 255). Only applicable to the ''Marker'' icon. Default is 0.&lt;br /&gt;
*'''b:''' The amount of blue in the blip's color (0 - 255). Only applicable to the ''Marker'' icon. Default is 0.&lt;br /&gt;
*'''a:''' The amount of alpha in the blip's color (0 - 255). Only applicable to the ''Marker'' icon. Default is 255.&lt;br /&gt;
{{New feature/item|3|1.0||&lt;br /&gt;
*'''ordering:''' This defines the blip's Z-level ordering (-32768 - 32767). Default is 0.&lt;br /&gt;
*'''visibleDistance:''' The maximum distance from the camera at which the blip is still visible&lt;br /&gt;
}}&lt;br /&gt;
*'''visibleTo:''' What elements can see the blip. Defaults to visible to everyone. See [[visibility]].&lt;br /&gt;
&amp;lt;/section&amp;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;
blip createBlip ( float x, float y, float z, [int icon=0, int size=2, int r=255, int g=0, int b=0, int a=255, &lt;br /&gt;
int ordering=0, float visibleDistance ] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''x:''' The x position of the blip, in world coordinates.&lt;br /&gt;
*'''y:''' The y position of the blip, in world coordinates.&lt;br /&gt;
*'''z:''' The z position of the blip, in world coordinates.&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments=== &lt;br /&gt;
{{OptionalArg}} &lt;br /&gt;
*'''icon:''' The icon that the radar blips should be. Valid values are:&lt;br /&gt;
{{Blip_Icons}}&lt;br /&gt;
*'''size:''' The size of the radar blip. Only applicable to the ''Marker'' icon. Default is 2.&lt;br /&gt;
*'''r:''' The amount of red in the blip's color (0 - 255). Only applicable to the ''Marker'' icon. Default is 255. &lt;br /&gt;
*'''g:''' The amount of green in the blip's color (0 - 255). Only applicable to the ''Marker'' icon. Default is 0.&lt;br /&gt;
*'''b:''' The amount of blue in the blip's color (0 - 255). Only applicable to the ''Marker'' icon. Default is 0.&lt;br /&gt;
*'''a:''' The amount of alpha in the blip's color (0 - 255). Only applicable to the ''Marker'' icon. Default is 255.&lt;br /&gt;
{{New feature/item|3|1.0||&lt;br /&gt;
*'''ordering:''' This defines the blip's Z-level ordering (-32768 - 32767). Default is 0.&lt;br /&gt;
*'''visibleDistance:''' The maximum distance from the camera at which the blip is still visible&lt;br /&gt;
}}&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Returns==&lt;br /&gt;
Returns an [[element]] of the [[blip]] if it was created successfully, ''false'' otherwise.&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;
'''Example 1:''' This example creates a radar blip at a random player's position and makes it so that it is only visible to that player.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- Pick a random player&lt;br /&gt;
myPlayer = getRandomPlayer ()&lt;br /&gt;
-- Retrieve the player's position and store it in the variables x, y and z&lt;br /&gt;
x,y,z = getElementPosition ( myPlayer )&lt;br /&gt;
-- Create a radar blip at the player's position, with a 'cash' icon and only visible to the player&lt;br /&gt;
myBlip = createBlip ( x, y, z, 51, 0, 0, 0, 255, myPlayer )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example 2:''' This example attaches a blip to a player. You can attach a blip to an element by just setting the blip's parent to that element.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- Pick a random player&lt;br /&gt;
myPlayer = getRandomPlayer ()&lt;br /&gt;
-- Create a radar blip in the middle of the map&lt;br /&gt;
myBlip = createBlip ( 0, 0, 0 )&lt;br /&gt;
-- Make the player the parent of the blip, so that the blip follows the player around&lt;br /&gt;
setElementParent ( myBlip, myPlayer )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example 3:''' This example creates a blip at 0 , 0 , 0&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
--creates a blip at 0 , 0 , 0&lt;br /&gt;
createBlip ( 0 , 0 , 0 , 37 )&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;
{{AR/Blip_functions}}&lt;br /&gt;
&lt;br /&gt;
[[es:CreateBlip]]&lt;/div&gt;</summary>
		<author><name>TAPL</name></author>
	</entry>
</feed>