<?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=%D8%A2%D8%AD%D9%85%D8%AF+%D8%A2%D9%84%D8%B9%D9%84%D9%8E%D9%8A</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=%D8%A2%D8%AD%D9%85%D8%AF+%D8%A2%D9%84%D8%B9%D9%84%D9%8E%D9%8A"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/wiki/Special:Contributions/%D8%A2%D8%AD%D9%85%D8%AF_%D8%A2%D9%84%D8%B9%D9%84%D9%8E%D9%8A"/>
	<updated>2026-05-23T08:58:45Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Talk:Useful_Functions&amp;diff=43233</id>
		<title>Talk:Useful Functions</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Talk:Useful_Functions&amp;diff=43233"/>
		<updated>2014-12-07T17:48:15Z</updated>

		<summary type="html">&lt;p&gt;آحمد آلعلَي: /* addAccountToConsole */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;there i wrote isElementInPhotograph()&lt;br /&gt;
enjoy&lt;br /&gt;
[[User:Drline|Drline]] 04:44, 30 October 2012 (UTC)&lt;br /&gt;
&lt;br /&gt;
== addAccountToConsole ==&lt;br /&gt;
&lt;br /&gt;
{{Useful Function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function add Account Console&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;* accName addAccountToConsole ( thePlayer, accountName )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
* '''thePlayer''': Name the player who wants calculation mode .&lt;br /&gt;
* '''accountName''': The account you want to add .&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This example center the window.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
    addAccountToConsole = function ( plr , name )&lt;br /&gt;
        if name and tostring ( name ) and plr and isElement ( plr ) and getElementType ( plr ) == 'player' then&lt;br /&gt;
            local acc = getPlayerAccount ( plr )&lt;br /&gt;
                if not acc or isGuestAccount ( acc ) then return end&lt;br /&gt;
                    if isObjectInACLGroup ( 'user.'.. getAccountName ( acc ) , aclGetGroup ( 'Console' ) ) then&lt;br /&gt;
                        if not isObjectInACLGroup ( 'user.'.. name , aclGetGroup ( 'Console' ) ) then&lt;br /&gt;
                            aclGroupAddObject ( aclGetGroup( 'Console' ), 'user.' .. name )&lt;br /&gt;
                else&lt;br /&gt;
                    return false&lt;br /&gt;
                end&lt;br /&gt;
            else   &lt;br /&gt;
                    return false&lt;br /&gt;
                end&lt;br /&gt;
        else&lt;br /&gt;
                return false&lt;br /&gt;
            end&lt;br /&gt;
        return name or false&lt;br /&gt;
    end&lt;br /&gt;
     &lt;br /&gt;
    addCommandHandler ( 'add_', function ( plr , _, name )&lt;br /&gt;
        local name = addAccountToConsole ( plr, name )&lt;br /&gt;
            if not name then return false end&lt;br /&gt;
                outputChatBox ( 'Warning ! the account : '.. name .. ' was added to console group !', root )&lt;br /&gt;
        end&lt;br /&gt;
    )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Author: The Best&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Useful_Functions}}&lt;/div&gt;</summary>
		<author><name>آحمد آلعلَي</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Talk:Useful_Functions&amp;diff=43232</id>
		<title>Talk:Useful Functions</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Talk:Useful_Functions&amp;diff=43232"/>
		<updated>2014-12-07T17:47:11Z</updated>

		<summary type="html">&lt;p&gt;آحمد آلعلَي: /* Required Arguments */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;there i wrote isElementInPhotograph()&lt;br /&gt;
enjoy&lt;br /&gt;
[[User:Drline|Drline]] 04:44, 30 October 2012 (UTC)&lt;br /&gt;
&lt;br /&gt;
== addAccountToConsole ==&lt;br /&gt;
&lt;br /&gt;
{{Useful Function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function center the window in any resolution.&amp;lt;br&amp;gt;&lt;br /&gt;
* '''NOTE:''' This is made to be used clientside!.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;* accName addAccountToConsole ( thePlayer, accountName )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
* '''thePlayer''': Name the player who wants calculation mode .&lt;br /&gt;
* '''accountName''': The account you want to add .&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This example center the window.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
    addAccountToConsole = function ( plr , name )&lt;br /&gt;
        if name and tostring ( name ) and plr and isElement ( plr ) and getElementType ( plr ) == 'player' then&lt;br /&gt;
            local acc = getPlayerAccount ( plr )&lt;br /&gt;
                if not acc or isGuestAccount ( acc ) then return end&lt;br /&gt;
                    if isObjectInACLGroup ( 'user.'.. getAccountName ( acc ) , aclGetGroup ( 'Console' ) ) then&lt;br /&gt;
                        if not isObjectInACLGroup ( 'user.'.. name , aclGetGroup ( 'Console' ) ) then&lt;br /&gt;
                            aclGroupAddObject ( aclGetGroup( 'Console' ), 'user.' .. name )&lt;br /&gt;
                else&lt;br /&gt;
                    return false&lt;br /&gt;
                end&lt;br /&gt;
            else   &lt;br /&gt;
                    return false&lt;br /&gt;
                end&lt;br /&gt;
        else&lt;br /&gt;
                return false&lt;br /&gt;
            end&lt;br /&gt;
        return name or false&lt;br /&gt;
    end&lt;br /&gt;
     &lt;br /&gt;
    addCommandHandler ( 'add_', function ( plr , _, name )&lt;br /&gt;
        local name = addAccountToConsole ( plr, name )&lt;br /&gt;
            if not name then return false end&lt;br /&gt;
                outputChatBox ( 'Warning ! the account : '.. name .. ' was added to console group !', root )&lt;br /&gt;
        end&lt;br /&gt;
    )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Author: The Best&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Useful_Functions}}&lt;/div&gt;</summary>
		<author><name>آحمد آلعلَي</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Talk:Useful_Functions&amp;diff=43231</id>
		<title>Talk:Useful Functions</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Talk:Useful_Functions&amp;diff=43231"/>
		<updated>2014-12-07T17:44:52Z</updated>

		<summary type="html">&lt;p&gt;آحمد آلعلَي: /* Code */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;there i wrote isElementInPhotograph()&lt;br /&gt;
enjoy&lt;br /&gt;
[[User:Drline|Drline]] 04:44, 30 October 2012 (UTC)&lt;br /&gt;
&lt;br /&gt;
== addAccountToConsole ==&lt;br /&gt;
&lt;br /&gt;
{{Useful Function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function center the window in any resolution.&amp;lt;br&amp;gt;&lt;br /&gt;
* '''NOTE:''' This is made to be used clientside!.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;* accName addAccountToConsole ( thePlayer, accountName )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
* '''theElement''': The element you want to center it.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This example center the window.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
    addAccountToConsole = function ( plr , name )&lt;br /&gt;
        if name and tostring ( name ) and plr and isElement ( plr ) and getElementType ( plr ) == 'player' then&lt;br /&gt;
            local acc = getPlayerAccount ( plr )&lt;br /&gt;
                if not acc or isGuestAccount ( acc ) then return end&lt;br /&gt;
                    if isObjectInACLGroup ( 'user.'.. getAccountName ( acc ) , aclGetGroup ( 'Console' ) ) then&lt;br /&gt;
                        if not isObjectInACLGroup ( 'user.'.. name , aclGetGroup ( 'Console' ) ) then&lt;br /&gt;
                            aclGroupAddObject ( aclGetGroup( 'Console' ), 'user.' .. name )&lt;br /&gt;
                else&lt;br /&gt;
                    return false&lt;br /&gt;
                end&lt;br /&gt;
            else   &lt;br /&gt;
                    return false&lt;br /&gt;
                end&lt;br /&gt;
        else&lt;br /&gt;
                return false&lt;br /&gt;
            end&lt;br /&gt;
        return name or false&lt;br /&gt;
    end&lt;br /&gt;
     &lt;br /&gt;
    addCommandHandler ( 'add_', function ( plr , _, name )&lt;br /&gt;
        local name = addAccountToConsole ( plr, name )&lt;br /&gt;
            if not name then return false end&lt;br /&gt;
                outputChatBox ( 'Warning ! the account : '.. name .. ' was added to console group !', root )&lt;br /&gt;
        end&lt;br /&gt;
    )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Author: The Best&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Useful_Functions}}&lt;/div&gt;</summary>
		<author><name>آحمد آلعلَي</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Talk:Useful_Functions&amp;diff=43230</id>
		<title>Talk:Useful Functions</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Talk:Useful_Functions&amp;diff=43230"/>
		<updated>2014-12-07T17:43:23Z</updated>

		<summary type="html">&lt;p&gt;آحمد آلعلَي: /* addAccountToConsole */ new section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;there i wrote isElementInPhotograph()&lt;br /&gt;
enjoy&lt;br /&gt;
[[User:Drline|Drline]] 04:44, 30 October 2012 (UTC)&lt;br /&gt;
&lt;br /&gt;
== addAccountToConsole ==&lt;br /&gt;
&lt;br /&gt;
{{Useful Function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function center the window in any resolution.&amp;lt;br&amp;gt;&lt;br /&gt;
* '''NOTE:''' This is made to be used clientside!.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;* accName addAccountToConsole ( thePlayer, accountName )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
* '''theElement''': The element you want to center it.&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Clientside script&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function centerWindow (center_window)&lt;br /&gt;
    local screenW, screenH = guiGetScreenSize()&lt;br /&gt;
    local windowW, windowH = guiGetSize(center_window, false)&lt;br /&gt;
    local x, y = (screenW - windowW) /2,(screenH - windowH) /2&lt;br /&gt;
    guiSetPosition(center_window, x, y, false)&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This example center the window.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
    addAccountToConsole = function ( plr , name )&lt;br /&gt;
        if name and tostring ( name ) and plr and isElement ( plr ) and getElementType ( plr ) == 'player' then&lt;br /&gt;
            local acc = getPlayerAccount ( plr )&lt;br /&gt;
                if not acc or isGuestAccount ( acc ) then return end&lt;br /&gt;
                    if isObjectInACLGroup ( 'user.'.. getAccountName ( acc ) , aclGetGroup ( 'Console' ) ) then&lt;br /&gt;
                        if not isObjectInACLGroup ( 'user.'.. name , aclGetGroup ( 'Console' ) ) then&lt;br /&gt;
                            aclGroupAddObject ( aclGetGroup( 'Console' ), 'user.' .. name )&lt;br /&gt;
                else&lt;br /&gt;
                    return false&lt;br /&gt;
                end&lt;br /&gt;
            else   &lt;br /&gt;
                    return false&lt;br /&gt;
                end&lt;br /&gt;
        else&lt;br /&gt;
                return false&lt;br /&gt;
            end&lt;br /&gt;
        return name or false&lt;br /&gt;
    end&lt;br /&gt;
     &lt;br /&gt;
    addCommandHandler ( 'add_', function ( plr , _, name )&lt;br /&gt;
        local name = addAccountToConsole ( plr, name )&lt;br /&gt;
            if not name then return false end&lt;br /&gt;
                outputChatBox ( 'Warning ! the account : '.. name .. ' was added to console group !', root )&lt;br /&gt;
        end&lt;br /&gt;
    )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Author: The Best&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Useful_Functions}}&lt;/div&gt;</summary>
		<author><name>آحمد آلعلَي</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Element&amp;diff=37635</id>
		<title>Element</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Element&amp;diff=37635"/>
		<updated>2013-11-21T19:18:28Z</updated>

		<summary type="html">&lt;p&gt;آحمد آلعلَي: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;An '''element''' is a generic class that can represent almost all in-game [[entity|entities]]. The built-in element types are:&lt;br /&gt;
