<?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=Dfigfjf</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=Dfigfjf"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/wiki/Special:Contributions/Dfigfjf"/>
	<updated>2026-05-15T06:04:49Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Math.round&amp;diff=55359</id>
		<title>Math.round</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Math.round&amp;diff=55359"/>
		<updated>2018-06-18T12:55:51Z</updated>

		<summary type="html">&lt;p&gt;Dfigfjf: /* Syntax 2 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Useful Function}}&lt;br /&gt;
&amp;lt;lowercasetitle&amp;gt;&amp;lt;/lowercasetitle&amp;gt;&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function is a full featured round function for Lua's math-library.&lt;br /&gt;
Bear in mind that both the floor and the ceil method may not work properly clientside when you pass something greater than 0 as second argument. This is because of some weird clientside number bug. It's fixed for the round method.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
=== Syntax 1 ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;int/float math.round( float number, [ int decimals = 0, string method = &amp;quot;round&amp;quot; ] )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
* '''number''': The number to round.&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
{{OptionalArg}}&lt;br /&gt;
* '''decimals''': The number of decimals to keep.&lt;br /&gt;
* '''method''': The round method that should be used. Valid values are &amp;quot;round&amp;quot; (which is default), &amp;quot;floor&amp;quot; and &amp;quot;ceil&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns the rounded number.&lt;br /&gt;
&lt;br /&gt;
=== Syntax 2 ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;int math.round( float number )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
* '''number''': The number to round.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns the rounded number.&lt;br /&gt;
&lt;br /&gt;
==Code ==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server- and/or clientside Script&amp;quot; class=&amp;quot;both&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
=== Syntax 1 ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function math.round(number, decimals, method)&lt;br /&gt;
    decimals = decimals or 0&lt;br /&gt;
    local factor = 10 ^ decimals&lt;br /&gt;
    if (method == &amp;quot;ceil&amp;quot; or method == &amp;quot;floor&amp;quot;) then return math[method](number * factor) / factor&lt;br /&gt;
    else return tonumber((&amp;quot;%.&amp;quot;..decimals..&amp;quot;f&amp;quot;):format(number)) end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Syntax 2 ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function math.round(number)&lt;br /&gt;
    local _, decimals = math.modf(number)&lt;br /&gt;
    if decimals &amp;lt; 0.5 then return math.floor(number) end&lt;br /&gt;
    return math.ceil(number)&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;
=== Syntax 1 ===&lt;br /&gt;
&amp;lt;section name=&amp;quot;Serverside Example&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This example adds a command that outputs the players current position approximated to three decimals.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot; lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function pos(thePlayer, command)&lt;br /&gt;
	local x, y, z = getElementPosition(getPedOccupiedVehicle(thePlayer) or thePlayer)&lt;br /&gt;
	outputChatBox(&amp;quot;Your current position: [&amp;quot;..math.round(x, 3)..&amp;quot;|&amp;quot;..math.round(y, 3)..&amp;quot;|&amp;quot;..math.round(z, 3)..&amp;quot;]&amp;quot;, thePlayer)&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler(&amp;quot;pos&amp;quot;,pos)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Syntax 2 ===&lt;br /&gt;
&amp;lt;section name=&amp;quot;Serverside Example&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This example adds a command that outputs the rounded players current position. It's useful for [[createWater]] function.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot; lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function roundedPos(thePlayer)&lt;br /&gt;
	local x, y, z = getElementPosition(getPedOccupiedVehicle(thePlayer) or thePlayer)&lt;br /&gt;
	outputChatBox(&amp;quot;Your current position: x: &amp;quot;..math.round(x)..&amp;quot;, y: &amp;quot;..math.round(y)..&amp;quot;, z: &amp;quot;..math.round(z), thePlayer)&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler(&amp;quot;roundedPos&amp;quot;,roundedPos)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Authors: NeonBlack (Syntax 1), Valentin3526 (Syntax 2)&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Useful_Functions}}&lt;/div&gt;</summary>
		<author><name>Dfigfjf</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Math.round&amp;diff=55358</id>
		<title>Math.round</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Math.round&amp;diff=55358"/>
		<updated>2018-06-18T12:50:41Z</updated>

		<summary type="html">&lt;p&gt;Dfigfjf: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Useful Function}}&lt;br /&gt;
&amp;lt;lowercasetitle&amp;gt;&amp;lt;/lowercasetitle&amp;gt;&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function is a full featured round function for Lua's math-library.&lt;br /&gt;
Bear in mind that both the floor and the ceil method may not work properly clientside when you pass something greater than 0 as second argument. This is because of some weird clientside number bug. It's fixed for the round method.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
=== Syntax 1 ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;int/float math.round( float number, [ int decimals = 0, string method = &amp;quot;round&amp;quot; ] )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
* '''number''': The number to round.&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
{{OptionalArg}}&lt;br /&gt;
* '''decimals''': The number of decimals to keep.&lt;br /&gt;
* '''method''': The round method that should be used. Valid values are &amp;quot;round&amp;quot; (which is default), &amp;quot;floor&amp;quot; and &amp;quot;ceil&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns the rounded number.&lt;br /&gt;
&lt;br /&gt;
=== Syntax 2 ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;int math.round( float number )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
* '''number''': The number to round.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns the rounded number.&lt;br /&gt;
&lt;br /&gt;
==Code ==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server- and/or clientside Script&amp;quot; class=&amp;quot;both&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
=== Syntax 1 ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function math.round(number, decimals, method)&lt;br /&gt;
    decimals = decimals or 0&lt;br /&gt;
    local factor = 10 ^ decimals&lt;br /&gt;
    if (method == &amp;quot;ceil&amp;quot; or method == &amp;quot;floor&amp;quot;) then return math[method](number * factor) / factor&lt;br /&gt;
    else return tonumber((&amp;quot;%.&amp;quot;..decimals..&amp;quot;f&amp;quot;):format(number)) end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Syntax 2 ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function math.round(number)&lt;br /&gt;
    local _, decimals = math.modf(number)&lt;br /&gt;
    if decimals &amp;lt; 0.5 then return math.floor(number) end&lt;br /&gt;
    return math.ceil(number)&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;
=== Syntax 1 ===&lt;br /&gt;
&amp;lt;section name=&amp;quot;Serverside Example&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This example adds a command that outputs the players current position approximated to three decimals.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot; lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function pos(thePlayer, command)&lt;br /&gt;
	local x, y, z = getElementPosition(getPedOccupiedVehicle(thePlayer) or thePlayer)&lt;br /&gt;
	outputChatBox(&amp;quot;Your current position: [&amp;quot;..math.round(x, 3)..&amp;quot;|&amp;quot;..math.round(y, 3)..&amp;quot;|&amp;quot;..math.round(z, 3)..&amp;quot;]&amp;quot;, thePlayer)&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler(&amp;quot;pos&amp;quot;,pos)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Syntax 2 ===&lt;br /&gt;
&amp;lt;section name=&amp;quot;Serverside Example&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This example adds a command that outputs the rounded players current position. It's useful for createWater function.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot; lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function roundedPos(thePlayer, command)&lt;br /&gt;
	local x, y, z = getElementPosition(getPedOccupiedVehicle(thePlayer) or thePlayer)&lt;br /&gt;
	outputChatBox(&amp;quot;Your current position: x: &amp;quot;..math.round(x)..&amp;quot;, y: &amp;quot;..math.round(y)..&amp;quot;, z: &amp;quot;..math.round(z), thePlayer)&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler(&amp;quot;roundedPos&amp;quot;,roundedPos)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Authors: NeonBlack (Syntax 1), Valentin3526 (Syntax 2)&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Useful_Functions}}&lt;/div&gt;</summary>
		<author><name>Dfigfjf</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Math.round&amp;diff=55357</id>
		<title>Math.round</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Math.round&amp;diff=55357"/>
		<updated>2018-06-18T12:44:57Z</updated>

		<summary type="html">&lt;p&gt;Dfigfjf: /* Syntax 2 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Useful Function}}&lt;br /&gt;
&amp;lt;lowercasetitle&amp;gt;&amp;lt;/lowercasetitle&amp;gt;&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function is a full featured round function for Lua's math-library.&lt;br /&gt;
Bear in mind that both the floor and the ceil method may not work properly clientside when you pass something greater than 0 as second argument. This is because of some weird clientside number bug. It's fixed for the round method.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
=== Syntax 1 ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;int/float math.round( float number, [ int decimals = 0, string method = &amp;quot;round&amp;quot; ] )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
* '''number''': The number to round.&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
{{OptionalArg}}&lt;br /&gt;
* '''decimals''': The number of decimals to keep.&lt;br /&gt;
* '''method''': The round method that should be used. Valid values are &amp;quot;round&amp;quot; (which is default), &amp;quot;floor&amp;quot; and &amp;quot;ceil&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns the rounded number.&lt;br /&gt;
&lt;br /&gt;
=== Syntax 2 ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;int math.round( float number )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
* '''number''': The number to round.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns the rounded number.&lt;br /&gt;
&lt;br /&gt;
==Code ==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server- and/or clientside Script&amp;quot; class=&amp;quot;both&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
=== Syntax 1 ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function math.round(number, decimals, method)&lt;br /&gt;
    decimals = decimals or 0&lt;br /&gt;
    local factor = 10 ^ decimals&lt;br /&gt;
    if (method == &amp;quot;ceil&amp;quot; or method == &amp;quot;floor&amp;quot;) then return math[method](number * factor) / factor&lt;br /&gt;
    else return tonumber((&amp;quot;%.&amp;quot;..decimals..&amp;quot;f&amp;quot;):format(number)) end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Syntax 2 ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function math.round(number)&lt;br /&gt;
    local _, decimals = math.modf(number)&lt;br /&gt;
    if decimals &amp;lt; 0.5 then return math.floor(number) end&lt;br /&gt;
    return math.ceil(number)&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Serverside Example&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This example adds a command that outputs the players current position approximated to three decimals.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot; lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function pos(thePlayer, command)&lt;br /&gt;
	local x, y, z = getElementPosition(getPedOccupiedVehicle(thePlayer) or thePlayer)&lt;br /&gt;
	outputChatBox(&amp;quot;Your current position: [&amp;quot;..math.round(x, 3)..&amp;quot;|&amp;quot;..math.round(y, 3)..&amp;quot;|&amp;quot;..math.round(z, 3)..&amp;quot;]&amp;quot;, thePlayer)&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler(&amp;quot;pos&amp;quot;,pos)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Author: NeonBlack&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Useful_Functions}}&lt;/div&gt;</summary>
		<author><name>Dfigfjf</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Math.round&amp;diff=55356</id>
		<title>Math.round</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Math.round&amp;diff=55356"/>
		<updated>2018-06-18T12:44:35Z</updated>

		<summary type="html">&lt;p&gt;Dfigfjf: /* Code */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Useful Function}}&lt;br /&gt;
&amp;lt;lowercasetitle&amp;gt;&amp;lt;/lowercasetitle&amp;gt;&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function is a full featured round function for Lua's math-library.&lt;br /&gt;
Bear in mind that both the floor and the ceil method may not work properly clientside when you pass something greater than 0 as second argument. This is because of some weird clientside number bug. It's fixed for the round method.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
=== Syntax 1 ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;int/float math.round( float number, [ int decimals = 0, string method = &amp;quot;round&amp;quot; ] )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
* '''number''': The number to round.&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
{{OptionalArg}}&lt;br /&gt;
* '''decimals''': The number of decimals to keep.&lt;br /&gt;
* '''method''': The round method that should be used. Valid values are &amp;quot;round&amp;quot; (which is default), &amp;quot;floor&amp;quot; and &amp;quot;ceil&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns the rounded number.&lt;br /&gt;
&lt;br /&gt;
=== Syntax 2 ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;int/float math.round( float number )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
* '''number''': The number to round.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns the rounded number.&lt;br /&gt;
&lt;br /&gt;
==Code ==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server- and/or clientside Script&amp;quot; class=&amp;quot;both&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
=== Syntax 1 ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function math.round(number, decimals, method)&lt;br /&gt;
    decimals = decimals or 0&lt;br /&gt;
    local factor = 10 ^ decimals&lt;br /&gt;
    if (method == &amp;quot;ceil&amp;quot; or method == &amp;quot;floor&amp;quot;) then return math[method](number * factor) / factor&lt;br /&gt;
    else return tonumber((&amp;quot;%.&amp;quot;..decimals..&amp;quot;f&amp;quot;):format(number)) end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Syntax 2 ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function math.round(number)&lt;br /&gt;
    local _, decimals = math.modf(number)&lt;br /&gt;
    if decimals &amp;lt; 0.5 then return math.floor(number) end&lt;br /&gt;
    return math.ceil(number)&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Serverside Example&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This example adds a command that outputs the players current position approximated to three decimals.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot; lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function pos(thePlayer, command)&lt;br /&gt;
	local x, y, z = getElementPosition(getPedOccupiedVehicle(thePlayer) or thePlayer)&lt;br /&gt;
	outputChatBox(&amp;quot;Your current position: [&amp;quot;..math.round(x, 3)..&amp;quot;|&amp;quot;..math.round(y, 3)..&amp;quot;|&amp;quot;..math.round(z, 3)..&amp;quot;]&amp;quot;, thePlayer)&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler(&amp;quot;pos&amp;quot;,pos)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Author: NeonBlack&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Useful_Functions}}&lt;/div&gt;</summary>
		<author><name>Dfigfjf</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Math.round&amp;diff=55355</id>
		<title>Math.round</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Math.round&amp;diff=55355"/>
		<updated>2018-06-18T12:42:00Z</updated>

		<summary type="html">&lt;p&gt;Dfigfjf: /* Syntax */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Useful Function}}&lt;br /&gt;
&amp;lt;lowercasetitle&amp;gt;&amp;lt;/lowercasetitle&amp;gt;&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function is a full featured round function for Lua's math-library.&lt;br /&gt;
Bear in mind that both the floor and the ceil method may not work properly clientside when you pass something greater than 0 as second argument. This is because of some weird clientside number bug. It's fixed for the round method.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
=== Syntax 1 ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;int/float math.round( float number, [ int decimals = 0, string method = &amp;quot;round&amp;quot; ] )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
* '''number''': The number to round.&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
{{OptionalArg}}&lt;br /&gt;
* '''decimals''': The number of decimals to keep.&lt;br /&gt;
* '''method''': The round method that should be used. Valid values are &amp;quot;round&amp;quot; (which is default), &amp;quot;floor&amp;quot; and &amp;quot;ceil&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns the rounded number.&lt;br /&gt;
&lt;br /&gt;
=== Syntax 2 ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;int/float math.round( float number )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
* '''number''': The number to round.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns the rounded number.&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server- and/or clientside Script&amp;quot; class=&amp;quot;both&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function math.round(number, decimals, method)&lt;br /&gt;
    decimals = decimals or 0&lt;br /&gt;
    local factor = 10 ^ decimals&lt;br /&gt;
    if (method == &amp;quot;ceil&amp;quot; or method == &amp;quot;floor&amp;quot;) then return math[method](number * factor) / factor&lt;br /&gt;
    else return tonumber((&amp;quot;%.&amp;quot;..decimals..&amp;quot;f&amp;quot;):format(number)) end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Serverside Example&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This example adds a command that outputs the players current position approximated to three decimals.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot; lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function pos(thePlayer, command)&lt;br /&gt;
	local x, y, z = getElementPosition(getPedOccupiedVehicle(thePlayer) or thePlayer)&lt;br /&gt;
	outputChatBox(&amp;quot;Your current position: [&amp;quot;..math.round(x, 3)..&amp;quot;|&amp;quot;..math.round(y, 3)..&amp;quot;|&amp;quot;..math.round(z, 3)..&amp;quot;]&amp;quot;, thePlayer)&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler(&amp;quot;pos&amp;quot;,pos)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Author: NeonBlack&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Useful_Functions}}&lt;/div&gt;</summary>
		<author><name>Dfigfjf</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Places_To_Chat&amp;diff=55340</id>
		<title>Places To Chat</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Places_To_Chat&amp;diff=55340"/>
		<updated>2018-06-17T17:21:23Z</updated>

		<summary type="html">&lt;p&gt;Dfigfjf: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;There are a number of ways you can chat with other MTA players. Whether you want to discuss your gaming techniques, arrange clan matches, or even join a clan, there's always somewhere to go.&lt;br /&gt;
