<?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=William+da+silva</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=William+da+silva"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/wiki/Special:Contributions/William_da_silva"/>
	<updated>2026-04-24T12:32:22Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetElementData&amp;diff=26766</id>
		<title>SetElementData</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetElementData&amp;diff=26766"/>
		<updated>2011-08-19T16:58:07Z</updated>

		<summary type="html">&lt;p&gt;William da silva: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Server client function}}&lt;br /&gt;
__NOTOC__ &lt;br /&gt;
This function stores [[element data]] under a certain key, attached to an element. Element data set using this is then synced with all clients or the server. As such you should avoid passing data that is not able to be synced into this function (i.e. xmlnodes, acls, aclgroups etc.) Server-created elements are able to be synced.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool setElementData ( element theElement, string key, var value, [bool synchronize = true] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theElement:''' The [[element]] you wish to attach the data to.&lt;br /&gt;
*'''key:''' The key you wish to store the data under. (Maximum 31 characters.) &lt;br /&gt;
*'''value:''' The value you wish to store. See [[element data]] for a list of acceptable datatypes.&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments=== &lt;br /&gt;
*'''synchronize:''' Determines whether or not the data will be synchronized with the server (client-side variation) and remote clients (both variations).&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the data was set succesfully, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
&amp;lt;section name=&amp;quot;Server&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This example allows for a player to add a custom tag onto their nickname, and also revert it back to normal if they wish&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function addPlayerCustomTag ( thePlayer, command, newTag )&lt;br /&gt;
	--Let's make sure the newTag param has been entered...&lt;br /&gt;
	if ( newTag ) then&lt;br /&gt;
		--Grab their current playername for saving.&lt;br /&gt;
		local sPlayerNickname = getPlayerName ( thePlayer )&lt;br /&gt;
		--Create their new nickname with their tag&lt;br /&gt;
		local sNewPlayerNickname = newTag .. &amp;quot; &amp;quot; .. sPlayerNickname&lt;br /&gt;
		&lt;br /&gt;
		--Let's first load the element data, see if it's there already&lt;br /&gt;
		--The reason for this is that if a player were to do /addtag twice,&lt;br /&gt;
		--the tag would be prepended a second time&lt;br /&gt;
		local sOldNick = getElementData( thePlayer, &amp;quot;tempdata.originalnick&amp;quot; )&lt;br /&gt;
		if ( sOldNick == false ) then&lt;br /&gt;
			--Save their orignal nickname in their element data&lt;br /&gt;
			setElementData ( thePlayer, &amp;quot;tempdata.originalnick&amp;quot;, sPlayerNickname )&lt;br /&gt;
		end&lt;br /&gt;
		&lt;br /&gt;
		--Set their new nickname globally&lt;br /&gt;
		setPlayerName ( thePlayer, sNewPlayerNickname )&lt;br /&gt;
		&lt;br /&gt;
		--Tell them it's done&lt;br /&gt;
		outputChatBox ( &amp;quot;Your new nickname has been set, to put it back to its original state you can use /deltag&amp;quot;, thePlayer )&lt;br /&gt;
	else&lt;br /&gt;
		--The newTag param was not entered, give an error message&lt;br /&gt;
		outputChatBox ( &amp;quot;/addtag - Incorrect syntax, Correct: /addtag &amp;lt;newtag&amp;gt;&amp;quot;, thePlayer )&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler ( &amp;quot;addtag&amp;quot;, addPlayerCustomTag )&lt;br /&gt;
&lt;br /&gt;
function removePlayerCustomTag ( thePlayer, command )&lt;br /&gt;
	--We first need to check that they have already used /addtag, let's do that now&lt;br /&gt;
	local sOldNick = getElementData( thePlayer, &amp;quot;tempdata.originalnick&amp;quot; )&lt;br /&gt;
	if ( sOldNick ) then&lt;br /&gt;
		--Great, they have a tag added, let's reset them&lt;br /&gt;
		&lt;br /&gt;
		--First we will want to reset the element data back to its default (that being false)&lt;br /&gt;
		setElementData ( thePlayer, &amp;quot;tempdata.originalnick&amp;quot;, false )&lt;br /&gt;
		&lt;br /&gt;
		--Now set the client name back&lt;br /&gt;
		setClientName ( thePlayer, sOldNick )&lt;br /&gt;
		&lt;br /&gt;
		--Notify them&lt;br /&gt;
		outputChatBox ( &amp;quot;Your old nickname has been set&amp;quot;, thePlayer )&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler ( &amp;quot;deltag&amp;quot;, removePlayerCustomTag )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Element_functions}}&lt;/div&gt;</summary>
		<author><name>William da silva</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetElementData&amp;diff=26765</id>
		<title>SetElementData</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetElementData&amp;diff=26765"/>
		<updated>2011-08-19T16:57:43Z</updated>

		<summary type="html">&lt;p&gt;William da silva: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Server client function}}&lt;br /&gt;
__NOTOC__ &lt;br /&gt;
This function stores [[element data]] under a certain key, attached to an element. Element data set using this is then synced with all clients or the server. As such you should avoid passing data that is not able to be synced into this function (i.e. xmlnodes, acls, aclgroups etc.) Server-created elements are able to be synced.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool setElementData ( element theElement, string key, var value, [bool synchronize = true] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theElement:''' The [[element]] you wish to attach the data to.&lt;br /&gt;
*'''key:''' The key you wish to store the data under. (Maximum 31 characters.) &lt;br /&gt;
*'''value:''' The value you wish to store. See [[element data]] for a list of acceptable datatypes.&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments=== &lt;br /&gt;
*'''synchronize:''' Determines whether or not the data will be synchronized with the server (client-side variation) and remote clients (both variations).&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the data was set succesfully, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
&amp;lt;section name=&amp;quot;Server&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This example allows for a player to add a custom tag onto their nickname, and also revert it back to normal if they wish&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function addPlayerCustomTag ( thePlayer, command, newTag )&lt;br /&gt;
	--Let's make sure the newTag param has been entered...&lt;br /&gt;
	if ( newTag ) then&lt;br /&gt;
		--Grab their current playername for saving.&lt;br /&gt;
		local sPlayerNickname = getPlayerName ( thePlayer )&lt;br /&gt;
		--Create their new nickname with their tag&lt;br /&gt;
		local sNewPlayerNickname = newTag .. &amp;quot; &amp;quot; .. sPlayerNickname&lt;br /&gt;
		&lt;br /&gt;
		--Let's first load the element data, see if it's there already&lt;br /&gt;
		--The reason for this is that if a player were to do /addtag twice,&lt;br /&gt;
		--the tag would be prepended a second time&lt;br /&gt;
		local sOldNick = getElementData( thePlayer, &amp;quot;tempdata.originalnick&amp;quot; )&lt;br /&gt;
		if ( sOldNick == false ) then&lt;br /&gt;
			--Save their orignal nickname in their element data&lt;br /&gt;
			setElementData ( thePlayer, &amp;quot;tempdata.originalnick&amp;quot;, sPlayerNickname )&lt;br /&gt;
		end&lt;br /&gt;
		&lt;br /&gt;
		--Set their new nickname globally&lt;br /&gt;
		setPlayerName ( thePlayer, sNewPlayerNickname )&lt;br /&gt;
		&lt;br /&gt;
		--Tell them it's done&lt;br /&gt;
		outputChatBox ( &amp;quot;Your new nickname has been set, to put it back to its original state you can use /deltag&amp;quot;, thePlayer )&lt;br /&gt;
	else&lt;br /&gt;
		--The newTag param was not entered, give an error message&lt;br /&gt;
		outputChatBox ( &amp;quot;/addtag - Incorrect syntax, Correct: /addtag &amp;lt;newtag&amp;gt;&amp;quot;, thePlayer )&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler ( &amp;quot;addtag&amp;quot;, addPlayerCustomTag )&lt;br /&gt;
&lt;br /&gt;
function removePlayerCustomTag ( thePlayer, command )&lt;br /&gt;
	--We first need to check that they have already used /addtag, let's do that now&lt;br /&gt;
	local sOldNick = getElementData( thePlayer, &amp;quot;tempdata.originalnick&amp;quot; )&lt;br /&gt;
	if ( sOldNick ) then&lt;br /&gt;
		--Great, they have a tag added, let's reset them&lt;br /&gt;
		&lt;br /&gt;
		--First we will want to reset the element data back to its default (that being false)&lt;br /&gt;
		setElementData ( thePlayer, &amp;quot;tempdata.originalnick&amp;quot;, false )&lt;br /&gt;
		&lt;br /&gt;
		--Now set the client name back&lt;br /&gt;
		setClientName ( thePlayer, sOldNick )&lt;br /&gt;
		&lt;br /&gt;
		--Notify them&lt;br /&gt;
		outputChatBox ( &amp;quot;Your old nickname has been set&amp;quot;, thePlayer )&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler ( &amp;quot;deltag&amp;quot;, removePlayerCustomTag )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section name=&amp;quot;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;
addEventHandler(&amp;quot;onClientResourceStart&amp;quot;, getResourceRootElement(getThisResource()),&lt;br /&gt;
function()&lt;br /&gt;
setElementData(&amp;quot;cash&amp;quot;, 0)&lt;br /&gt;
end)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Element_functions}}&lt;/div&gt;</summary>
		<author><name>William da silva</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Fr/Meta.xml&amp;diff=26763</id>
		<title>Fr/Meta.xml</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Fr/Meta.xml&amp;diff=26763"/>
		<updated>2011-08-19T16:37:16Z</updated>

		<summary type="html">&lt;p&gt;William da silva: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Le ficher ''meta.xml'' presents MTA with a set of metadata, such as the resource's name, the scripts to include, and which files to precache for sending to clients among other things. It is also the scope of &amp;quot;elements&amp;quot;. It is written in XML, which is based on HTML and is the parent of XHTML.&lt;br /&gt;