&lt;br /&gt;
{{Elements}}&lt;br /&gt;
&lt;br /&gt;
Any other element type can be created as an abstract element, not referring to any game [[entity]]. For example, '''resource''' and '''map''' elements are created when resources and maps are loaded to group entities they create as their children.&lt;br /&gt;
&lt;br /&gt;
Elements share common functions such as type and list retrieval, a destroy operation to remove both the element and the game entity it is linked to (except for some elements which can't be destroyed, for example client elements), [[element data]] storing and retrieval, and many more common operations.&lt;br /&gt;
&lt;br /&gt;
All elements are stored internally in a [[Element tree|tree structure]], and as such every element except the '''root''' element has a parent element, that can be the '''root''' element, a '''resource''', '''map''' or another element. This is purely for declaring the scope of function calls.&lt;br /&gt;
&lt;br /&gt;
==Related scripting functions==&lt;br /&gt;
===Client===&lt;br /&gt;
{{Client element functions}}&lt;br /&gt;
===Server===&lt;br /&gt;
{{Element functions}}&lt;br /&gt;
[[Category:Scripting Concepts]]&lt;br /&gt;
&lt;br /&gt;
[[it:Elemento]]&lt;br /&gt;
[[ru:Element]]&lt;br /&gt;
[[es:Elemento]]&lt;br /&gt;
&lt;br /&gt;
== '''Is BacKeD By ALCKASEER ( Sk : MaHeR-354''' ==&lt;/div&gt;</summary>
		<author><name>آحمد آلعلَي</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Element_tree&amp;diff=37634</id>
		<title>Element tree</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Element_tree&amp;diff=37634"/>
		<updated>2013-11-21T19:17:38Z</updated>

		<summary type="html">&lt;p&gt;آحمد آلعلَي: /* Is BacKeD By ALCKASEER ( Sk : MaHeR-354 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:Tre.png|frame|Element tree]]&lt;br /&gt;
MTA uses a so-called ''element tree'' to store all the elements that exist on the server and the client. This is directly related to the set of running [[resources]] and their map files' XML layout, although it can be changed at run-time by scripts.&lt;br /&gt;
&lt;br /&gt;
If you are familiar with the concept of ''trees'' in computer-science, this should be easy to understand. If you are not, think of it like a family tree - except everyone only has a single parent. Every [[element]] has a ''parent'' element.&lt;br /&gt;
&lt;br /&gt;
All elements that are created within scripts or from .map files are child elements of the resource they belong to. Thus, most elements (except for [[client]]s) exist only within resources and are also destroyed as soon as their resource is stopped.&lt;br /&gt;
&lt;br /&gt;
==Tree elements==&lt;br /&gt;
* '''root''': This is at the very base of the tree - all elements are children (or descendants) of this element.&lt;br /&gt;
* '''resource''': These are direct children of the root element - with one for each ''running'' resource. This element is called the ''resource root''. Its ID holds the name of the resource.&lt;br /&gt;
* '''map''': Each resource element contains at least one map element, representing either a &amp;quot;.map&amp;quot; file in the resource or the one containing the elements created by scripts (this is called the ''dynamic'' map). Their IDs contain the maps' filenames, or ''dynamic'' for the dynamic map.&lt;br /&gt;
** Map files can contain a number of other [[element]]s as well as an unlimited number of custom elements.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This in an example of a serverside tree dumped to XML from a running server.&lt;br /&gt;
''Please note that it is shortened on some places for the sake of overview.''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;root&amp;gt;&lt;br /&gt;
	&amp;lt;console/&amp;gt;&lt;br /&gt;
	&amp;lt;player dontRespawn=&amp;quot;false&amp;quot;/&amp;gt;&lt;br /&gt;
	&amp;lt;player dontRespawn=&amp;quot;false&amp;quot; lastSpawnarea=&amp;quot;&amp;quot;/&amp;gt;&lt;br /&gt;
	&amp;lt;resource id=&amp;quot;resourcebrowser&amp;quot;/&amp;gt;&lt;br /&gt;
	&amp;lt;resource id=&amp;quot;ajax&amp;quot;/&amp;gt;&lt;br /&gt;
	&amp;lt;resource id=&amp;quot;resourcemanager&amp;quot;/&amp;gt;&lt;br /&gt;
	&amp;lt;resource id=&amp;quot;spawnmanager&amp;quot;/&amp;gt;&lt;br /&gt;
	&amp;lt;resource id=&amp;quot;mapmanager&amp;quot;/&amp;gt;&lt;br /&gt;
	&amp;lt;resource id=&amp;quot;runcode&amp;quot;/&amp;gt;&lt;br /&gt;
	&amp;lt;resource id=&amp;quot;fr&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;map id=&amp;quot;dynamic&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;vehicle/&amp;gt;&lt;br /&gt;
		&amp;lt;/map&amp;gt;&lt;br /&gt;
	&amp;lt;/resource&amp;gt;&lt;br /&gt;
	&amp;lt;resource id=&amp;quot;elementbrowser&amp;quot;/&amp;gt;&lt;br /&gt;
	&amp;lt;resource id=&amp;quot;assault&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;map id=&amp;quot;dynamic&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;team/&amp;gt;&lt;br /&gt;
			&amp;lt;team/&amp;gt;&lt;br /&gt;
			&amp;lt;blip/&amp;gt;&lt;br /&gt;
			&amp;lt;marker/&amp;gt;&lt;br /&gt;
			&amp;lt;colshape/&amp;gt;&lt;br /&gt;
			&amp;lt;blip/&amp;gt;&lt;br /&gt;
			&amp;lt;blip/&amp;gt;&lt;br /&gt;
		&amp;lt;/map&amp;gt;&lt;br /&gt;
	&amp;lt;/resource&amp;gt;&lt;br /&gt;
	&amp;lt;resource id=&amp;quot;as-farm&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;map id=&amp;quot;dynamic&amp;quot;/&amp;gt;&lt;br /&gt;
		&amp;lt;map id=&amp;quot;as-farm.map&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;spawngroup req=&amp;quot;&amp;quot; type=&amp;quot;attacker&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;spawnarea posY=&amp;quot;-8.3976354598999&amp;quot; posX=&amp;quot;20.182683944702&amp;quot; skins=&amp;quot;9&amp;quot; ... /&amp;gt;&lt;br /&gt;
			&amp;lt;/spawngroup&amp;gt;&lt;br /&gt;
			&amp;lt;spawngroup req=&amp;quot;&amp;quot; type=&amp;quot;attacker&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;spawnarea posY=&amp;quot;32.166355133057&amp;quot; posX=&amp;quot;-46.90763092041&amp;quot; skins=&amp;quot;9&amp;quot; ... /&amp;gt;&lt;br /&gt;
			&amp;lt;/spawngroup&amp;gt;&lt;br /&gt;
			&amp;lt;spawngroup req=&amp;quot;&amp;quot; type=&amp;quot;attacker&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;spawnarea posY=&amp;quot;35.214984893799&amp;quot; posX=&amp;quot;-33.486911773682&amp;quot; skins=&amp;quot;9&amp;quot; ... /&amp;gt;&lt;br /&gt;
			&amp;lt;/spawngroup&amp;gt;&lt;br /&gt;
			&amp;lt;spawngroup req=&amp;quot;&amp;quot; type=&amp;quot;attacker&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;spawnarea posY=&amp;quot;35.214984893799&amp;quot; posX=&amp;quot;-33.486911773682&amp;quot; skins=&amp;quot;9&amp;quot; ... /&amp;gt;&lt;br /&gt;
			&amp;lt;/spawngroup&amp;gt;&lt;br /&gt;
			&amp;lt;objective id=&amp;quot;first&amp;quot; type=&amp;quot;checkpoint&amp;quot; description=&amp;quot;Breach into the farm&amp;quot; ... /&amp;gt;&lt;br /&gt;
			&amp;lt;pickup type=&amp;quot;weapon&amp;quot; ... /&amp;gt;&lt;br /&gt;
		&amp;lt;/map&amp;gt;&lt;br /&gt;
	&amp;lt;/resource&amp;gt;&lt;br /&gt;
&amp;lt;/root&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
===Explanation===&lt;br /&gt;
This tree consists of a number of resource root elements, the [[Element/Console|server console]] and two [[player]] elements, that are direct children of the '''root''' element. All these resources have a ''dynamic map'' as child element (it is just not shown for most of them). These contain the elements that are created dynamically by this resource using scripts, for example a [[vehicle]]. If the resource has a map file, it is also a child element, itself containing all the elements in the .map file.&lt;br /&gt;
&lt;br /&gt;
Let's have a closer look at the '''assault''' resource: This contains just one ''dynamic'' map that has 2 teams, 3 blips, 1 marker and 1 colshape as child elements. These are the elements that are created by the script, for example the marker, the colshape and one of the blips are probably used for the objective.&lt;br /&gt;
&lt;br /&gt;
The '''as-farm''' resource's function on the contrary is to be a map for the '''assault''' gamemode. The dynamic map is empty (it could contain elements if there was a script in it though), while there is a map called 'as-farm.map', that contains a number of elements. These are mostly custom elements (like spawngroup, spawnarea, objective) but also a few elements that MTA creates automactically after loading the map (like pickup). In the brackets after the element type, you can see the element data it contains. These are identical with the attributes the .map file contains within these elements, while you can also set and get element data for any other elements (e.g. players) with [[setElementData]] and [[getElementData]].&lt;br /&gt;
&lt;br /&gt;
==Pratical application==&lt;br /&gt;
Elements can have as many children as they like. This does not directly affect the map in any way, but it comes in to its own when combined with the scripting system.&lt;br /&gt;
&lt;br /&gt;
===Setting data for elements===&lt;br /&gt;
If you call a set... function on a node of the element tree, the function will affect every element within it (that it can work on).&lt;br /&gt;
&lt;br /&gt;
So, the following code would set the size of every marker (the only type of element the setMarkerSize function can work on) that is below the root element to ''2.5''.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
setMarkerSize ( getRootElement(), 2.5 )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The same can be done on any element, it is not restricted to the root element.&lt;br /&gt;
&lt;br /&gt;
===Map manager===&lt;br /&gt;
The [[#Example|example above]] shows the way the [[map manager]] uses different resources. The 'assault' resource is the gamemode, that manages what happens on the server using scripts and thus by creating elements in the tree dynamically. When a map resource is started, the gamemode receives a [[resource|resource pointer]] referring to the started resource - in this case ''as-farm'' - from which you can retrieve and store the resource root element. Using this element in conjunction with functions like [[getElementsByType]], [[getElementData]] and various others, you can access any of the information that was loaded into the tree from the 'as-farm.map'-file through scripts in the gamemode resource.&lt;br /&gt;
&lt;br /&gt;
Another thing that has to be considered related to the tree of elements is the fact that when you change the map, you don't have to remove any elements you created within the map resource, while you '''do''' have to remove elements that are created within the gamemode resource, '''if''' they are specific to the map (which will be probably the case for those items you create based on information read from the map resource's .map files).&lt;br /&gt;
&lt;br /&gt;
==Element browser==&lt;br /&gt;
You can start the resource ''elementbrowser'' to see a live view of the element tree on your server. Just start the resource and browser to your server's web page and choose the ''Element browser'' option in the sidebar (firefox only currently).&lt;br /&gt;
[[Category:Scripting Concepts]]&lt;br /&gt;
[[es:Árbol de elementos]]&lt;br /&gt;
[[ru:Element tree]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
== '''Is BacKeD By ALCKASEER ( Sk : MaHeR-354''' ==&lt;/div&gt;</summary>
		<author><name>آحمد آلعلَي</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Element_tree&amp;diff=37633</id>
		<title>Element tree</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Element_tree&amp;diff=37633"/>
		<updated>2013-11-21T19:17:18Z</updated>

		<summary type="html">&lt;p&gt;آحمد آلعلَي: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:Tre.png|frame|Element tree]]&lt;br /&gt;
MTA uses a so-called ''element tree'' to store all the elements that exist on the server and the client. This is directly related to the set of running [[resources]] and their map files' XML layout, although it can be changed at run-time by scripts.&lt;br /&gt;
&lt;br /&gt;
If you are familiar with the concept of ''trees'' in computer-science, this should be easy to understand. If you are not, think of it like a family tree - except everyone only has a single parent. Every [[element]] has a ''parent'' element.&lt;br /&gt;
&lt;br /&gt;
All elements that are created within scripts or from .map files are child elements of the resource they belong to. Thus, most elements (except for [[client]]s) exist only within resources and are also destroyed as soon as their resource is stopped.&lt;br /&gt;
&lt;br /&gt;
==Tree elements==&lt;br /&gt;
* '''root''': This is at the very base of the tree - all elements are children (or descendants) of this element.&lt;br /&gt;
* '''resource''': These are direct children of the root element - with one for each ''running'' resource. This element is called the ''resource root''. Its ID holds the name of the resource.&lt;br /&gt;
* '''map''': Each resource element contains at least one map element, representing either a &amp;quot;.map&amp;quot; file in the resource or the one containing the elements created by scripts (this is called the ''dynamic'' map). Their IDs contain the maps' filenames, or ''dynamic'' for the dynamic map.&lt;br /&gt;
** Map files can contain a number of other [[element]]s as well as an unlimited number of custom elements.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This in an example of a serverside tree dumped to XML from a running server.&lt;br /&gt;
''Please note that it is shortened on some places for the sake of overview.''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;root&amp;gt;&lt;br /&gt;
	&amp;lt;console/&amp;gt;&lt;br /&gt;
	&amp;lt;player dontRespawn=&amp;quot;false&amp;quot;/&amp;gt;&lt;br /&gt;
	&amp;lt;player dontRespawn=&amp;quot;false&amp;quot; lastSpawnarea=&amp;quot;&amp;quot;/&amp;gt;&lt;br /&gt;
	&amp;lt;resource id=&amp;quot;resourcebrowser&amp;quot;/&amp;gt;&lt;br /&gt;
	&amp;lt;resource id=&amp;quot;ajax&amp;quot;/&amp;gt;&lt;br /&gt;
	&amp;lt;resource id=&amp;quot;resourcemanager&amp;quot;/&amp;gt;&lt;br /&gt;
	&amp;lt;resource id=&amp;quot;spawnmanager&amp;quot;/&amp;gt;&lt;br /&gt;
	&amp;lt;resource id=&amp;quot;mapmanager&amp;quot;/&amp;gt;&lt;br /&gt;
	&amp;lt;resource id=&amp;quot;runcode&amp;quot;/&amp;gt;&lt;br /&gt;
	&amp;lt;resource id=&amp;quot;fr&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;map id=&amp;quot;dynamic&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;vehicle/&amp;gt;&lt;br /&gt;
		&amp;lt;/map&amp;gt;&lt;br /&gt;
	&amp;lt;/resource&amp;gt;&lt;br /&gt;
	&amp;lt;resource id=&amp;quot;elementbrowser&amp;quot;/&amp;gt;&lt;br /&gt;
	&amp;lt;resource id=&amp;quot;assault&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;map id=&amp;quot;dynamic&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;team/&amp;gt;&lt;br /&gt;
			&amp;lt;team/&amp;gt;&lt;br /&gt;
			&amp;lt;blip/&amp;gt;&lt;br /&gt;
			&amp;lt;marker/&amp;gt;&lt;br /&gt;
			&amp;lt;colshape/&amp;gt;&lt;br /&gt;
			&amp;lt;blip/&amp;gt;&lt;br /&gt;
			&amp;lt;blip/&amp;gt;&lt;br /&gt;
		&amp;lt;/map&amp;gt;&lt;br /&gt;
	&amp;lt;/resource&amp;gt;&lt;br /&gt;
	&amp;lt;resource id=&amp;quot;as-farm&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;map id=&amp;quot;dynamic&amp;quot;/&amp;gt;&lt;br /&gt;
		&amp;lt;map id=&amp;quot;as-farm.map&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;spawngroup req=&amp;quot;&amp;quot; type=&amp;quot;attacker&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;spawnarea posY=&amp;quot;-8.3976354598999&amp;quot; posX=&amp;quot;20.182683944702&amp;quot; skins=&amp;quot;9&amp;quot; ... /&amp;gt;&lt;br /&gt;
			&amp;lt;/spawngroup&amp;gt;&lt;br /&gt;
			&amp;lt;spawngroup req=&amp;quot;&amp;quot; type=&amp;quot;attacker&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;spawnarea posY=&amp;quot;32.166355133057&amp;quot; posX=&amp;quot;-46.90763092041&amp;quot; skins=&amp;quot;9&amp;quot; ... /&amp;gt;&lt;br /&gt;
			&amp;lt;/spawngroup&amp;gt;&lt;br /&gt;
			&amp;lt;spawngroup req=&amp;quot;&amp;quot; type=&amp;quot;attacker&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;spawnarea posY=&amp;quot;35.214984893799&amp;quot; posX=&amp;quot;-33.486911773682&amp;quot; skins=&amp;quot;9&amp;quot; ... /&amp;gt;&lt;br /&gt;
			&amp;lt;/spawngroup&amp;gt;&lt;br /&gt;
			&amp;lt;spawngroup req=&amp;quot;&amp;quot; type=&amp;quot;attacker&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;spawnarea posY=&amp;quot;35.214984893799&amp;quot; posX=&amp;quot;-33.486911773682&amp;quot; skins=&amp;quot;9&amp;quot; ... /&amp;gt;&lt;br /&gt;
			&amp;lt;/spawngroup&amp;gt;&lt;br /&gt;
			&amp;lt;objective id=&amp;quot;first&amp;quot; type=&amp;quot;checkpoint&amp;quot; description=&amp;quot;Breach into the farm&amp;quot; ... /&amp;gt;&lt;br /&gt;
			&amp;lt;pickup type=&amp;quot;weapon&amp;quot; ... /&amp;gt;&lt;br /&gt;
		&amp;lt;/map&amp;gt;&lt;br /&gt;
	&amp;lt;/resource&amp;gt;&lt;br /&gt;
&amp;lt;/root&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
===Explanation===&lt;br /&gt;
This tree consists of a number of resource root elements, the [[Element/Console|server console]] and two [[player]] elements, that are direct children of the '''root''' element. All these resources have a ''dynamic map'' as child element (it is just not shown for most of them). These contain the elements that are created dynamically by this resource using scripts, for example a [[vehicle]]. If the resource has a map file, it is also a child element, itself containing all the elements in the .map file.&lt;br /&gt;
&lt;br /&gt;
Let's have a closer look at the '''assault''' resource: This contains just one ''dynamic'' map that has 2 teams, 3 blips, 1 marker and 1 colshape as child elements. These are the elements that are created by the script, for example the marker, the colshape and one of the blips are probably used for the objective.&lt;br /&gt;
&lt;br /&gt;
The '''as-farm''' resource's function on the contrary is to be a map for the '''assault''' gamemode. The dynamic map is empty (it could contain elements if there was a script in it though), while there is a map called 'as-farm.map', that contains a number of elements. These are mostly custom elements (like spawngroup, spawnarea, objective) but also a few elements that MTA creates automactically after loading the map (like pickup). In the brackets after the element type, you can see the element data it contains. These are identical with the attributes the .map file contains within these elements, while you can also set and get element data for any other elements (e.g. players) with [[setElementData]] and [[getElementData]].&lt;br /&gt;
&lt;br /&gt;
==Pratical application==&lt;br /&gt;
Elements can have as many children as they like. This does not directly affect the map in any way, but it comes in to its own when combined with the scripting system.&lt;br /&gt;
&lt;br /&gt;
===Setting data for elements===&lt;br /&gt;
If you call a set... function on a node of the element tree, the function will affect every element within it (that it can work on).&lt;br /&gt;
&lt;br /&gt;
So, the following code would set the size of every marker (the only type of element the setMarkerSize function can work on) that is below the root element to ''2.5''.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
setMarkerSize ( getRootElement(), 2.5 )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The same can be done on any element, it is not restricted to the root element.&lt;br /&gt;
&lt;br /&gt;
===Map manager===&lt;br /&gt;
The [[#Example|example above]] shows the way the [[map manager]] uses different resources. The 'assault' resource is the gamemode, that manages what happens on the server using scripts and thus by creating elements in the tree dynamically. When a map resource is started, the gamemode receives a [[resource|resource pointer]] referring to the started resource - in this case ''as-farm'' - from which you can retrieve and store the resource root element. Using this element in conjunction with functions like [[getElementsByType]], [[getElementData]] and various others, you can access any of the information that was loaded into the tree from the 'as-farm.map'-file through scripts in the gamemode resource.&lt;br /&gt;
&lt;br /&gt;
Another thing that has to be considered related to the tree of elements is the fact that when you change the map, you don't have to remove any elements you created within the map resource, while you '''do''' have to remove elements that are created within the gamemode resource, '''if''' they are specific to the map (which will be probably the case for those items you create based on information read from the map resource's .map files).&lt;br /&gt;
&lt;br /&gt;
==Element browser==&lt;br /&gt;
You can start the resource ''elementbrowser'' to see a live view of the element tree on your server. Just start the resource and browser to your server's web page and choose the ''Element browser'' option in the sidebar (firefox only currently).&lt;br /&gt;
[[Category:Scripting Concepts]]&lt;br /&gt;
[[es:Árbol de elementos]]&lt;br /&gt;
[[ru:Element tree]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
== [['''Is BacKeD By ALCKASEER ( Sk : MaHeR-354''']] ==&lt;/div&gt;</summary>
		<author><name>آحمد آلعلَي</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Element_tree&amp;diff=37632</id>
		<title>Element tree</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Element_tree&amp;diff=37632"/>
		<updated>2013-11-21T19:16:24Z</updated>

		<summary type="html">&lt;p&gt;آحمد آلعلَي: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:Tre.png|frame|Element tree]]&lt;br /&gt;
MTA uses a so-called ''element tree'' to store all the elements that exist on the server and the client. This is directly related to the set of running [[resources]] and their map files' XML layout, although it can be changed at run-time by scripts.&lt;br /&gt;
&lt;br /&gt;
If you are familiar with the concept of ''trees'' in computer-science, this should be easy to understand. If you are not, think of it like a family tree - except everyone only has a single parent. Every [[element]] has a ''parent'' element.&lt;br /&gt;
&lt;br /&gt;
All elements that are created within scripts or from .map files are child elements of the resource they belong to. Thus, most elements (except for [[client]]s) exist only within resources and are also destroyed as soon as their resource is stopped.&lt;br /&gt;
&lt;br /&gt;
==Tree elements==&lt;br /&gt;
* '''root''': This is at the very base of the tree - all elements are children (or descendants) of this element.&lt;br /&gt;
* '''resource''': These are direct children of the root element - with one for each ''running'' resource. This element is called the ''resource root''. Its ID holds the name of the resource.&lt;br /&gt;
* '''map''': Each resource element contains at least one map element, representing either a &amp;quot;.map&amp;quot; file in the resource or the one containing the elements created by scripts (this is called the ''dynamic'' map). Their IDs contain the maps' filenames, or ''dynamic'' for the dynamic map.&lt;br /&gt;
** Map files can contain a number of other [[element]]s as well as an unlimited number of custom elements.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This in an example of a serverside tree dumped to XML from a running server.&lt;br /&gt;
''Please note that it is shortened on some places for the sake of overview.''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;root&amp;gt;&lt;br /&gt;
	&amp;lt;console/&amp;gt;&lt;br /&gt;
	&amp;lt;player dontRespawn=&amp;quot;false&amp;quot;/&amp;gt;&lt;br /&gt;
	&amp;lt;player dontRespawn=&amp;quot;false&amp;quot; lastSpawnarea=&amp;quot;&amp;quot;/&amp;gt;&lt;br /&gt;
	&amp;lt;resource id=&amp;quot;resourcebrowser&amp;quot;/&amp;gt;&lt;br /&gt;
	&amp;lt;resource id=&amp;quot;ajax&amp;quot;/&amp;gt;&lt;br /&gt;
	&amp;lt;resource id=&amp;quot;resourcemanager&amp;quot;/&amp;gt;&lt;br /&gt;
	&amp;lt;resource id=&amp;quot;spawnmanager&amp;quot;/&amp;gt;&lt;br /&gt;
	&amp;lt;resource id=&amp;quot;mapmanager&amp;quot;/&amp;gt;&lt;br /&gt;
	&amp;lt;resource id=&amp;quot;runcode&amp;quot;/&amp;gt;&lt;br /&gt;
	&amp;lt;resource id=&amp;quot;fr&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;map id=&amp;quot;dynamic&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;vehicle/&amp;gt;&lt;br /&gt;
		&amp;lt;/map&amp;gt;&lt;br /&gt;
	&amp;lt;/resource&amp;gt;&lt;br /&gt;
	&amp;lt;resource id=&amp;quot;elementbrowser&amp;quot;/&amp;gt;&lt;br /&gt;
	&amp;lt;resource id=&amp;quot;assault&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;map id=&amp;quot;dynamic&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;team/&amp;gt;&lt;br /&gt;
			&amp;lt;team/&amp;gt;&lt;br /&gt;
			&amp;lt;blip/&amp;gt;&lt;br /&gt;
			&amp;lt;marker/&amp;gt;&lt;br /&gt;
			&amp;lt;colshape/&amp;gt;&lt;br /&gt;
			&amp;lt;blip/&amp;gt;&lt;br /&gt;
			&amp;lt;blip/&amp;gt;&lt;br /&gt;
		&amp;lt;/map&amp;gt;&lt;br /&gt;
	&amp;lt;/resource&amp;gt;&lt;br /&gt;
	&amp;lt;resource id=&amp;quot;as-farm&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;map id=&amp;quot;dynamic&amp;quot;/&amp;gt;&lt;br /&gt;
		&amp;lt;map id=&amp;quot;as-farm.map&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;spawngroup req=&amp;quot;&amp;quot; type=&amp;quot;attacker&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;spawnarea posY=&amp;quot;-8.3976354598999&amp;quot; posX=&amp;quot;20.182683944702&amp;quot; skins=&amp;quot;9&amp;quot; ... /&amp;gt;&lt;br /&gt;
			&amp;lt;/spawngroup&amp;gt;&lt;br /&gt;
			&amp;lt;spawngroup req=&amp;quot;&amp;quot; type=&amp;quot;attacker&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;spawnarea posY=&amp;quot;32.166355133057&amp;quot; posX=&amp;quot;-46.90763092041&amp;quot; skins=&amp;quot;9&amp;quot; ... /&amp;gt;&lt;br /&gt;
			&amp;lt;/spawngroup&amp;gt;&lt;br /&gt;
			&amp;lt;spawngroup req=&amp;quot;&amp;quot; type=&amp;quot;attacker&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;spawnarea posY=&amp;quot;35.214984893799&amp;quot; posX=&amp;quot;-33.486911773682&amp;quot; skins=&amp;quot;9&amp;quot; ... /&amp;gt;&lt;br /&gt;
			&amp;lt;/spawngroup&amp;gt;&lt;br /&gt;
			&amp;lt;spawngroup req=&amp;quot;&amp;quot; type=&amp;quot;attacker&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;spawnarea posY=&amp;quot;35.214984893799&amp;quot; posX=&amp;quot;-33.486911773682&amp;quot; skins=&amp;quot;9&amp;quot; ... /&amp;gt;&lt;br /&gt;
			&amp;lt;/spawngroup&amp;gt;&lt;br /&gt;
			&amp;lt;objective id=&amp;quot;first&amp;quot; type=&amp;quot;checkpoint&amp;quot; description=&amp;quot;Breach into the farm&amp;quot; ... /&amp;gt;&lt;br /&gt;
			&amp;lt;pickup type=&amp;quot;weapon&amp;quot; ... /&amp;gt;&lt;br /&gt;
		&amp;lt;/map&amp;gt;&lt;br /&gt;
	&amp;lt;/resource&amp;gt;&lt;br /&gt;
&amp;lt;/root&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
===Explanation===&lt;br /&gt;
This tree consists of a number of resource root elements, the [[Element/Console|server console]] and two [[player]] elements, that are direct children of the '''root''' element. All these resources have a ''dynamic map'' as child element (it is just not shown for most of them). These contain the elements that are created dynamically by this resource using scripts, for example a [[vehicle]]. If the resource has a map file, it is also a child element, itself containing all the elements in the .map file.&lt;br /&gt;
&lt;br /&gt;
Let's have a closer look at the '''assault''' resource: This contains just one ''dynamic'' map that has 2 teams, 3 blips, 1 marker and 1 colshape as child elements. These are the elements that are created by the script, for example the marker, the colshape and one of the blips are probably used for the objective.&lt;br /&gt;
&lt;br /&gt;
The '''as-farm''' resource's function on the contrary is to be a map for the '''assault''' gamemode. The dynamic map is empty (it could contain elements if there was a script in it though), while there is a map called 'as-farm.map', that contains a number of elements. These are mostly custom elements (like spawngroup, spawnarea, objective) but also a few elements that MTA creates automactically after loading the map (like pickup). In the brackets after the element type, you can see the element data it contains. These are identical with the attributes the .map file contains within these elements, while you can also set and get element data for any other elements (e.g. players) with [[setElementData]] and [[getElementData]].&lt;br /&gt;
&lt;br /&gt;
==Pratical application==&lt;br /&gt;
Elements can have as many children as they like. This does not directly affect the map in any way, but it comes in to its own when combined with the scripting system.&lt;br /&gt;
&lt;br /&gt;
===Setting data for elements===&lt;br /&gt;
If you call a set... function on a node of the element tree, the function will affect every element within it (that it can work on).&lt;br /&gt;
&lt;br /&gt;
So, the following code would set the size of every marker (the only type of element the setMarkerSize function can work on) that is below the root element to ''2.5''.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
setMarkerSize ( getRootElement(), 2.5 )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The same can be done on any element, it is not restricted to the root element.&lt;br /&gt;
&lt;br /&gt;
===Map manager===&lt;br /&gt;
The [[#Example|example above]] shows the way the [[map manager]] uses different resources. The 'assault' resource is the gamemode, that manages what happens on the server using scripts and thus by creating elements in the tree dynamically. When a map resource is started, the gamemode receives a [[resource|resource pointer]] referring to the started resource - in this case ''as-farm'' - from which you can retrieve and store the resource root element. Using this element in conjunction with functions like [[getElementsByType]], [[getElementData]] and various others, you can access any of the information that was loaded into the tree from the 'as-farm.map'-file through scripts in the gamemode resource.&lt;br /&gt;
&lt;br /&gt;
Another thing that has to be considered related to the tree of elements is the fact that when you change the map, you don't have to remove any elements you created within the map resource, while you '''do''' have to remove elements that are created within the gamemode resource, '''if''' they are specific to the map (which will be probably the case for those items you create based on information read from the map resource's .map files).&lt;br /&gt;
&lt;br /&gt;
==Element browser==&lt;br /&gt;
You can start the resource ''elementbrowser'' to see a live view of the element tree on your server. Just start the resource and browser to your server's web page and choose the ''Element browser'' option in the sidebar (firefox only currently).&lt;br /&gt;
[[Category:Scripting Concepts]]&lt;br /&gt;
[[es:Árbol de elementos]]&lt;br /&gt;
[[ru:Element tree]]&lt;br /&gt;
Is BacKeD By ALCKASEER ( Sk : MaHeR-354&lt;/div&gt;</summary>
		<author><name>آحمد آلعلَي</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Element_tree&amp;diff=37631</id>
		<title>Element tree</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Element_tree&amp;diff=37631"/>
		<updated>2013-11-21T19:15:35Z</updated>

		<summary type="html">&lt;p&gt;آحمد آلعلَي: Replaced content with &amp;quot;Sooned By AL-Ckaser&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Sooned By AL-Ckaser&lt;/div&gt;</summary>
		<author><name>آحمد آلعلَي</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=AR/%D8%A7%D9%84%D8%B5%D9%81%D8%AD%D9%87_%D8%A7%D9%84%D8%B1%D8%A6%D9%8A%D8%B3%D9%8A%D9%87&amp;diff=37630</id>
		<title>AR/الصفحه الرئيسيه</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=AR/%D8%A7%D9%84%D8%B5%D9%81%D8%AD%D9%87_%D8%A7%D9%84%D8%B1%D8%A6%D9%8A%D8%B3%D9%8A%D9%87&amp;diff=37630"/>
		<updated>2013-11-21T19:11:13Z</updated>

		<summary type="html">&lt;p&gt;آحمد آلعلَي: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| width=&amp;quot;100%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;0&amp;quot;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px solid #D8D8D8; padding: 5px; height: 130px;&amp;quot;&amp;gt;&lt;br /&gt;
[[File:Mtalogo.png|left|100px]].Multi Theft Auto ستجد هنا معلومات غنية عن استخدام .'''Multi Theft Auto أهلا بك فى الويكى الخاص ب''' &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--هناك العديد من [[كيف يمكنك المساعده|الإشياء الممكن ان تساعدنا بها]] كصنع خريطه وصنع مود--&amp;gt;&lt;br /&gt;
.[[IRC Channel]] أو [irc://irc.gtanet.com/Arab_scripting Arab_scripting] إذا كان لديك أي أسئلة أو مشاكل تتعلق بالبرمجة ، يمكنك السؤال على&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
{| width=&amp;quot;100%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;0&amp;quot;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |&lt;br /&gt;
|-&lt;br /&gt;
|width=&amp;quot;50%&amp;quot; style=&amp;quot;vertical-align:top;&amp;quot; |&amp;lt;div style=&amp;quot;border: 1px solid #D8D8D8; padding:4px 8px 8px 8px; margin:10px;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px;&amp;quot;&amp;gt;&lt;br /&gt;
====مكتبات====&lt;br /&gt;
&lt;br /&gt;
* [[AR/Math|  Math مكتبة ]] [[Image:Sa.png|اللغة العربية|20px]]&lt;br /&gt;
* [[AR/String|  String مكتبة ]] [[Image:Sa.png|اللغة العربية|20px]]&lt;br /&gt;
* [[AR/Table|  Table مكتبة ]] [[Image:Sa.png|اللغة العربية|20px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;float:right; width: 32px;&amp;quot;&amp;gt;[[File:Input-gaming.png‎]]&amp;lt;/div&amp;gt;&lt;br /&gt;
=== لعب ===&lt;br /&gt;
&amp;lt;div style=&amp;quot;background: #FFEEAA;&amp;quot;&amp;gt;&lt;br /&gt;
[[File:Go-down.png|link=http://mtasa.com/]] ''' [http://mtasa.com/ تحميل لعبة ام تي اي اخر اصدار {{Current Version|full}}]'''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[AR/دليل اللاعب|(Client) دليل اللاعب]] [[Image:Sa.png|اللغة العربية|20px]] [[Image:flag_us.png|اللغة الأنجليزية|20px]]&lt;br /&gt;
* [[Changes_in_{{padleft:|3|{{Current Version|full}}}}| {{padleft:|3|{{Current Version|full}}}} التغيرات فى ]] [[Image:flag_us.png|اللغة الأنجليزية|20px]]&lt;br /&gt;
* [[Known_Issues_-_FAQ|مشاكل معروفه]] [[Image:flag_us.png|اللغة الأنجليزية|20px]]&lt;br /&gt;
* [[Upgrading_from_MTA:Race|MTA:SA {{padleft:|3|{{Current Version|full}}}} الى MTA:RACE المهاجرة من]] [[Image:flag_us.png|اللغة الأنجليزية|20px]]&lt;br /&gt;
* [[Server_Manual|(Server) دليل السيرفر]] [[Image:flag_us.png|اللغة الأنجليزية|20px]]&lt;br /&gt;
* [[Map_manager|ادارة الخرائط]] [[Image:flag_us.png|اللغة الأنجليزية|20px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== صنع الخرائط ===&lt;br /&gt;
*[[Resource:Editor|دليل]] [[Image:flag_us.png|اللغة الأنجليزية|20px]]&lt;br /&gt;
*[[Resource:Editor/EDF|EDF صيغة]] [[Image:flag_us.png|اللغة الأنجليزية|20px]]&lt;br /&gt;
*[[Resource:Editor/Plugins|الاضافات]] [[Image:flag_us.png|اللغة الأنجليزية|20px]]&lt;br /&gt;
*[[Resource:Editor#FAQ|أسئلة وأجوبة]] [[Image:flag_us.png|اللغة الأنجليزية|20px]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px solid #D8D8D8; padding:4px 8px 8px 8px; margin:10px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;float:right; width: 32px;&amp;quot;&amp;gt;[[File:Package-x-generic.png‎]]&amp;lt;/div&amp;gt;&lt;br /&gt;
=== قواعد البيانات ===&lt;br /&gt;
MTA لـ (Resources) فى صنع المودات Lua يوضح هذا القسم امكانيات &lt;br /&gt;
* [[:Category:Resource|(Resources)]] كتالوج المودات&lt;br /&gt;
* [[Client side scripts]]&lt;br /&gt;
* [[Modules]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px solid #D8D8D8; padding:4px 8px 8px 8px; margin:10px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;float:right; width: 32px;&amp;quot;&amp;gt;[[File:Applications-development.png‎‎‎]]&amp;lt;/div&amp;gt;&lt;br /&gt;
=== Multi Theft Auto تطوير ===&lt;br /&gt;
[[File:Go-down.png|link=http://nightly.mtasa.com/]] [http://nightly.mtasa.com/ Nightly builds]&lt;br /&gt;
* [[Compiling_MTASA|Compiling MTASA on Windows]]&lt;br /&gt;
* [[Building_MTASA_Server_on_Mac_OS_X|Compiling MTASA on Mac OS X]]&lt;br /&gt;
* [[Building_MTASA_Server_on_GNU_Linux|Compiling MTASA on GNU/Linux]]&lt;br /&gt;
* [[Coding guidelines]]&lt;br /&gt;
* [http://code.google.com/p/mtasa-blue Google Code SVN]&lt;br /&gt;
* [[Roadmap]]&lt;br /&gt;
* [http://bugs.mtasa.com/ Bugtracker]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px solid #D8D8D8; padding:4px 8px 8px 8px; margin:10px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;float:right; width: 32px;&amp;quot;&amp;gt;[[File:Applications-office.png‎]]&amp;lt;/div&amp;gt;&lt;br /&gt;
=== Wiki - كيف يمكنك المساعدة ===&lt;br /&gt;
* [[:Category:Incomplete|تكملة الوثائق الغير مكتملة]]&lt;br /&gt;
* [[:Category:Needs_Example |eventsو لل functionsاضف مثال لل]].&lt;br /&gt;
* [[:Category:Needs Checking|مراجعة والتحقق من الصفحات التي تحتاج التحقق]]&lt;br /&gt;
* كتابة دروس لمساعدة الناس&lt;br /&gt;
* ترجمة صفحات الويكي&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px solid #D8D8D8; padding:4px 8px 8px 8px; margin:10px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;float:right; width: 32px;&amp;quot;&amp;gt;[[File:Internet-group-chat.png‎]]&amp;lt;/div&amp;gt;&lt;br /&gt;
=== المجتمع ===&lt;br /&gt;
* [http://forum.multitheftauto.com/ المنتدى]&lt;br /&gt;
* IRC: [irc://irc.multitheftauto.com/mta irc.multitheftauto.com #mta]&lt;br /&gt;
* [http://community.mtasa.com/ MTA Community] - تنزيل ومشاركة المودات&lt;br /&gt;
* [http://twitter.com/#!/MTAQA/ Twitter] - [http://www.youtube.com/user/MTAQA Youtube] - [http://plus.google.com/102014133442331779727/ Google+] - [http://www.moddb.com/mods/multi-theft-auto-san-andreas ModDB]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
| width=&amp;quot;50%&amp;quot; style=&amp;quot;vertical-align:top;&amp;quot; |&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px solid #D8D8D8; padding:4px 8px 8px 8px; margin:10px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;float:right; width: 32px;&amp;quot;&amp;gt;[[File:Accessories-text-editor.png]]&amp;lt;/div&amp;gt;&lt;br /&gt;
=== (Scripting) البرمجة ===&lt;br /&gt;
* [[AR/مقدمه في البرمجه|مقدمه في البرمجه]] [[Image:Sa.png|اللغة العربية|20px]] [[Image:flag_us.png|اللغة الأنجليزية|20px]]&lt;br /&gt;
* [[Introduction to Scripting the GUI|GUI مقدمة فى برمجة]] [[Image:flag_us.png|اللغة الأنجليزية|20px]]&lt;br /&gt;
* [[Debugging|كيفية البحث عن الأخطاء فى السكربت]] [[Image:flag_us.png|اللغة الأنجليزية|20px]]&lt;br /&gt;
* [[Resources|(Resources) مقدمة فى المودات]] [[Image:flag_us.png|اللغة الأنجليزية|20px]]&lt;br /&gt;
** [[Resource Web Access]] [[Image:flag_us.png|اللغة الأنجليزية|20px]]&lt;br /&gt;
** [[:Category:Resource|(Resources) كتالوج المودات]] [[Image:flag_us.png|اللغة الأنجليزية|20px]]&lt;br /&gt;
** [[Meta.xml]] - الذى يحدد ذلك (meta.xml) ملف التعريف (Resources) وراء كل المودات&lt;br /&gt;
** [[ACL]] - و هذا أمر حيوى لسكربتات معقدة للعمل Access Control List&lt;br /&gt;
* [[Writing_Gamemodes|Gamemodes كتابة]]&lt;br /&gt;
* [[Useful_Functions|وظائف مفيدة]]&lt;br /&gt;
&amp;lt;div style=&amp;quot;float:right; width: 32px;&amp;quot;&amp;gt;[[File:start-here.png]]&amp;lt;/div&amp;gt;&lt;br /&gt;
====LUA تعلميات عامه حول====	&lt;br /&gt;
صفحات مصممه للمساعدة في فهم اللغه&lt;br /&gt;
*[http://www.lua.org/pil/index.html &amp;quot;LUA دليل البرمجة في]&lt;br /&gt;
**[http://www.lua.org/manual/5.1/#index Lua  دليل وظائف]&lt;br /&gt;
*[http://lua-users.org/wiki/TutorialDirectory Lua ويكي]&lt;br /&gt;
*[http://nixstaller.berlios.de/manual/0.2/nixstaller_9.html Nixstaller من  Lua أرشادات عامة في]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px solid #D8D8D8; padding:4px 8px 8px 8px; margin:10px; background:#E5E5FF;&amp;quot;&amp;gt;&lt;br /&gt;
====Reference====&lt;br /&gt;
* [[Client Scripting Functions|Client-side Functions]]&lt;br /&gt;
* [[Client Scripting Events|Client-side Events]]&lt;br /&gt;
* [[AR/Server Scripting Functions|Server-side Functions]] [[Image:Sa.png|اللغة العربية|20px]] تم الترجمة جزئياً&lt;br /&gt;
* [[Server Scripting Events|Server-side Events]]&lt;br /&gt;
&amp;lt;!-- Incomplete * [[Module functions|Server-side external module scripting functions list]] --&amp;gt;&lt;br /&gt;
* [[MTA Classes]] - Detailed descriptions of all MTA custom types&lt;br /&gt;
** [[Element|MTA Elements]] / [[Element tree]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px solid #D8D8D8; padding:4px 8px 8px 8px; margin:10px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;float:right; width: 32px;&amp;quot;&amp;gt;[[File:System-file-manager.png]]&amp;lt;/div&amp;gt;&lt;br /&gt;
====[[Id|قائمة المعرفات]]====&lt;br /&gt;
*[[Animations|الحركات]]&lt;br /&gt;
*[[Character Skins|الشخصيات]]&lt;br /&gt;
*[[CJ_Clothes|CJ ستايل]]&lt;br /&gt;
*[[Garage|الكراجات]]&lt;br /&gt;
*[[Interior IDs|المحلات]]&lt;br /&gt;
*[[Material IDs|الادوات]]&lt;br /&gt;
*[[Projectiles|المجسمات]]&lt;br /&gt;
*[[Radar Blips|ايقونات الرادار]]&lt;br /&gt;
*[[Sounds|الإصوات]]&lt;br /&gt;
*[[Vehicle IDs|السيارات]]&lt;br /&gt;
*[[Vehicle Colors|الوان السيارات]]&lt;br /&gt;
*[[Vehicle Upgrades|اضافات السيارات]]&lt;br /&gt;
*[[Vehicle variants|متغيرات السيارات]]&lt;br /&gt;
*[[Weapons|الاسلحه]]&lt;br /&gt;
*[[Weather|الجو]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;padding:4px 8px 8px 8px; margin:10px;&amp;quot;&amp;gt;&lt;br /&gt;
[[File:Osi symbol.png|75px|link=http://opensource.org/]]&lt;br /&gt;
'''Multi Theft Auto''' is '''Open Source'''. &lt;br /&gt;
This means anyone can contribute to making Multi Theft Auto even better! &lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |&lt;br /&gt;
|}&lt;br /&gt;
{| width=&amp;quot;100%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;0&amp;quot;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |&lt;br /&gt;
&amp;lt;div style=&amp;quot;padding: 5px;&amp;quot; class=&amp;quot;plainlinks&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;ul style=&amp;quot;list-style: none; width: 200px; float: left;&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;'''About Multi Theft Auto'''&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;[[Archive]]&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;[[Press Coverage]]&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;[http://code.google.com/p/mtasa-blue/people/list Developers]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;ul style=&amp;quot;list-style: none; width: 200px; float: left;&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;'''Multi Theft Auto 0.5'''&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;[[Archive#Multi_Theft_Auto_0.5|Download]]&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;[[MTA 0.5r2 Known Issues|Known Issues]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;ul style=&amp;quot;list-style: none; width: 200px; float: left;&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;'''Wiki Stats'''&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;{{NUMBEROFARTICLES}} Articles&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;{{NUMBEROFPAGES}} Pages&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;{{NUMBEROFUSERS}} Registered Users&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
__NOEDITSECTION__&lt;br /&gt;
{{Languages list|ar}}&lt;/div&gt;</summary>
		<author><name>آحمد آلعلَي</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=AR/setAccountData&amp;diff=37293</id>
		<title>AR/setAccountData</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=AR/setAccountData&amp;diff=37293"/>
		<updated>2013-10-09T12:11:50Z</updated>

		<summary type="html">&lt;p&gt;آحمد آلعلَي: /* See Also */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Server function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
{{Note_box|It is strongly recommended that you use the standard ''module.key'' naming for your keys, as shown in the example below. This prevents collisions between different scripts.}}&lt;br /&gt;
This function sets a string to be stored in an account. This can then be retrieved using [[getAccountData]]. Data stored as account data is persistent across user's sessions and maps, unless they are logged into a guest account. Even if logged into a guest account, account data can be useful as a way to store a reference to your own account system, though it's persistence is equivalent to that of using [[setElementData]] on the player's element.&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 setAccountData ( account theAccount, string key, string value )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===العناصر المطلوبة=== &lt;br /&gt;
*'''theAccount:''' إن الحساب الذي تريد استرداد البيانات من.&lt;br /&gt;
*'''key:''' مفتاح تحت التي كنت ترغب في تخزين البيانات&lt;br /&gt;
*'''value:''' The value you wish to store. '''NOTE:''' you cannot store tables as values, but you can use [[toJSON]] strings.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
ترجع صحيح إذا تم تعيين بيانات حسابك، كاذبة إذا تم تحديد وسيطة غير صالحة.&lt;br /&gt;
&lt;br /&gt;
==مثال== &lt;br /&gt;
لقرصان الأدوار gametype، ويرصد مبلغ من المال لاعب الثابتة عن طريق تخزينه في حسابه. ملاحظة يستخدم رمز &amp;quot;piraterpg.money&amp;quot; كمفتاح بدلا من مجرد &amp;quot;المال&amp;quot;، كما يجوز المشاركة للاعب في gametypes الأخرى التي توفر أيضا له مبلغ من المال لله الحساب. If both gametypes would use &amp;quot;money&amp;quot; as the account key, they'd overwrite each other's data.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function onPlayerQuit ( )&lt;br /&gt;
      -- عندما يترك لاعب، متجره المبلغ من المال الحالية في بيانات حسابه&lt;br /&gt;
      local playeraccount = getPlayerAccount ( source )&lt;br /&gt;
      if ( playeraccount ) and not isGuestAccount ( playeraccount ) then -- إذا تم تسجيل اللاعب&lt;br /&gt;
            local playermoney = getPlayerMoney ( source ) -- الحصول على المال الاعب&lt;br /&gt;
            setAccountData ( playeraccount, &amp;quot;piraterpg.money&amp;quot;, playermoney ) -- حفظها في حسابه&lt;br /&gt;
      end&lt;br /&gt;
end&lt;br /&gt;
 &lt;br /&gt;
function onPlayerLogin (_, playeraccount )&lt;br /&gt;
      -- عندما تسجيلات لاعب، استرداد له مبلغ من المال من بيانات حسابه وضعه&lt;br /&gt;
      if ( playeraccount ) then&lt;br /&gt;
            local playermoney = getAccountData ( playeraccount, &amp;quot;piraterpg.money&amp;quot; )&lt;br /&gt;
            -- تأكد من أن هناك فعلا قيمة المحفوظة تحت هذا المفتاح (معرفة ما اذا كان مال الاعب ليست كاذبة).&lt;br /&gt;
            -- وهذا على سبيل المثال سوف لا يكون الأمر كذلك عندما لاعب يلعب قيم تايب لأول مرة&lt;br /&gt;
            if ( playermoney ) then&lt;br /&gt;
                  setPlayerMoney ( source, playermoney )&lt;br /&gt;
            end&lt;br /&gt;
      end&lt;br /&gt;
end&lt;br /&gt;
 &lt;br /&gt;
addEventHandler ( &amp;quot;onPlayerQuit&amp;quot;, getRootElement ( ), onPlayerQuit )&lt;br /&gt;
addEventHandler ( &amp;quot;onPlayerLogin&amp;quot;, getRootElement ( ), onPlayerLogin)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==انظر ايضا==&lt;br /&gt;
{{AR Account_functions}}&lt;br /&gt;
&lt;br /&gt;
[[en:setAccountData]]&lt;br /&gt;
[[es:setAccountData]]&lt;/div&gt;</summary>
		<author><name>آحمد آلعلَي</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=AR/setAccountData&amp;diff=37292</id>
		<title>AR/setAccountData</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=AR/setAccountData&amp;diff=37292"/>
		<updated>2013-10-09T12:11:18Z</updated>

		<summary type="html">&lt;p&gt;آحمد آلعلَي: /* مثال */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Server function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
{{Note_box|It is strongly recommended that you use the standard ''module.key'' naming for your keys, as shown in the example below. This prevents collisions between different scripts.}}&lt;br /&gt;
This function sets a string to be stored in an account. This can then be retrieved using [[getAccountData]]. Data stored as account data is persistent across user's sessions and maps, unless they are logged into a guest account. Even if logged into a guest account, account data can be useful as a way to store a reference to your own account system, though it's persistence is equivalent to that of using [[setElementData]] on the player's element.&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 setAccountData ( account theAccount, string key, string value )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===العناصر المطلوبة=== &lt;br /&gt;
*'''theAccount:''' إن الحساب الذي تريد استرداد البيانات من.&lt;br /&gt;
*'''key:''' مفتاح تحت التي كنت ترغب في تخزين البيانات&lt;br /&gt;
*'''value:''' The value you wish to store. '''NOTE:''' you cannot store tables as values, but you can use [[toJSON]] strings.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
ترجع صحيح إذا تم تعيين بيانات حسابك، كاذبة إذا تم تحديد وسيطة غير صالحة.&lt;br /&gt;
&lt;br /&gt;
==مثال== &lt;br /&gt;
لقرصان الأدوار gametype، ويرصد مبلغ من المال لاعب الثابتة عن طريق تخزينه في حسابه. ملاحظة يستخدم رمز &amp;quot;piraterpg.money&amp;quot; كمفتاح بدلا من مجرد &amp;quot;المال&amp;quot;، كما يجوز المشاركة للاعب في gametypes الأخرى التي توفر أيضا له مبلغ من المال لله الحساب. If both gametypes would use &amp;quot;money&amp;quot; as the account key, they'd overwrite each other's data.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function onPlayerQuit ( )&lt;br /&gt;
      -- عندما يترك لاعب، متجره المبلغ من المال الحالية في بيانات حسابه&lt;br /&gt;
      local playeraccount = getPlayerAccount ( source )&lt;br /&gt;
      if ( playeraccount ) and not isGuestAccount ( playeraccount ) then -- إذا تم تسجيل اللاعب&lt;br /&gt;
            local playermoney = getPlayerMoney ( source ) -- الحصول على المال الاعب&lt;br /&gt;
            setAccountData ( playeraccount, &amp;quot;piraterpg.money&amp;quot;, playermoney ) -- حفظها في حسابه&lt;br /&gt;
      end&lt;br /&gt;
end&lt;br /&gt;
 &lt;br /&gt;
function onPlayerLogin (_, playeraccount )&lt;br /&gt;
      -- عندما تسجيلات لاعب، استرداد له مبلغ من المال من بيانات حسابه وضعه&lt;br /&gt;
      if ( playeraccount ) then&lt;br /&gt;
            local playermoney = getAccountData ( playeraccount, &amp;quot;piraterpg.money&amp;quot; )&lt;br /&gt;
            -- تأكد من أن هناك فعلا قيمة المحفوظة تحت هذا المفتاح (معرفة ما اذا كان مال الاعب ليست كاذبة).&lt;br /&gt;
            -- وهذا على سبيل المثال سوف لا يكون الأمر كذلك عندما لاعب يلعب قيم تايب لأول مرة&lt;br /&gt;
            if ( playermoney ) then&lt;br /&gt;
                  setPlayerMoney ( source, playermoney )&lt;br /&gt;
            end&lt;br /&gt;
      end&lt;br /&gt;
end&lt;br /&gt;
 &lt;br /&gt;
addEventHandler ( &amp;quot;onPlayerQuit&amp;quot;, getRootElement ( ), onPlayerQuit )&lt;br /&gt;
addEventHandler ( &amp;quot;onPlayerLogin&amp;quot;, getRootElement ( ), onPlayerLogin)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{AR Account_functions}}&lt;br /&gt;
&lt;br /&gt;
[[en:setAccountData]]&lt;br /&gt;
[[es:setAccountData]]&lt;/div&gt;</summary>
		<author><name>آحمد آلعلَي</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=AR/setAccountData&amp;diff=37291</id>
		<title>AR/setAccountData</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=AR/setAccountData&amp;diff=37291"/>
		<updated>2013-10-09T12:07:56Z</updated>

		<summary type="html">&lt;p&gt;آحمد آلعلَي: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Server function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
{{Note_box|It is strongly recommended that you use the standard ''module.key'' naming for your keys, as shown in the example below. This prevents collisions between different scripts.}}&lt;br /&gt;
This function sets a string to be stored in an account. This can then be retrieved using [[getAccountData]]. Data stored as account data is persistent across user's sessions and maps, unless they are logged into a guest account. Even if logged into a guest account, account data can be useful as a way to store a reference to your own account system, though it's persistence is equivalent to that of using [[setElementData]] on the player's element.&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 setAccountData ( account theAccount, string key, string value )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===العناصر المطلوبة=== &lt;br /&gt;
*'''theAccount:''' إن الحساب الذي تريد استرداد البيانات من.&lt;br /&gt;
*'''key:''' مفتاح تحت التي كنت ترغب في تخزين البيانات&lt;br /&gt;
*'''value:''' The value you wish to store. '''NOTE:''' you cannot store tables as values, but you can use [[toJSON]] strings.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
ترجع صحيح إذا تم تعيين بيانات حسابك، كاذبة إذا تم تحديد وسيطة غير صالحة.&lt;br /&gt;
&lt;br /&gt;
==مثال== &lt;br /&gt;
لقرصان الأدوار gametype، ويرصد مبلغ من المال لاعب الثابتة عن طريق تخزينه في حسابه. ملاحظة يستخدم رمز &amp;quot;piraterpg.money&amp;quot; كمفتاح بدلا من مجرد &amp;quot;المال&amp;quot;، كما يجوز المشاركة للاعب في gametypes الأخرى التي توفر أيضا له مبلغ من المال لله الحساب. If both gametypes would use &amp;quot;money&amp;quot; as the account key, they'd overwrite each other's data.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function onPlayerQuit ( )&lt;br /&gt;
      -- when a player leaves, store his current money amount in his account data&lt;br /&gt;
      local playeraccount = getPlayerAccount ( source )&lt;br /&gt;
      if ( playeraccount ) and not isGuestAccount ( playeraccount ) then -- if the player is logged in&lt;br /&gt;
            local playermoney = getPlayerMoney ( source ) -- get the player money&lt;br /&gt;
            setAccountData ( playeraccount, &amp;quot;piraterpg.money&amp;quot;, playermoney ) -- save it in his account&lt;br /&gt;
      end&lt;br /&gt;