Of course you can chat with some people whilst playing via the ingame chat. But there are many places where a large proportion of the MTA community often visit. Some of these are described below.&lt;br /&gt;
&lt;br /&gt;
== Forums ==&lt;br /&gt;
The first place you are likely to come across is the official MTA Community Forums. These are found at [http://forum.mtasa.com http://forum.mtasa.com]. You are free to browse around and read what other people have to say, but to put your own point of view across and start your own discussions, you will have to Register at the forums. This is free and can be done by clicking the Register link at the top of the page.&lt;br /&gt;
&lt;br /&gt;
The forums are split up into a number of categories and sub-forums. These organise all the topics, and you should make sure that before you start your own topic, you are in the right forum. Also, before making any posts, be sure to read the [http://forum.mtasa.com/viewtopic.php?f=15&amp;amp;t=15740#p219286 rules].&lt;br /&gt;
&lt;br /&gt;
== IRC (Internet Relay Chat) ==&lt;br /&gt;
For an instant response to whatever you have to say, the best place is IRC. IRC is a chat network similar to any other chat rooms you find on the internet. The best Windows client for IRC is mIRC, which you can find [http://www.mirc.com here]. Download, install, configure the settings and you are ready to go.&lt;br /&gt;
The connection information you need is:&amp;lt;br&amp;gt;&lt;br /&gt;
'''Server -''' [irc://irc.gtanet.com/mta irc.gtanet.com/mta]&amp;lt;br&amp;gt;&lt;br /&gt;
'''Port -''' 6667&amp;lt;br&amp;gt;&lt;br /&gt;
Once you have connected and received the MOTD (message of the day), to join the MTA discussion, type /join #mta&lt;br /&gt;
This takes you into the MTA ''channel'', which you would know as a room in other chat networks.&lt;br /&gt;
Make sure you read the mIRC help files if you are unsure.&lt;br /&gt;
For more specific help for the server commands, go to the window you first had when connecting, and type /helpop for a list of help categories.&lt;br /&gt;
&lt;br /&gt;
=== Scripting Help ===&lt;br /&gt;
There is an IRC Channel available for help with MTA Scripting. You can find it at #mta.scripting on GTANet (irc.multitheftauto.com).&lt;br /&gt;
&lt;br /&gt;
==== How To Get Help ====&lt;br /&gt;
* Try to find your Answer on the [[Main Page]], especially on its upper part&lt;br /&gt;
* Ask your question once and only repeat it after a reasonable amount of time, given the channel is busy and people just coming online won't see your question else (like 10 minutes). NOT after 10 seconds.&lt;br /&gt;
* Your question should at least contain:&lt;br /&gt;
** What are you trying to do.&lt;br /&gt;
** What have you done so far.&lt;br /&gt;
** What exactly doesn't work/is your problem. What errors are occuring.&lt;br /&gt;
** Maybe a code snippet with an explanation using [http://mta.pastebin.com mta.pastebin.com] (''code snippet means the relevant parts, NOT the whole script'')&lt;br /&gt;
&lt;br /&gt;
== Discord ==&lt;br /&gt;
Compared to IRC, it offers a built-in chat history buffer, so even if you are offline, you can still catch up with what happened in the channels then. IRC also offers that, but only through an IRC Bouncer that you either need to pay for, or have someone host it for you.&lt;br /&gt;
It also has a modern look and features such as URL embedding (regular websites, but also pictures and videos), handy syntax colouring for pasted code snippets, emojis (also custom ones), chat messages reactions, [http://store.steampowered.com/about/ Steam] integration and more.&lt;br /&gt;
We currently have some channels created, including:&lt;br /&gt;
#general - for general MTA and offtopic chats&lt;br /&gt;
#scripting - for Lua scripting-related queries&lt;br /&gt;
#support - for any problems related to MTA:SA client or server&lt;br /&gt;
#announcements - for all important messages from us&lt;br /&gt;
The invisation link is here: [https://discord.gg/RygaCSD https://discord.gg/RygaCSD]. All you need is a [https://discordapp.com/ Discord] account. You can use Discord from your web browser or you can download the client.&lt;br /&gt;
You can find the official forum post [https://forum.mtasa.com/topic/95008-multi-theft-autos-official-discord-server/ here].&lt;br /&gt;
&lt;br /&gt;
== Other ==&lt;br /&gt;
These aren't all the places/ways of talking with other members of the MTA community. There are many many more forums than the official MTA one, for example [http://www.gtaforums.com GTAForums] which is the most popular unofficial GTA community forum. Although not just MTA discussion, online play is a popular topic of discussion.&lt;br /&gt;
&lt;br /&gt;
Please feel free to edit this page if you have something else to add.&lt;br /&gt;
&lt;br /&gt;
[[es:Places_To_Chat_ES]]&lt;br /&gt;
[[uk:Places To Chat]]&lt;br /&gt;
[[ru:Places To Chat]]&lt;br /&gt;
[[hu:Places To Chat]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Support]]&lt;/div&gt;</summary>
		<author><name>Dfigfjf</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GuiComboBoxAddItem&amp;diff=54900</id>
		<title>GuiComboBoxAddItem</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GuiComboBoxAddItem&amp;diff=54900"/>
		<updated>2018-05-09T18:45:45Z</updated>

		<summary type="html">&lt;p&gt;Dfigfjf: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Client function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
Adds an item to a combobox.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
int guiComboBoxAddItem( element comboBox, string value )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''comboBox:''' The combobox you want to add a row to&lt;br /&gt;
*'''value:''' The text that the item will contain.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns the item ID if it has been created, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This Example will add an item to comboBox when player use command ''addItem'' followed by the value of the item.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addCommandHandler(&amp;quot;addItem&amp;quot;, function (command, value)&lt;br /&gt;
    guiComboBoxAddItem(comboBox, value)&lt;br /&gt;
    outputChatBox(&amp;quot;Item with text &amp;quot; .. value .. &amp;quot; has been added!&amp;quot;)&lt;br /&gt;
end)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{GUI functions}}&lt;/div&gt;</summary>
		<author><name>Dfigfjf</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetElementVelocity&amp;diff=46730</id>
		<title>GetElementVelocity</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetElementVelocity&amp;diff=46730"/>
		<updated>2016-02-21T13:59:35Z</updated>

		<summary type="html">&lt;p&gt;Dfigfjf: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Server client function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function returns three floats containing the velocity (movement speeds) along the X, Y, and Z axis respectively. This means that velocity values can be positive and negative for each axis. &lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;float float float getElementVelocity ( element theElement )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{OOP||[[element]]:getVelocity|velocity|setElementVelocity|}}&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''theElement''': The [[element]] you wish to retrieve the velocity of.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
If succesful, returns three ''float''s that represent the element's current velocity along the ''x'', ''y'', and ''z'' axis respectively. This function can fail if the element is a player in a car. Use the vehicle element in this case. It will also fail if the element specified does not have a velocity, or does not exist. In case of failure, the first return value will be ''false''.&lt;br /&gt;
&lt;br /&gt;
The returned values are expressed in GTA units per 1/50th of a second[http://forum.mtasa.com/viewtopic.php?f=91&amp;amp;t=31225]. A GTA Unit is equal to one metre[http://gta.wikia.com/Unit#GTA3.2C_GTAVC_.26_GTASA].&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 retrieves, calculates, and displays the speed of a random player.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- find a player named &amp;quot;someguy&amp;quot; and get his velocity.&lt;br /&gt;
speedx, speedy, speedz = getElementVelocity ( getRandomPlayer() )&lt;br /&gt;
&lt;br /&gt;
-- use pythagorean theorem to get actual velocity&lt;br /&gt;
-- raising something to the exponent of 0.5 is the same thing as taking a square root.&lt;br /&gt;
actualspeed = (speedx^2 + speedy^2 + speedz^2)^(0.5) -- can be: math.sqrt(speedx^2 + speedy^2 + speedz^2)&lt;br /&gt;
&lt;br /&gt;
-- multiply by 50 to obtain the speed in metres per second&lt;br /&gt;
mps = actualspeed * 50&lt;br /&gt;
&lt;br /&gt;
-- other useful conversions&lt;br /&gt;
-- kilometres per hour&lt;br /&gt;
kmh = actualspeed * 180&lt;br /&gt;
-- miles per hour&lt;br /&gt;
mph = actualspeed * 111.847&lt;br /&gt;
&lt;br /&gt;
-- report the results.&lt;br /&gt;
outputChatBox ( &amp;quot;Someguy's current velocity: &amp;quot; .. mps .. &amp;quot; metres per second.&amp;quot; )&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>Dfigfjf</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=FR/A_propos_des_Map&amp;diff=46040</id>
		<title>FR/A propos des Map</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=FR/A_propos_des_Map&amp;diff=46040"/>
		<updated>2015-10-15T16:38:11Z</updated>

		<summary type="html">&lt;p&gt;Dfigfjf: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Needs Checking|Either complete the translation or remove it.}}&lt;br /&gt;
{{Needs Checking|Entrez la traduction complète ou supprimez-la}}&lt;br /&gt;
Le &amp;quot;Map manager&amp;quot; est une ressource inclue dans la suite serveur de MTA DM. Elle offre des commandes, fonctions et événements pour les modes de jeu afin de dynamiser vos maps. Par exemple, quand un serveur doit charger plusieurs routes pour plusieurs maps, au lieu d'avoir le tout dans un seul script principal, ces routes peuvent êtres stockée dans plusieurs ressources et chargée simplement grâce à la fonction &amp;quot;changeGamemodeMap&amp;quot; quand une map démarre.&lt;br /&gt;
&lt;br /&gt;
Plus spécifiquement, le &amp;quot;Map manager&amp;quot; liste les modes de jeux et maps chargés sur le serveur. Il inclut un listing sur l'interface web, il rafraîchit cette liste fréquemment et met en gras les ressources et/ou maps actuellement entrain d'être utilisées. &lt;br /&gt;
&lt;br /&gt;
== Un Simple Tutoriel ==&lt;br /&gt;
Dans cette section nous allons poursuivre le travail commencé dans [[FR/Introduction_Programmation|Introduction to Scripting]]. Nous allons ajouter une ressource qui enregistre l'endroit de spawn des joueurs sur la map, le chargement de ce script se fera depuis le script principal.&lt;br /&gt;
&lt;br /&gt;
Premièrement, créez un dossier dans /Your MTA Server/mods/deathmatch/resources/, nommez-le &amp;quot;mymap&amp;quot;. Ensuite dans ce dossier, créez un fichier texte et nommez-le &amp;quot;meta.xml&amp;quot;, ce fichier est présent dans chaque scripts.&lt;br /&gt;
&lt;br /&gt;
Ecrivez les lignes suivantes dans le fichier ''meta.xml'' :&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;meta&amp;gt;&lt;br /&gt;
   &amp;lt;info type=&amp;quot;map&amp;quot; gamemodes=&amp;quot;myserver&amp;quot;/&amp;gt;&lt;br /&gt;
   &amp;lt;map src=&amp;quot;mymap.map&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/meta&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Prenez garde car ce fichier est &amp;quot;lié&amp;quot; avec le ''gamemodes=&amp;quot;&amp;quot;'' choisit, qui contient le nom de la ressource principale qu'utilise ce mode. le paramètre ''map'', indique le nom de la map qui sera afficher sur le serveur.&lt;br /&gt;
&lt;br /&gt;
Maintenant créez un nouveau fichier texte dans /mymap/ et nommez le &amp;quot;mymap.map&amp;quot;, écrivez y les lignes suivantes:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;map&amp;gt;&lt;br /&gt;
   &amp;lt;spawnpoint id=&amp;quot;spawnpoint1&amp;quot; posX=&amp;quot;1959.5487060547&amp;quot; posY=&amp;quot;-1714.4613037109&amp;quot; posZ=&amp;quot;18&amp;quot; rot=&amp;quot;63.350006103516&amp;quot; model=&amp;quot;0&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/map&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Notez que &amp;quot;spawnpoint&amp;quot; est le type de l'élément utilisé dans la fonction [[getElementsByType]], &amp;quot;id&amp;quot; est utilisée dans la fonction [[getElementByID]]&lt;br /&gt;
&lt;br /&gt;
Pour charger la map, le script principal doit pouvoir accéder aux maps par lui même. Quelques modifications sont à apportées dans script.lua situé dans &amp;quot;myserver&amp;quot;. Entrez les lignes suivantes :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function loadMap(startedMap)&lt;br /&gt;
	mapRoot = getResourceRootElement(startedMap)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
addEventHandler(&amp;quot;onGamemodeMapStart&amp;quot;, getRootElement(), loadMap)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Par défaut, l'evênement &amp;quot;onGamemodeMapStart&amp;quot; nous donne le &amp;quot;handle&amp;quot;(?) de la map (&amp;quot;startedMap&amp;quot;), lequel nous avons utilisé pour le &amp;quot;handle&amp;quot;(?) de la ressource contenant la map (&amp;quot;mapRoot&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
Avec la ressource &amp;quot;handle&amp;quot;(?), nous pouvons extraire les informations relatives au spawnpoint. Jetez un œil à la fonction joinHandler() dans script.lua, à la place de x, y and z, nous pouvons utiliser les informations de la map comme suit :&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function joinHandler()&lt;br /&gt;
	local spawn = getElementsByType(&amp;quot;spawnpoint&amp;quot;, mapRoot)&lt;br /&gt;
	local x,y,z,r&lt;br /&gt;
	for key, value in pairs(spawn) do&lt;br /&gt;
		x = getElementData(value, &amp;quot;posX&amp;quot;)&lt;br /&gt;
		y = getElementData(value, &amp;quot;posY&amp;quot;)&lt;br /&gt;
		z = getElementData(value, &amp;quot;posZ&amp;quot;)&lt;br /&gt;
		r = getElementData(value, &amp;quot;rot&amp;quot;)&lt;br /&gt;
	end&lt;br /&gt;
	spawnPlayer(source, x, y, z)&lt;br /&gt;
	fadeCamera(source, true)&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Lancez maintenant votre gamemode avec la commande suivante via la console:&lt;br /&gt;
&lt;br /&gt;
'''gamemode myserver mymap'''&lt;br /&gt;
&lt;br /&gt;
==Utilisation==&lt;br /&gt;
Pour utiliser le map manager, vos ressources doivent d'abord être reconnues en tant que gamemodes ou maps.&lt;br /&gt;
&lt;br /&gt;
Vous devez remplir quelques informations pour votre fichier de configuration du '''gamemode resource''' :&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;info description=&amp;quot;Votre Gamemode&amp;quot; type=&amp;quot;gamemode&amp;quot; /&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Map resources''' Les maps ont aussi besoin d'information dans le meta.xml, ''type=&amp;quot;map&amp;quot;'' et un ou plusieurs ''gamemodes''. Une map peut en effet être compatible avec plusieurs mode de jeu pour se faire il faudra séparer les modes par une virgule ''sans espaces''.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;info description=&amp;quot;A gamemode map&amp;quot; type=&amp;quot;map&amp;quot; gamemodes=&amp;quot;ctv,koth&amp;quot; /&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Il ne peut y avoir qu’un mode de jeu 'Gamemode' Actif ou une map chargée à la fois.&lt;br /&gt;
&lt;br /&gt;
==Paramètres Supplémentaires==&lt;br /&gt;
Ces paramètres sont aussi à ajouter dans meta.xml.&lt;br /&gt;
&lt;br /&gt;
'''name:''' Entrez ici un message sympa qui sera afficher lors du démarrage de la ressource. C'est en quelques sorte un alias au cas ou le nom de votre ressource ne vous correspond pas.&lt;br /&gt;
&lt;br /&gt;
==Commandes==&lt;br /&gt;
'''changemap newmap [gamemode]''' (changer le 'Gamemode' d'une map)&lt;br /&gt;
&lt;br /&gt;
'''changemode newgamemode [map]''' (lancer un mode de jeu 'Gamemode' et démarrez une map)&lt;br /&gt;
&lt;br /&gt;
'''gamemode newgamemode [map]''' (idem que la précédente)&lt;br /&gt;
&lt;br /&gt;
'''stopmode''' (Arrête le mode de jeu et la map en cours)&lt;br /&gt;
&lt;br /&gt;
'''stopmap''' (Arrête la map en cours)&lt;br /&gt;
&lt;br /&gt;
'''maps [gamemode]''' (liste toutes les maps sur le serveurs, ajoutez en option le mode pour lequel vous voulez connaître les maps)&lt;br /&gt;
&lt;br /&gt;
'''gamemodes''' (Liste tout les mode de jeu)&lt;br /&gt;
&lt;br /&gt;
==Paramètres==&lt;br /&gt;
'''*mapmanager.color''' [string couleur hex] (change la couleur de sortie des message du mapmanager) (Par défaut : #E1AA5A)&lt;br /&gt;
&lt;br /&gt;
'''*mapmanager.messages''' [boolean] (si les changements de map/gm sont activés) (Par défaut : true)&lt;br /&gt;
&lt;br /&gt;
'''*mapmanager.ASE''' [boolean] (si le manager doit charger en mode ASE) (Par défaut : true)&lt;br /&gt;
&lt;br /&gt;
==Autres fonctions==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;bool changeGamemode ( resource newGamemode, [ resource mapToLoadWith ] )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Changement de mode de jeu, on peut aussi lui donner une map initial à charger.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;bool changeGamemodeMap ( resource newMap, [ resource gamemodeToChangeTo ] )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Change le mode de jeu d'une map pour un nouveau, on peut choisir un mode de jeu à charger une fois cette map rechargée.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;table getGamemodes ( )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Renvoie une table des tout les modes de jeu et leur pointeurs.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;table getGamemodesCompatibleWithMap ( resource theMap )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Retourne une table de tout les modes de jeu compatibles.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;table getMaps ( )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Reourne une table de toutes les ressources en rapport avec la map.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;table getMapsCompatibleWithGamemode ( [ resource theGamemode ] )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Retourne une table de tout les modes de jeu compatibles. Si l'argument &amp;quot;theGamemode&amp;quot; est inexistant, ça retourne toutes les maps qui n'ont aucun mode de jeu compatible..&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;resource getRunningGamemode ( )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Renvoie le mode de jeu actif.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;resource getRunningGamemodeMap ( )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Renvoie le mode de jeu de la map en cours.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;bool isGamemode ( resource theGamemode )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Déterminie si une ressources est un mode de jeu ou pas.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;bool isGamemodeCompatibleWithMap ( resource theGamemode, resource theMap )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Déterminie si une map est compatible avec un mode de jeu ou pas.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;bool isMap ( resource theMap )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Détermine si ressources est une map ou pas.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;bool isMapCompatibleWithGamemode ( resource theMap, resource theGamemode )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Déterminie si une map est compatible avec un gamemode ou pas.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;bool stopGamemode ( )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Arrêter le mode de jeux actif ainsi que la map chargée.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;bool stopGamemodeMap ( )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Arrêter la map active.&lt;br /&gt;
&lt;br /&gt;
==Evênement Appelés==&lt;br /&gt;
''(Pour tous ces évênements, &amp;quot;source&amp;quot; est la ressource racine des élément.)''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;onGamemodeStart ( resource startedGamemode )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Appelé lors du démarrage d'un mode de jeu.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;onGamemodeStop ( resource stoppedGamemode )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Appelé quand on arrête un mode de jeu.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;onGamemodeMapStart ( resource startedMap )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Appelé quand la map d'un mode de jeu démarre.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;onGamemodeMapStop ( resource stoppedMap )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Appelé quand la map de mode de jeu est stoppée.&lt;br /&gt;
&lt;br /&gt;
==Paramètres d'une Map==&lt;br /&gt;
Les paramètres suivants [[settings system|registry]] sont appliqué par le &amp;quot;Map Manager&amp;quot; quand une map est démarée :&lt;br /&gt;
&amp;lt;br&amp;gt;'''gamespeed''' [nombre]: la vitesse du jeu sur la map.&lt;br /&gt;
&amp;lt;br&amp;gt;'''gravity''' [nombre]: la gravité de la map.&lt;br /&gt;
&amp;lt;br&amp;gt;'''time''' [Sous la forme suivante '''hh:mm''']: l'heure du jeu avec cette map.&lt;br /&gt;
&amp;lt;br&amp;gt;'''weather''' [nombre]: la météo de la map.&lt;br /&gt;
&amp;lt;br&amp;gt;'''waveheight''' [nombre]: la hauteur de l'eau pour cette map.&lt;br /&gt;
&amp;lt;br&amp;gt;'''locked_time''' [boolean]: décide si le temps est verouillé ou non.&lt;br /&gt;
&amp;lt;br&amp;gt;'''minplayers''' [nombre]: décide du nombre minimum de joueurs pour démarrer la map.&lt;br /&gt;
&amp;lt;br&amp;gt;'''maxplayers''' [nombre]: décide du nombre maximum de joueurs que peut accepter la map.&lt;br /&gt;
&lt;br /&gt;
[[it:Map manager]]&lt;br /&gt;
[[ru:Resource:Mapmanager]]&lt;/div&gt;</summary>
		<author><name>Dfigfjf</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=FR/A_propos_des_Map&amp;diff=46039</id>
		<title>FR/A propos des Map</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=FR/A_propos_des_Map&amp;diff=46039"/>
		<updated>2015-10-15T16:37:36Z</updated>

		<summary type="html">&lt;p&gt;Dfigfjf: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Needs Checking|Either complete the translation or remove it.}}&lt;br /&gt;
{{Besoin de vérification|Entrez la traduction complète ou supprimez-la}}&lt;br /&gt;
Le &amp;quot;Map manager&amp;quot; est une ressource inclue dans la suite serveur de MTA DM. Elle offre des commandes, fonctions et événements pour les modes de jeu afin de dynamiser vos maps. Par exemple, quand un serveur doit charger plusieurs routes pour plusieurs maps, au lieu d'avoir le tout dans un seul script principal, ces routes peuvent êtres stockée dans plusieurs ressources et chargée simplement grâce à la fonction &amp;quot;changeGamemodeMap&amp;quot; quand une map démarre.&lt;br /&gt;
&lt;br /&gt;
Plus spécifiquement, le &amp;quot;Map manager&amp;quot; liste les modes de jeux et maps chargés sur le serveur. Il inclut un listing sur l'interface web, il rafraîchit cette liste fréquemment et met en gras les ressources et/ou maps actuellement entrain d'être utilisées. &lt;br /&gt;
&lt;br /&gt;
== Un Simple Tutoriel ==&lt;br /&gt;
Dans cette section nous allons poursuivre le travail commencé dans [[FR/Introduction_Programmation|Introduction to Scripting]]. Nous allons ajouter une ressource qui enregistre l'endroit de spawn des joueurs sur la map, le chargement de ce script se fera depuis le script principal.&lt;br /&gt;
&lt;br /&gt;
Premièrement, créez un dossier dans /Your MTA Server/mods/deathmatch/resources/, nommez-le &amp;quot;mymap&amp;quot;. Ensuite dans ce dossier, créez un fichier texte et nommez-le &amp;quot;meta.xml&amp;quot;, ce fichier est présent dans chaque scripts.&lt;br /&gt;
&lt;br /&gt;
Ecrivez les lignes suivantes dans le fichier ''meta.xml'' :&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;meta&amp;gt;&lt;br /&gt;
   &amp;lt;info type=&amp;quot;map&amp;quot; gamemodes=&amp;quot;myserver&amp;quot;/&amp;gt;&lt;br /&gt;
   &amp;lt;map src=&amp;quot;mymap.map&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/meta&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Prenez garde car ce fichier est &amp;quot;lié&amp;quot; avec le ''gamemodes=&amp;quot;&amp;quot;'' choisit, qui contient le nom de la ressource principale qu'utilise ce mode. le paramètre ''map'', indique le nom de la map qui sera afficher sur le serveur.&lt;br /&gt;
&lt;br /&gt;
Maintenant créez un nouveau fichier texte dans /mymap/ et nommez le &amp;quot;mymap.map&amp;quot;, écrivez y les lignes suivantes:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;map&amp;gt;&lt;br /&gt;
   &amp;lt;spawnpoint id=&amp;quot;spawnpoint1&amp;quot; posX=&amp;quot;1959.5487060547&amp;quot; posY=&amp;quot;-1714.4613037109&amp;quot; posZ=&amp;quot;18&amp;quot; rot=&amp;quot;63.350006103516&amp;quot; model=&amp;quot;0&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/map&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Notez que &amp;quot;spawnpoint&amp;quot; est le type de l'élément utilisé dans la fonction [[getElementsByType]], &amp;quot;id&amp;quot; est utilisée dans la fonction [[getElementByID]]&lt;br /&gt;
&lt;br /&gt;
Pour charger la map, le script principal doit pouvoir accéder aux maps par lui même. Quelques modifications sont à apportées dans script.lua situé dans &amp;quot;myserver&amp;quot;. Entrez les lignes suivantes :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function loadMap(startedMap)&lt;br /&gt;
	mapRoot = getResourceRootElement(startedMap)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
addEventHandler(&amp;quot;onGamemodeMapStart&amp;quot;, getRootElement(), loadMap)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Par défaut, l'evênement &amp;quot;onGamemodeMapStart&amp;quot; nous donne le &amp;quot;handle&amp;quot;(?) de la map (&amp;quot;startedMap&amp;quot;), lequel nous avons utilisé pour le &amp;quot;handle&amp;quot;(?) de la ressource contenant la map (&amp;quot;mapRoot&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
Avec la ressource &amp;quot;handle&amp;quot;(?), nous pouvons extraire les informations relatives au spawnpoint. Jetez un œil à la fonction joinHandler() dans script.lua, à la place de x, y and z, nous pouvons utiliser les informations de la map comme suit :&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function joinHandler()&lt;br /&gt;
	local spawn = getElementsByType(&amp;quot;spawnpoint&amp;quot;, mapRoot)&lt;br /&gt;
	local x,y,z,r&lt;br /&gt;
	for key, value in pairs(spawn) do&lt;br /&gt;
		x = getElementData(value, &amp;quot;posX&amp;quot;)&lt;br /&gt;
		y = getElementData(value, &amp;quot;posY&amp;quot;)&lt;br /&gt;
		z = getElementData(value, &amp;quot;posZ&amp;quot;)&lt;br /&gt;
		r = getElementData(value, &amp;quot;rot&amp;quot;)&lt;br /&gt;
	end&lt;br /&gt;
	spawnPlayer(source, x, y, z)&lt;br /&gt;
	fadeCamera(source, true)&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Lancez maintenant votre gamemode avec la commande suivante via la console:&lt;br /&gt;
&lt;br /&gt;
'''gamemode myserver mymap'''&lt;br /&gt;
&lt;br /&gt;
==Utilisation==&lt;br /&gt;
Pour utiliser le map manager, vos ressources doivent d'abord être reconnues en tant que gamemodes ou maps.&lt;br /&gt;
&lt;br /&gt;
Vous devez remplir quelques informations pour votre fichier de configuration du '''gamemode resource''' :&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;info description=&amp;quot;Votre Gamemode&amp;quot; type=&amp;quot;gamemode&amp;quot; /&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Map resources''' Les maps ont aussi besoin d'information dans le meta.xml, ''type=&amp;quot;map&amp;quot;'' et un ou plusieurs ''gamemodes''. Une map peut en effet être compatible avec plusieurs mode de jeu pour se faire il faudra séparer les modes par une virgule ''sans espaces''.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;info description=&amp;quot;A gamemode map&amp;quot; type=&amp;quot;map&amp;quot; gamemodes=&amp;quot;ctv,koth&amp;quot; /&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Il ne peut y avoir qu’un mode de jeu 'Gamemode' Actif ou une map chargée à la fois.&lt;br /&gt;
&lt;br /&gt;
==Paramètres Supplémentaires==&lt;br /&gt;
Ces paramètres sont aussi à ajouter dans meta.xml.&lt;br /&gt;
&lt;br /&gt;
'''name:''' Entrez ici un message sympa qui sera afficher lors du démarrage de la ressource. C'est en quelques sorte un alias au cas ou le nom de votre ressource ne vous correspond pas.&lt;br /&gt;
&lt;br /&gt;
==Commandes==&lt;br /&gt;
'''changemap newmap [gamemode]''' (changer le 'Gamemode' d'une map)&lt;br /&gt;
&lt;br /&gt;
'''changemode newgamemode [map]''' (lancer un mode de jeu 'Gamemode' et démarrez une map)&lt;br /&gt;
&lt;br /&gt;
'''gamemode newgamemode [map]''' (idem que la précédente)&lt;br /&gt;
&lt;br /&gt;
'''stopmode''' (Arrête le mode de jeu et la map en cours)&lt;br /&gt;
&lt;br /&gt;
'''stopmap''' (Arrête la map en cours)&lt;br /&gt;
&lt;br /&gt;
'''maps [gamemode]''' (liste toutes les maps sur le serveurs, ajoutez en option le mode pour lequel vous voulez connaître les maps)&lt;br /&gt;
&lt;br /&gt;
'''gamemodes''' (Liste tout les mode de jeu)&lt;br /&gt;
&lt;br /&gt;
==Paramètres==&lt;br /&gt;
'''*mapmanager.color''' [string couleur hex] (change la couleur de sortie des message du mapmanager) (Par défaut : #E1AA5A)&lt;br /&gt;
&lt;br /&gt;
'''*mapmanager.messages''' [boolean] (si les changements de map/gm sont activés) (Par défaut : true)&lt;br /&gt;
&lt;br /&gt;
'''*mapmanager.ASE''' [boolean] (si le manager doit charger en mode ASE) (Par défaut : true)&lt;br /&gt;
&lt;br /&gt;
==Autres fonctions==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;bool changeGamemode ( resource newGamemode, [ resource mapToLoadWith ] )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Changement de mode de jeu, on peut aussi lui donner une map initial à charger.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;bool changeGamemodeMap ( resource newMap, [ resource gamemodeToChangeTo ] )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Change le mode de jeu d'une map pour un nouveau, on peut choisir un mode de jeu à charger une fois cette map rechargée.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;table getGamemodes ( )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Renvoie une table des tout les modes de jeu et leur pointeurs.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;table getGamemodesCompatibleWithMap ( resource theMap )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Retourne une table de tout les modes de jeu compatibles.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;table getMaps ( )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Reourne une table de toutes les ressources en rapport avec la map.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;table getMapsCompatibleWithGamemode ( [ resource theGamemode ] )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Retourne une table de tout les modes de jeu compatibles. Si l'argument &amp;quot;theGamemode&amp;quot; est inexistant, ça retourne toutes les maps qui n'ont aucun mode de jeu compatible..&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;resource getRunningGamemode ( )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Renvoie le mode de jeu actif.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;resource getRunningGamemodeMap ( )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Renvoie le mode de jeu de la map en cours.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;bool isGamemode ( resource theGamemode )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Déterminie si une ressources est un mode de jeu ou pas.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;bool isGamemodeCompatibleWithMap ( resource theGamemode, resource theMap )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Déterminie si une map est compatible avec un mode de jeu ou pas.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;bool isMap ( resource theMap )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Détermine si ressources est une map ou pas.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;bool isMapCompatibleWithGamemode ( resource theMap, resource theGamemode )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Déterminie si une map est compatible avec un gamemode ou pas.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;bool stopGamemode ( )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Arrêter le mode de jeux actif ainsi que la map chargée.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;bool stopGamemodeMap ( )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Arrêter la map active.&lt;br /&gt;
&lt;br /&gt;
==Evênement Appelés==&lt;br /&gt;
''(Pour tous ces évênements, &amp;quot;source&amp;quot; est la ressource racine des élément.)''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;onGamemodeStart ( resource startedGamemode )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Appelé lors du démarrage d'un mode de jeu.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;onGamemodeStop ( resource stoppedGamemode )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Appelé quand on arrête un mode de jeu.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;onGamemodeMapStart ( resource startedMap )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Appelé quand la map d'un mode de jeu démarre.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;onGamemodeMapStop ( resource stoppedMap )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Appelé quand la map de mode de jeu est stoppée.&lt;br /&gt;
&lt;br /&gt;
==Paramètres d'une Map==&lt;br /&gt;
Les paramètres suivants [[settings system|registry]] sont appliqué par le &amp;quot;Map Manager&amp;quot; quand une map est démarée :&lt;br /&gt;
&amp;lt;br&amp;gt;'''gamespeed''' [nombre]: la vitesse du jeu sur la map.&lt;br /&gt;
&amp;lt;br&amp;gt;'''gravity''' [nombre]: la gravité de la map.&lt;br /&gt;
&amp;lt;br&amp;gt;'''time''' [Sous la forme suivante '''hh:mm''']: l'heure du jeu avec cette map.&lt;br /&gt;
&amp;lt;br&amp;gt;'''weather''' [nombre]: la météo de la map.&lt;br /&gt;
&amp;lt;br&amp;gt;'''waveheight''' [nombre]: la hauteur de l'eau pour cette map.&lt;br /&gt;
&amp;lt;br&amp;gt;'''locked_time''' [boolean]: décide si le temps est verouillé ou non.&lt;br /&gt;
&amp;lt;br&amp;gt;'''minplayers''' [nombre]: décide du nombre minimum de joueurs pour démarrer la map.&lt;br /&gt;
&amp;lt;br&amp;gt;'''maxplayers''' [nombre]: décide du nombre maximum de joueurs que peut accepter la map.&lt;br /&gt;
&lt;br /&gt;
[[it:Map manager]]&lt;br /&gt;
[[ru:Resource:Mapmanager]]&lt;/div&gt;</summary>
		<author><name>Dfigfjf</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=FR/A_propos_des_Map&amp;diff=46038</id>
		<title>FR/A propos des Map</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=FR/A_propos_des_Map&amp;diff=46038"/>
		<updated>2015-10-15T16:35:43Z</updated>

		<summary type="html">&lt;p&gt;Dfigfjf: /* Commandes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Needs Checking|Either complete the translation or remove it.}}&lt;br /&gt;
Le &amp;quot;Map manager&amp;quot; est une ressource inclue dans la suite serveur de MTA DM. Elle offre des commandes, fonctions et événements pour les modes de jeu afin de dynamiser vos maps. Par exemple, quand un serveur doit charger plusieurs routes pour plusieurs maps, au lieu d'avoir le tout dans un seul script principal, ces routes peuvent êtres stockée dans plusieurs ressources et chargée simplement grâce à la fonction &amp;quot;changeGamemodeMap&amp;quot; quand une map démarre.&lt;br /&gt;
&lt;br /&gt;
Plus spécifiquement, le &amp;quot;Map manager&amp;quot; liste les modes de jeux et maps chargés sur le serveur. Il inclut un listing sur l'interface web, il rafraîchit cette liste fréquemment et met en gras les ressources et/ou maps actuellement entrain d'être utilisées. &lt;br /&gt;
&lt;br /&gt;
== Un Simple Tutoriel ==&lt;br /&gt;
Dans cette section nous allons poursuivre le travail commencé dans [[FR/Introduction_Programmation|Introduction to Scripting]]. Nous allons ajouter une ressource qui enregistre l'endroit de spawn des joueurs sur la map, le chargement de ce script se fera depuis le script principal.&lt;br /&gt;
&lt;br /&gt;
Premièrement, créez un dossier dans /Your MTA Server/mods/deathmatch/resources/, nommez-le &amp;quot;mymap&amp;quot;. Ensuite dans ce dossier, créez un fichier texte et nommez-le &amp;quot;meta.xml&amp;quot;, ce fichier est présent dans chaque scripts.&lt;br /&gt;
&lt;br /&gt;
Ecrivez les lignes suivantes dans le fichier ''meta.xml'' :&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;meta&amp;gt;&lt;br /&gt;
   &amp;lt;info type=&amp;quot;map&amp;quot; gamemodes=&amp;quot;myserver&amp;quot;/&amp;gt;&lt;br /&gt;
   &amp;lt;map src=&amp;quot;mymap.map&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/meta&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Prenez garde car ce fichier est &amp;quot;lié&amp;quot; avec le ''gamemodes=&amp;quot;&amp;quot;'' choisit, qui contient le nom de la ressource principale qu'utilise ce mode. le paramètre ''map'', indique le nom de la map qui sera afficher sur le serveur.&lt;br /&gt;
&lt;br /&gt;
Maintenant créez un nouveau fichier texte dans /mymap/ et nommez le &amp;quot;mymap.map&amp;quot;, écrivez y les lignes suivantes:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;map&amp;gt;&lt;br /&gt;
   &amp;lt;spawnpoint id=&amp;quot;spawnpoint1&amp;quot; posX=&amp;quot;1959.5487060547&amp;quot; posY=&amp;quot;-1714.4613037109&amp;quot; posZ=&amp;quot;18&amp;quot; rot=&amp;quot;63.350006103516&amp;quot; model=&amp;quot;0&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/map&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Notez que &amp;quot;spawnpoint&amp;quot; est le type de l'élément utilisé dans la fonction [[getElementsByType]], &amp;quot;id&amp;quot; est utilisée dans la fonction [[getElementByID]]&lt;br /&gt;
&lt;br /&gt;
Pour charger la map, le script principal doit pouvoir accéder aux maps par lui même. Quelques modifications sont à apportées dans script.lua situé dans &amp;quot;myserver&amp;quot;. Entrez les lignes suivantes :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function loadMap(startedMap)&lt;br /&gt;
	mapRoot = getResourceRootElement(startedMap)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
addEventHandler(&amp;quot;onGamemodeMapStart&amp;quot;, getRootElement(), loadMap)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Par défaut, l'evênement &amp;quot;onGamemodeMapStart&amp;quot; nous donne le &amp;quot;handle&amp;quot;(?) de la map (&amp;quot;startedMap&amp;quot;), lequel nous avons utilisé pour le &amp;quot;handle&amp;quot;(?) de la ressource contenant la map (&amp;quot;mapRoot&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
Avec la ressource &amp;quot;handle&amp;quot;(?), nous pouvons extraire les informations relatives au spawnpoint. Jetez un œil à la fonction joinHandler() dans script.lua, à la place de x, y and z, nous pouvons utiliser les informations de la map comme suit :&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function joinHandler()&lt;br /&gt;
	local spawn = getElementsByType(&amp;quot;spawnpoint&amp;quot;, mapRoot)&lt;br /&gt;
	local x,y,z,r&lt;br /&gt;
	for key, value in pairs(spawn) do&lt;br /&gt;
		x = getElementData(value, &amp;quot;posX&amp;quot;)&lt;br /&gt;
		y = getElementData(value, &amp;quot;posY&amp;quot;)&lt;br /&gt;
		z = getElementData(value, &amp;quot;posZ&amp;quot;)&lt;br /&gt;
		r = getElementData(value, &amp;quot;rot&amp;quot;)&lt;br /&gt;
	end&lt;br /&gt;
	spawnPlayer(source, x, y, z)&lt;br /&gt;
	fadeCamera(source, true)&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Lancez maintenant votre gamemode avec la commande suivante via la console:&lt;br /&gt;
&lt;br /&gt;
'''gamemode myserver mymap'''&lt;br /&gt;
&lt;br /&gt;
==Utilisation==&lt;br /&gt;
Pour utiliser le map manager, vos ressources doivent d'abord être reconnues en tant que gamemodes ou maps.&lt;br /&gt;
&lt;br /&gt;
Vous devez remplir quelques informations pour votre fichier de configuration du '''gamemode resource''' :&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;info description=&amp;quot;Votre Gamemode&amp;quot; type=&amp;quot;gamemode&amp;quot; /&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Map resources''' Les maps ont aussi besoin d'information dans le meta.xml, ''type=&amp;quot;map&amp;quot;'' et un ou plusieurs ''gamemodes''. Une map peut en effet être compatible avec plusieurs mode de jeu pour se faire il faudra séparer les modes par une virgule ''sans espaces''.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;info description=&amp;quot;A gamemode map&amp;quot; type=&amp;quot;map&amp;quot; gamemodes=&amp;quot;ctv,koth&amp;quot; /&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Il ne peut y avoir qu’un mode de jeu 'Gamemode' Actif ou une map chargée à la fois.&lt;br /&gt;
&lt;br /&gt;
==Paramètres Supplémentaires==&lt;br /&gt;
Ces paramètres sont aussi à ajouter dans meta.xml.&lt;br /&gt;
&lt;br /&gt;
'''name:''' Entrez ici un message sympa qui sera afficher lors du démarrage de la ressource. C'est en quelques sorte un alias au cas ou le nom de votre ressource ne vous correspond pas.&lt;br /&gt;
&lt;br /&gt;
==Commandes==&lt;br /&gt;
'''changemap newmap [gamemode]''' (changer le 'Gamemode' d'une map)&lt;br /&gt;
&lt;br /&gt;
'''changemode newgamemode [map]''' (lancer un mode de jeu 'Gamemode' et démarrez une map)&lt;br /&gt;
&lt;br /&gt;
'''gamemode newgamemode [map]''' (idem que la précédente)&lt;br /&gt;
&lt;br /&gt;
'''stopmode''' (Arrête le mode de jeu et la map en cours)&lt;br /&gt;
&lt;br /&gt;
'''stopmap''' (Arrête la map en cours)&lt;br /&gt;
&lt;br /&gt;
'''maps [gamemode]''' (liste toutes les maps sur le serveurs, ajoutez en option le mode pour lequel vous voulez connaître les maps)&lt;br /&gt;
&lt;br /&gt;
'''gamemodes''' (Liste tout les mode de jeu)&lt;br /&gt;
&lt;br /&gt;
==Paramètres==&lt;br /&gt;
'''*mapmanager.color''' [string couleur hex] (change la couleur de sortie des message du mapmanager) (Par défaut : #E1AA5A)&lt;br /&gt;
&lt;br /&gt;
'''*mapmanager.messages''' [boolean] (si les changements de map/gm sont activés) (Par défaut : true)&lt;br /&gt;
&lt;br /&gt;
'''*mapmanager.ASE''' [boolean] (si le manager doit charger en mode ASE) (Par défaut : true)&lt;br /&gt;
&lt;br /&gt;
==Autres fonctions==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;bool changeGamemode ( resource newGamemode, [ resource mapToLoadWith ] )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Changement de mode de jeu, on peut aussi lui donner une map initial à charger.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;bool changeGamemodeMap ( resource newMap, [ resource gamemodeToChangeTo ] )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Change le mode de jeu d'une map pour un nouveau, on peut choisir un mode de jeu à charger une fois cette map rechargée.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;table getGamemodes ( )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Renvoie une table des tout les modes de jeu et leur pointeurs.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;table getGamemodesCompatibleWithMap ( resource theMap )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Retourne une table de tout les modes de jeu compatibles.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;table getMaps ( )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Reourne une table de toutes les ressources en rapport avec la map.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;table getMapsCompatibleWithGamemode ( [ resource theGamemode ] )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Retourne une table de tout les modes de jeu compatibles. Si l'argument &amp;quot;theGamemode&amp;quot; est inexistant, ça retourne toutes les maps qui n'ont aucun mode de jeu compatible..&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;resource getRunningGamemode ( )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Renvoie le mode de jeu actif.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;resource getRunningGamemodeMap ( )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Renvoie le mode de jeu de la map en cours.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;bool isGamemode ( resource theGamemode )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Déterminie si une ressources est un mode de jeu ou pas.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;bool isGamemodeCompatibleWithMap ( resource theGamemode, resource theMap )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Déterminie si une map est compatible avec un mode de jeu ou pas.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;bool isMap ( resource theMap )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Détermine si ressources est une map ou pas.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;bool isMapCompatibleWithGamemode ( resource theMap, resource theGamemode )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Déterminie si une map est compatible avec un gamemode ou pas.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;bool stopGamemode ( )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Arrêter le mode de jeux actif ainsi que la map chargée.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;bool stopGamemodeMap ( )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Arrêter la map active.&lt;br /&gt;
&lt;br /&gt;
==Evênement Appelés==&lt;br /&gt;
''(Pour tous ces évênements, &amp;quot;source&amp;quot; est la ressource racine des élément.)''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;onGamemodeStart ( resource startedGamemode )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Appelé lors du démarrage d'un mode de jeu.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;onGamemodeStop ( resource stoppedGamemode )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Appelé quand on arrête un mode de jeu.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;onGamemodeMapStart ( resource startedMap )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Appelé quand la map d'un mode de jeu démarre.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;onGamemodeMapStop ( resource stoppedMap )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Appelé quand la map de mode de jeu est stoppée.&lt;br /&gt;
&lt;br /&gt;
==Paramètres d'une Map==&lt;br /&gt;
Les paramètres suivants [[settings system|registry]] sont appliqué par le &amp;quot;Map Manager&amp;quot; quand une map est démarée :&lt;br /&gt;
&amp;lt;br&amp;gt;'''gamespeed''' [nombre]: la vitesse du jeu sur la map.&lt;br /&gt;
&amp;lt;br&amp;gt;'''gravity''' [nombre]: la gravité de la map.&lt;br /&gt;
&amp;lt;br&amp;gt;'''time''' [Sous la forme suivante '''hh:mm''']: l'heure du jeu avec cette map.&lt;br /&gt;
&amp;lt;br&amp;gt;'''weather''' [nombre]: la météo de la map.&lt;br /&gt;
&amp;lt;br&amp;gt;'''waveheight''' [nombre]: la hauteur de l'eau pour cette map.&lt;br /&gt;
&amp;lt;br&amp;gt;'''locked_time''' [boolean]: décide si le temps est verouillé ou non.&lt;br /&gt;
&amp;lt;br&amp;gt;'''minplayers''' [nombre]: décide du nombre minimum de joueurs pour démarrer la map.&lt;br /&gt;
&amp;lt;br&amp;gt;'''maxplayers''' [nombre]: décide du nombre maximum de joueurs que peut accepter la map.&lt;br /&gt;
&lt;br /&gt;
[[it:Map manager]]&lt;br /&gt;
[[ru:Resource:Mapmanager]]&lt;/div&gt;</summary>
		<author><name>Dfigfjf</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=FR/A_propos_des_Map&amp;diff=46037</id>
		<title>FR/A propos des Map</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=FR/A_propos_des_Map&amp;diff=46037"/>
		<updated>2015-10-15T16:34:44Z</updated>

		<summary type="html">&lt;p&gt;Dfigfjf: /* Paramètres */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Needs Checking|Either complete the translation or remove it.}}&lt;br /&gt;
Le &amp;quot;Map manager&amp;quot; est une ressource inclue dans la suite serveur de MTA DM. Elle offre des commandes, fonctions et événements pour les modes de jeu afin de dynamiser vos maps. Par exemple, quand un serveur doit charger plusieurs routes pour plusieurs maps, au lieu d'avoir le tout dans un seul script principal, ces routes peuvent êtres stockée dans plusieurs ressources et chargée simplement grâce à la fonction &amp;quot;changeGamemodeMap&amp;quot; quand une map démarre.&lt;br /&gt;
&lt;br /&gt;
Plus spécifiquement, le &amp;quot;Map manager&amp;quot; liste les modes de jeux et maps chargés sur le serveur. Il inclut un listing sur l'interface web, il rafraîchit cette liste fréquemment et met en gras les ressources et/ou maps actuellement entrain d'être utilisées. &lt;br /&gt;
&lt;br /&gt;
== Un Simple Tutoriel ==&lt;br /&gt;
Dans cette section nous allons poursuivre le travail commencé dans [[FR/Introduction_Programmation|Introduction to Scripting]]. Nous allons ajouter une ressource qui enregistre l'endroit de spawn des joueurs sur la map, le chargement de ce script se fera depuis le script principal.&lt;br /&gt;
&lt;br /&gt;
Premièrement, créez un dossier dans /Your MTA Server/mods/deathmatch/resources/, nommez-le &amp;quot;mymap&amp;quot;. Ensuite dans ce dossier, créez un fichier texte et nommez-le &amp;quot;meta.xml&amp;quot;, ce fichier est présent dans chaque scripts.&lt;br /&gt;
&lt;br /&gt;
Ecrivez les lignes suivantes dans le fichier ''meta.xml'' :&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;meta&amp;gt;&lt;br /&gt;
   &amp;lt;info type=&amp;quot;map&amp;quot; gamemodes=&amp;quot;myserver&amp;quot;/&amp;gt;&lt;br /&gt;
   &amp;lt;map src=&amp;quot;mymap.map&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/meta&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Prenez garde car ce fichier est &amp;quot;lié&amp;quot; avec le ''gamemodes=&amp;quot;&amp;quot;'' choisit, qui contient le nom de la ressource principale qu'utilise ce mode. le paramètre ''map'', indique le nom de la map qui sera afficher sur le serveur.&lt;br /&gt;
&lt;br /&gt;
Maintenant créez un nouveau fichier texte dans /mymap/ et nommez le &amp;quot;mymap.map&amp;quot;, écrivez y les lignes suivantes:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;map&amp;gt;&lt;br /&gt;
   &amp;lt;spawnpoint id=&amp;quot;spawnpoint1&amp;quot; posX=&amp;quot;1959.5487060547&amp;quot; posY=&amp;quot;-1714.4613037109&amp;quot; posZ=&amp;quot;18&amp;quot; rot=&amp;quot;63.350006103516&amp;quot; model=&amp;quot;0&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/map&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Notez que &amp;quot;spawnpoint&amp;quot; est le type de l'élément utilisé dans la fonction [[getElementsByType]], &amp;quot;id&amp;quot; est utilisée dans la fonction [[getElementByID]]&lt;br /&gt;
&lt;br /&gt;
Pour charger la map, le script principal doit pouvoir accéder aux maps par lui même. Quelques modifications sont à apportées dans script.lua situé dans &amp;quot;myserver&amp;quot;. Entrez les lignes suivantes :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function loadMap(startedMap)&lt;br /&gt;
	mapRoot = getResourceRootElement(startedMap)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
addEventHandler(&amp;quot;onGamemodeMapStart&amp;quot;, getRootElement(), loadMap)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Par défaut, l'evênement &amp;quot;onGamemodeMapStart&amp;quot; nous donne le &amp;quot;handle&amp;quot;(?) de la map (&amp;quot;startedMap&amp;quot;), lequel nous avons utilisé pour le &amp;quot;handle&amp;quot;(?) de la ressource contenant la map (&amp;quot;mapRoot&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
Avec la ressource &amp;quot;handle&amp;quot;(?), nous pouvons extraire les informations relatives au spawnpoint. Jetez un œil à la fonction joinHandler() dans script.lua, à la place de x, y and z, nous pouvons utiliser les informations de la map comme suit :&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function joinHandler()&lt;br /&gt;
	local spawn = getElementsByType(&amp;quot;spawnpoint&amp;quot;, mapRoot)&lt;br /&gt;
	local x,y,z,r&lt;br /&gt;
	for key, value in pairs(spawn) do&lt;br /&gt;
		x = getElementData(value, &amp;quot;posX&amp;quot;)&lt;br /&gt;
		y = getElementData(value, &amp;quot;posY&amp;quot;)&lt;br /&gt;
		z = getElementData(value, &amp;quot;posZ&amp;quot;)&lt;br /&gt;
		r = getElementData(value, &amp;quot;rot&amp;quot;)&lt;br /&gt;
	end&lt;br /&gt;
	spawnPlayer(source, x, y, z)&lt;br /&gt;
	fadeCamera(source, true)&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Lancez maintenant votre gamemode avec la commande suivante via la console:&lt;br /&gt;
&lt;br /&gt;
'''gamemode myserver mymap'''&lt;br /&gt;
&lt;br /&gt;
==Utilisation==&lt;br /&gt;
Pour utiliser le map manager, vos ressources doivent d'abord être reconnues en tant que gamemodes ou maps.&lt;br /&gt;
&lt;br /&gt;
Vous devez remplir quelques informations pour votre fichier de configuration du '''gamemode resource''' :&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;info description=&amp;quot;Votre Gamemode&amp;quot; type=&amp;quot;gamemode&amp;quot; /&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Map resources''' Les maps ont aussi besoin d'information dans le meta.xml, ''type=&amp;quot;map&amp;quot;'' et un ou plusieurs ''gamemodes''. Une map peut en effet être compatible avec plusieurs mode de jeu pour se faire il faudra séparer les modes par une virgule ''sans espaces''.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;info description=&amp;quot;A gamemode map&amp;quot; type=&amp;quot;map&amp;quot; gamemodes=&amp;quot;ctv,koth&amp;quot; /&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Il ne peut y avoir qu’un mode de jeu 'Gamemode' Actif ou une map chargée à la fois.&lt;br /&gt;
&lt;br /&gt;
==Paramètres Supplémentaires==&lt;br /&gt;
Ces paramètres sont aussi à ajouter dans meta.xml.&lt;br /&gt;
&lt;br /&gt;
'''name:''' Entrez ici un message sympa qui sera afficher lors du démarrage de la ressource. C'est en quelques sorte un alias au cas ou le nom de votre ressource ne vous correspond pas.&lt;br /&gt;
&lt;br /&gt;
==Commandes==&lt;br /&gt;
'''changemap newmap [newgamemode]''' (changer le 'Gamemode' d'une map)&lt;br /&gt;
&lt;br /&gt;
'''changemode newgamemode [newmap]''' (lancer un mode de jeu 'Gamemode' et démarrez une map)&lt;br /&gt;
&lt;br /&gt;
'''gamemode newgamemode [newmap]''' (idem que la précédente)&lt;br /&gt;
&lt;br /&gt;
'''stopmode''' (Arrête le mode de jeu et la map en cours)&lt;br /&gt;
&lt;br /&gt;
'''stopmap''' (Arrête la map en cours)&lt;br /&gt;
&lt;br /&gt;
'''maps [gamemode]''' (liste toutes les maps sur le serveurs, ajoutez en option le mode pour lequel vous voulez connaître les maps)&lt;br /&gt;
&lt;br /&gt;
'''gamemodes''' (Liste tout les mode de jeu)&lt;br /&gt;
&lt;br /&gt;
==Paramètres==&lt;br /&gt;
'''*mapmanager.color''' [string couleur hex] (change la couleur de sortie des message du mapmanager) (Par défaut : #E1AA5A)&lt;br /&gt;
&lt;br /&gt;
'''*mapmanager.messages''' [boolean] (si les changements de map/gm sont activés) (Par défaut : true)&lt;br /&gt;
&lt;br /&gt;
'''*mapmanager.ASE''' [boolean] (si le manager doit charger en mode ASE) (Par défaut : true)&lt;br /&gt;
&lt;br /&gt;
==Autres fonctions==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;bool changeGamemode ( resource newGamemode, [ resource mapToLoadWith ] )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Changement de mode de jeu, on peut aussi lui donner une map initial à charger.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;bool changeGamemodeMap ( resource newMap, [ resource gamemodeToChangeTo ] )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Change le mode de jeu d'une map pour un nouveau, on peut choisir un mode de jeu à charger une fois cette map rechargée.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;table getGamemodes ( )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Renvoie une table des tout les modes de jeu et leur pointeurs.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;table getGamemodesCompatibleWithMap ( resource theMap )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Retourne une table de tout les modes de jeu compatibles.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;table getMaps ( )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Reourne une table de toutes les ressources en rapport avec la map.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;table getMapsCompatibleWithGamemode ( [ resource theGamemode ] )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Retourne une table de tout les modes de jeu compatibles. Si l'argument &amp;quot;theGamemode&amp;quot; est inexistant, ça retourne toutes les maps qui n'ont aucun mode de jeu compatible..&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;resource getRunningGamemode ( )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Renvoie le mode de jeu actif.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;resource getRunningGamemodeMap ( )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Renvoie le mode de jeu de la map en cours.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;bool isGamemode ( resource theGamemode )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Déterminie si une ressources est un mode de jeu ou pas.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;bool isGamemodeCompatibleWithMap ( resource theGamemode, resource theMap )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Déterminie si une map est compatible avec un mode de jeu ou pas.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;bool isMap ( resource theMap )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Détermine si ressources est une map ou pas.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;bool isMapCompatibleWithGamemode ( resource theMap, resource theGamemode )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Déterminie si une map est compatible avec un gamemode ou pas.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;bool stopGamemode ( )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Arrêter le mode de jeux actif ainsi que la map chargée.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;bool stopGamemodeMap ( )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Arrêter la map active.&lt;br /&gt;
&lt;br /&gt;
==Evênement Appelés==&lt;br /&gt;
''(Pour tous ces évênements, &amp;quot;source&amp;quot; est la ressource racine des élément.)''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;onGamemodeStart ( resource startedGamemode )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Appelé lors du démarrage d'un mode de jeu.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;onGamemodeStop ( resource stoppedGamemode )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Appelé quand on arrête un mode de jeu.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;onGamemodeMapStart ( resource startedMap )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Appelé quand la map d'un mode de jeu démarre.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;onGamemodeMapStop ( resource stoppedMap )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Appelé quand la map de mode de jeu est stoppée.&lt;br /&gt;
&lt;br /&gt;
==Paramètres d'une Map==&lt;br /&gt;
Les paramètres suivants [[settings system|registry]] sont appliqué par le &amp;quot;Map Manager&amp;quot; quand une map est démarée :&lt;br /&gt;
&amp;lt;br&amp;gt;'''gamespeed''' [nombre]: la vitesse du jeu sur la map.&lt;br /&gt;
&amp;lt;br&amp;gt;'''gravity''' [nombre]: la gravité de la map.&lt;br /&gt;
&amp;lt;br&amp;gt;'''time''' [Sous la forme suivante '''hh:mm''']: l'heure du jeu avec cette map.&lt;br /&gt;
&amp;lt;br&amp;gt;'''weather''' [nombre]: la météo de la map.&lt;br /&gt;
&amp;lt;br&amp;gt;'''waveheight''' [nombre]: la hauteur de l'eau pour cette map.&lt;br /&gt;
&amp;lt;br&amp;gt;'''locked_time''' [boolean]: décide si le temps est verouillé ou non.&lt;br /&gt;
&amp;lt;br&amp;gt;'''minplayers''' [nombre]: décide du nombre minimum de joueurs pour démarrer la map.&lt;br /&gt;
&amp;lt;br&amp;gt;'''maxplayers''' [nombre]: décide du nombre maximum de joueurs que peut accepter la map.&lt;br /&gt;
&lt;br /&gt;
[[it:Map manager]]&lt;br /&gt;
[[ru:Resource:Mapmanager]]&lt;/div&gt;</summary>
		<author><name>Dfigfjf</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=FR/A_propos_des_Map&amp;diff=46036</id>
		<title>FR/A propos des Map</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=FR/A_propos_des_Map&amp;diff=46036"/>
		<updated>2015-10-15T16:33:53Z</updated>

		<summary type="html">&lt;p&gt;Dfigfjf: /* Paramètres d'une Map */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Needs Checking|Either complete the translation or remove it.}}&lt;br /&gt;
Le &amp;quot;Map manager&amp;quot; est une ressource inclue dans la suite serveur de MTA DM. Elle offre des commandes, fonctions et événements pour les modes de jeu afin de dynamiser vos maps. Par exemple, quand un serveur doit charger plusieurs routes pour plusieurs maps, au lieu d'avoir le tout dans un seul script principal, ces routes peuvent êtres stockée dans plusieurs ressources et chargée simplement grâce à la fonction &amp;quot;changeGamemodeMap&amp;quot; quand une map démarre.&lt;br /&gt;
&lt;br /&gt;
Plus spécifiquement, le &amp;quot;Map manager&amp;quot; liste les modes de jeux et maps chargés sur le serveur. Il inclut un listing sur l'interface web, il rafraîchit cette liste fréquemment et met en gras les ressources et/ou maps actuellement entrain d'être utilisées. &lt;br /&gt;
&lt;br /&gt;
== Un Simple Tutoriel ==&lt;br /&gt;
Dans cette section nous allons poursuivre le travail commencé dans [[FR/Introduction_Programmation|Introduction to Scripting]]. Nous allons ajouter une ressource qui enregistre l'endroit de spawn des joueurs sur la map, le chargement de ce script se fera depuis le script principal.&lt;br /&gt;
&lt;br /&gt;
Premièrement, créez un dossier dans /Your MTA Server/mods/deathmatch/resources/, nommez-le &amp;quot;mymap&amp;quot;. Ensuite dans ce dossier, créez un fichier texte et nommez-le &amp;quot;meta.xml&amp;quot;, ce fichier est présent dans chaque scripts.&lt;br /&gt;
&lt;br /&gt;
Ecrivez les lignes suivantes dans le fichier ''meta.xml'' :&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;meta&amp;gt;&lt;br /&gt;
   &amp;lt;info type=&amp;quot;map&amp;quot; gamemodes=&amp;quot;myserver&amp;quot;/&amp;gt;&lt;br /&gt;
   &amp;lt;map src=&amp;quot;mymap.map&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/meta&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Prenez garde car ce fichier est &amp;quot;lié&amp;quot; avec le ''gamemodes=&amp;quot;&amp;quot;'' choisit, qui contient le nom de la ressource principale qu'utilise ce mode. le paramètre ''map'', indique le nom de la map qui sera afficher sur le serveur.&lt;br /&gt;
&lt;br /&gt;
Maintenant créez un nouveau fichier texte dans /mymap/ et nommez le &amp;quot;mymap.map&amp;quot;, écrivez y les lignes suivantes:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;map&amp;gt;&lt;br /&gt;
   &amp;lt;spawnpoint id=&amp;quot;spawnpoint1&amp;quot; posX=&amp;quot;1959.5487060547&amp;quot; posY=&amp;quot;-1714.4613037109&amp;quot; posZ=&amp;quot;18&amp;quot; rot=&amp;quot;63.350006103516&amp;quot; model=&amp;quot;0&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/map&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Notez que &amp;quot;spawnpoint&amp;quot; est le type de l'élément utilisé dans la fonction [[getElementsByType]], &amp;quot;id&amp;quot; est utilisée dans la fonction [[getElementByID]]&lt;br /&gt;
&lt;br /&gt;
Pour charger la map, le script principal doit pouvoir accéder aux maps par lui même. Quelques modifications sont à apportées dans script.lua situé dans &amp;quot;myserver&amp;quot;. Entrez les lignes suivantes :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function loadMap(startedMap)&lt;br /&gt;
	mapRoot = getResourceRootElement(startedMap)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
addEventHandler(&amp;quot;onGamemodeMapStart&amp;quot;, getRootElement(), loadMap)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Par défaut, l'evênement &amp;quot;onGamemodeMapStart&amp;quot; nous donne le &amp;quot;handle&amp;quot;(?) de la map (&amp;quot;startedMap&amp;quot;), lequel nous avons utilisé pour le &amp;quot;handle&amp;quot;(?) de la ressource contenant la map (&amp;quot;mapRoot&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
Avec la ressource &amp;quot;handle&amp;quot;(?), nous pouvons extraire les informations relatives au spawnpoint. Jetez un œil à la fonction joinHandler() dans script.lua, à la place de x, y and z, nous pouvons utiliser les informations de la map comme suit :&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function joinHandler()&lt;br /&gt;
	local spawn = getElementsByType(&amp;quot;spawnpoint&amp;quot;, mapRoot)&lt;br /&gt;
	local x,y,z,r&lt;br /&gt;
	for key, value in pairs(spawn) do&lt;br /&gt;
		x = getElementData(value, &amp;quot;posX&amp;quot;)&lt;br /&gt;
		y = getElementData(value, &amp;quot;posY&amp;quot;)&lt;br /&gt;
		z = getElementData(value, &amp;quot;posZ&amp;quot;)&lt;br /&gt;
		r = getElementData(value, &amp;quot;rot&amp;quot;)&lt;br /&gt;
	end&lt;br /&gt;
	spawnPlayer(source, x, y, z)&lt;br /&gt;
	fadeCamera(source, true)&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Lancez maintenant votre gamemode avec la commande suivante via la console:&lt;br /&gt;
&lt;br /&gt;
'''gamemode myserver mymap'''&lt;br /&gt;
&lt;br /&gt;
==Utilisation==&lt;br /&gt;
Pour utiliser le map manager, vos ressources doivent d'abord être reconnues en tant que gamemodes ou maps.&lt;br /&gt;
&lt;br /&gt;
Vous devez remplir quelques informations pour votre fichier de configuration du '''gamemode resource''' :&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;info description=&amp;quot;Votre Gamemode&amp;quot; type=&amp;quot;gamemode&amp;quot; /&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Map resources''' Les maps ont aussi besoin d'information dans le meta.xml, ''type=&amp;quot;map&amp;quot;'' et un ou plusieurs ''gamemodes''. Une map peut en effet être compatible avec plusieurs mode de jeu pour se faire il faudra séparer les modes par une virgule ''sans espaces''.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;info description=&amp;quot;A gamemode map&amp;quot; type=&amp;quot;map&amp;quot; gamemodes=&amp;quot;ctv,koth&amp;quot; /&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Il ne peut y avoir qu’un mode de jeu 'Gamemode' Actif ou une map chargée à la fois.&lt;br /&gt;
&lt;br /&gt;
==Paramètres Supplémentaires==&lt;br /&gt;
Ces paramètres sont aussi à ajouter dans meta.xml.&lt;br /&gt;
&lt;br /&gt;
'''name:''' Entrez ici un message sympa qui sera afficher lors du démarrage de la ressource. C'est en quelques sorte un alias au cas ou le nom de votre ressource ne vous correspond pas.&lt;br /&gt;
&lt;br /&gt;
==Commandes==&lt;br /&gt;
'''changemap newmap [newgamemode]''' (changer le 'Gamemode' d'une map)&lt;br /&gt;
&lt;br /&gt;
'''changemode newgamemode [newmap]''' (lancer un mode de jeu 'Gamemode' et démarrez une map)&lt;br /&gt;
&lt;br /&gt;
'''gamemode newgamemode [newmap]''' (idem que la précédente)&lt;br /&gt;
&lt;br /&gt;
'''stopmode''' (Arrête le mode de jeu et la map en cours)&lt;br /&gt;
&lt;br /&gt;
'''stopmap''' (Arrête la map en cours)&lt;br /&gt;
&lt;br /&gt;
'''maps [gamemode]''' (liste toutes les maps sur le serveurs, ajoutez en option le mode pour lequel vous voulez connaître les maps)&lt;br /&gt;
&lt;br /&gt;
'''gamemodes''' (Liste tout les mode de jeu)&lt;br /&gt;
&lt;br /&gt;
==Paramètres==&lt;br /&gt;
'''*mapmanager.color''' [hex color string] (change la couleur de sortie des message du mapmanager) (Par défaut : #E1AA5A)&lt;br /&gt;
&lt;br /&gt;
'''*mapmanager.messages''' [boolean] (si les changements de map/gm sont activés) (Par défaut : true)&lt;br /&gt;
&lt;br /&gt;
'''*mapmanager.ASE''' [boolean] (si le manager doit charger en mode ASE) (Par défaut : true)&lt;br /&gt;
&lt;br /&gt;
==Autres fonctions==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;bool changeGamemode ( resource newGamemode, [ resource mapToLoadWith ] )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Changement de mode de jeu, on peut aussi lui donner une map initial à charger.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;bool changeGamemodeMap ( resource newMap, [ resource gamemodeToChangeTo ] )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Change le mode de jeu d'une map pour un nouveau, on peut choisir un mode de jeu à charger une fois cette map rechargée.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;table getGamemodes ( )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Renvoie une table des tout les modes de jeu et leur pointeurs.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;table getGamemodesCompatibleWithMap ( resource theMap )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Retourne une table de tout les modes de jeu compatibles.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;table getMaps ( )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Reourne une table de toutes les ressources en rapport avec la map.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;table getMapsCompatibleWithGamemode ( [ resource theGamemode ] )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Retourne une table de tout les modes de jeu compatibles. Si l'argument &amp;quot;theGamemode&amp;quot; est inexistant, ça retourne toutes les maps qui n'ont aucun mode de jeu compatible..&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;resource getRunningGamemode ( )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Renvoie le mode de jeu actif.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;resource getRunningGamemodeMap ( )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Renvoie le mode de jeu de la map en cours.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;bool isGamemode ( resource theGamemode )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Déterminie si une ressources est un mode de jeu ou pas.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;bool isGamemodeCompatibleWithMap ( resource theGamemode, resource theMap )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Déterminie si une map est compatible avec un mode de jeu ou pas.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;bool isMap ( resource theMap )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Détermine si ressources est une map ou pas.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;bool isMapCompatibleWithGamemode ( resource theMap, resource theGamemode )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Déterminie si une map est compatible avec un gamemode ou pas.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;bool stopGamemode ( )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Arrêter le mode de jeux actif ainsi que la map chargée.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;bool stopGamemodeMap ( )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Arrêter la map active.&lt;br /&gt;
&lt;br /&gt;
==Evênement Appelés==&lt;br /&gt;
''(Pour tous ces évênements, &amp;quot;source&amp;quot; est la ressource racine des élément.)''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;onGamemodeStart ( resource startedGamemode )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Appelé lors du démarrage d'un mode de jeu.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;onGamemodeStop ( resource stoppedGamemode )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Appelé quand on arrête un mode de jeu.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;onGamemodeMapStart ( resource startedMap )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Appelé quand la map d'un mode de jeu démarre.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;onGamemodeMapStop ( resource stoppedMap )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Appelé quand la map de mode de jeu est stoppée.&lt;br /&gt;
&lt;br /&gt;
==Paramètres d'une Map==&lt;br /&gt;
Les paramètres suivants [[settings system|registry]] sont appliqué par le &amp;quot;Map Manager&amp;quot; quand une map est démarée :&lt;br /&gt;
&amp;lt;br&amp;gt;'''gamespeed''' [nombre]: la vitesse du jeu sur la map.&lt;br /&gt;
&amp;lt;br&amp;gt;'''gravity''' [nombre]: la gravité de la map.&lt;br /&gt;
&amp;lt;br&amp;gt;'''time''' [Sous la forme suivante '''hh:mm''']: l'heure du jeu avec cette map.&lt;br /&gt;
&amp;lt;br&amp;gt;'''weather''' [nombre]: la météo de la map.&lt;br /&gt;
&amp;lt;br&amp;gt;'''waveheight''' [nombre]: la hauteur de l'eau pour cette map.&lt;br /&gt;
&amp;lt;br&amp;gt;'''locked_time''' [boolean]: décide si le temps est verouillé ou non.&lt;br /&gt;
&amp;lt;br&amp;gt;'''minplayers''' [nombre]: décide du nombre minimum de joueurs pour démarrer la map.&lt;br /&gt;
&amp;lt;br&amp;gt;'''maxplayers''' [nombre]: décide du nombre maximum de joueurs que peut accepter la map.&lt;br /&gt;
&lt;br /&gt;
[[it:Map manager]]&lt;br /&gt;
[[ru:Resource:Mapmanager]]&lt;/div&gt;</summary>
		<author><name>Dfigfjf</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=FR/A_propos_des_Map&amp;diff=46035</id>
		<title>FR/A propos des Map</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=FR/A_propos_des_Map&amp;diff=46035"/>
		<updated>2015-10-15T16:32:56Z</updated>

		<summary type="html">&lt;p&gt;Dfigfjf: /* Usage */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Needs Checking|Either complete the translation or remove it.}}&lt;br /&gt;
Le &amp;quot;Map manager&amp;quot; est une ressource inclue dans la suite serveur de MTA DM. Elle offre des commandes, fonctions et événements pour les modes de jeu afin de dynamiser vos maps. Par exemple, quand un serveur doit charger plusieurs routes pour plusieurs maps, au lieu d'avoir le tout dans un seul script principal, ces routes peuvent êtres stockée dans plusieurs ressources et chargée simplement grâce à la fonction &amp;quot;changeGamemodeMap&amp;quot; quand une map démarre.&lt;br /&gt;
&lt;br /&gt;
Plus spécifiquement, le &amp;quot;Map manager&amp;quot; liste les modes de jeux et maps chargés sur le serveur. Il inclut un listing sur l'interface web, il rafraîchit cette liste fréquemment et met en gras les ressources et/ou maps actuellement entrain d'être utilisées. &lt;br /&gt;
&lt;br /&gt;
== Un Simple Tutoriel ==&lt;br /&gt;
Dans cette section nous allons poursuivre le travail commencé dans [[FR/Introduction_Programmation|Introduction to Scripting]]. Nous allons ajouter une ressource qui enregistre l'endroit de spawn des joueurs sur la map, le chargement de ce script se fera depuis le script principal.&lt;br /&gt;
&lt;br /&gt;
Premièrement, créez un dossier dans /Your MTA Server/mods/deathmatch/resources/, nommez-le &amp;quot;mymap&amp;quot;. Ensuite dans ce dossier, créez un fichier texte et nommez-le &amp;quot;meta.xml&amp;quot;, ce fichier est présent dans chaque scripts.&lt;br /&gt;
&lt;br /&gt;
Ecrivez les lignes suivantes dans le fichier ''meta.xml'' :&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;meta&amp;gt;&lt;br /&gt;
   &amp;lt;info type=&amp;quot;map&amp;quot; gamemodes=&amp;quot;myserver&amp;quot;/&amp;gt;&lt;br /&gt;
   &amp;lt;map src=&amp;quot;mymap.map&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/meta&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Prenez garde car ce fichier est &amp;quot;lié&amp;quot; avec le ''gamemodes=&amp;quot;&amp;quot;'' choisit, qui contient le nom de la ressource principale qu'utilise ce mode. le paramètre ''map'', indique le nom de la map qui sera afficher sur le serveur.&lt;br /&gt;
&lt;br /&gt;
Maintenant créez un nouveau fichier texte dans /mymap/ et nommez le &amp;quot;mymap.map&amp;quot;, écrivez y les lignes suivantes:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;map&amp;gt;&lt;br /&gt;
   &amp;lt;spawnpoint id=&amp;quot;spawnpoint1&amp;quot; posX=&amp;quot;1959.5487060547&amp;quot; posY=&amp;quot;-1714.4613037109&amp;quot; posZ=&amp;quot;18&amp;quot; rot=&amp;quot;63.350006103516&amp;quot; model=&amp;quot;0&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/map&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Notez que &amp;quot;spawnpoint&amp;quot; est le type de l'élément utilisé dans la fonction [[getElementsByType]], &amp;quot;id&amp;quot; est utilisée dans la fonction [[getElementByID]]&lt;br /&gt;
&lt;br /&gt;
Pour charger la map, le script principal doit pouvoir accéder aux maps par lui même. Quelques modifications sont à apportées dans script.lua situé dans &amp;quot;myserver&amp;quot;. Entrez les lignes suivantes :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function loadMap(startedMap)&lt;br /&gt;
	mapRoot = getResourceRootElement(startedMap)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
addEventHandler(&amp;quot;onGamemodeMapStart&amp;quot;, getRootElement(), loadMap)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Par défaut, l'evênement &amp;quot;onGamemodeMapStart&amp;quot; nous donne le &amp;quot;handle&amp;quot;(?) de la map (&amp;quot;startedMap&amp;quot;), lequel nous avons utilisé pour le &amp;quot;handle&amp;quot;(?) de la ressource contenant la map (&amp;quot;mapRoot&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
Avec la ressource &amp;quot;handle&amp;quot;(?), nous pouvons extraire les informations relatives au spawnpoint. Jetez un œil à la fonction joinHandler() dans script.lua, à la place de x, y and z, nous pouvons utiliser les informations de la map comme suit :&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function joinHandler()&lt;br /&gt;
	local spawn = getElementsByType(&amp;quot;spawnpoint&amp;quot;, mapRoot)&lt;br /&gt;
	local x,y,z,r&lt;br /&gt;
	for key, value in pairs(spawn) do&lt;br /&gt;
		x = getElementData(value, &amp;quot;posX&amp;quot;)&lt;br /&gt;
		y = getElementData(value, &amp;quot;posY&amp;quot;)&lt;br /&gt;
		z = getElementData(value, &amp;quot;posZ&amp;quot;)&lt;br /&gt;
		r = getElementData(value, &amp;quot;rot&amp;quot;)&lt;br /&gt;
	end&lt;br /&gt;
	spawnPlayer(source, x, y, z)&lt;br /&gt;
	fadeCamera(source, true)&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Lancez maintenant votre gamemode avec la commande suivante via la console:&lt;br /&gt;
&lt;br /&gt;
'''gamemode myserver mymap'''&lt;br /&gt;
&lt;br /&gt;
==Utilisation==&lt;br /&gt;
Pour utiliser le map manager, vos ressources doivent d'abord être reconnues en tant que gamemodes ou maps.&lt;br /&gt;
&lt;br /&gt;
Vous devez remplir quelques informations pour votre fichier de configuration du '''gamemode resource''' :&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;info description=&amp;quot;Votre Gamemode&amp;quot; type=&amp;quot;gamemode&amp;quot; /&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Map resources''' Les maps ont aussi besoin d'information dans le meta.xml, ''type=&amp;quot;map&amp;quot;'' et un ou plusieurs ''gamemodes''. Une map peut en effet être compatible avec plusieurs mode de jeu pour se faire il faudra séparer les modes par une virgule ''sans espaces''.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;info description=&amp;quot;A gamemode map&amp;quot; type=&amp;quot;map&amp;quot; gamemodes=&amp;quot;ctv,koth&amp;quot; /&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Il ne peut y avoir qu’un mode de jeu 'Gamemode' Actif ou une map chargée à la fois.&lt;br /&gt;
&lt;br /&gt;
==Paramètres Supplémentaires==&lt;br /&gt;
Ces paramètres sont aussi à ajouter dans meta.xml.&lt;br /&gt;
&lt;br /&gt;
'''name:''' Entrez ici un message sympa qui sera afficher lors du démarrage de la ressource. C'est en quelques sorte un alias au cas ou le nom de votre ressource ne vous correspond pas.&lt;br /&gt;
&lt;br /&gt;
==Commandes==&lt;br /&gt;
'''changemap newmap [newgamemode]''' (changer le 'Gamemode' d'une map)&lt;br /&gt;
&lt;br /&gt;
'''changemode newgamemode [newmap]''' (lancer un mode de jeu 'Gamemode' et démarrez une map)&lt;br /&gt;
&lt;br /&gt;
'''gamemode newgamemode [newmap]''' (idem que la précédente)&lt;br /&gt;
&lt;br /&gt;
'''stopmode''' (Arrête le mode de jeu et la map en cours)&lt;br /&gt;
&lt;br /&gt;
'''stopmap''' (Arrête la map en cours)&lt;br /&gt;
&lt;br /&gt;
'''maps [gamemode]''' (liste toutes les maps sur le serveurs, ajoutez en option le mode pour lequel vous voulez connaître les maps)&lt;br /&gt;
&lt;br /&gt;
'''gamemodes''' (Liste tout les mode de jeu)&lt;br /&gt;
&lt;br /&gt;
==Paramètres==&lt;br /&gt;
'''*mapmanager.color''' [hex color string] (change la couleur de sortie des message du mapmanager) (Par défaut : #E1AA5A)&lt;br /&gt;
&lt;br /&gt;
'''*mapmanager.messages''' [boolean] (si les changements de map/gm sont activés) (Par défaut : true)&lt;br /&gt;
&lt;br /&gt;
'''*mapmanager.ASE''' [boolean] (si le manager doit charger en mode ASE) (Par défaut : true)&lt;br /&gt;
&lt;br /&gt;
==Autres fonctions==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;bool changeGamemode ( resource newGamemode, [ resource mapToLoadWith ] )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Changement de mode de jeu, on peut aussi lui donner une map initial à charger.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;bool changeGamemodeMap ( resource newMap, [ resource gamemodeToChangeTo ] )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Change le mode de jeu d'une map pour un nouveau, on peut choisir un mode de jeu à charger une fois cette map rechargée.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;table getGamemodes ( )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Renvoie une table des tout les modes de jeu et leur pointeurs.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;table getGamemodesCompatibleWithMap ( resource theMap )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Retourne une table de tout les modes de jeu compatibles.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;table getMaps ( )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Reourne une table de toutes les ressources en rapport avec la map.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;table getMapsCompatibleWithGamemode ( [ resource theGamemode ] )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Retourne une table de tout les modes de jeu compatibles. Si l'argument &amp;quot;theGamemode&amp;quot; est inexistant, ça retourne toutes les maps qui n'ont aucun mode de jeu compatible..&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;resource getRunningGamemode ( )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Renvoie le mode de jeu actif.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;resource getRunningGamemodeMap ( )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Renvoie le mode de jeu de la map en cours.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;bool isGamemode ( resource theGamemode )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Déterminie si une ressources est un mode de jeu ou pas.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;bool isGamemodeCompatibleWithMap ( resource theGamemode, resource theMap )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Déterminie si une map est compatible avec un mode de jeu ou pas.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;bool isMap ( resource theMap )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Détermine si ressources est une map ou pas.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;bool isMapCompatibleWithGamemode ( resource theMap, resource theGamemode )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Déterminie si une map est compatible avec un gamemode ou pas.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;bool stopGamemode ( )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Arrêter le mode de jeux actif ainsi que la map chargée.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;bool stopGamemodeMap ( )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Arrêter la map active.&lt;br /&gt;
&lt;br /&gt;
==Evênement Appelés==&lt;br /&gt;
''(Pour tous ces évênements, &amp;quot;source&amp;quot; est la ressource racine des élément.)''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;onGamemodeStart ( resource startedGamemode )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Appelé lors du démarrage d'un mode de jeu.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;onGamemodeStop ( resource stoppedGamemode )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Appelé quand on arrête un mode de jeu.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;onGamemodeMapStart ( resource startedMap )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Appelé quand la map d'un mode de jeu démarre.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;onGamemodeMapStop ( resource stoppedMap )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Appelé quand la map de mode de jeu est stoppée.&lt;br /&gt;
&lt;br /&gt;
==Paramètres d'une Map==&lt;br /&gt;
Les paramètres suivants [[settings system|registry]] sont appliqué par le &amp;quot;Map Manager&amp;quot; quand une map est démarée :&lt;br /&gt;
&amp;lt;br&amp;gt;'''gamespeed''' [number]: la vitesse du jeu sur la map.&lt;br /&gt;
&amp;lt;br&amp;gt;'''gravity''' [number]: la gravité de la map.&lt;br /&gt;
&amp;lt;br&amp;gt;'''time''' [Sous la forme suivante '''hh:mm''']: l'heure du jeu avec cette map.&lt;br /&gt;
&amp;lt;br&amp;gt;'''weather''' [number]: la météo de la map.&lt;br /&gt;
&amp;lt;br&amp;gt;'''waveheight''' [number]: la hauteur de l'eau pour cette map.&lt;br /&gt;
&amp;lt;br&amp;gt;'''locked_time''' [boolean]: décide si le temps est verouillé ou non.&lt;br /&gt;
&amp;lt;br&amp;gt;'''minplayers''' [number]: décide du nombre minimum de joueurs pour démarrer la map.&lt;br /&gt;
&amp;lt;br&amp;gt;'''maxplayers''' [number]: décide du nombre maximum de joueurs que peut accepter la map.&lt;br /&gt;
&lt;br /&gt;
[[it:Map manager]]&lt;br /&gt;
[[ru:Resource:Mapmanager]]&lt;/div&gt;</summary>
		<author><name>Dfigfjf</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Requested_Functions_and_Events&amp;diff=46026</id>
		<title>Requested Functions and Events</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Requested_Functions_and_Events&amp;diff=46026"/>
		<updated>2015-10-04T18:54:00Z</updated>

		<summary type="html">&lt;p&gt;Dfigfjf: /* Client-Side */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Server-side==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Event like onServerTick wich is run very often. Like the clientside onClientRender. This could be useful for constat checking wich must be done under 50ms (lower than timers can handle).&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
onVehicleCreated or an equivalent... shouldn't be too hard? -Robhol (14:15 Jul 6, 08)&lt;br /&gt;
:If we did it, it'd be onElementCreated - what do you want this for? [[User:EAi|eAi]] 08:58, 7 July 2008 (CDT)&lt;br /&gt;
::onElementCreated is a good idea - it could be used for lots of things. Also, how about onVehicleDrown or whatever? that is, when a vehicle hits deep water. Checking for collisions and stuff is very awkward, and client-side only, and has to be checked constantly.. -Robhol (17:31 Jul 9 08)&lt;br /&gt;
:::I second that. It would be useful if you use like me element data like the fuel amount or other stuff. And an event like this would help me to setup those element data, when a car spawns. Otherwise I would either have to edit every car spawn script I use or do a post-setup when someone is entering the car.. [[User:MaddDogg14]] (04:34 Apr 4, 10 (CEST))&lt;br /&gt;
::::i definetly agree, onElementCreated would be VERY useful for utility/librares scripts, but i think this should be limited by ACL, because &amp;quot;evil&amp;quot; scripts could abuse this othervise -Karlis (9:10 Apr 5, 10)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
I ask for a function that detects if a ped is on floor, eg. '''isPedOnFloor(ped thePed)''', thanks. --&amp;lt;span style=&amp;quot;font-family:Courier New, Courier, monospace&amp;quot;&amp;gt;[[User:Shadd|Shadd]]&amp;lt;/span&amp;gt;&amp;lt;sub&amp;gt;([[User_talk:Shadd|In caso di emergenza rompere le scatole]])&amp;lt;/sub&amp;gt; 11:29, 15 June 2008 (CDT)&lt;br /&gt;
: [[isPedOnGround]]? [[User:Awwu|Awwu]] 12:58, 15 June 2008 (CDT)&lt;br /&gt;
::I need to know if the player has its back touching the ground, not if it's simply &amp;quot;on ground&amp;quot;. --&amp;lt;span style=&amp;quot;font-family:Courier New, Courier, monospace&amp;quot;&amp;gt;[[User:Shadd|Shadd]]&amp;lt;/span&amp;gt;&amp;lt;sub&amp;gt;([[User_talk:Shadd|In caso di emergenza rompere le scatole]])&amp;lt;/sub&amp;gt; 14:16, 16 June 2008 (CDT)&lt;br /&gt;
:::Check what task the player has, they should have TASK_COMPLEX_FALL_AND_GET_UP or TASK_COMPLEX_FALL_AND_STAY_DOWN... [[User:EAi|eAi]] 19:12, 16 June 2008 (CDT)&lt;br /&gt;
::::Thanks. What task does player have after being hitten by a melee attack that cause it to fall down? Would &amp;quot;TASK_SIMPLE_BE_KICKED_ON_GROUND&amp;quot; and &amp;quot;TASK_SIMPLE_GET_UP&amp;quot; work? --&amp;lt;span style=&amp;quot;font-family:Courier New, Courier, monospace&amp;quot;&amp;gt;[[User:Shadd|Shadd]]&amp;lt;/span&amp;gt;&amp;lt;sub&amp;gt;([[User_talk:Shadd|In caso di emergenza rompere le scatole]])&amp;lt;/sub&amp;gt; 09:35, 17 June 2008 (CDT)&lt;br /&gt;
:::::Try it, I'm not entirely sure. You should be able to produce some code to show the player's current tasks very easily... [[User:EAi|eAi]] 19:20, 17 June 2008 (CDT)&lt;br /&gt;
::::::My goal is to edit the standard damage of the attacks, in this case i have to know when player is on ground to cause higher damage. However it doesn't seem to work, when i hit the player it simply gets up without animation with no damage. --&amp;lt;span style=&amp;quot;font-family:Courier New, Courier, monospace&amp;quot;&amp;gt;[[User:Shadd|Shadd]]&amp;lt;/span&amp;gt;&amp;lt;sub&amp;gt;([[User_talk:Shadd|In caso di emergenza rompere le scatole]])&amp;lt;/sub&amp;gt; 19:10, 19 June 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
It may looks strange and useless (waste of time?) but I think that it could be a awesome feature. Having a web browser.&lt;br /&gt;
Like: http://www.youtube.com/watch?v=wT1UR6qEgdg&lt;br /&gt;
http://princeofcode.com/awesomium.php&lt;br /&gt;
:definetly useles and waste of time, suporting xfire enought. -karlis&lt;br /&gt;
::Really Karlis, who asked you bro. It could be very useful, actually. For example, creating dynamic billboards. Instead of changing the TXD, they could set up a browser object over the billboard. That way they can also set up a timer to change the image, etc. [[User:JacobS|JacobS]] 20:08, 1 August 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
There could be something like createBrowser( float x, float y, float z, [float rx, float ry, float rz, float width, float high, string url, bool locked] ) &lt;br /&gt;
locked parameter: false = navigation bar present, true = no navigation bar&lt;br /&gt;
toggleBrowserFullsceenMode(browser theBrowser, bool tog, [bool smooth])&lt;br /&gt;
smooth parameter: If set to true the browser will smoothly move from his ingame position to the fullscreen position&lt;br /&gt;
toggleBrowserBackground(browser theBrowser, bool tog)&lt;br /&gt;
Set the browser background transparent.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Security: Disable file downloads, disable popups (disable flash, javascript and any other protocols than http and https [no mailto and stuff...]?)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Should be a Client and server function. --[[User:Masterofquebec|Masterofquebec]] 00:10, 15 October 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Support of tooltips from CEGUI would be cool. I saw a property for that, but it didn't work for me. [[User:MaddDogg14]] (04:36 Apr 4, 10 (CEST))&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
I request a function that gets all clothes from a ped, just like getPedClothes but for all bodyparts. With this function it would be more ease to save clothes to database.&lt;br /&gt;
:That's so easy to do yourself that it's barely worth adding. Just loop all the indexes 0-17 and save them to a table. [[User:Awwu|Awwu]] 19:26, 17 April 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
[[setProjectileTarget]] for setting a projectile to target a specific entity. I am trying to create a Battlefield Bad Company type of gamemode and in that game, you can plant a 'tracer'. Any rocket fired (if the tracer is on screen) will seek the tracer. [[User:LeetWoovie|LeetWoovie]] 05:01, 19 April 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
(marcol07, June the 25th, 2010) I would like to have some function to create light source as element or sth like createFire, for example createLight(x,y,z,xrot,yrot,zrot,f,r,g,b) where &amp;quot;f&amp;quot; is an angle of lightning. or it is possible with some model or function? It would be good to create for example fog lamps or classic street lamps&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
moveElement available for markers, objects, pedestrians and players or maybe more if you can do. [[User:Socialz|Socialz]] 13:10, 1 January 2012 (CET)&lt;br /&gt;
&lt;br /&gt;
==Client-Side==&lt;br /&gt;
&lt;br /&gt;
Function &amp;quot;'''isPlayerStunting'''&amp;quot; for add options to events &amp;quot;''onClientPlayerStuntStart''&amp;quot; and &amp;quot;''onClientPlayerStuntFinish''&amp;quot; --[[User:Dfigfjf|Dfigfjf]] 18:52, 4 October 2015 (UTC)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Event &amp;quot;onClientVehicleFire&amp;quot;, which would be triggered when a vehicle shoots.&lt;br /&gt;
:See [[OnVehicleWeaponFire]] --[[User:X86dev|X86dev]] 12:11, 19 April 2013 (UTC)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Adding possibility to toggle radio hud label by '''showHudComponent''' -karlis&lt;br /&gt;
  &lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Pickup events clientside please, onClientPickupHit onClientPickupUse.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Would it be possible to add a color arg to guiGridListSetItemText()? Im trying to get each item colored differently in one list. Thanks, ABEL&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
I need a function which could get current target of hydra or a HS rocket launcher, like when someone press space and targets a element, to get what element is it for calculating distance from it. '''getPlayerOccupiedVehicleTarget''' or '''getPlayerHSTarget'''. &lt;br /&gt;
Thanks in advance -Nidza a.k.a. CodeMaster 2:26 PM 19th June 2008.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
It'd be useful to have something to disable elements of the default hud (weapon display, health display, armor, radar, etcetera) so that you can create your own HUDs. Something like '''setHudElement(element name, toggle)'''.&lt;br /&gt;
&lt;br /&gt;
[[User:Lord Xalphox|Lord Xalphox]] 19:32, 22 March 2009 (CET)&lt;br /&gt;
:[[showPlayerHudComponent]]? [[User:Awwu|Awwu]] 19:43, 22 March 2009 (CET)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
I'd like to have a function that sets the chatbox input line text. Then I could script my own chat history function (that inserts the last sent text into the input line again by pressing arrow up) (which samp has since 0.2 btw) since nobody builds it into the client. [[User:NeonBlack|NeonBlack]] 12:03, 4 July 2009 (CEST) PS.: samp also supports cut, copy and paste :P&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
A function setElementMatrix, doing the exact opposite of getElementMatrix would be much appreciated. --[[User:Kayl|Kayl]] 15:21, 13 November 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Functions like setTrainPosition(train,track,pos) and track,pos getTrainPosition(train) would be great in order to allow more script side control of trains.&lt;br /&gt;
The track argument would be an index of the track number (currently there are around 4 tracks handled, including 1 incompletely defined).&lt;br /&gt;
The position would be a float between 0 and 1 (or however you guys handle it) telling where on the track the train currently is.&lt;br /&gt;
It would be great if those functions could be available client and server side. --[[User:Kayl|Kayl]] 12:58, 23 November 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
need this function client and server side '''movePlayerHudComponent(string component, float x, float y)''' --[[User:SuatEyrice|SuatEyrice]] 00:18, 26 February 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
'''(marcol07, June the 27th, 2010)''' I would be so happy to have fuction to set Analog control of player sth like '''getAnalogControlState(string controlName)''' but inverted to '''setAnalogControlState(string controlName, float state)'''&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
OnPedDamage (serverside) event. There is OnClientPedDamage, but it's clientside. [[User:damage22|damage22]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
'''setRadioVolume(element thePlayer, int volume)''', to create GUI volume control, turn off the radio without changing the station, etc. [[User:JacobS|JacobS]] 14:47, 29 July 2010 (UTC)&lt;br /&gt;
----&lt;br /&gt;
'''setVehicleHydraulics(element theVehicle, bool state)''', to force hydraulics to be up (true) or down (false)&lt;br /&gt;
----&lt;br /&gt;
'''createFire(x, y, z, theSize, dimension)''', just like [[createFire]], only with the option to enter a dimension for the fire to appear in&lt;br /&gt;
----&lt;br /&gt;
'''setGunshotsEnabled(bool enabled)''', '''getGunshotsEnabled()''' and '''createGunshot(x,y,z,radius)''' - to enable/disable the game's gunshot ambience, and to create gunshots at specific locations with radii that it is audible in [[User:JacobS.|JacobS.]] 19:28, 11 September 2010 (MDT)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
onClick  should pass the name of the clicked SUBobject too (eg: vehicle parts, bone names etc.)--[[User:Lcaseidefensis|Lcaseidefensis]] 16:48, 21 May 2012 (UTC)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
something to open/close doors like in singleplayer (teleports are a bit unrealistic)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
moveCamera( player thePlayer, float positionX, float positionY, float positionZ [, float lookAtX, float lookAtY, float lookAtZ, float roll = 0, float fov = 70 ] )&lt;br /&gt;
and&lt;br /&gt;
attachElementToPed( player thePlayer, element theElement, interger bone)&lt;/div&gt;</summary>
		<author><name>Dfigfjf</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Requested_Functions_and_Events&amp;diff=46025</id>
		<title>Requested Functions and Events</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Requested_Functions_and_Events&amp;diff=46025"/>
		<updated>2015-10-04T18:52:45Z</updated>

		<summary type="html">&lt;p&gt;Dfigfjf: /* Client-Side */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Server-side==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Event like onServerTick wich is run very often. Like the clientside onClientRender. This could be useful for constat checking wich must be done under 50ms (lower than timers can handle).&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
onVehicleCreated or an equivalent... shouldn't be too hard? -Robhol (14:15 Jul 6, 08)&lt;br /&gt;
:If we did it, it'd be onElementCreated - what do you want this for? [[User:EAi|eAi]] 08:58, 7 July 2008 (CDT)&lt;br /&gt;
::onElementCreated is a good idea - it could be used for lots of things. Also, how about onVehicleDrown or whatever? that is, when a vehicle hits deep water. Checking for collisions and stuff is very awkward, and client-side only, and has to be checked constantly.. -Robhol (17:31 Jul 9 08)&lt;br /&gt;
:::I second that. It would be useful if you use like me element data like the fuel amount or other stuff. And an event like this would help me to setup those element data, when a car spawns. Otherwise I would either have to edit every car spawn script I use or do a post-setup when someone is entering the car.. [[User:MaddDogg14]] (04:34 Apr 4, 10 (CEST))&lt;br /&gt;
::::i definetly agree, onElementCreated would be VERY useful for utility/librares scripts, but i think this should be limited by ACL, because &amp;quot;evil&amp;quot; scripts could abuse this othervise -Karlis (9:10 Apr 5, 10)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
I ask for a function that detects if a ped is on floor, eg. '''isPedOnFloor(ped thePed)''', thanks. --&amp;lt;span style=&amp;quot;font-family:Courier New, Courier, monospace&amp;quot;&amp;gt;[[User:Shadd|Shadd]]&amp;lt;/span&amp;gt;&amp;lt;sub&amp;gt;([[User_talk:Shadd|In caso di emergenza rompere le scatole]])&amp;lt;/sub&amp;gt; 11:29, 15 June 2008 (CDT)&lt;br /&gt;
: [[isPedOnGround]]? [[User:Awwu|Awwu]] 12:58, 15 June 2008 (CDT)&lt;br /&gt;
::I need to know if the player has its back touching the ground, not if it's simply &amp;quot;on ground&amp;quot;. --&amp;lt;span style=&amp;quot;font-family:Courier New, Courier, monospace&amp;quot;&amp;gt;[[User:Shadd|Shadd]]&amp;lt;/span&amp;gt;&amp;lt;sub&amp;gt;([[User_talk:Shadd|In caso di emergenza rompere le scatole]])&amp;lt;/sub&amp;gt; 14:16, 16 June 2008 (CDT)&lt;br /&gt;
:::Check what task the player has, they should have TASK_COMPLEX_FALL_AND_GET_UP or TASK_COMPLEX_FALL_AND_STAY_DOWN... [[User:EAi|eAi]] 19:12, 16 June 2008 (CDT)&lt;br /&gt;
::::Thanks. What task does player have after being hitten by a melee attack that cause it to fall down? Would &amp;quot;TASK_SIMPLE_BE_KICKED_ON_GROUND&amp;quot; and &amp;quot;TASK_SIMPLE_GET_UP&amp;quot; work? --&amp;lt;span style=&amp;quot;font-family:Courier New, Courier, monospace&amp;quot;&amp;gt;[[User:Shadd|Shadd]]&amp;lt;/span&amp;gt;&amp;lt;sub&amp;gt;([[User_talk:Shadd|In caso di emergenza rompere le scatole]])&amp;lt;/sub&amp;gt; 09:35, 17 June 2008 (CDT)&lt;br /&gt;
:::::Try it, I'm not entirely sure. You should be able to produce some code to show the player's current tasks very easily... [[User:EAi|eAi]] 19:20, 17 June 2008 (CDT)&lt;br /&gt;
::::::My goal is to edit the standard damage of the attacks, in this case i have to know when player is on ground to cause higher damage. However it doesn't seem to work, when i hit the player it simply gets up without animation with no damage. --&amp;lt;span style=&amp;quot;font-family:Courier New, Courier, monospace&amp;quot;&amp;gt;[[User:Shadd|Shadd]]&amp;lt;/span&amp;gt;&amp;lt;sub&amp;gt;([[User_talk:Shadd|In caso di emergenza rompere le scatole]])&amp;lt;/sub&amp;gt; 19:10, 19 June 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
It may looks strange and useless (waste of time?) but I think that it could be a awesome feature. Having a web browser.&lt;br /&gt;
Like: http://www.youtube.com/watch?v=wT1UR6qEgdg&lt;br /&gt;
http://princeofcode.com/awesomium.php&lt;br /&gt;
:definetly useles and waste of time, suporting xfire enought. -karlis&lt;br /&gt;
::Really Karlis, who asked you bro. It could be very useful, actually. For example, creating dynamic billboards. Instead of changing the TXD, they could set up a browser object over the billboard. That way they can also set up a timer to change the image, etc. [[User:JacobS|JacobS]] 20:08, 1 August 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
There could be something like createBrowser( float x, float y, float z, [float rx, float ry, float rz, float width, float high, string url, bool locked] ) &lt;br /&gt;
locked parameter: false = navigation bar present, true = no navigation bar&lt;br /&gt;
toggleBrowserFullsceenMode(browser theBrowser, bool tog, [bool smooth])&lt;br /&gt;
smooth parameter: If set to true the browser will smoothly move from his ingame position to the fullscreen position&lt;br /&gt;
toggleBrowserBackground(browser theBrowser, bool tog)&lt;br /&gt;
Set the browser background transparent.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Security: Disable file downloads, disable popups (disable flash, javascript and any other protocols than http and https [no mailto and stuff...]?)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Should be a Client and server function. --[[User:Masterofquebec|Masterofquebec]] 00:10, 15 October 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Support of tooltips from CEGUI would be cool. I saw a property for that, but it didn't work for me. [[User:MaddDogg14]] (04:36 Apr 4, 10 (CEST))&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
I request a function that gets all clothes from a ped, just like getPedClothes but for all bodyparts. With this function it would be more ease to save clothes to database.&lt;br /&gt;
:That's so easy to do yourself that it's barely worth adding. Just loop all the indexes 0-17 and save them to a table. [[User:Awwu|Awwu]] 19:26, 17 April 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
[[setProjectileTarget]] for setting a projectile to target a specific entity. I am trying to create a Battlefield Bad Company type of gamemode and in that game, you can plant a 'tracer'. Any rocket fired (if the tracer is on screen) will seek the tracer. [[User:LeetWoovie|LeetWoovie]] 05:01, 19 April 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
(marcol07, June the 25th, 2010) I would like to have some function to create light source as element or sth like createFire, for example createLight(x,y,z,xrot,yrot,zrot,f,r,g,b) where &amp;quot;f&amp;quot; is an angle of lightning. or it is possible with some model or function? It would be good to create for example fog lamps or classic street lamps&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
moveElement available for markers, objects, pedestrians and players or maybe more if you can do. [[User:Socialz|Socialz]] 13:10, 1 January 2012 (CET)&lt;br /&gt;
&lt;br /&gt;
==Client-Side==&lt;br /&gt;
&lt;br /&gt;
Function &amp;quot;'''isPlayerStunting'''&amp;quot; for add options to events &amp;quot;''onClientPlayerStuntStart''&amp;quot; and &amp;quot;''onClientPlayerStuntFinish''&amp;quot; --[[User:Dfigfjf|Dfigfjf]] ([[User talk:Dfigfjf|talk]]) 18:52, 4 October 2015 (UTC)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Event &amp;quot;onClientVehicleFire&amp;quot;, which would be triggered when a vehicle shoots.&lt;br /&gt;
:See [[OnVehicleWeaponFire]] --[[User:X86dev|X86dev]] 12:11, 19 April 2013 (UTC)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Adding possibility to toggle radio hud label by '''showHudComponent''' -karlis&lt;br /&gt;
  &lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Pickup events clientside please, onClientPickupHit onClientPickupUse.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Would it be possible to add a color arg to guiGridListSetItemText()? Im trying to get each item colored differently in one list. Thanks, ABEL&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
I need a function which could get current target of hydra or a HS rocket launcher, like when someone press space and targets a element, to get what element is it for calculating distance from it. '''getPlayerOccupiedVehicleTarget''' or '''getPlayerHSTarget'''. &lt;br /&gt;
Thanks in advance -Nidza a.k.a. CodeMaster 2:26 PM 19th June 2008.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
It'd be useful to have something to disable elements of the default hud (weapon display, health display, armor, radar, etcetera) so that you can create your own HUDs. Something like '''setHudElement(element name, toggle)'''.&lt;br /&gt;
&lt;br /&gt;
[[User:Lord Xalphox|Lord Xalphox]] 19:32, 22 March 2009 (CET)&lt;br /&gt;
:[[showPlayerHudComponent]]? [[User:Awwu|Awwu]] 19:43, 22 March 2009 (CET)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
I'd like to have a function that sets the chatbox input line text. Then I could script my own chat history function (that inserts the last sent text into the input line again by pressing arrow up) (which samp has since 0.2 btw) since nobody builds it into the client. [[User:NeonBlack|NeonBlack]] 12:03, 4 July 2009 (CEST) PS.: samp also supports cut, copy and paste :P&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
A function setElementMatrix, doing the exact opposite of getElementMatrix would be much appreciated. --[[User:Kayl|Kayl]] 15:21, 13 November 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Functions like setTrainPosition(train,track,pos) and track,pos getTrainPosition(train) would be great in order to allow more script side control of trains.&lt;br /&gt;
The track argument would be an index of the track number (currently there are around 4 tracks handled, including 1 incompletely defined).&lt;br /&gt;
The position would be a float between 0 and 1 (or however you guys handle it) telling where on the track the train currently is.&lt;br /&gt;
It would be great if those functions could be available client and server side. --[[User:Kayl|Kayl]] 12:58, 23 November 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
need this function client and server side '''movePlayerHudComponent(string component, float x, float y)''' --[[User:SuatEyrice|SuatEyrice]] 00:18, 26 February 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
'''(marcol07, June the 27th, 2010)''' I would be so happy to have fuction to set Analog control of player sth like '''getAnalogControlState(string controlName)''' but inverted to '''setAnalogControlState(string controlName, float state)'''&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
OnPedDamage (serverside) event. There is OnClientPedDamage, but it's clientside. [[User:damage22|damage22]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
'''setRadioVolume(element thePlayer, int volume)''', to create GUI volume control, turn off the radio without changing the station, etc. [[User:JacobS|JacobS]] 14:47, 29 July 2010 (UTC)&lt;br /&gt;
----&lt;br /&gt;
'''setVehicleHydraulics(element theVehicle, bool state)''', to force hydraulics to be up (true) or down (false)&lt;br /&gt;
----&lt;br /&gt;
'''createFire(x, y, z, theSize, dimension)''', just like [[createFire]], only with the option to enter a dimension for the fire to appear in&lt;br /&gt;
----&lt;br /&gt;
'''setGunshotsEnabled(bool enabled)''', '''getGunshotsEnabled()''' and '''createGunshot(x,y,z,radius)''' - to enable/disable the game's gunshot ambience, and to create gunshots at specific locations with radii that it is audible in [[User:JacobS.|JacobS.]] 19:28, 11 September 2010 (MDT)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
onClick  should pass the name of the clicked SUBobject too (eg: vehicle parts, bone names etc.)--[[User:Lcaseidefensis|Lcaseidefensis]] 16:48, 21 May 2012 (UTC)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
something to open/close doors like in singleplayer (teleports are a bit unrealistic)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
moveCamera( player thePlayer, float positionX, float positionY, float positionZ [, float lookAtX, float lookAtY, float lookAtZ, float roll = 0, float fov = 70 ] )&lt;br /&gt;
and&lt;br /&gt;
attachElementToPed( player thePlayer, element theElement, interger bone)&lt;/div&gt;</summary>
		<author><name>Dfigfjf</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Requested_Functions_and_Events&amp;diff=46024</id>
		<title>Requested Functions and Events</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Requested_Functions_and_Events&amp;diff=46024"/>
		<updated>2015-10-04T18:52:10Z</updated>

		<summary type="html">&lt;p&gt;Dfigfjf: /* Client-Side */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Server-side==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Event like onServerTick wich is run very often. Like the clientside onClientRender. This could be useful for constat checking wich must be done under 50ms (lower than timers can handle).&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
onVehicleCreated or an equivalent... shouldn't be too hard? -Robhol (14:15 Jul 6, 08)&lt;br /&gt;
:If we did it, it'd be onElementCreated - what do you want this for? [[User:EAi|eAi]] 08:58, 7 July 2008 (CDT)&lt;br /&gt;
::onElementCreated is a good idea - it could be used for lots of things. Also, how about onVehicleDrown or whatever? that is, when a vehicle hits deep water. Checking for collisions and stuff is very awkward, and client-side only, and has to be checked constantly.. -Robhol (17:31 Jul 9 08)&lt;br /&gt;
:::I second that. It would be useful if you use like me element data like the fuel amount or other stuff. And an event like this would help me to setup those element data, when a car spawns. Otherwise I would either have to edit every car spawn script I use or do a post-setup when someone is entering the car.. [[User:MaddDogg14]] (04:34 Apr 4, 10 (CEST))&lt;br /&gt;
::::i definetly agree, onElementCreated would be VERY useful for utility/librares scripts, but i think this should be limited by ACL, because &amp;quot;evil&amp;quot; scripts could abuse this othervise -Karlis (9:10 Apr 5, 10)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
I ask for a function that detects if a ped is on floor, eg. '''isPedOnFloor(ped thePed)''', thanks. --&amp;lt;span style=&amp;quot;font-family:Courier New, Courier, monospace&amp;quot;&amp;gt;[[User:Shadd|Shadd]]&amp;lt;/span&amp;gt;&amp;lt;sub&amp;gt;([[User_talk:Shadd|In caso di emergenza rompere le scatole]])&amp;lt;/sub&amp;gt; 11:29, 15 June 2008 (CDT)&lt;br /&gt;
: [[isPedOnGround]]? [[User:Awwu|Awwu]] 12:58, 15 June 2008 (CDT)&lt;br /&gt;
::I need to know if the player has its back touching the ground, not if it's simply &amp;quot;on ground&amp;quot;. --&amp;lt;span style=&amp;quot;font-family:Courier New, Courier, monospace&amp;quot;&amp;gt;[[User:Shadd|Shadd]]&amp;lt;/span&amp;gt;&amp;lt;sub&amp;gt;([[User_talk:Shadd|In caso di emergenza rompere le scatole]])&amp;lt;/sub&amp;gt; 14:16, 16 June 2008 (CDT)&lt;br /&gt;
:::Check what task the player has, they should have TASK_COMPLEX_FALL_AND_GET_UP or TASK_COMPLEX_FALL_AND_STAY_DOWN... [[User:EAi|eAi]] 19:12, 16 June 2008 (CDT)&lt;br /&gt;
::::Thanks. What task does player have after being hitten by a melee attack that cause it to fall down? Would &amp;quot;TASK_SIMPLE_BE_KICKED_ON_GROUND&amp;quot; and &amp;quot;TASK_SIMPLE_GET_UP&amp;quot; work? --&amp;lt;span style=&amp;quot;font-family:Courier New, Courier, monospace&amp;quot;&amp;gt;[[User:Shadd|Shadd]]&amp;lt;/span&amp;gt;&amp;lt;sub&amp;gt;([[User_talk:Shadd|In caso di emergenza rompere le scatole]])&amp;lt;/sub&amp;gt; 09:35, 17 June 2008 (CDT)&lt;br /&gt;
:::::Try it, I'm not entirely sure. You should be able to produce some code to show the player's current tasks very easily... [[User:EAi|eAi]] 19:20, 17 June 2008 (CDT)&lt;br /&gt;
::::::My goal is to edit the standard damage of the attacks, in this case i have to know when player is on ground to cause higher damage. However it doesn't seem to work, when i hit the player it simply gets up without animation with no damage. --&amp;lt;span style=&amp;quot;font-family:Courier New, Courier, monospace&amp;quot;&amp;gt;[[User:Shadd|Shadd]]&amp;lt;/span&amp;gt;&amp;lt;sub&amp;gt;([[User_talk:Shadd|In caso di emergenza rompere le scatole]])&amp;lt;/sub&amp;gt; 19:10, 19 June 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
It may looks strange and useless (waste of time?) but I think that it could be a awesome feature. Having a web browser.&lt;br /&gt;
Like: http://www.youtube.com/watch?v=wT1UR6qEgdg&lt;br /&gt;
http://princeofcode.com/awesomium.php&lt;br /&gt;
:definetly useles and waste of time, suporting xfire enought. -karlis&lt;br /&gt;
::Really Karlis, who asked you bro. It could be very useful, actually. For example, creating dynamic billboards. Instead of changing the TXD, they could set up a browser object over the billboard. That way they can also set up a timer to change the image, etc. [[User:JacobS|JacobS]] 20:08, 1 August 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
There could be something like createBrowser( float x, float y, float z, [float rx, float ry, float rz, float width, float high, string url, bool locked] ) &lt;br /&gt;
locked parameter: false = navigation bar present, true = no navigation bar&lt;br /&gt;
toggleBrowserFullsceenMode(browser theBrowser, bool tog, [bool smooth])&lt;br /&gt;
smooth parameter: If set to true the browser will smoothly move from his ingame position to the fullscreen position&lt;br /&gt;
toggleBrowserBackground(browser theBrowser, bool tog)&lt;br /&gt;
Set the browser background transparent.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Security: Disable file downloads, disable popups (disable flash, javascript and any other protocols than http and https [no mailto and stuff...]?)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Should be a Client and server function. --[[User:Masterofquebec|Masterofquebec]] 00:10, 15 October 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Support of tooltips from CEGUI would be cool. I saw a property for that, but it didn't work for me. [[User:MaddDogg14]] (04:36 Apr 4, 10 (CEST))&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
I request a function that gets all clothes from a ped, just like getPedClothes but for all bodyparts. With this function it would be more ease to save clothes to database.&lt;br /&gt;
:That's so easy to do yourself that it's barely worth adding. Just loop all the indexes 0-17 and save them to a table. [[User:Awwu|Awwu]] 19:26, 17 April 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
[[setProjectileTarget]] for setting a projectile to target a specific entity. I am trying to create a Battlefield Bad Company type of gamemode and in that game, you can plant a 'tracer'. Any rocket fired (if the tracer is on screen) will seek the tracer. [[User:LeetWoovie|LeetWoovie]] 05:01, 19 April 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
(marcol07, June the 25th, 2010) I would like to have some function to create light source as element or sth like createFire, for example createLight(x,y,z,xrot,yrot,zrot,f,r,g,b) where &amp;quot;f&amp;quot; is an angle of lightning. or it is possible with some model or function? It would be good to create for example fog lamps or classic street lamps&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
moveElement available for markers, objects, pedestrians and players or maybe more if you can do. [[User:Socialz|Socialz]] 13:10, 1 January 2012 (CET)&lt;br /&gt;
&lt;br /&gt;
==Client-Side==&lt;br /&gt;
&lt;br /&gt;
Function &amp;quot;isPlayerStunting&amp;quot; for add options to events &amp;quot;onClientPlayerStuntStart&amp;quot; and &amp;quot;onClientPlayerStuntFinish&amp;quot; --[[User:Dfigfjf|Dfigfjf]] ([[User talk:Dfigfjf|talk]]) 18:52, 4 October 2015 (UTC)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Event &amp;quot;onClientVehicleFire&amp;quot;, which would be triggered when a vehicle shoots.&lt;br /&gt;
:See [[OnVehicleWeaponFire]] --[[User:X86dev|X86dev]] 12:11, 19 April 2013 (UTC)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Adding possibility to toggle radio hud label by '''showHudComponent''' -karlis&lt;br /&gt;
  &lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Pickup events clientside please, onClientPickupHit onClientPickupUse.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Would it be possible to add a color arg to guiGridListSetItemText()? Im trying to get each item colored differently in one list. Thanks, ABEL&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
I need a function which could get current target of hydra or a HS rocket launcher, like when someone press space and targets a element, to get what element is it for calculating distance from it. '''getPlayerOccupiedVehicleTarget''' or '''getPlayerHSTarget'''. &lt;br /&gt;
Thanks in advance -Nidza a.k.a. CodeMaster 2:26 PM 19th June 2008.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
It'd be useful to have something to disable elements of the default hud (weapon display, health display, armor, radar, etcetera) so that you can create your own HUDs. Something like '''setHudElement(element name, toggle)'''.&lt;br /&gt;
&lt;br /&gt;
[[User:Lord Xalphox|Lord Xalphox]] 19:32, 22 March 2009 (CET)&lt;br /&gt;
:[[showPlayerHudComponent]]? [[User:Awwu|Awwu]] 19:43, 22 March 2009 (CET)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
I'd like to have a function that sets the chatbox input line text. Then I could script my own chat history function (that inserts the last sent text into the input line again by pressing arrow up) (which samp has since 0.2 btw) since nobody builds it into the client. [[User:NeonBlack|NeonBlack]] 12:03, 4 July 2009 (CEST) PS.: samp also supports cut, copy and paste :P&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
A function setElementMatrix, doing the exact opposite of getElementMatrix would be much appreciated. --[[User:Kayl|Kayl]] 15:21, 13 November 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Functions like setTrainPosition(train,track,pos) and track,pos getTrainPosition(train) would be great in order to allow more script side control of trains.&lt;br /&gt;
The track argument would be an index of the track number (currently there are around 4 tracks handled, including 1 incompletely defined).&lt;br /&gt;
The position would be a float between 0 and 1 (or however you guys handle it) telling where on the track the train currently is.&lt;br /&gt;
It would be great if those functions could be available client and server side. --[[User:Kayl|Kayl]] 12:58, 23 November 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
need this function client and server side '''movePlayerHudComponent(string component, float x, float y)''' --[[User:SuatEyrice|SuatEyrice]] 00:18, 26 February 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
'''(marcol07, June the 27th, 2010)''' I would be so happy to have fuction to set Analog control of player sth like '''getAnalogControlState(string controlName)''' but inverted to '''setAnalogControlState(string controlName, float state)'''&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
OnPedDamage (serverside) event. There is OnClientPedDamage, but it's clientside. [[User:damage22|damage22]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
'''setRadioVolume(element thePlayer, int volume)''', to create GUI volume control, turn off the radio without changing the station, etc. [[User:JacobS|JacobS]] 14:47, 29 July 2010 (UTC)&lt;br /&gt;
----&lt;br /&gt;
'''setVehicleHydraulics(element theVehicle, bool state)''', to force hydraulics to be up (true) or down (false)&lt;br /&gt;
----&lt;br /&gt;
'''createFire(x, y, z, theSize, dimension)''', just like [[createFire]], only with the option to enter a dimension for the fire to appear in&lt;br /&gt;
----&lt;br /&gt;
'''setGunshotsEnabled(bool enabled)''', '''getGunshotsEnabled()''' and '''createGunshot(x,y,z,radius)''' - to enable/disable the game's gunshot ambience, and to create gunshots at specific locations with radii that it is audible in [[User:JacobS.|JacobS.]] 19:28, 11 September 2010 (MDT)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
onClick  should pass the name of the clicked SUBobject too (eg: vehicle parts, bone names etc.)--[[User:Lcaseidefensis|Lcaseidefensis]] 16:48, 21 May 2012 (UTC)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
something to open/close doors like in singleplayer (teleports are a bit unrealistic)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
moveCamera( player thePlayer, float positionX, float positionY, float positionZ [, float lookAtX, float lookAtY, float lookAtZ, float roll = 0, float fov = 70 ] )&lt;br /&gt;
and&lt;br /&gt;
attachElementToPed( player thePlayer, element theElement, interger bone)&lt;/div&gt;</summary>
		<author><name>Dfigfjf</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Multi_Theft_Auto:_Wiki:About&amp;diff=45934</id>
		<title>Multi Theft Auto: Wiki:About</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Multi_Theft_Auto:_Wiki:About&amp;diff=45934"/>
		<updated>2015-09-11T23:06:47Z</updated>

		<summary type="html">&lt;p&gt;Dfigfjf: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Multi Theft Auto''' ''(MTA)'' is a multiplayer modification for the Microsoft Windows version of Rockstar North games Grand Theft Auto III, Grand Theft Auto: Vice City and Grand Theft Auto: San Andreas that adds online multiplayer functionality.&lt;/div&gt;</summary>
		<author><name>Dfigfjf</name></author>
	</entry>
</feed>