&lt;br /&gt;
Note: Vous pouvez essayer le generateur de Meta.xml crée par 50p: http://forum.mtasa.com/viewtopic.php?f=91&amp;amp;t=22247&lt;br /&gt;
&lt;br /&gt;
=Tags=&lt;br /&gt;
XML is a textual data format which is widely used for the representation of data. MTA uses an XML-based language to describe the metadata for resources by using the tags below:&lt;br /&gt;
&lt;br /&gt;
*'''&amp;lt;info /&amp;gt;''' Information about this resource, possible parameters include (any arbitrary parameters can be used and read using [[getResourceInfo]]):&lt;br /&gt;
** '''author:''' L'auteur de la ressource&lt;br /&gt;
** '''version:''' La version de la ressource&lt;br /&gt;
** '''name:''' Le nom de la ressource&lt;br /&gt;
** '''description:''' Une petite description de la ressource&lt;br /&gt;
** '''type:''' Le type de ressource, ça peut être &amp;quot;gamemode&amp;quot;, &amp;quot;script&amp;quot;, &amp;quot;map&amp;quot; ou &amp;quot;misc&amp;quot;.&lt;br /&gt;
*'''&amp;lt;script /&amp;gt;''' Le code source de la ressource, les paramètres possibles sont:&lt;br /&gt;
** '''src:''' Le nom du fichier&lt;br /&gt;
** '''type:''' Le type du code source: &amp;quot;client&amp;quot; ou &amp;quot;server&amp;quot;&lt;br /&gt;
*'''&amp;lt;map /&amp;gt;''' La map pour le gamemode, les paramètres possibles sont:&lt;br /&gt;
**'''src:''' Nom du fichier .map (Peut être distant. &amp;quot;maps/filename.map&amp;quot;)&lt;br /&gt;
*'''&amp;lt;file /&amp;gt;''' A client-side file. Generally these are images, .txd, .col, .dff or .xml files. They'll be downloaded by clients when the resources is started (or on join)&lt;br /&gt;
**'''src:''' client-side file name (can be path too eg. &amp;quot;images/image.png&amp;quot;)&lt;br /&gt;
*'''&amp;lt;include /&amp;gt;''' Include resources that this resource will use&lt;br /&gt;
**'''resource:''' Resource name that you want to start with this resource&lt;br /&gt;
**'''minversion:''' Minimum version that '''resource''' needs to be (optional)&lt;br /&gt;
**'''maxversion:''' Maximum version that '''resource''' needs to be (optional)&lt;br /&gt;
*'''&amp;lt;config /&amp;gt;''' Config file (.xml) can be accessed by resource, possible parameters are:&lt;br /&gt;
**'''src:''' The file name of the config file&lt;br /&gt;
**'''type:''' The type of the config file: &amp;quot;client&amp;quot; or &amp;quot;server&amp;quot;&lt;br /&gt;
*'''&amp;lt;export /&amp;gt;''' This exports functions from this resource, so other resources can use them with [[call]]&lt;br /&gt;
**'''function:''' The function name&lt;br /&gt;
**'''type''' Whether function is exported server-side or client-side (valid values are: &amp;quot;server&amp;quot; and &amp;quot;client&amp;quot;)&lt;br /&gt;
**'''http:''' Can the function be called via HTTP (true/false)&lt;br /&gt;
*'''&amp;lt;html /&amp;gt;'''&lt;br /&gt;
**'''src:''' The filename for the HTTP file (can be a path)&lt;br /&gt;
**'''default:''' The html file is one that is shown by default when visiting /resourceName/ on the server. Only one html can be default, the rest are ignored. (true/false)&lt;br /&gt;
**'''raw:''' The html file is not parsed by the LUA interpreter and is treated as binary data. Must be used for binary files (images mainly) (true/false)&lt;br /&gt;
*'''&amp;lt;settings&amp;gt; &amp;lt;setting name=&amp;quot;&amp;quot; value=&amp;quot;&amp;quot;/&amp;gt; &amp;lt;/settings&amp;gt;:''' Most gamemodes use [[settings system]] to let server admins to configure it how they like. For instance you could set round time and then use [[get]] and [[set]] to get the value or change it, respectively.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
Heres an example of a meta file using some of the tags mentioned:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot; lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;meta&amp;gt;&lt;br /&gt;
    &amp;lt;info author=&amp;quot;Slothman&amp;quot; type=&amp;quot;gamemode&amp;quot; name=&amp;quot;Stealth&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;config src=&amp;quot;help.xml&amp;quot; type=&amp;quot;client&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;script src=&amp;quot;stealthmain_server.lua&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;script src=&amp;quot;noiseblip.lua&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;script src=&amp;quot;mission_timer.lua&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;script src=&amp;quot;gadgets_server.lua&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;script src=&amp;quot;gadgets_client.lua&amp;quot; type=&amp;quot;client&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;script src=&amp;quot;stealthmain_client.lua&amp;quot; type=&amp;quot;client&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;script src=&amp;quot;noisebar.lua&amp;quot; type=&amp;quot;client&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;script src=&amp;quot;spycam.lua&amp;quot; type=&amp;quot;client&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;file src=&amp;quot;riot_shield.txd&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;file src=&amp;quot;riot_shield.dff&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;file src=&amp;quot;riot_shield.col&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;file src=&amp;quot;armor.png&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;file src=&amp;quot;camera.png&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;file src=&amp;quot;cloak.png&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;file src=&amp;quot;goggles.png&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;file src=&amp;quot;mine.png&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;file src=&amp;quot;radar.png&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;file src=&amp;quot;shield.png&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;include resource=&amp;quot;scoreboard&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;include resource=&amp;quot;killmessages&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;include resource=&amp;quot;maplimits&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;settings&amp;gt;&lt;br /&gt;
         &amp;lt;setting name=&amp;quot;roundlimit&amp;quot; value=&amp;quot;[6]&amp;quot; /&amp;gt; &amp;lt;!-- round length in minutes --&amp;gt;&lt;br /&gt;
	 &amp;lt;setting name=&amp;quot;teamdamage&amp;quot; value=&amp;quot;[1]&amp;quot; /&amp;gt; &amp;lt;!-- 0 for team protection off, 1 for team protection on --&amp;gt;&lt;br /&gt;
	 &amp;lt;setting name=&amp;quot;teambalance&amp;quot; value=&amp;quot;[1]&amp;quot; /&amp;gt; &amp;lt;!--  difference limit of amount of players between teams --&amp;gt;&lt;br /&gt;
	 &amp;lt;setting name=&amp;quot;spazammo&amp;quot; value=&amp;quot;[25]&amp;quot; /&amp;gt; &amp;lt;!-- ammo amounts --&amp;gt;&lt;br /&gt;
	 &amp;lt;setting name=&amp;quot;m4ammo&amp;quot; value=&amp;quot;[100]&amp;quot; /&amp;gt;&lt;br /&gt;
	 &amp;lt;setting name=&amp;quot;shotgunammo&amp;quot; value=&amp;quot;[25]&amp;quot; /&amp;gt;&lt;br /&gt;
	 &amp;lt;setting name=&amp;quot;sniperammo&amp;quot; value=&amp;quot;[20]&amp;quot; /&amp;gt;&lt;br /&gt;
	 &amp;lt;setting name=&amp;quot;ak47ammo&amp;quot; value=&amp;quot;[120]&amp;quot; /&amp;gt;&lt;br /&gt;
	 &amp;lt;setting name=&amp;quot;rifleammo&amp;quot; value=&amp;quot;[40]&amp;quot; /&amp;gt;&lt;br /&gt;
	 &amp;lt;setting name=&amp;quot;deserteagleammo&amp;quot; value=&amp;quot;[45]&amp;quot; /&amp;gt;&lt;br /&gt;
	 &amp;lt;setting name=&amp;quot;pistolammo&amp;quot; value=&amp;quot;[132]&amp;quot; /&amp;gt;&lt;br /&gt;
	 &amp;lt;setting name=&amp;quot;uziammo&amp;quot; value=&amp;quot;[150]&amp;quot; /&amp;gt;&lt;br /&gt;
	 &amp;lt;setting name=&amp;quot;tec9ammo&amp;quot; value=&amp;quot;[150]&amp;quot; /&amp;gt;&lt;br /&gt;
	 &amp;lt;setting name=&amp;quot;silencedammo&amp;quot; value=&amp;quot;[65]&amp;quot; /&amp;gt;&lt;br /&gt;
	 &amp;lt;setting name=&amp;quot;grenadeammo&amp;quot; value=&amp;quot;[4]&amp;quot; /&amp;gt;&lt;br /&gt;
	 &amp;lt;setting name=&amp;quot;satchelammo&amp;quot; value=&amp;quot;[4]&amp;quot; /&amp;gt;&lt;br /&gt;
	 &amp;lt;setting name=&amp;quot;teargasammo&amp;quot; value=&amp;quot;[4]&amp;quot; /&amp;gt;&lt;br /&gt;
	 &amp;lt;setting name=&amp;quot;molatovammo&amp;quot; value=&amp;quot;[4]&amp;quot; /&amp;gt;&lt;br /&gt;
     &amp;lt;/settings&amp;gt;&lt;br /&gt;