end&lt;br /&gt;
 &lt;br /&gt;
function onPlayerLogin (_, playeraccount )&lt;br /&gt;
      -- when a player logins, retrieve his money amount from his account data and set it&lt;br /&gt;
      if ( playeraccount ) then&lt;br /&gt;
            local playermoney = getAccountData ( playeraccount, &amp;quot;piraterpg.money&amp;quot; )&lt;br /&gt;
            -- make sure there was actually a value saved under this key (check if playermoney is not false).&lt;br /&gt;
            -- this will for example not be the case when a player plays the gametype for the first time&lt;br /&gt;
            if ( playermoney ) then&lt;br /&gt;
                  setPlayerMoney ( source, playermoney )&lt;br /&gt;
            end&lt;br /&gt;
      end&lt;br /&gt;
end&lt;br /&gt;
 &lt;br /&gt;
addEventHandler ( &amp;quot;onPlayerQuit&amp;quot;, getRootElement ( ), onPlayerQuit )&lt;br /&gt;
addEventHandler ( &amp;quot;onPlayerLogin&amp;quot;, getRootElement ( ), onPlayerLogin)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{AR Account_functions}}&lt;br /&gt;
&lt;br /&gt;
[[en:setAccountData]]&lt;br /&gt;
[[es:setAccountData]]&lt;/div&gt;</summary>
		<author><name>آحمد آلعلَي</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=AR/setAccountData&amp;diff=37290</id>
		<title>AR/setAccountData</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=AR/setAccountData&amp;diff=37290"/>
		<updated>2013-10-09T12:05:48Z</updated>

		<summary type="html">&lt;p&gt;آحمد آلعلَي: /* Syntax */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Server function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
{{Note_box|It is strongly recommended that you use the standard ''module.key'' naming for your keys, as shown in the example below. This prevents collisions between different scripts.}}&lt;br /&gt;
This function sets a string to be stored in an account. This can then be retrieved using [[getAccountData]]. Data stored as account data is persistent across user's sessions and maps, unless they are logged into a guest account. Even if logged into a guest account, account data can be useful as a way to store a reference to your own account system, though it's persistence is equivalent to that of using [[setElementData]] on the player's element.&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 setAccountData ( account theAccount, string key, string value )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===العناصر المطلوبة=== &lt;br /&gt;
*'''theAccount:''' إن الحساب الذي تريد استرداد البيانات من.&lt;br /&gt;
*'''key:''' مفتاح تحت التي كنت ترغب في تخزين البيانات&lt;br /&gt;
*'''value:''' The value you wish to store. '''NOTE:''' you cannot store tables as values, but you can use [[toJSON]] strings.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
ترجع صحيح إذا تم تعيين بيانات حسابك، كاذبة إذا تم تحديد وسيطة غير صالحة.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
For a pirate roleplaying gametype, the amount of money a player has is made persistent by storing it in his account. Note the code uses &amp;quot;piraterpg.money&amp;quot; as key instead of just &amp;quot;money&amp;quot;, as the player may be participating in other gametypes that also save his money amount to his account. If both gametypes would use &amp;quot;money&amp;quot; as the account key, they'd overwrite each other's data.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function onPlayerQuit ( )&lt;br /&gt;
      -- when a player leaves, store his current money amount in his account data&lt;br /&gt;
      local playeraccount = getPlayerAccount ( source )&lt;br /&gt;
      if ( playeraccount ) and not isGuestAccount ( playeraccount ) then -- if the player is logged in&lt;br /&gt;
            local playermoney = getPlayerMoney ( source ) -- get the player money&lt;br /&gt;
            setAccountData ( playeraccount, &amp;quot;piraterpg.money&amp;quot;, playermoney ) -- save it in his account&lt;br /&gt;
      end&lt;br /&gt;
end&lt;br /&gt;
 &lt;br /&gt;
function onPlayerLogin (_, playeraccount )&lt;br /&gt;
      -- when a player logins, retrieve his money amount from his account data and set it&lt;br /&gt;
      if ( playeraccount ) then&lt;br /&gt;
            local playermoney = getAccountData ( playeraccount, &amp;quot;piraterpg.money&amp;quot; )&lt;br /&gt;
            -- make sure there was actually a value saved under this key (check if playermoney is not false).&lt;br /&gt;
            -- this will for example not be the case when a player plays the gametype for the first time&lt;br /&gt;
            if ( playermoney ) then&lt;br /&gt;
                  setPlayerMoney ( source, playermoney )&lt;br /&gt;
            end&lt;br /&gt;
      end&lt;br /&gt;
end&lt;br /&gt;
 &lt;br /&gt;
addEventHandler ( &amp;quot;onPlayerQuit&amp;quot;, getRootElement ( ), onPlayerQuit )&lt;br /&gt;
addEventHandler ( &amp;quot;onPlayerLogin&amp;quot;, getRootElement ( ), onPlayerLogin)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{AR Account_functions}}&lt;br /&gt;
&lt;br /&gt;
[[en:setAccountData]]&lt;br /&gt;
[[es:setAccountData]]&lt;/div&gt;</summary>
		<author><name>آحمد آلعلَي</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=AR/playSound&amp;diff=37289</id>
		<title>AR/playSound</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=AR/playSound&amp;diff=37289"/>
		<updated>2013-10-09T11:52:49Z</updated>

		<summary type="html">&lt;p&gt;آحمد آلعلَي: /* مثــال */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Client function}}&lt;br /&gt;
 [[sound]] إنشاء ملف صوت .&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