&amp;lt;/meta&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[[Category:Scripting Concepts]]&lt;br /&gt;
[[ru:Meta.xml]]&lt;/div&gt;</summary>
		<author><name>William da silva</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Fr/Meta.xml&amp;diff=26762</id>
		<title>Fr/Meta.xml</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Fr/Meta.xml&amp;diff=26762"/>
		<updated>2011-08-19T16:25:32Z</updated>

		<summary type="html">&lt;p&gt;William da silva: Created page with &amp;quot;Le ficher ''meta.xml'' presents MTA with a set of metadata, such as the resource's name, the scripts to include, and which files to precache for sending to clients among other th...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Le ficher ''meta.xml'' presents MTA with a set of metadata, such as the resource's name, the scripts to include, and which files to precache for sending to clients among other things. It is also the scope of &amp;quot;elements&amp;quot;. It is written in XML, which is based on HTML and is the parent of XHTML.&lt;br /&gt;
&lt;br /&gt;
Note: Vous pouvez essayer le generateur de Meta.xml crée par 50p: http://forum.mtasa.com/viewtopic.php?f=91&amp;amp;t=22247&lt;br /&gt;
&lt;br /&gt;
=Tags=&lt;br /&gt;
XML is a textual data format which is widely used for the representation of data. MTA uses an XML-based language to describe the metadata for resources by using the tags below:&lt;br /&gt;
&lt;br /&gt;
*'''&amp;lt;info /&amp;gt;''' Information about this resource, possible parameters include (any arbitrary parameters can be used and read using [[getResourceInfo]]):&lt;br /&gt;
** '''author:''' The author of this resource&lt;br /&gt;
** '''version:''' The version of this resource&lt;br /&gt;
** '''name:''' The name of this resource&lt;br /&gt;
** '''description:''' A brief description of this resource&lt;br /&gt;
** '''type:''' The type of this resource, that can be &amp;quot;gamemode&amp;quot;, &amp;quot;script&amp;quot;, &amp;quot;map&amp;quot; or &amp;quot;misc&amp;quot;.&lt;br /&gt;
*'''&amp;lt;script /&amp;gt;''' Source code for this resource, possible parameters are:&lt;br /&gt;
** '''src:''' The file name of the source code&lt;br /&gt;
** '''type:''' The type of source code: &amp;quot;client&amp;quot; or &amp;quot;server&amp;quot;&lt;br /&gt;
*'''&amp;lt;map /&amp;gt;''' The map for a gamemode, possible parameters are:&lt;br /&gt;
**'''src:''' .map file name (can be path too eg. &amp;quot;maps/filename.map&amp;quot;)&lt;br /&gt;
**'''dimension:''' Dimension in which the map will be loaded (optional)&lt;br /&gt;
*'''&amp;lt;file /&amp;gt;''' A client-side file. Generally these are images, .txd, .col, .dff or .xml files. They'll be downloaded by clients when the resources is started (or on join)&lt;br /&gt;
**'''src:''' client-side file name (can be path too eg. &amp;quot;images/image.png&amp;quot;)&lt;br /&gt;
*'''&amp;lt;include /&amp;gt;''' Include resources that this resource will use&lt;br /&gt;
**'''resource:''' Resource name that you want to start with this resource&lt;br /&gt;
**'''minversion:''' Minimum version that '''resource''' needs to be (optional)&lt;br /&gt;
**'''maxversion:''' Maximum version that '''resource''' needs to be (optional)&lt;br /&gt;
*'''&amp;lt;config /&amp;gt;''' Config file (.xml) can be accessed by resource, possible parameters are:&lt;br /&gt;
**'''src:''' The file name of the config file&lt;br /&gt;
**'''type:''' The type of the config file: &amp;quot;client&amp;quot; or &amp;quot;server&amp;quot;&lt;br /&gt;
*'''&amp;lt;export /&amp;gt;''' This exports functions from this resource, so other resources can use them with [[call]]&lt;br /&gt;
**'''function:''' The function name&lt;br /&gt;
**'''type''' Whether function is exported server-side or client-side (valid values are: &amp;quot;server&amp;quot; and &amp;quot;client&amp;quot;)&lt;br /&gt;
**'''http:''' Can the function be called via HTTP (true/false)&lt;br /&gt;
*'''&amp;lt;html /&amp;gt;'''&lt;br /&gt;
**'''src:''' The filename for the HTTP file (can be a path)&lt;br /&gt;
**'''default:''' The html file is one that is shown by default when visiting /resourceName/ on the server. Only one html can be default, the rest are ignored. (true/false)&lt;br /&gt;
**'''raw:''' The html file is not parsed by the LUA interpreter and is treated as binary data. Must be used for binary files (images mainly) (true/false)&lt;br /&gt;
*'''&amp;lt;settings&amp;gt; &amp;lt;setting name=&amp;quot;&amp;quot; value=&amp;quot;&amp;quot;/&amp;gt; &amp;lt;/settings&amp;gt;:''' Most gamemodes use [[settings system]] to let server admins to configure it how they like. For instance you could set round time and then use [[get]] and [[set]] to get the value or change it, respectively.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
Heres an example of a meta file using some of the tags mentioned:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot; lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;meta&amp;gt;&lt;br /&gt;
    &amp;lt;info author=&amp;quot;Slothman&amp;quot; type=&amp;quot;gamemode&amp;quot; name=&amp;quot;Stealth&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;config src=&amp;quot;help.xml&amp;quot; type=&amp;quot;client&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;script src=&amp;quot;stealthmain_server.lua&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;script src=&amp;quot;noiseblip.lua&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;script src=&amp;quot;mission_timer.lua&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;script src=&amp;quot;gadgets_server.lua&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;script src=&amp;quot;gadgets_client.lua&amp;quot; type=&amp;quot;client&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;script src=&amp;quot;stealthmain_client.lua&amp;quot; type=&amp;quot;client&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;script src=&amp;quot;noisebar.lua&amp;quot; type=&amp;quot;client&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;script src=&amp;quot;spycam.lua&amp;quot; type=&amp;quot;client&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;file src=&amp;quot;riot_shield.txd&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;file src=&amp;quot;riot_shield.dff&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;file src=&amp;quot;riot_shield.col&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;file src=&amp;quot;armor.png&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;file src=&amp;quot;camera.png&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;file src=&amp;quot;cloak.png&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;file src=&amp;quot;goggles.png&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;file src=&amp;quot;mine.png&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;file src=&amp;quot;radar.png&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;file src=&amp;quot;shield.png&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;include resource=&amp;quot;scoreboard&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;include resource=&amp;quot;killmessages&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;include resource=&amp;quot;maplimits&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;settings&amp;gt;&lt;br /&gt;
         &amp;lt;setting name=&amp;quot;roundlimit&amp;quot; value=&amp;quot;[6]&amp;quot; /&amp;gt; &amp;lt;!-- round length in minutes --&amp;gt;&lt;br /&gt;
	 &amp;lt;setting name=&amp;quot;teamdamage&amp;quot; value=&amp;quot;[1]&amp;quot; /&amp;gt; &amp;lt;!-- 0 for team protection off, 1 for team protection on --&amp;gt;&lt;br /&gt;
	 &amp;lt;setting name=&amp;quot;teambalance&amp;quot; value=&amp;quot;[1]&amp;quot; /&amp;gt; &amp;lt;!--  difference limit of amount of players between teams --&amp;gt;&lt;br /&gt;
	 &amp;lt;setting name=&amp;quot;spazammo&amp;quot; value=&amp;quot;[25]&amp;quot; /&amp;gt; &amp;lt;!-- ammo amounts --&amp;gt;&lt;br /&gt;
	 &amp;lt;setting name=&amp;quot;m4ammo&amp;quot; value=&amp;quot;[100]&amp;quot; /&amp;gt;&lt;br /&gt;
	 &amp;lt;setting name=&amp;quot;shotgunammo&amp;quot; value=&amp;quot;[25]&amp;quot; /&amp;gt;&lt;br /&gt;
	 &amp;lt;setting name=&amp;quot;sniperammo&amp;quot; value=&amp;quot;[20]&amp;quot; /&amp;gt;&lt;br /&gt;
	 &amp;lt;setting name=&amp;quot;ak47ammo&amp;quot; value=&amp;quot;[120]&amp;quot; /&amp;gt;&lt;br /&gt;
	 &amp;lt;setting name=&amp;quot;rifleammo&amp;quot; value=&amp;quot;[40]&amp;quot; /&amp;gt;&lt;br /&gt;
	 &amp;lt;setting name=&amp;quot;deserteagleammo&amp;quot; value=&amp;quot;[45]&amp;quot; /&amp;gt;&lt;br /&gt;
	 &amp;lt;setting name=&amp;quot;pistolammo&amp;quot; value=&amp;quot;[132]&amp;quot; /&amp;gt;&lt;br /&gt;
	 &amp;lt;setting name=&amp;quot;uziammo&amp;quot; value=&amp;quot;[150]&amp;quot; /&amp;gt;&lt;br /&gt;
	 &amp;lt;setting name=&amp;quot;tec9ammo&amp;quot; value=&amp;quot;[150]&amp;quot; /&amp;gt;&lt;br /&gt;
	 &amp;lt;setting name=&amp;quot;silencedammo&amp;quot; value=&amp;quot;[65]&amp;quot; /&amp;gt;&lt;br /&gt;
	 &amp;lt;setting name=&amp;quot;grenadeammo&amp;quot; value=&amp;quot;[4]&amp;quot; /&amp;gt;&lt;br /&gt;
	 &amp;lt;setting name=&amp;quot;satchelammo&amp;quot; value=&amp;quot;[4]&amp;quot; /&amp;gt;&lt;br /&gt;
	 &amp;lt;setting name=&amp;quot;teargasammo&amp;quot; value=&amp;quot;[4]&amp;quot; /&amp;gt;&lt;br /&gt;
	 &amp;lt;setting name=&amp;quot;molatovammo&amp;quot; value=&amp;quot;[4]&amp;quot; /&amp;gt;&lt;br /&gt;
     &amp;lt;/settings&amp;gt;&lt;br /&gt;
&amp;lt;/meta&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[[Category:Scripting Concepts]]&lt;br /&gt;
[[ru:Meta.xml]]&lt;/div&gt;</summary>
		<author><name>William da silva</name></author>
	</entry>
</feed>