'''مـلاحـظـة:''' MP3, WAV, OGG, RIFF, MOD, XM, IT و S3M  '''  --- صـيـغـة ملف الـصـوت تـقـبـل فـقـط'''&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;element playSound ( string soundPath, [ bool looped = false ] )&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===العناصر المطلوبة=== &lt;br /&gt;
*'''soundPath: هو ملف الصوت المراد تشغيله [[filepath]]  / ( &amp;lt;file /&amp;gt; مع علامة [[meta.xml]] و يجب ان يكون ملف الصوت معرفا في )&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments=== &lt;br /&gt;
{{OptionalArg}} &lt;br /&gt;
*'''looped:''' الحلقة غير متوفرة لتدفق الأصوات، فقط لملفات الصوت . true تمثل اذا كان سوف يحلق الصوت . لتكرار الصوت , استخدم   [[boolean]] '''&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns a [[sound]] element if the sound was successfully created, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
=='''مثــال'''== &lt;br /&gt;
&amp;lt;section name=&amp;quot;Client&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function wasted (killer, weapon, bodypart) &lt;br /&gt;
	local sound = playSound(&amp;quot;sounds/wasted.mp3&amp;quot;) -- wasted.mp3 نشغل الصوت - sounds من مجلد اسمه	&lt;br /&gt;
        setSoundVolume(sound, 0.5) -- 50% نجعل حجم الصوت&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
addEventHandler(&amp;quot;onClientPlayerWasted&amp;quot;, getLocalPlayer(), wasted) -- نضع الايفنت الى هذه الوظيفه عند موت الاعب&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;
{{AR/Audio_functions}}&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Client_audio_functions}}&lt;br /&gt;
[[EN:playSound]]&lt;br /&gt;
[[DE:playSound]]&lt;/div&gt;</summary>
		<author><name>آحمد آلعلَي</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=AR/playSound&amp;diff=37288</id>
		<title>AR/playSound</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=AR/playSound&amp;diff=37288"/>
		<updated>2013-10-09T11:52:30Z</updated>

		<summary type="html">&lt;p&gt;آحمد آلعلَي: /* مثــال */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Client function}}&lt;br /&gt;
 [[sound]] إنشاء ملف صوت .&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
'''مـلاحـظـة:''' MP3, WAV, OGG, RIFF, MOD, XM, IT و S3M  '''  --- صـيـغـة ملف الـصـوت تـقـبـل فـقـط'''&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;element playSound ( string soundPath, [ bool looped = false ] )&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===العناصر المطلوبة=== &lt;br /&gt;
*'''soundPath: هو ملف الصوت المراد تشغيله [[filepath]]  / ( &amp;lt;file /&amp;gt; مع علامة [[meta.xml]] و يجب ان يكون ملف الصوت معرفا في )&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments=== &lt;br /&gt;
{{OptionalArg}} &lt;br /&gt;
*'''looped:''' الحلقة غير متوفرة لتدفق الأصوات، فقط لملفات الصوت . true تمثل اذا كان سوف يحلق الصوت . لتكرار الصوت , استخدم   [[boolean]] '''&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns a [[sound]] element if the sound was successfully created, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
=='''مثــال'''== &lt;br /&gt;
&amp;lt;section name=&amp;quot;'''كلنت'''&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 wasted (killer, weapon, bodypart) &lt;br /&gt;
	local sound = playSound(&amp;quot;sounds/wasted.mp3&amp;quot;) -- wasted.mp3 نشغل الصوت - sounds من مجلد اسمه	&lt;br /&gt;
        setSoundVolume(sound, 0.5) -- 50% نجعل حجم الصوت&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
addEventHandler(&amp;quot;onClientPlayerWasted&amp;quot;, getLocalPlayer(), wasted) -- نضع الايفنت الى هذه الوظيفه عند موت الاعب&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;
{{AR/Audio_functions}}&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Client_audio_functions}}&lt;br /&gt;
[[EN:playSound]]&lt;br /&gt;
[[DE:playSound]]&lt;/div&gt;</summary>
		<author><name>آحمد آلعلَي</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=AR/playSound&amp;diff=37287</id>
		<title>AR/playSound</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=AR/playSound&amp;diff=37287"/>
		<updated>2013-10-09T11:52:11Z</updated>

		<summary type="html">&lt;p&gt;آحمد آلعلَي: /* مثــال */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Client function}}&lt;br /&gt;
 [[sound]] إنشاء ملف صوت .&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
'''مـلاحـظـة:''' MP3, WAV, OGG, RIFF, MOD, XM, IT و S3M  '''  --- صـيـغـة ملف الـصـوت تـقـبـل فـقـط'''&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;element playSound ( string soundPath, [ bool looped = false ] )&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===العناصر المطلوبة=== &lt;br /&gt;
*'''soundPath: هو ملف الصوت المراد تشغيله [[filepath]]  / ( &amp;lt;file /&amp;gt; مع علامة [[meta.xml]] و يجب ان يكون ملف الصوت معرفا في )&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments=== &lt;br /&gt;
{{OptionalArg}} &lt;br /&gt;
*'''looped:''' الحلقة غير متوفرة لتدفق الأصوات، فقط لملفات الصوت . true تمثل اذا كان سوف يحلق الصوت . لتكرار الصوت , استخدم   [[boolean]] '''&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns a [[sound]] element if the sound was successfully created, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
=='''مثــال'''== &lt;br /&gt;
&amp;lt;section name=&amp;quot;كلنت&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 wasted (killer, weapon, bodypart) &lt;br /&gt;
	local sound = playSound(&amp;quot;sounds/wasted.mp3&amp;quot;) -- wasted.mp3 نشغل الصوت - sounds من مجلد اسمه	&lt;br /&gt;
        setSoundVolume(sound, 0.5) -- 50% نجعل حجم الصوت&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
addEventHandler(&amp;quot;onClientPlayerWasted&amp;quot;, getLocalPlayer(), wasted) -- نضع الايفنت الى هذه الوظيفه عند موت الاعب&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;
{{AR/Audio_functions}}&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Client_audio_functions}}&lt;br /&gt;
[[EN:playSound]]&lt;br /&gt;
[[DE:playSound]]&lt;/div&gt;</summary>
		<author><name>آحمد آلعلَي</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=AR/playSound&amp;diff=37286</id>
		<title>AR/playSound</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=AR/playSound&amp;diff=37286"/>
		<updated>2013-10-09T11:51:40Z</updated>

		<summary type="html">&lt;p&gt;آحمد آلعلَي: /* مثال */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Client function}}&lt;br /&gt;
 [[sound]] إنشاء ملف صوت .&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
'''مـلاحـظـة:''' MP3, WAV, OGG, RIFF, MOD, XM, IT و S3M  '''  --- صـيـغـة ملف الـصـوت تـقـبـل فـقـط'''&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;element playSound ( string soundPath, [ bool looped = false ] )&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===العناصر المطلوبة=== &lt;br /&gt;
*'''soundPath: هو ملف الصوت المراد تشغيله [[filepath]]  / ( &amp;lt;file /&amp;gt; مع علامة [[meta.xml]] و يجب ان يكون ملف الصوت معرفا في )&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments=== &lt;br /&gt;
{{OptionalArg}} &lt;br /&gt;
*'''looped:''' الحلقة غير متوفرة لتدفق الأصوات، فقط لملفات الصوت . true تمثل اذا كان سوف يحلق الصوت . لتكرار الصوت , استخدم   [[boolean]] '''&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns a [[sound]] element if the sound was successfully created, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
=='''مثــال'''== &lt;br /&gt;
&amp;lt;section name=&amp;quot;Client&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function wasted (killer, weapon, bodypart) &lt;br /&gt;
	local sound = playSound(&amp;quot;sounds/wasted.mp3&amp;quot;) -- wasted.mp3 نشغل الصوت - sounds من مجلد اسمه	&lt;br /&gt;
        setSoundVolume(sound, 0.5) -- 50% نجعل حجم الصوت&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
addEventHandler(&amp;quot;onClientPlayerWasted&amp;quot;, getLocalPlayer(), wasted) -- نضع الايفنت الى هذه الوظيفه عند موت الاعب&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;
{{AR/Audio_functions}}&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Client_audio_functions}}&lt;br /&gt;
[[EN:playSound]]&lt;br /&gt;
[[DE:playSound]]&lt;/div&gt;</summary>
		<author><name>آحمد آلعلَي</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Client_Scripting_Functions&amp;diff=37285</id>
		<title>Client Scripting Functions</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Client_Scripting_Functions&amp;diff=37285"/>
		<updated>2013-10-09T11:47:57Z</updated>

		<summary type="html">&lt;p&gt;آحمد آلعلَي: /* Blip Functions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;pageclass class=&amp;quot;client&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 '''client-side''' scripting functions that have been implemented and are available as native functions from the Deathmatch mod. To request a function or event, use [[Requested Functions and Events]]&lt;br /&gt;
&lt;br /&gt;
For more functions, check the [[Useful_Functions|useful functions page]].&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
==Audio functions==&lt;br /&gt;
{{Client_audio_functions}}&lt;br /&gt;
&lt;br /&gt;
==Blip Function==&lt;br /&gt;
{{Client_blip_functions}}&lt;br /&gt;
&lt;br /&gt;
==Camera functions==&lt;br /&gt;
{{Client_camera_functions}}&lt;br /&gt;
&lt;br /&gt;
==Clothes and body functions==&lt;br /&gt;
{{Client_Clothes and body functions}}&lt;br /&gt;
&lt;br /&gt;
==Collision shape functions==&lt;br /&gt;
{{Client_collision_shape_functions}}&lt;br /&gt;
&lt;br /&gt;
==Cursor functions==&lt;br /&gt;
{{Client_cursor_functions}}&lt;br /&gt;
&lt;br /&gt;
==Drawing functions==&lt;br /&gt;
{{Drawing_functions}}&lt;br /&gt;
&lt;br /&gt;
==Effects functions==&lt;br /&gt;
{{Client_Effects_functions}}&lt;br /&gt;
&lt;br /&gt;
==Element functions==&lt;br /&gt;
{{Client_element_functions}}&lt;br /&gt;
&lt;br /&gt;
==Engine functions==&lt;br /&gt;
{{Engine_functions}}&lt;br /&gt;
&lt;br /&gt;
==Event functions==&lt;br /&gt;
{{Client_event_functions}}&lt;br /&gt;
&lt;br /&gt;
==Explosion functions==&lt;br /&gt;
{{Client_explosion_functions}}&lt;br /&gt;
&lt;br /&gt;
==File functions==&lt;br /&gt;
{{Client file functions}}&lt;br /&gt;
&lt;br /&gt;
==Fire functions==&lt;br /&gt;
{{Client fire functions}}&lt;br /&gt;
&lt;br /&gt;
==GUI functions==&lt;br /&gt;
{{GUI_functions}}&lt;br /&gt;
&lt;br /&gt;
==Input functions==&lt;br /&gt;
{{Client_input_functions}}&lt;br /&gt;
&lt;br /&gt;
==Marker functions==&lt;br /&gt;
{{Client_marker_functions}}&lt;br /&gt;
&lt;br /&gt;
==Object functions==&lt;br /&gt;
{{Client_object_functions}}&lt;br /&gt;
&lt;br /&gt;
==Output functions==&lt;br /&gt;
{{Client_output_functions}}&lt;br /&gt;
&lt;br /&gt;
==Ped functions==&lt;br /&gt;
{{Client_ped_functions}}&lt;br /&gt;
&lt;br /&gt;
==Pickup functions==&lt;br /&gt;
{{Client_pickup_functions}}&lt;br /&gt;
&lt;br /&gt;
==Player functions==&lt;br /&gt;
{{Client_player_functions}}&lt;br /&gt;
&lt;br /&gt;
==Projectile functions==&lt;br /&gt;
{{Client_projectile_functions}}&lt;br /&gt;
&lt;br /&gt;
==Radar-area functions==&lt;br /&gt;
{{Client_radar-area_functions}}&lt;br /&gt;
&lt;br /&gt;
==Resource functions==&lt;br /&gt;
{{Client_resource_functions}}&lt;br /&gt;
&lt;br /&gt;
==Serial functions==&lt;br /&gt;
{{Client_serial_functions}}&lt;br /&gt;
&lt;br /&gt;
==Team functions==&lt;br /&gt;
{{Client_team_functions}}&lt;br /&gt;
&lt;br /&gt;
==Utility functions==&lt;br /&gt;
{{Client_utility_functions}}&lt;br /&gt;
&lt;br /&gt;
==Vehicle functions==&lt;br /&gt;
{{Client_vehicle_functions}}&lt;br /&gt;
&lt;br /&gt;
==Water functions==&lt;br /&gt;
{{Client_water_functions}}&lt;br /&gt;
&lt;br /&gt;
==Weapon functions==&lt;br /&gt;
{{Client_weapon_functions}}&lt;br /&gt;
&lt;br /&gt;
==Weapon Creation functions==&lt;br /&gt;
Documentation can be found [http://code.google.com/p/mtasa-blue/source/detail?r=4555 here] and [http://code.google.com/p/mtasa-blue/source/detail?r=4557 here]&lt;br /&gt;
{{Client_weapon_creation_functions}}&lt;br /&gt;
&lt;br /&gt;
==World functions==&lt;br /&gt;
{{Client_world_functions}}&lt;br /&gt;
&lt;br /&gt;
==XML functions==&lt;br /&gt;
{{Client XML functions}}&lt;br /&gt;
&lt;br /&gt;
[[pl:Funkcje po stronie klienta]]&lt;br /&gt;
[[it:Funzioni Client-side]]&lt;br /&gt;
[[ru:Client Scripting Functions]]&lt;br /&gt;
[[de:Clientseitige_Funktionen]]&lt;br /&gt;
[[tr:Client Taraflı Fonksiyonlar]]&lt;/div&gt;</summary>
		<author><name>آحمد آلعلَي</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Client_Scripting_Functions&amp;diff=37284</id>
		<title>Client Scripting Functions</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Client_Scripting_Functions&amp;diff=37284"/>
		<updated>2013-10-09T11:47:34Z</updated>

		<summary type="html">&lt;p&gt;آحمد آلعلَي: /* Blip functions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;pageclass class=&amp;quot;client&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 '''client-side''' scripting functions that have been implemented and are available as native functions from the Deathmatch mod. To request a function or event, use [[Requested Functions and Events]]&lt;br /&gt;
&lt;br /&gt;
For more functions, check the [[Useful_Functions|useful functions page]].&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
==Audio functions==&lt;br /&gt;
{{Client_audio_functions}}&lt;br /&gt;
&lt;br /&gt;
==Blip Functions==&lt;br /&gt;
{{Client_blip_functions}}&lt;br /&gt;
&lt;br /&gt;
==Camera functions==&lt;br /&gt;
{{Client_camera_functions}}&lt;br /&gt;
&lt;br /&gt;
==Clothes and body functions==&lt;br /&gt;
{{Client_Clothes and body functions}}&lt;br /&gt;
&lt;br /&gt;
==Collision shape functions==&lt;br /&gt;
{{Client_collision_shape_functions}}&lt;br /&gt;
&lt;br /&gt;
==Cursor functions==&lt;br /&gt;
{{Client_cursor_functions}}&lt;br /&gt;
&lt;br /&gt;
==Drawing functions==&lt;br /&gt;
{{Drawing_functions}}&lt;br /&gt;
&lt;br /&gt;
==Effects functions==&lt;br /&gt;
{{Client_Effects_functions}}&lt;br /&gt;
&lt;br /&gt;
==Element functions==&lt;br /&gt;
{{Client_element_functions}}&lt;br /&gt;
&lt;br /&gt;
==Engine functions==&lt;br /&gt;
{{Engine_functions}}&lt;br /&gt;
&lt;br /&gt;
==Event functions==&lt;br /&gt;
{{Client_event_functions}}&lt;br /&gt;
&lt;br /&gt;
==Explosion functions==&lt;br /&gt;
{{Client_explosion_functions}}&lt;br /&gt;
&lt;br /&gt;
==File functions==&lt;br /&gt;
{{Client file functions}}&lt;br /&gt;
&lt;br /&gt;
==Fire functions==&lt;br /&gt;
{{Client fire functions}}&lt;br /&gt;
&lt;br /&gt;
==GUI functions==&lt;br /&gt;
{{GUI_functions}}&lt;br /&gt;
&lt;br /&gt;
==Input functions==&lt;br /&gt;
{{Client_input_functions}}&lt;br /&gt;
&lt;br /&gt;
==Marker functions==&lt;br /&gt;
{{Client_marker_functions}}&lt;br /&gt;
&lt;br /&gt;
==Object functions==&lt;br /&gt;
{{Client_object_functions}}&lt;br /&gt;
&lt;br /&gt;
==Output functions==&lt;br /&gt;
{{Client_output_functions}}&lt;br /&gt;
&lt;br /&gt;
==Ped functions==&lt;br /&gt;
{{Client_ped_functions}}&lt;br /&gt;
&lt;br /&gt;
==Pickup functions==&lt;br /&gt;
{{Client_pickup_functions}}&lt;br /&gt;
&lt;br /&gt;
==Player functions==&lt;br /&gt;
{{Client_player_functions}}&lt;br /&gt;
&lt;br /&gt;
==Projectile functions==&lt;br /&gt;
{{Client_projectile_functions}}&lt;br /&gt;
&lt;br /&gt;
==Radar-area functions==&lt;br /&gt;
{{Client_radar-area_functions}}&lt;br /&gt;
&lt;br /&gt;
==Resource functions==&lt;br /&gt;
{{Client_resource_functions}}&lt;br /&gt;
&lt;br /&gt;
==Serial functions==&lt;br /&gt;
{{Client_serial_functions}}&lt;br /&gt;
&lt;br /&gt;
==Team functions==&lt;br /&gt;
{{Client_team_functions}}&lt;br /&gt;
&lt;br /&gt;
==Utility functions==&lt;br /&gt;
{{Client_utility_functions}}&lt;br /&gt;
&lt;br /&gt;
==Vehicle functions==&lt;br /&gt;
{{Client_vehicle_functions}}&lt;br /&gt;
&lt;br /&gt;
==Water functions==&lt;br /&gt;
{{Client_water_functions}}&lt;br /&gt;
&lt;br /&gt;
==Weapon functions==&lt;br /&gt;
{{Client_weapon_functions}}&lt;br /&gt;
&lt;br /&gt;
==Weapon Creation functions==&lt;br /&gt;
Documentation can be found [http://code.google.com/p/mtasa-blue/source/detail?r=4555 here] and [http://code.google.com/p/mtasa-blue/source/detail?r=4557 here]&lt;br /&gt;
{{Client_weapon_creation_functions}}&lt;br /&gt;
&lt;br /&gt;
==World functions==&lt;br /&gt;
{{Client_world_functions}}&lt;br /&gt;
&lt;br /&gt;
==XML functions==&lt;br /&gt;
{{Client XML functions}}&lt;br /&gt;
&lt;br /&gt;
[[pl:Funkcje po stronie klienta]]&lt;br /&gt;
[[it:Funzioni Client-side]]&lt;br /&gt;
[[ru:Client Scripting Functions]]&lt;br /&gt;
[[de:Clientseitige_Funktionen]]&lt;br /&gt;
[[tr:Client Taraflı Fonksiyonlar]]&lt;/div&gt;</summary>
		<author><name>آحمد آلعلَي</name></author>
	</entry>
</feed>