<?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=Kevin+Gross</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=Kevin+Gross"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/wiki/Special:Contributions/Kevin_Gross"/>
	<updated>2026-05-12T02:35:49Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetResourceScripts&amp;diff=43138</id>
		<title>GetResourceScripts</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetResourceScripts&amp;diff=43138"/>
		<updated>2014-12-01T20:22:40Z</updated>

		<summary type="html">&lt;p&gt;Kevin Gross: Final minor edit&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 show all scripts in resource.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;table getResourceScripts ( resource theResource )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
* '''theResource''': The resource where you want to get the scripts from.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''table'' scripts on [[resource]].&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function getResourceScripts(resource)&lt;br /&gt;
    local scripts = {}&lt;br /&gt;
    local resourceName = getResourceName(resource)&lt;br /&gt;
    local theMeta = xmlLoadFile(&amp;quot;:&amp;quot;..resourceName..&amp;quot;/meta.xml&amp;quot;)&lt;br /&gt;
    for i, node in ipairs (xmlNodeGetChildren(theMeta)) do&lt;br /&gt;
        if (xmlNodeGetName(node) == &amp;quot;script&amp;quot;) then&lt;br /&gt;
            local script = xmlNodeGetAttribute(node, &amp;quot;src&amp;quot;)&lt;br /&gt;
            if (script) then&lt;br /&gt;
                table.insert(scripts, script)&lt;br /&gt;
            end&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
    return scripts&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
This example will compile all script on resource&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addCommandHandler(&amp;quot;compile&amp;quot;, &lt;br /&gt;
function (source, cmd, resourceName)&lt;br /&gt;
    outputChatBox(&amp;quot;STARTED COMPILING&amp;quot;,source,255,0,0,true)&lt;br /&gt;
    local resource = getResourceFromName(resourceName)&lt;br /&gt;
    for i, script in ipairs (getResourceScripts(resource)) do&lt;br /&gt;
        local theScript = fileOpen(&amp;quot;:&amp;quot;..resourceName..&amp;quot;/&amp;quot;..script..&amp;quot;&amp;quot;, true)&lt;br /&gt;
	local theScriptN = script&lt;br /&gt;
        if (theScript) then&lt;br /&gt;
                fetchRemote(&amp;quot;http://luac.mtasa.com/?compile=1&amp;amp;debug=0&amp;amp;obfuscate=1&amp;quot;, myCallback, fileRead(theScript, 500000000), true,resourceName,theScriptN)&lt;br /&gt;
            end&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
	&lt;br /&gt;
function myCallback(responseData, errno,resourceName,theScript)&lt;br /&gt;
                if errno == 0 then&lt;br /&gt;
                    if (string.find(responseData, &amp;quot;ERROR&amp;quot;)) then&lt;br /&gt;
                        outputConsole(&amp;quot;:&amp;quot;..resourceName..&amp;quot;/: &amp;quot;..responseData..&amp;quot;&amp;quot;, source)&lt;br /&gt;
                    else&lt;br /&gt;
                        local theScriptC = fileCreate(&amp;quot;:&amp;quot;..resourceName..&amp;quot;/&amp;quot;..theScript..&amp;quot;c&amp;quot;)&lt;br /&gt;
                        fileWrite(theScriptC, responseData)&lt;br /&gt;
                        fileClose(theScriptC)&lt;br /&gt;
                        if (responseData) then&lt;br /&gt;
                            outputConsole(&amp;quot;&amp;quot;..resourceName..&amp;quot;/&amp;quot;..theScript..&amp;quot;: Successfully compiled&amp;quot;, source)&lt;br /&gt;
                        else&lt;br /&gt;
                            outputConsole(&amp;quot;&amp;quot;..resourceName..&amp;quot;/&amp;quot;..theScript..&amp;quot;: Failed to compiled&amp;quot;, source)&lt;br /&gt;
                        end&lt;br /&gt;
                    end&lt;br /&gt;
		end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Credits==&lt;br /&gt;
*'''Author:''': WASSIm.&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Useful_Functions}}&lt;/div&gt;</summary>
		<author><name>Kevin Gross</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetResourceScripts&amp;diff=43137</id>
		<title>GetResourceScripts</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetResourceScripts&amp;diff=43137"/>
		<updated>2014-12-01T20:22:17Z</updated>

		<summary type="html">&lt;p&gt;Kevin Gross: Minor edit / Tabulation&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 show all scripts in resource.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;table getResourceScripts ( resource theResource )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
* '''theResource''': The resource where you want to get the scripts from.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''table'' scripts on [[resource]].&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function getResourceScripts(resource)&lt;br /&gt;
    local scripts = {}&lt;br /&gt;
    local resourceName = getResourceName(resource)&lt;br /&gt;
    local theMeta = xmlLoadFile(&amp;quot;:&amp;quot;..resourceName..&amp;quot;/meta.xml&amp;quot;)&lt;br /&gt;
    for i, node in ipairs (xmlNodeGetChildren(theMeta)) do&lt;br /&gt;
        if (xmlNodeGetName(node) == &amp;quot;script&amp;quot;) then&lt;br /&gt;
            local script = xmlNodeGetAttribute(node, &amp;quot;src&amp;quot;)&lt;br /&gt;
            if (script) then&lt;br /&gt;
                table.insert(scripts, script)&lt;br /&gt;
            end&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
    return scripts&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
This example will compile all script on resource&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addCommandHandler(&amp;quot;compile&amp;quot;, &lt;br /&gt;
function (source, cmd, resourceName)&lt;br /&gt;
    outputChatBox(&amp;quot;STARTED COMPILING&amp;quot;,source,255,0,0,true)&lt;br /&gt;
    local resource = getResourceFromName(resourceName)&lt;br /&gt;
    for i, script in ipairs (getResourceScripts(resource)) do&lt;br /&gt;
        local theScript = fileOpen(&amp;quot;:&amp;quot;..resourceName..&amp;quot;/&amp;quot;..script..&amp;quot;&amp;quot;, true)&lt;br /&gt;
	local theScriptN = script&lt;br /&gt;
        if (theScript) then&lt;br /&gt;
                fetchRemote(&amp;quot;http://luac.mtasa.com/?compile=1&amp;amp;debug=0&amp;amp;obfuscate=1&amp;quot;, myCallback, fileRead(theScript, 500000000), true,resourceName,theScriptN)&lt;br /&gt;
            end&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
	&lt;br /&gt;
function myCallback(responseData, errno,resourceName,theScript)&lt;br /&gt;
                if errno == 0 then&lt;br /&gt;
                    if (string.find(responseData, &amp;quot;ERROR&amp;quot;)) then&lt;br /&gt;
                        outputConsole(&amp;quot;:&amp;quot;..resourceName..&amp;quot;/: &amp;quot;..responseData..&amp;quot;&amp;quot;, source)&lt;br /&gt;
                    else&lt;br /&gt;
                        local theScriptC = fileCreate(&amp;quot;:&amp;quot;..resourceName..&amp;quot;/&amp;quot;..theScript..&amp;quot;.c&amp;quot;)&lt;br /&gt;
                        fileWrite(theScriptC, responseData)&lt;br /&gt;
                        fileClose(theScriptC)&lt;br /&gt;
                        if (responseData) then&lt;br /&gt;
                            outputConsole(&amp;quot;&amp;quot;..resourceName..&amp;quot;/&amp;quot;..theScript..&amp;quot;: Successfully compiled&amp;quot;, source)&lt;br /&gt;
                        else&lt;br /&gt;
                            outputConsole(&amp;quot;&amp;quot;..resourceName..&amp;quot;/&amp;quot;..theScript..&amp;quot;: Failed to compiled&amp;quot;, source)&lt;br /&gt;
                        end&lt;br /&gt;
                    end&lt;br /&gt;
		end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Credits==&lt;br /&gt;
*'''Author:''': WASSIm.&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Useful_Functions}}&lt;/div&gt;</summary>
		<author><name>Kevin Gross</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetResourceScripts&amp;diff=43136</id>
		<title>GetResourceScripts</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetResourceScripts&amp;diff=43136"/>
		<updated>2014-12-01T20:19:48Z</updated>

		<summary type="html">&lt;p&gt;Kevin Gross: Fixed 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 show all scripts in resource.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;table getResourceScripts ( resource theResource )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
* '''theResource''': The resource where you want to get the scripts from.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''table'' scripts on [[resource]].&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function getResourceScripts(resource)&lt;br /&gt;
    local scripts = {}&lt;br /&gt;
    local resourceName = getResourceName(resource)&lt;br /&gt;
    local theMeta = xmlLoadFile(&amp;quot;:&amp;quot;..resourceName..&amp;quot;/meta.xml&amp;quot;)&lt;br /&gt;
    for i, node in ipairs (xmlNodeGetChildren(theMeta)) do&lt;br /&gt;
        if (xmlNodeGetName(node) == &amp;quot;script&amp;quot;) then&lt;br /&gt;
            local script = xmlNodeGetAttribute(node, &amp;quot;src&amp;quot;)&lt;br /&gt;
            if (script) then&lt;br /&gt;
                table.insert(scripts, script)&lt;br /&gt;
            end&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
    return scripts&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
This example will compile all script on resource&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addCommandHandler(&amp;quot;compile&amp;quot;, &lt;br /&gt;
function (source, cmd, resourceName)&lt;br /&gt;
	outputChatBox(&amp;quot;STARTED COMPILING&amp;quot;,source,255,0,0,true)&lt;br /&gt;
    local resource = getResourceFromName(resourceName)&lt;br /&gt;
    for i, script in ipairs (getResourceScripts(resource)) do&lt;br /&gt;
        local theScript = fileOpen(&amp;quot;:&amp;quot;..resourceName..&amp;quot;/&amp;quot;..script..&amp;quot;&amp;quot;, true)&lt;br /&gt;
		local theScriptN = script&lt;br /&gt;
        if (theScript) then&lt;br /&gt;
                fetchRemote(&amp;quot;http://luac.mtasa.com/?compile=1&amp;amp;debug=0&amp;amp;obfuscate=1&amp;quot;, myCallback, fileRead(theScript, 500000000), true,resourceName,theScriptN)&lt;br /&gt;
            end&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
	&lt;br /&gt;
function myCallback(responseData, errno,resourceName,theScript)&lt;br /&gt;
                if errno == 0 then&lt;br /&gt;
                    if (string.find(responseData, &amp;quot;ERROR&amp;quot;)) then&lt;br /&gt;
                        outputConsole(&amp;quot;:&amp;quot;..resourceName..&amp;quot;/: &amp;quot;..responseData..&amp;quot;&amp;quot;, source)&lt;br /&gt;
                    else&lt;br /&gt;
                        local theScriptC = fileCreate(&amp;quot;:&amp;quot;..resourceName..&amp;quot;/&amp;quot;..theScript..&amp;quot;.luac&amp;quot;)&lt;br /&gt;
                        fileWrite(theScriptC, responseData)&lt;br /&gt;
                        fileClose(theScriptC)&lt;br /&gt;
                        if (responseData) then&lt;br /&gt;
                            outputConsole(&amp;quot;&amp;quot;..resourceName..&amp;quot;/&amp;quot;..theScript..&amp;quot;: Successfully compiled&amp;quot;, source)&lt;br /&gt;
                        else&lt;br /&gt;
                            outputConsole(&amp;quot;&amp;quot;..resourceName..&amp;quot;/&amp;quot;..theScript..&amp;quot;: Failed to compiled&amp;quot;, source)&lt;br /&gt;
                        end&lt;br /&gt;
                    end&lt;br /&gt;
		end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Credits==&lt;br /&gt;
*'''Author:''': WASSIm.&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Useful_Functions}}&lt;/div&gt;</summary>
		<author><name>Kevin Gross</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=ES/P%C3%A1gina_Principal&amp;diff=38900</id>
		<title>ES/Página Principal</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=ES/P%C3%A1gina_Principal&amp;diff=38900"/>
		<updated>2014-02-18T16:18:03Z</updated>

		<summary type="html">&lt;p&gt;Kevin Gross: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
__NOEDITSECTION__&lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;100%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;0&amp;quot;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px solid #D8D8D8; padding: 10px; height: 140px;&amp;quot;&amp;gt;&lt;br /&gt;
[[File:Mtalogo.png|left|100px]]'''&lt;br /&gt;
Bienvenid@ a la Wiki de Multi Theft Auto: San Andreas en español.''' Aquí puedes encontrar mucha información sobre el uso de Multi Theft Auto. &lt;br /&gt;
&lt;br /&gt;
Hay muchas [[ES/Cómo puedes ayudar|cosas que puedes hacer para ayudarnos]] a mejorar MTA - crea un mapa, un modo de juego, escribe códigos de ejemplo, tutoriales, traduce páginas del inglés al español, o simplemente juega y reporta los bugs que encuentres.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
{| width=&amp;quot;100%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;0&amp;quot;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |&lt;br /&gt;
|-&lt;br /&gt;
|width=&amp;quot;50%&amp;quot; style=&amp;quot;vertical-align:top;&amp;quot; |&amp;lt;div style=&amp;quot;border: 1px solid #D8D8D8; padding:10px 8px 8px 8px; margin:10px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;float:right; width: 32px;&amp;quot;&amp;gt;[[File:Input-gaming.png‎]]&amp;lt;/div&amp;gt;&lt;br /&gt;
=== El Juego ===&lt;br /&gt;
&amp;lt;div style=&amp;quot;background: #FFEEAA;&amp;quot;&amp;gt;&lt;br /&gt;
[[File:Go-down.png|link=http://mtasa.com/]] ''' [http://mtasa.com/ Descargar Multi Theft Auto: San Andreas {{Current Version|full}}]'''&amp;lt;/div&amp;gt;&lt;br /&gt;
* [[ES/Manual del Cliente|Manual del Cliente]] [[Image:flag_es.png|En Español|20px]]&lt;br /&gt;
* [[ES/Cambios en la versión 1.3|Cambios de la versión 1.3]] [[Image:flag_es.png|En Español|20px]] (Traducción 80%)&lt;br /&gt;
* [[ES/Problemas_Conocidos_-_FAQ|Problemas Conocidos]] [[Image:flag_es.png|En Español|20px]] (Traducción: 10%)&lt;br /&gt;
* [[Upgrading_from_MTA:Race|Cambiando MTA:Race a MTA:SA 1.0.x]] [[Image:flag_us.png|En Inglés|20px]]&lt;br /&gt;
* [[ES/Manual del Servidor|Manual del Servidor]] [[Image:flag_es.png|En Español|20px]] (Traducción: 90%)&lt;br /&gt;
* [[Map_manager|El Resource &amp;quot;Map Manager&amp;quot;]] [[Image:flag_us.png|En Inglés|20px]]&lt;br /&gt;
&lt;br /&gt;
====Editor de Mapas====&lt;br /&gt;
*[[ES/Resource:Editor|Manual del Editor]] [[Image:flag_es.png|En Español|20px]]&lt;br /&gt;
*[[Resource:Editor/EDF|EDF: Formato de Definiciones del Editor]] [[Image:flag_us.png|En Inglés|20px]]&lt;br /&gt;
*[[Resource:Editor/Plugins|Plugins para el Editor]] [[Image:flag_us.png|En Inglés|20px]]&lt;br /&gt;
*[[ES/Resource:Editor#Preguntas_Frecuentes|Preguntas Frecuentes]] [[Image:flag_es.png|En Español|20px]]&lt;br /&gt;
&lt;br /&gt;
====Bases de Datos====&lt;br /&gt;
* [[:Category:Resource|Catálogo de Resources]] [[Image:flag_us.png|En Inglés|20px]]&lt;br /&gt;
* [[ES/Scripts de Cliente|Scripts de Cliente]] [[Image:flag_es.png|En Español|20px]]&lt;br /&gt;
* [[Modules| Módulos]] [[Image:flag_us.png|En Inglés|20px]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px solid #D8D8D8; padding:4px 8px 8px 8px; margin:10px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;float:right; width: 32px;&amp;quot;&amp;gt;[[File:Applications-development.png‎‎‎]]&amp;lt;/div&amp;gt;&lt;br /&gt;
====Desarrollando Multi Theft Auto====&lt;br /&gt;
[[File:Go-down.png|link=http://nightly.mtasa.com/]] [http://nightly.mtasa.com/ Nightly builds]&lt;br /&gt;
* [[Compiling_MTASA|Compilando MTA:SA en Windows]] [[Image:flag_us.png|En Inglés|20px]]&lt;br /&gt;
* [[Building_MTASA_Server_on_Mac_OS_X|Compilando MTA:SA en Mac OS X]] [[Image:flag_us.png|En Inglés|20px]]&lt;br /&gt;
* [[Building_MTASA_Server_on_GNU_Linux|Compilando MTA:SA en GNU/Linux]] [[Image:flag_us.png|En Inglés|20px]]&lt;br /&gt;
* [[Coding guidelines|Guías de Codificación]] [[Image:flag_us.png|En Inglés|20px]]&lt;br /&gt;
* [http://code.google.com/p/mtasa-blue Google Code SVN] [[Image:flag_us.png|En Inglés|20px]]&lt;br /&gt;
* [http://bugs.mtasa.com/roadmap_page.php Seguimiento de Versiones] [[Image:flag_us.png|En Inglés|20px]]&lt;br /&gt;
* [http://bugs.mtasa.com/ Central de Reportes de Bugs] [[Image:flag_us.png|En Inglés|20px]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px solid #D8D8D8; padding:4px 8px 8px 8px; margin:10px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;float:right; width: 32px;&amp;quot;&amp;gt;[[File:Applications-office.png‎]]&amp;lt;/div&amp;gt;&lt;br /&gt;
===Wiki - Cómo puedes ayudar===&lt;br /&gt;
* Termina la documentación para [[:Category:Incomplete|funciones incompletas]].&lt;br /&gt;
* [[:Category:Needs_Example|Crea ejemplos para eventos y funciones]].&lt;br /&gt;
* Revisa y verifica [[:Category:Needs Checking|páginas que necesitan revisión]].&lt;br /&gt;
* Escribe tutoriales para ayudar a la gente.&lt;br /&gt;
* Traduce las páginas del wiki.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px solid #D8D8D8; padding:4px 8px 8px 8px; margin:10px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;float:right; width: 32px;&amp;quot;&amp;gt;[[File:Internet-group-chat.png‎]]&amp;lt;/div&amp;gt;&lt;br /&gt;
=== Comunidad ===&lt;br /&gt;
* [http://forum.multitheftauto.com/ Foro] [[Image:flag_us.png|En Inglés|20px]]&lt;br /&gt;
** [http://forum.multitheftauto.com/viewforum.php?f=122&amp;amp;sid=72be1c29dd00c4442f8112cc09818283 Sección en español] [[Image:flag_es.png|En Español|20px]]&lt;br /&gt;
* [irc://irc.multitheftauto.com/mta Canal IRC] [[Image:flag_us.png|En Inglés|20px]]&lt;br /&gt;
* [http://community.mtasa.com/ Comunidad MTA] [[Image:flag_us.png|En Inglés|20px]]&lt;br /&gt;
* [http://www.youtube.com/user/MTAQA Canal de YouTube oficial] [[Image:flag_us.png|En Inglés|20px]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;padding:4px 8px 8px 8px; margin:10px; text-align:center&amp;quot;&amp;gt;&lt;br /&gt;
[[File:Osi symbol.png|75px|link=http://opensource.org/]]&lt;br /&gt;
'''Multi Theft Auto''' es un '''Proyecto Open Source'''. &lt;br /&gt;
¡Todos podemos contribuir a mejorar Multi Theft Auto!&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
| width=&amp;quot;50%&amp;quot; style=&amp;quot;vertical-align:top;&amp;quot; |&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px solid #D8D8D8; padding:4px 8px 8px 8px; margin:10px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;float:right; width: 32px;&amp;quot;&amp;gt;[[File:Accessories-text-editor.png]]&amp;lt;/div&amp;gt;&lt;br /&gt;
=== Scripting ===&lt;br /&gt;
* [[ES/Resources|Introducción a los Resources]]  [[Image:flag_es.png|En Español|20px]]&lt;br /&gt;
** [[Resource Web Access|Acceso Web con Resources]] [[Image:flag_us.png|En Inglés|20px]]&lt;br /&gt;
** [[Meta.xml|Sobre el archivo &amp;quot;meta.xml&amp;quot;]] [[Image:flag_us.png|En Inglés|20px]]&lt;br /&gt;
** [[:Category:Resource|Catálogo de Resources]] [[Image:flag_us.png|En Inglés|20px]]&lt;br /&gt;
** [[ES/ACL|Lista de Control del Acceso (ACL)]]  [[Image:flag_es.png|En Español|20px]] (Traducción: 10%)&lt;br /&gt;
* [[ES/Introducción a Lua|Introducción a Lua]] [[Image:flag_es.png|En Español|20px]] (Traducción: 85%)&lt;br /&gt;
** [[ES/Introducción a la Programación de GUI|Introducción al GUI]] [[Image:flag_es.png|En Español|20px]] (Traducción: 40%)&lt;br /&gt;
** [[Debugging|Tutorial de Depuración]] [[Image:flag_us.png|En Inglés|20px]] - Encontrar errores en scripts.&lt;br /&gt;
** [http://forum.mtasa.com/viewtopic.php?f=145&amp;amp;t=70852 Tutoriales]&lt;br /&gt;
* [[ES/Useful_Functions| Funciones útiles]] [[Image:flag_es.png|En Español|20px]]&lt;br /&gt;
* [[Writing_Gamemodes|Escribiendo Modos de Juego]] [[Image:flag_us.png|En Inglés|20px]]&lt;br /&gt;
====Ayuda General de Lua====&lt;br /&gt;
*[http://www.lua.org/manual/5.1/es/manual.html Manual de Referencia de Lua 5.1]  [[Image:flag_es.png|En Español|20px]]&lt;br /&gt;
*[http://www.lua.org/pil/index.html Manual Programando en Lua]  [[Image:flag_us.png|En Inglés|20px]]&lt;br /&gt;
*[http://lua-users.org/wiki/TutorialDirectory Lua Wiki]  [[Image:flag_us.png|En Inglés|20px]]&lt;br /&gt;
*[http://nixstaller.berlios.de/manual/0.2/nixstaller_9.html Guía general de Lua de Nixstaller]  [[Image:flag_us.png|En Inglés|20px]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px;&amp;quot;&amp;gt;&lt;br /&gt;
====Referencia====&lt;br /&gt;
* [[Client Scripting Functions|Funciones de Cliente]] [[Image:flag_us.png|En Inglés|20px]]&lt;br /&gt;
* [[Client Scripting Events|Eventos de Cliente]] [[Image:flag_us.png|En Inglés|20px]]&lt;br /&gt;
* [[ES/Funciones de Servidor|Funciones de Servidor]] [[Image:flag_es.png|En Español|20px]]&lt;br /&gt;
* [[Server Scripting Events|Eventos de Servidor]] [[Image:flag_us.png|En Inglés|20px]]&lt;br /&gt;
&amp;lt;!-- Incomplete * [[Module functions|Lista de funciones de módulos externos de servidor]] [[Image:flag_us.png|En Inglés]] --&amp;gt;&lt;br /&gt;
* [[ES/Clases MTA| Clases de MTA]] [[Image:flag_es.png|En Español|20px]]&lt;br /&gt;
**[[Element tree| Árbol de Elementos]] [[Image:flag_us.png|En Inglés|20px]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px solid #D8D8D8; padding:4px 8px 8px 8px; margin:10px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;float:right; width: 32px;&amp;quot;&amp;gt;[[File:System-file-manager.png]]&amp;lt;/div&amp;gt;&lt;br /&gt;
====[[Id|Lista de ID's]]====&lt;br /&gt;
*[[Animations|Animaciones]]&lt;br /&gt;
*[[ES/Skins de Personajes|Skins]]&lt;br /&gt;
*[[CJ_Clothes|Ropa]]&lt;br /&gt;
*[[Garage|Garajes]]&lt;br /&gt;
*[[Interior IDs|Interiores]]&lt;br /&gt;
*[[Projectiles|Proyectiles]]&lt;br /&gt;
*[[Radar Blips|Iconos de Radar]]&lt;br /&gt;
*[[Sounds|Sonidos]]&lt;br /&gt;
*[[Vehicle IDs|ID's de Vehículos]]&lt;br /&gt;
*[[Vehicle Colors|Colores de Vehículos]]&lt;br /&gt;
*[[Vehicle Upgrades|Mejoras de Vehículos]]&lt;br /&gt;
*[[Weapons|Armas]]&lt;br /&gt;
*[[ES/Climas|Climas]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Equipo de Traducción====&lt;br /&gt;
* [mailto:zorrigas@gtagamingchile.com zorrigas@gtagamingchile.com]&amp;lt;br&amp;gt;&lt;br /&gt;
* [mailto:Brijido_XD@hotmail.com Brijido_XD@hotmail.com]&amp;lt;br&amp;gt;&lt;br /&gt;
* Benxamix2/The Kid&lt;br /&gt;
* [mailto:matiuno@gmail.com matiuno@gmail.com]&amp;lt;br&amp;gt;&lt;br /&gt;
* [mailto:cesarcastillo4@gmail.com cesarcastillo4@gmail.com]&amp;lt;br&amp;gt;&lt;br /&gt;
* [mailto:alex_firexx@hotmail.com alex_firexx@hotmail.com]&amp;lt;br&amp;gt;&lt;br /&gt;
* [mailto:carlos_olivo@msn.com carlos_olivo@msn.com]&amp;lt;br&amp;gt;&lt;br /&gt;
* AlexD&lt;br /&gt;
* Alexs_Steel[mailto:alexTO123@hotmail.com]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''¡NO ELIMINES CONTENIDO SIN AUTORIZACIÓN!'''&amp;lt;br&amp;gt; Tampoco uses modismos, usa el Castellano (Internacional), y trata de que al traducir todo quede tan claro como puedas, y la ortografía sea la mejor posible.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |&lt;br /&gt;
|}&lt;br /&gt;
{{Languages list|es}}&lt;/div&gt;</summary>
		<author><name>Kevin Gross</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=ES/P%C3%A1gina_Principal&amp;diff=38899</id>
		<title>ES/Página Principal</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=ES/P%C3%A1gina_Principal&amp;diff=38899"/>
		<updated>2014-02-18T16:12:10Z</updated>

		<summary type="html">&lt;p&gt;Kevin Gross: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
__NOEDITSECTION__&lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;100%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;0&amp;quot;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px solid #D8D8D8; padding: 10px; height: 140px;&amp;quot;&amp;gt;&lt;br /&gt;
[[File:Mtalogo.png|left|100px]]'''&lt;br /&gt;
Bienvenid@ a la Wiki de Multi Theft Auto: San Andreas en español.''' Aquí puedes encontrar mucha información sobre el uso de Multi Theft Auto. &lt;br /&gt;
&lt;br /&gt;
Hay muchas [[ES/Cómo puedes ayudar|cosas que puedes hacer para ayudarnos]] a mejorar MTA - crea un mapa, un modo de juego, escribe códigos de ejemplo, tutoriales, traduce páginas del inglés al español, o simplemente juega y reporta los bugs que encuentres.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
{| width=&amp;quot;100%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;0&amp;quot;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |&lt;br /&gt;
|-&lt;br /&gt;
|width=&amp;quot;50%&amp;quot; style=&amp;quot;vertical-align:top;&amp;quot; |&amp;lt;div style=&amp;quot;border: 1px solid #D8D8D8; padding:10px 8px 8px 8px; margin:10px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;float:right; width: 32px;&amp;quot;&amp;gt;[[File:Input-gaming.png‎]]&amp;lt;/div&amp;gt;&lt;br /&gt;
=== El Juego ===&lt;br /&gt;
&amp;lt;div style=&amp;quot;background: #FFEEAA;&amp;quot;&amp;gt;&lt;br /&gt;
[[File:Go-down.png|link=http://mtasa.com/]] ''' [http://mtasa.com/ Descargar Multi Theft Auto: San Andreas {{Current Version|full}}]'''&amp;lt;/div&amp;gt;&lt;br /&gt;
* [[ES/Manual del Cliente|Manual del Cliente]] [[Image:flag_es.png|En Español|20px]]&lt;br /&gt;
* [[ES/Cambios en la versión 1.3|Cambios de la versión 1.3]] [[Image:flag_es.png|En Español|20px]] (Traducción 80%)&lt;br /&gt;
* [[ES/Problemas_Conocidos_-_FAQ|Problemas Conocidos]] [[Image:flag_es.png|En Español|20px]] (Traducción: 10%)&lt;br /&gt;
* [[Upgrading_from_MTA:Race|Cambiando MTA:Race a MTA:SA 1.0.x]] [[Image:flag_us.png|En Inglés|20px]]&lt;br /&gt;
* [[ES/Manual del Servidor|Manual del Servidor]] [[Image:flag_es.png|En Español|20px]] (Traducción: 90%)&lt;br /&gt;
* [[Map_manager|El Resource &amp;quot;Map Manager&amp;quot;]] [[Image:flag_us.png|En Inglés|20px]]&lt;br /&gt;
&lt;br /&gt;
====Editor de Mapas====&lt;br /&gt;
*[[ES/Resource:Editor|Manual del Editor]] [[Image:flag_es.png|En Español|20px]]&lt;br /&gt;
*[[Resource:Editor/EDF|EDF: Formato de Definiciones del Editor]] [[Image:flag_us.png|En Inglés|20px]]&lt;br /&gt;
*[[Resource:Editor/Plugins|Plugins para el Editor]] [[Image:flag_us.png|En Inglés|20px]]&lt;br /&gt;
*[[ES/Resource:Editor#Preguntas_Frecuentes|Preguntas Frecuentes]] [[Image:flag_es.png|En Español|20px]]&lt;br /&gt;
&lt;br /&gt;
====Bases de Datos====&lt;br /&gt;
* [[:Category:Resource|Catálogo de Resources]] [[Image:flag_us.png|En Inglés|20px]]&lt;br /&gt;
* [[ES/Scripts de Cliente|Scripts de Cliente]] [[Image:flag_es.png|En Español|20px]]&lt;br /&gt;
* [[Modules| Módulos]] [[Image:flag_us.png|En Inglés|20px]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px solid #D8D8D8; padding:4px 8px 8px 8px; margin:10px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;float:right; width: 32px;&amp;quot;&amp;gt;[[File:Applications-development.png‎‎‎]]&amp;lt;/div&amp;gt;&lt;br /&gt;
====Desarrollando Multi Theft Auto====&lt;br /&gt;
[[File:Go-down.png|link=http://nightly.mtasa.com/]] [http://nightly.mtasa.com/ Nightly builds]&lt;br /&gt;
* [[Compiling_MTASA|Compilando MTA:SA en Windows]] [[Image:flag_us.png|En Inglés|20px]]&lt;br /&gt;
* [[Building_MTASA_Server_on_Mac_OS_X|Compilando MTA:SA en Mac OS X]] [[Image:flag_us.png|En Inglés|20px]]&lt;br /&gt;
* [[Building_MTASA_Server_on_GNU_Linux|Compilando MTA:SA en GNU/Linux]] [[Image:flag_us.png|En Inglés|20px]]&lt;br /&gt;
* [[Coding guidelines|Guías de Codificación]] [[Image:flag_us.png|En Inglés|20px]]&lt;br /&gt;
* [http://code.google.com/p/mtasa-blue Google Code SVN] [[Image:flag_us.png|En Inglés|20px]]&lt;br /&gt;
* [http://bugs.mtasa.com/roadmap_page.php Seguimiento de Versiones] [[Image:flag_us.png|En Inglés|20px]]&lt;br /&gt;
* [http://bugs.mtasa.com/ Central de Reportes de Bugs] [[Image:flag_us.png|En Inglés|20px]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px solid #D8D8D8; padding:4px 8px 8px 8px; margin:10px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;float:right; width: 32px;&amp;quot;&amp;gt;[[File:Applications-office.png‎]]&amp;lt;/div&amp;gt;&lt;br /&gt;
===Wiki - Cómo puedes ayudar===&lt;br /&gt;
* Termina la documentación para [[:Category:Incomplete|funciones incompletas]].&lt;br /&gt;
* [[:Category:Needs_Example|Crea ejemplos para eventos y funciones]].&lt;br /&gt;
* Revisa y verifica [[:Category:Needs Checking|páginas que necesitan revisión]].&lt;br /&gt;
* Escribe tutoriales para ayudar a la gente.&lt;br /&gt;
* Traduce las páginas del wiki.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px solid #D8D8D8; padding:4px 8px 8px 8px; margin:10px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;float:right; width: 32px;&amp;quot;&amp;gt;[[File:Internet-group-chat.png‎]]&amp;lt;/div&amp;gt;&lt;br /&gt;
=== Comunidad ===&lt;br /&gt;
* [http://forum.multitheftauto.com/ Foro] [[Image:flag_us.png|En Inglés|20px]]&lt;br /&gt;
** [http://forum.multitheftauto.com/viewforum.php?f=122&amp;amp;sid=72be1c29dd00c4442f8112cc09818283 Sección en español] [[Image:flag_es.png|En Español|20px]]&lt;br /&gt;
* [irc://irc.multitheftauto.com/mta Canal IRC] [[Image:flag_us.png|En Inglés|20px]]&lt;br /&gt;
* [http://community.mtasa.com/ Comunidad MTA] [[Image:flag_us.png|En Inglés|20px]]&lt;br /&gt;
* [http://www.youtube.com/user/MTAQA Canal de YouTube oficial] [[Image:flag_us.png|En Inglés|20px]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;padding:4px 8px 8px 8px; margin:10px; text-align:center&amp;quot;&amp;gt;&lt;br /&gt;
[[File:Osi symbol.png|75px|link=http://opensource.org/]]&lt;br /&gt;
'''Multi Theft Auto''' es un '''Proyecto Open Source'''. &lt;br /&gt;
¡Todos podemos contribuir a mejorar Multi Theft Auto!&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
| width=&amp;quot;50%&amp;quot; style=&amp;quot;vertical-align:top;&amp;quot; |&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px solid #D8D8D8; padding:4px 8px 8px 8px; margin:10px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;float:right; width: 32px;&amp;quot;&amp;gt;[[File:Accessories-text-editor.png]]&amp;lt;/div&amp;gt;&lt;br /&gt;
=== Scripting ===&lt;br /&gt;
* [[ES/Resources|Introducción a los Resources]]  [[Image:flag_es.png|En Español|20px]]&lt;br /&gt;
** [[Resource Web Access|Acceso Web con Resources]] [[Image:flag_us.png|En Inglés|20px]]&lt;br /&gt;
** [[Meta.xml|Sobre el archivo &amp;quot;meta.xml&amp;quot;]] [[Image:flag_us.png|En Inglés|20px]]&lt;br /&gt;
** [[:Category:Resource|Catálogo de Resources]] [[Image:flag_us.png|En Inglés|20px]]&lt;br /&gt;
** [[ES/ACL|Lista de Control del Acceso (ACL)]]  [[Image:flag_es.png|En Español|20px]] (Traducción: 10%)&lt;br /&gt;
* [[ES/Introducción a Lua|Introducción a Lua]] [[Image:flag_es.png|En Español|20px]] (Traducción: 85%)&lt;br /&gt;
** [[ES/Introducción a la Programación de GUI|Introducción al GUI]] [[Image:flag_es.png|En Español|20px]] (Traducción: 40%)&lt;br /&gt;
** [[Debugging|Tutorial de Depuración]] [[Image:flag_us.png|En Inglés|20px]] - Encontrar errores en scripts.&lt;br /&gt;
* [[ES/Useful_Functions| Funciones útiles]] [[Image:flag_es.png|En Español|20px]]&lt;br /&gt;
* [[Writing_Gamemodes|Escribiendo Modos de Juego]] [[Image:flag_us.png|En Inglés|20px]]&lt;br /&gt;
* [http://forum.mtasa.com/viewtopic.php?f=145&amp;amp;t=70852 Tutoriales]&lt;br /&gt;
====Ayuda General de Lua====&lt;br /&gt;
*[http://www.lua.org/manual/5.1/es/manual.html Manual de Referencia de Lua 5.1]  [[Image:flag_es.png|En Español|20px]]&lt;br /&gt;
*[http://www.lua.org/pil/index.html Manual Programando en Lua]  [[Image:flag_us.png|En Inglés|20px]]&lt;br /&gt;
*[http://lua-users.org/wiki/TutorialDirectory Lua Wiki]  [[Image:flag_us.png|En Inglés|20px]]&lt;br /&gt;
*[http://nixstaller.berlios.de/manual/0.2/nixstaller_9.html Guía general de Lua de Nixstaller]  [[Image:flag_us.png|En Inglés|20px]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px;&amp;quot;&amp;gt;&lt;br /&gt;
====Referencia====&lt;br /&gt;
* [[Client Scripting Functions|Funciones de Cliente]] [[Image:flag_us.png|En Inglés|20px]]&lt;br /&gt;
* [[Client Scripting Events|Eventos de Cliente]] [[Image:flag_us.png|En Inglés|20px]]&lt;br /&gt;
* [[ES/Funciones de Servidor|Funciones de Servidor]] [[Image:flag_es.png|En Español|20px]]&lt;br /&gt;
* [[Server Scripting Events|Eventos de Servidor]] [[Image:flag_us.png|En Inglés|20px]]&lt;br /&gt;
&amp;lt;!-- Incomplete * [[Module functions|Lista de funciones de módulos externos de servidor]] [[Image:flag_us.png|En Inglés]] --&amp;gt;&lt;br /&gt;
* [[ES/Clases MTA| Clases de MTA]] [[Image:flag_es.png|En Español|20px]]&lt;br /&gt;
**[[Element tree| Árbol de Elementos]] [[Image:flag_us.png|En Inglés|20px]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px solid #D8D8D8; padding:4px 8px 8px 8px; margin:10px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;float:right; width: 32px;&amp;quot;&amp;gt;[[File:System-file-manager.png]]&amp;lt;/div&amp;gt;&lt;br /&gt;
====[[Id|Lista de ID's]]====&lt;br /&gt;
*[[Animations|Animaciones]]&lt;br /&gt;
*[[ES/Skins de Personajes|Skins]]&lt;br /&gt;
*[[CJ_Clothes|Ropa]]&lt;br /&gt;
*[[Garage|Garajes]]&lt;br /&gt;
*[[Interior IDs|Interiores]]&lt;br /&gt;
*[[Projectiles|Proyectiles]]&lt;br /&gt;
*[[Radar Blips|Iconos de Radar]]&lt;br /&gt;
*[[Sounds|Sonidos]]&lt;br /&gt;
*[[Vehicle IDs|ID's de Vehículos]]&lt;br /&gt;
*[[Vehicle Colors|Colores de Vehículos]]&lt;br /&gt;
*[[Vehicle Upgrades|Mejoras de Vehículos]]&lt;br /&gt;
*[[Weapons|Armas]]&lt;br /&gt;
*[[ES/Climas|Climas]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Equipo de Traducción====&lt;br /&gt;
* [mailto:zorrigas@gtagamingchile.com zorrigas@gtagamingchile.com]&amp;lt;br&amp;gt;&lt;br /&gt;
* [mailto:Brijido_XD@hotmail.com Brijido_XD@hotmail.com]&amp;lt;br&amp;gt;&lt;br /&gt;
* Benxamix2/The Kid&lt;br /&gt;
* [mailto:matiuno@gmail.com matiuno@gmail.com]&amp;lt;br&amp;gt;&lt;br /&gt;
* [mailto:cesarcastillo4@gmail.com cesarcastillo4@gmail.com]&amp;lt;br&amp;gt;&lt;br /&gt;
* [mailto:alex_firexx@hotmail.com alex_firexx@hotmail.com]&amp;lt;br&amp;gt;&lt;br /&gt;
* [mailto:carlos_olivo@msn.com carlos_olivo@msn.com]&amp;lt;br&amp;gt;&lt;br /&gt;
* AlexD&lt;br /&gt;
* Alexs_Steel[mailto:alexTO123@hotmail.com]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''¡NO ELIMINES CONTENIDO SIN AUTORIZACIÓN!'''&amp;lt;br&amp;gt; Tampoco uses modismos, usa el Castellano (Internacional), y trata de que al traducir todo quede tan claro como puedas, y la ortografía sea la mejor posible.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |&lt;br /&gt;
|}&lt;br /&gt;
{{Languages list|es}}&lt;/div&gt;</summary>
		<author><name>Kevin Gross</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=ES/Introducci%C3%B3n_a_Lua&amp;diff=38898</id>
		<title>ES/Introducción a Lua</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=ES/Introducci%C3%B3n_a_Lua&amp;diff=38898"/>
		<updated>2014-02-18T16:10:46Z</updated>

		<summary type="html">&lt;p&gt;Kevin Gross: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Los llamados &amp;quot;resources&amp;quot; son fundamentales en MTA. Básicamente consisten en una carpeta o archivo ZIP que contiene una colección archivos, además de un archivo '''meta.xml''' que define qué archivos pertenecen al resource, algunas configuraciones, y otras cosas. Como los programas en un sistema operativo, los resources pueden ser iniciados, detenidos, y reiniciados, y varios pueden funcionar al mismo tiempo.&lt;br /&gt;
&lt;br /&gt;
Todo lo que es la programación ocurre dentro de los resources. Lo que éste haga define si se trata de un modo de juego, un mapa, un script sencillo, u otra cosa. MTA, por defecto, trae ciertos resources que puedes usar opcionalmente en tus modos de juego.&lt;br /&gt;
&lt;br /&gt;
'''Lo primero que debes tener en cuenta al iniciarte en la programacion en LUA, es conseguir un editor que funcione para ello. Esto hace mucho más facil tu trabajo, permitiéndote corregir el sintaxis de las matemáticas, por ejemplo. El equipo de MTA recomienda [http://notepad-plus.sourceforge.net/uk/site.htm Notepad++] y [http://luaedit.sourceforge.net/ LuaEdit].'''&lt;br /&gt;
&lt;br /&gt;
'''También en cuanto a Tutoriales, puedes guiarte de estos: [http://forum.mtasa.com/viewtopic.php?f=145&amp;amp;t=70852 Scripteando Cosas Básicas] .'''&lt;br /&gt;
&lt;br /&gt;
==Creando un script funcional==&lt;br /&gt;
Primero, aprenderemos a hacer un script que permita al jugador caminar libremente por la ciudad. Esto lo explicaremos paso a paso.&lt;br /&gt;
&lt;br /&gt;
===Estructura de un script y ubicación del mismo===&lt;br /&gt;
Dirijámonos a la carpeta raíz de tu servidor para MTA (por defecto es ''C:\Archivos de Programa\Multi Theft Auto\server''). Después vamos a la siguiente ubicación:&lt;br /&gt;
&lt;br /&gt;
	\server\mods\deathmatch\resources\&lt;br /&gt;
&lt;br /&gt;
Verás muchos archivos ZIP. Como mencioné antes, estos ZIP son los resources, que vienen por defecto con MTA. Para crear tu propio resource, añade una carpeta a esta ubicación, y dale un nombre. Recomiendo que, al ser tu primer script, sigas las instrucciones al pie de la letra, y a esta carpeta la llames &amp;quot;myserver&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Ahora, entremos a la ubicación: &lt;br /&gt;
&lt;br /&gt;
	\resources\myserver\&lt;br /&gt;
&lt;br /&gt;
===Identificando tu resource===&lt;br /&gt;
Como mencioné antes, todo resource tiene un archivo que define el tipo, los archivos, y las configuraciones del resource, es el ''meta.xml''. Siempre debe estar dentro de cada resource, de otra forma éste no funciona. Así que creemos un archivo de texto, y llamémoslo &amp;quot;meta.xml&amp;quot; (sin las comillas). Luego abrámoslo con el Bloc de Notas, o con Microsoft Wordpad.&lt;br /&gt;
&lt;br /&gt;
Una vez dentro de este archivo, agregaremos el siguiente código:&lt;br /&gt;
&lt;br /&gt;
&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 author=&amp;quot;TuNombre&amp;quot; type=&amp;quot;gamemode&amp;quot; name=&amp;quot;Mi Servidor&amp;quot; description=&amp;quot;Mi primer servidor de MTA DM&amp;quot; /&amp;gt;&lt;br /&gt;
     &amp;lt;script src=&amp;quot;script.lua&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/meta&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
En la etiqueta ''&amp;lt;info /&amp;gt;'' hay un campo &amp;quot;type&amp;quot;. Éste indica el tipo de resource, que siendo &amp;quot;gamemode&amp;quot; en este caso, define que es un modo de juego. Nótese que cuando es otro tipo de resource, el valor &amp;quot;type&amp;quot; cambia. Pero eso lo veremos luego. Por ahora, un modo de juego es lo que necesitas para comenzar un servidor.&lt;br /&gt;
&lt;br /&gt;
La etiqueta ''&amp;lt;script /&amp;gt;'' indica el script que tendrá nuestro modo de juego. A continuación, cómo crearlo.&lt;br /&gt;
&lt;br /&gt;
===Creando un script simple===&lt;br /&gt;
Nótese que en la etiqueta ''&amp;lt;script /&amp;gt;'', el archivo Lua no está en otro directorio, como por ejemplo ''myserver\script.lua''. Esto es porque el archivo LUA del que hablamos será creado en el mismo lugar en el que el archivo ''meta.xml''. Bueno, ahora creamos en &amp;quot;myserver&amp;quot;, otro archivo de texto, y lo llamamos &amp;quot;script.lua&amp;quot;. Abrámoslo y agreguemos estas líneas:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function manejadorDeInicio()&lt;br /&gt;
	local x = 1959.55&lt;br /&gt;
	local y = -1714.46&lt;br /&gt;
	local z = 10&lt;br /&gt;
	spawnPlayer(source, x, y, z)&lt;br /&gt;
	fadeCamera(source, true)&lt;br /&gt;
	setCameraTarget(source, source)&lt;br /&gt;
	outputChatBox(&amp;quot;Bienvenido a Mi Servidor&amp;quot;, source)&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onPlayerJoin&amp;quot;, getRootElement(), manejadorDeInicio)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Este script inicia a tu jugador en las coordenadas &amp;quot;x&amp;quot;, &amp;quot;y&amp;quot; y &amp;quot;z&amp;quot; (spawnPlayer) cuando entras al servidor. OJO: ¡La función ''fadeCamera'' siempre debe ser usada cuando inicias al jugador, de otra forma, la pantalla quedará en negro!. Lo mismo pasa con la función ''setCameraTarget''; si no la usas, el jugador no podrá verse a sí mismo, si no que mirará al cielo infinito.&lt;br /&gt;
&lt;br /&gt;
La variable '''source''' indica qué fue lo que ocasionó al evento. Como el evento ''onPlayerJoin'' significa ''alIniciarJugador'', lógico que lo que ocasione a este evento sea el jugador. Así, evitaremos iniciar a cualquier jugador.&lt;br /&gt;
&lt;br /&gt;
Ahora, dirigiéndonos a [[addEventHandler]], podrás ver que posee 3 cosas: ''onPlayerJoin'' (el nombre del evento), ''getRootElement()'' (que indica por qué o quién será iniciado el evento, ya que ''getRootElement()'' significa &amp;quot;todo&amp;quot;), y ''joinHandler'', que es el nombre de la función a ejecutar cuando el evento sea activado.&lt;br /&gt;
&lt;br /&gt;
Con esto, deberías poder comenzar a jugar. Pero faltan algunos detalles... ¡Sigamos!&lt;br /&gt;
&lt;br /&gt;
===Corriendo el script===&lt;br /&gt;
Para que tu servidor local sea iniciado, debes ir a la carpeta raíz de tu servidor (recuerda cuando fuimos a los resources, 2 puestos encima). Una vez que lo inicies, aparecerá una consola con una serie de datos; recuerda el número del puerto, porque lo necesitarás para jugar. Cuando aparezca un mensaje que diga &amp;quot;Server started and is ready to accept connections!&amp;quot;, sabrás que ya está listo.&lt;br /&gt;
&lt;br /&gt;
Pero antes de jugar, debes iniciar el modo de juego. Escribe &amp;quot;gamemode myserver&amp;quot; en la consola del servidor, y presiona Enter. El servidor emitirá algunos mensajes, e iniciará tu modo de juego, y si algún error surge, nos lo dirá. Bueno, ahora es tiempo de probar el modo de juego. Inicia MTA, y en el menú principal escoge &amp;quot;Quick Connect&amp;quot;. Apareceren 3 campos. En el primero, escribe &amp;quot;localhost&amp;quot;, en el segundo, el número del puerto de tu servidor, y en el tercero, nada, después de todo es la contraseña,y tú no pusiste ninguna. Si todo funciona bien, deberías poder comenzar a jugar en Los Santos.&lt;br /&gt;
&lt;br /&gt;
A continuación, te enseñaremos a crear un comando que permita crear un vehículo a tu lado. Si quieres, puedes saltarte este paso y seguir la programación avanzada con [[Map manager|Map Manager]], que continúa este tutorial. También puedes revisar [[Introduction to Scripting GUI| Introducción a la Programación del GUI]], en el que te enseñaremos a diseñar la Interfaz Gráfica de Usuario (GUI en inglés, por ''Graphical User Interface'').&lt;br /&gt;
&lt;br /&gt;
==Creando un Comando==&lt;br /&gt;
Volvamos a ''script.lua''. Como dije hace un momento, crearemos un comando que permita crear un vehículo a tu lado. Primero, necesitaremos crear una función a la que llamar, y un manejador de comandos que cree el comando buscado.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- Aquí creamos la función que llama el manejador, con los argumentos &amp;quot;elJugador&amp;quot;, &amp;quot;nombreDelComando&amp;quot;, &amp;quot;modeloDeVehiculo&amp;quot;:&lt;br /&gt;
function crearVehículoParaJugador(elJugador, nombreDelComando, modeloDeVehículo)&lt;br /&gt;
   -- Crear el vehículo y otros.&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Aquí creamos el manejador de comandos:&lt;br /&gt;
addCommandHandler(&amp;quot;crearvehiculo&amp;quot;, crearVehículoParaJugador)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Nota:''' ''Los nombres de las funciones tienen enlaces que te llevan a la '''documentación''' de ellas.''&lt;br /&gt;
&lt;br /&gt;
====Acerca de los manejadores de comandos====&lt;br /&gt;
El primer argumento de ''addCommandHandler'' es el nombre del comando que el jugador podrá ingresar, y el segundo es la función que ejecutará en el momento de ingreso del comando (en este caso ''crearVehiculoParaJugador''). &lt;br /&gt;
&lt;br /&gt;
Si tienes alguna experiencia con la programación en C o algún lenguaje parecido, sabrás que las funciones se ejecutan de la forma:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
nombreDeFunción(argumento1, argumento2, argumento3, ..)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
nombreDeFunción(elJugador, nombreDelComando, argumento3, ..)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Fijémonos bien en esto. Vemos que ''argumento1'' es ''elJugador'' y ''argumento2'' es ''nombreDelComando''. ''elJugador'' representa al jugador que haya ingresado el comando, por lo que de la forma que lo llames, esta variable será el jugador. ''nombreDelComando'' es simplemente el nombre del comando (sin la barra &amp;quot;/&amp;quot;), no hay ningún misterio en ello, por lo que si el jugador escribió &amp;quot;/crearvehiculo&amp;quot; entonces esta variable sería &amp;quot;crearvehiculo&amp;quot;. Por último, ''argumento3'' representa una variable más, que estudiaremos más adelante. Nunca olvides que los 2 primeros argumentos son obligatorios y están predefinidos (y debes tenerlos en el orden que se indican), pero puedes llamarlos como sea.&lt;br /&gt;
&lt;br /&gt;
''addCommandHandler'' permite llamar fácilmente a funciones como ''crearVehículoParaJugador'', de forma interna.&lt;br /&gt;
&lt;br /&gt;
Por ejemplo: Alguien entra el comando &amp;quot;/crearvehiculo 468&amp;quot;. El servidor creará el vehículo 468, es decir, la moto Sánchez. Dentro del código, ''addCommandHandler'' llama a la función ''crearVehículoParaJugador'' como si hubiera sido escrito así:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
crearVehículoParaJugador(elJugador,&amp;quot;crearvehiculo&amp;quot;,&amp;quot;468&amp;quot;) -- Recuerda que &amp;quot;elJugador&amp;quot; es el elemento jugador que entró el comando.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Como podemos ver, esto prevée ciertos argumentos que ya hemos mencionado. Pero el más importante es &amp;quot;468&amp;quot;, que es el &amp;quot;argumento3&amp;quot; del que hablábamos más arriba. Éste se refiere al modelo del vehículo. Recuerda que siempre debes definir los primeros 2 parámetros (&amp;quot;elJugador&amp;quot; y &amp;quot;nombreDelComando&amp;quot;), porque de otra forma el comando no funcionará.&lt;br /&gt;
&lt;br /&gt;
'''Nota:''' ''Tienes que poner el manejador de comandos DEBAJO de la función a llamar por el comando. ¡El orden de las ejecuciones es fundamental!''&lt;br /&gt;
&lt;br /&gt;
====Escribiendo la función====&lt;br /&gt;
Para llenar la función que hemos creado, primero hay que plantearse qué se debe hacer:&lt;br /&gt;
* Conseguir la posición del jugador, así sabremos dónde crear el vehículo (queremos que aparezca al lado del jugador).&lt;br /&gt;
* Calcular la posición donde crearemos el vehículo (no queremos que aparezca en el jugador).&lt;br /&gt;
* Crear el vehículo.&lt;br /&gt;
* Revisar si fue creado. Si no, mostrar alguna advertencia o algún mensaje de error.&lt;br /&gt;
&lt;br /&gt;
Para conseguir estos objetivos, debemos usar ciertas funciones, las cuales se pueden ver visitando la [[Scripting Functions| Lista de Funciones de Servidor]]. Primero, una función para conseguir la posición del jugador. Si visitaste la [[ES/Clases MTA| Lista de Clases de MTA]], sabrás que un jugador es un elemento, lo que nos lleva a buscar una '''Función de Elemento''', la cual es ''[[getElementPosition]]''. Haciendo click en ella, visitarás la documentación de ella, que contiene una descripción, el sintaxis (los argumentos necesarios en la función), y, generalmente, un ejemplo de cómo usarla.&lt;br /&gt;
&lt;br /&gt;
Para la función [[getElementPosition]], el sintaxis sería:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
float, float, float getElementPosition ( elemento elElemento )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Los 3 ''float'' que aparecen, son los valores que regresa la función. Estos valores, en español, se llaman '''Número de punto flotante''', y son números que pueden o no, poseer decimales (véase la [[ES/Tipos de Valores| Lista de tipos de valores]]). Como &amp;quot;x&amp;quot;, &amp;quot;y&amp;quot; y &amp;quot;z&amp;quot; son coordenadas, por defecto siempre serán números de punto flotante. Ahora, fijándonos en los paréntesis, notaremos que sólo aparece &amp;quot;elElemento&amp;quot; como argumento de la función. Pues, aplicando la función a un jugador, tendríamos algo como esto:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function crearVehículoParaJugador(elJugador, nombreDelComando, modeloDeVehículo)&lt;br /&gt;
	--[[Aquí conseguiremos la posición del jugador, y la almacenaremos en 3 valores: &amp;quot;x&amp;quot;, &amp;quot;y&amp;quot; y &amp;quot;z&amp;quot;. Nota: &amp;quot;local&amp;quot; significa que las variables indicadas sólo pueden ser usadas en la función actual.]]--&lt;br /&gt;
	local x,y,z = getElementPosition(elJugador)&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Ahora, para crear el vehículo al lado del jugador, debemos modificar alguna coordenada, en este caso, &amp;quot;x&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function crearVehículoParaJugador(elJugador, nombreDelComando, modeloDeVehículo)&lt;br /&gt;
	local x,y,z = getElementPosition(elJugador)&lt;br /&gt;
	x = x + 5 --Agregamos 5 a la posición &amp;quot;X&amp;quot; (¡esto no altera la posición del jugador!)&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Nuevamente, necesitamos otra función para crear el vehículo. Buscándola en la [[Scripting Functions| Lista de Funciones de Servidor]], la encontraremos. Ya que hablamos de vehículo, vamos a la subcategoría tal, en la que encontramos [[createVehicle]]. En esta función, el valor que regresa la función consta de 1 solo argumento (esto es lo más común en las funciones), y es el vehículo creado, o un valor &amp;quot;boolean&amp;quot; (&amp;quot;lógico&amp;quot; en inglés) de tipo &amp;quot;false&amp;quot;, si el vehículo no fue creado.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function crearVehículoParaJugador(elJugador, nombreDelComando, modeloDeVehículo)&lt;br /&gt;
	local x,y,z = getElementPosition(elJugador)&lt;br /&gt;
	x = x + 5&lt;br /&gt;
	local vehículoCreado = createVehicle(tonumber(modeloDeVehículo),x,y,z)&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Nótese que usamos &amp;quot;tonumber(modeloDeVehículo)&amp;quot; en vez de usar directamente &amp;quot;modeloDeVehículo&amp;quot;. Esto es porque cuando entramos un comando, todos los argumentos salen en forma de &amp;quot;string&amp;quot; (&amp;quot;arreglo&amp;quot; en inglés), que es un tipo de valor textual. Por ello, no puede ser usado como número, y la función &amp;quot;tonumber()&amp;quot; nos permite dejarlo como un número.&lt;br /&gt;
&lt;br /&gt;
Bueno, tenemos todo lo necesario para que nuestro script funcione, pero eso no indica que esté listo. Ya tenemos la función para conseguir la posición del jugador, modificarla, y crear el vehículo. Pero nos falta el mensaje. La función para esto se llama ''outputChatBox''. Como dije antes, si el vehículo no fue creado, entonces regresa un valor &amp;quot;false&amp;quot;. Así que creamos nuestra primera condición, en la que si el valor regresado es falso, entonces aparece un mensaje.&lt;br /&gt;
&lt;br /&gt;
Veamos cómo luce el script final:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function crearVehículoParaJugador(elJugador, nombreDelComando, modeloDeVehículo)&lt;br /&gt;
	local x,y,z = getElementPosition(elJugador)&lt;br /&gt;
	x = x + 5&lt;br /&gt;
	local vehículoCreado = createVehicle(tonumber(modeloDeVehículo),x,y,z)&lt;br /&gt;
	if (vehículoCreado == false) then --&amp;quot;if&amp;quot; es la condición, siempre debe ir acompañado de la condición y un &amp;quot;then&amp;quot;.&lt;br /&gt;
		outputChatBox(&amp;quot;Error al crear vehículo.&amp;quot;,elJugador) --Crea un mensaje de error simple en el chat.&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler(&amp;quot;crearvehiculo&amp;quot;, crearVehículoParaJugador) --Y aquí creamos el manejador de comandos.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Nada mal, ¿no? Ya te hemos introducido en la creación de 2 scripts sencillos. Si quieres más programación avanzada, entonces visita el [[Map Manager| Mánager de Mapas]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Lo que necesitas saber==&lt;br /&gt;
Ya has leído un poco sobre resources, manejadores de comandos y funciones de búsqueda en la documentación (en el primer párrafo), pero aún queda mucho por aprender. En esta sección te daremos una vista rápida sobre esto, y si se puede, enlazar a otras páginas útiles.&lt;br /&gt;
&lt;br /&gt;
===Scripts de cliente y servidor===&lt;br /&gt;
Quizás ya has notado los términos Server (o Servidor) y Client (o Cliente) en algún lado, mayormente en conjunción con las funciones. MTA no sólo soporta scripts que funcionan en el servidor y prevén comandos (como el que escribimos arriba) u otras características; también scripts que corren en el cliente (MTA en sí, el software que usas para conectarte a los servidores). Esto se debe a que algunas funciones tienen que estar del lado cliente (como el GUI; Graphical User Interface, Interfaz de Usuario Gráfica), si bien funcionan mejor o porque no se pueden hacer en el servidor.&lt;br /&gt;
&lt;br /&gt;
La mayoría de los scripts que harás (modos de juego y/o mapas) probablemente serán de tipo servidor, como el que escribimos en la primera sección. Si tratas de hacer funcionar algo que no se puede hacer en el servidor, probablemente tendrá que ser de cliente. para un script de cliente, por ejemplo, podrías crear un archivo de Lua ordinario (como ''client.lua'') y especificarlo en el archivo meta.xml, así:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;script src=&amp;quot;client.lua&amp;quot; type=&amp;quot;client&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
El atributo ''type'' por defecto es 'server' (servidor), por lo que no es necesario escribirlo cuando se trata de scripts de servidor. Si quieres, puedes leer más sobre [[ES/Scripts de Cliente|scripts de cliente]].&lt;br /&gt;
&lt;br /&gt;
===Resources más complejos===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
La seccion previa es de como poner scripts de modo clientside, pero hay cosas mas posibles. Como se menciona al principio de este texto, los resources pueden hacer casi cualquier cosa. Su proposito es definido de porque hacen. Veamos unos resources teoricamente, por ver los archivos que tienen, el''meta.xml'' y que podrian hacer:&lt;br /&gt;
&lt;br /&gt;
====Primer Ejemplo - Un script util====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
/admin_commands&lt;br /&gt;
	/meta.xml&lt;br /&gt;
	/commands.lua&lt;br /&gt;
	/client.lua&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&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 author=&amp;quot;AlexD&amp;quot; description=&amp;quot;Comandos de Admin&amp;quot; /&amp;gt;&lt;br /&gt;
	&amp;lt;script src=&amp;quot;commands.lua&amp;quot; /&amp;gt;&lt;br /&gt;
	&amp;lt;script src=&amp;quot;client.lua&amp;quot; type=&amp;quot;client&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/meta&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* El ''commands.lua'' tiene comandos de administrador, como banear a un jugador, mutearlo o cualquier cosa que pueda usar un administrador&lt;br /&gt;
* El ''client.lua'' tiene el GUI para poder ejecutar los comandos sencillamente.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Este ejemplo estaria corriendo todo el tiempo (talvez auto-empezado cuando el servidor empieza) Y es util durante toda la experiencia en el juego y tambien no interfiere con el Juego en general, al menos que un administrador decide de ejecutar algun acto, por supuesto.&lt;br /&gt;
&lt;br /&gt;
====Segundo Ejemplo - Un modo de Juego====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
/counterstrike&lt;br /&gt;
	/meta.xml&lt;br /&gt;
	/counterstrike.lua&lt;br /&gt;
	/buymenu.lua&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&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 author=&amp;quot;AlexD&amp;quot; description=&amp;quot;Recreacion de CounterStrike&amp;quot; type=&amp;quot;gamemode&amp;quot; /&amp;gt;&lt;br /&gt;
	&amp;lt;script src=&amp;quot;counterstrike.lua&amp;quot; /&amp;gt;&lt;br /&gt;
	&amp;lt;script src=&amp;quot;buymenu.lua&amp;quot; type=&amp;quot;client&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/meta&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* El ''counterstrike.lua'' contiene lo similar a las siguientes caracteristicas:&lt;br /&gt;
** Dejar que los jugadores elijan su equipo y aparezcan en el&lt;br /&gt;
** Darles armas, objectivos e instrucciones (talvez leer de un Mapa, vease mas adelante)&lt;br /&gt;
** Definir las reglas del juego, ejemplo: cuando la partida acabe, que pasa cuando un jugador muere&lt;br /&gt;
** .. y talvez algo mas&lt;br /&gt;
* El ''buymenu.lua'' es un script Clientside y crea un menu para comprar armas&lt;br /&gt;
&lt;br /&gt;
Este ejemplo puede ser llamado modo de juego, porque no solo interviene con el juego en general, pero actualmente define las reglas de el. El atributo ''type'' indica que este ejemplo sirve con el  [[Map manager]], si otro resource que fue escrito por el Equipo QA para gestionar modos de juego y carga de mapas. Es altamente recomendado que tu base tus modos de juego en las tecnicas que proporciona.&lt;br /&gt;
&lt;br /&gt;
Esto tambien significa que el modo de juego no cargara sin el mapa. Los modos de juego tienen que ser tan genericos posibles. Un ejemplo de un mapa  es mostrado en el siguiente ejemplo.&lt;br /&gt;
&lt;br /&gt;
====(Falta traducir desde Aqui)====&lt;br /&gt;
&lt;br /&gt;
====Third example - A Map====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
/cs-airport&lt;br /&gt;
	/meta.xml&lt;br /&gt;
	/airport.map&lt;br /&gt;
	/airport.lua&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&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 author=&amp;quot;Someguy&amp;quot; description=&amp;quot;Counterstrike airport map&amp;quot; type=&amp;quot;map&amp;quot; gamemodes=&amp;quot;counterstrike&amp;quot; /&amp;gt;&lt;br /&gt;
	&amp;lt;map src=&amp;quot;airport.map&amp;quot; /&amp;gt;&lt;br /&gt;
	&amp;lt;script src=&amp;quot;airport.lua&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/meta&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The ''airport.map'' in a XML file that provides information about the map to the gamemode, these may include:&lt;br /&gt;
** Where the players should spawn, with what weapons, what teams there are&lt;br /&gt;
** What the targets are&lt;br /&gt;
** Weather, World Time, Timelimit&lt;br /&gt;
** Provide vehicles&lt;br /&gt;
* The ''airport.lua'' might contain map-specific features, that may include:&lt;br /&gt;
** Opening some door/make something explode when something specific happens&lt;br /&gt;
** Create or move some custom objects, or manipulate objects that are created through the .map file&lt;br /&gt;
** .. anything else map-specific you can think of&lt;br /&gt;
&lt;br /&gt;
As you can see, the ''type'' attribute changed to 'map', telling the [[Map manager]] that this resource is a map, while the ''gamemodes'' attribute tells it for which gamemodes this map is valid, in this case the gamemode from the above example.&lt;br /&gt;
What may come as a surprise is that there is also a script in the Map resource. Of course this is not necessarily needed in a map, but opens a wide range of possibilities for map makers to create their own world within the rules of the gamemode they create it for.&lt;br /&gt;
&lt;br /&gt;
The ''airport.map'' file might look similiar to this:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;map mode=&amp;quot;deathmatch&amp;quot; version=&amp;quot;1.0&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;terrorists&amp;gt;&lt;br /&gt;
		&amp;lt;spawnpoint posX=&amp;quot;2332.23&amp;quot; posY=&amp;quot;-12232.33&amp;quot; posZ=&amp;quot;4.42223&amp;quot; skins=&amp;quot;23-40&amp;quot; /&amp;gt;&lt;br /&gt;
	&amp;lt;/terrorists&amp;gt;&lt;br /&gt;
	&amp;lt;counterterrorists&amp;gt;&lt;br /&gt;
		&amp;lt;spawnpoint posX=&amp;quot;2334.23443&amp;quot; posY=&amp;quot;-12300.233&amp;quot; posZ=&amp;quot;10.2344&amp;quot; skins=&amp;quot;40-50&amp;quot; /&amp;gt;&lt;br /&gt;
	&amp;lt;/counterterrorists&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;bomb posX=&amp;quot;23342.23&amp;quot; posY=&amp;quot;&amp;quot; posZ=&amp;quot;&amp;quot; /&amp;gt;&lt;br /&gt;
	&lt;br /&gt;
	&amp;lt;vehicle posX=&amp;quot;&amp;quot; posY=&amp;quot;&amp;quot; posZ=&amp;quot;&amp;quot; model=&amp;quot;602&amp;quot; /&amp;gt;	&lt;br /&gt;
	&amp;lt;vehicle posX=&amp;quot;&amp;quot; posY=&amp;quot;&amp;quot; posZ=&amp;quot;&amp;quot; model=&amp;quot;603&amp;quot; /&amp;gt;	&lt;br /&gt;
&amp;lt;/map&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When a gamemode is started with a map, the map resources is automatically started by the mapmanager and the information it contains can be read by the gamemode resource. When the map changes, the current map resource is stopped and the next map resource is started. For a more in-depth explanation and examples of how map resources are utilized in the main script, please visit the [[Writing Gamemodes]] page.&lt;br /&gt;
&lt;br /&gt;
===Eventos===&lt;br /&gt;
Los eventos son la manera en la cual MTA le informa a los scripts cuando las cosas estan ocurriendo. Por ejemplo cuando un jugador muere, el evento [[onPlayerWasted]] es llamado. De manera de realizar cualquier accion cuando un jugador muere, tienes que prepararlo tu mismo, de manera similar a como cuando añades un command handler en[[#Writing_the_script|el primer capitulo]].&lt;br /&gt;
&lt;br /&gt;
Este ejemplo mostrara un mensaje con el nombre del jugador que murió.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function playerDied(totalAmmo, killer, killerWeapon, bodypart)&lt;br /&gt;
	outputChatBox(getPlayerName(source)..&amp;quot; died!&amp;quot;)&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onPlayerWasted&amp;quot;,getRootElement(),playerDied)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Instead of showing what arguments are needed, the documentation page for Events shows what parameters are passed to the handler function, similiar to the way a [[#About_command_handlers|command handler]] does, just that it is different from event to event. Another important point is the ''source'' variable, that exists in handler functions. It doesn't have to be added to the parameter list of the function, but it still exists. It has a different value from event to event, for player events (as in the example above) it is the player element. As another example, you can take a look at the basic spawning player script in the first section to get an idea how ''source'' is used.&lt;br /&gt;
&lt;br /&gt;
==¿Y ahora qué?==&lt;br /&gt;
Deberías ya estar familiarizado con los aspectos básicos de los scripts de MTA, así como con la documentación. La [[ES/Pagina Principal|Página Principal]] te provee de enlaces con mayor información, así como tutoriales y Referencias que permiten una vista más profunda a los temas que te interesan.&lt;br /&gt;
&lt;br /&gt;
Recomendamos que leas el tutorial de [[debugging|debug]] (encuentro de errores). Es necesaria una buena habilidad con el &amp;quot;debug&amp;quot; cuando haces scripts. ¡Suerte en MTA!&lt;br /&gt;
&lt;br /&gt;
==Traductores==&lt;br /&gt;
&lt;br /&gt;
*Benxamix2/The Kid&lt;br /&gt;
[[en:Scripting Introduction]]&lt;br /&gt;
[[it:Introduzione allo scripting]]&lt;br /&gt;
[[nl:Scripting_introductie]]&lt;br /&gt;
[[pt-br:Introdução ao Scripting]]&lt;br /&gt;
[[ru:Scripting Introduction]]&lt;br /&gt;
&lt;br /&gt;
*AlexD&lt;br /&gt;
[[en:Scripting Introduction]]&lt;br /&gt;
[[it:Introduzione allo scripting]]&lt;br /&gt;
[[nl:Scripting_introductie]]&lt;br /&gt;
[[pt-br:Introdução ao Scripting]]&lt;br /&gt;
[[ru:Scripting Introduction]]&lt;/div&gt;</summary>
		<author><name>Kevin Gross</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=DxSetTestMode&amp;diff=38792</id>
		<title>DxSetTestMode</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=DxSetTestMode&amp;diff=38792"/>
		<updated>2014-02-02T09:57:55Z</updated>

		<summary type="html">&lt;p&gt;Kevin Gross: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Client function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function is used for testing scripts written using [[guiCreateFont]], [[dxCreateFont]], [[dxCreateShader]] and [[dxCreateRenderTarget]]&lt;br /&gt;
&lt;br /&gt;
Each one of the 3 test modes should be used in turn to help highlight any potential problems.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool dxSetTestMode ( string testMode )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''testMode :''' The test mode to be set. It can be one of the following values:&lt;br /&gt;
**'''none :''' Test mode disabled&lt;br /&gt;
**'''no_mem:''' Simulate no free video memory available for MTA.&lt;br /&gt;
**'''low_mem:''' Simulate little free video memory available for MTA.&lt;br /&gt;
**'''no_shader:''' Simulate shaders failing validation.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the test mode was successfully set, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
&amp;lt;section name=&amp;quot;Client&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
--Use /setmode [PARAM] to test.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function testmode(cmd,param)&lt;br /&gt;
if param  then&lt;br /&gt;
local value = tostring(param)&lt;br /&gt;
dxSetTestMode(value)&lt;br /&gt;
end&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler(&amp;quot;setmode&amp;quot;,testmode)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
''Example by .:CiBeR:.''&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Drawing_functions}}&lt;/div&gt;</summary>
		<author><name>Kevin Gross</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=DxDrawAnimWindow&amp;diff=37994</id>
		<title>DxDrawAnimWindow</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=DxDrawAnimWindow&amp;diff=37994"/>
		<updated>2013-12-23T00:53:11Z</updated>

		<summary type="html">&lt;p&gt;Kevin Gross: /* Use */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Useful Function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function is for creating and animating a dX Window.&lt;br /&gt;
* '''NOTE:''' This is made to be used clientside!.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;bool dxDrawAnimWindow ( string text, int height, int width, int color, string element font, string anim)&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
* '''text:''' The text of the window&lt;br /&gt;
* '''height:''' The height of the window&lt;br /&gt;
* '''width:''' The width of the window&lt;br /&gt;
* '''color:''' The color of the window&lt;br /&gt;
* '''font:''' A element or string representing the font.&lt;br /&gt;
* '''anim:''' The easing or animation type. See https://wiki.multitheftauto.com/wiki/Easing] For more Types-&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Clientside script&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function dxDrawAnimWindow(text,height,width,color,font,anim)&lt;br /&gt;
    local x,y = guiGetScreenSize()&lt;br /&gt;
 &lt;br /&gt;
    btwidth = width&lt;br /&gt;
    btheight = height/20&lt;br /&gt;
 &lt;br /&gt;
    local now = getTickCount()&lt;br /&gt;
    local elapsedTime = now - start&lt;br /&gt;
    local endTime = start + 1500&lt;br /&gt;
    local duration = endTime - start&lt;br /&gt;
    local progress = elapsedTime / duration&lt;br /&gt;
    local x1, y1, z1 = interpolateBetween ( 0, 0, 0, width, height, 255, progress, anim)&lt;br /&gt;
    local x2, y2, z2 = interpolateBetween ( 0, 0, 0, btwidth, btheight, btheight/11, progress, anim)&lt;br /&gt;
 &lt;br /&gt;
    posx = (x/2)-(x1/2)&lt;br /&gt;
    posy = (y/2)-(y1/2)&lt;br /&gt;
 &lt;br /&gt;
    dxDrawRectangle ( posx, posy-y2, x2, y2, color )&lt;br /&gt;
    dxDrawRectangle ( posx, posy, x1, y1, tocolor ( 0, 0, 0, 200 ) )&lt;br /&gt;
    dxDrawText ( text, 0, -(y1)-y2, x, y, tocolor ( 255, 255, 255, 255 ), z2,font,&amp;quot;center&amp;quot;,&amp;quot;center&amp;quot;)   &lt;br /&gt;
 &lt;br /&gt;
 &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;
==Use==&lt;br /&gt;
Always remeber to define the &amp;quot;start&amp;quot; value with getTickCount() and use onClientRender or onClientPreRender&lt;br /&gt;
&amp;lt;section name=&amp;quot;Clientside example&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bindKey ( &amp;quot;F2&amp;quot;, &amp;quot;down&amp;quot;, main )&lt;br /&gt;
function main()&lt;br /&gt;
start = getTickCount()&lt;br /&gt;
addEventHandler ( &amp;quot;onClientRender&amp;quot;, getRootElement(), content )&lt;br /&gt;
end&lt;br /&gt;
function content()&lt;br /&gt;
local color = tocolor ( 0, 0, 0, 200 )&lt;br /&gt;
dxDrawAnimWindow ( &amp;quot;My Animated Window&amp;quot;, 520, 600, color, &amp;quot;default-bold&amp;quot;, &amp;quot;OutBounce&amp;quot;)&lt;br /&gt;
end&lt;br /&gt;
--Script NOT TESTED&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Author: Bc#&lt;br /&gt;
 // Added to Wiki By: CiBeR~&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Useful_Functions}}&lt;/div&gt;</summary>
		<author><name>Kevin Gross</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=DxDrawAnimWindow&amp;diff=37993</id>
		<title>DxDrawAnimWindow</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=DxDrawAnimWindow&amp;diff=37993"/>
		<updated>2013-12-23T00:45:51Z</updated>

		<summary type="html">&lt;p&gt;Kevin Gross: /* Use */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Useful Function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function is for creating and animating a dX Window.&lt;br /&gt;
* '''NOTE:''' This is made to be used clientside!.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;bool dxDrawAnimWindow ( string text, int height, int width, int color, string element font, string anim)&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
* '''text:''' The text of the window&lt;br /&gt;
* '''height:''' The height of the window&lt;br /&gt;
* '''width:''' The width of the window&lt;br /&gt;
* '''color:''' The color of the window&lt;br /&gt;
* '''font:''' A element or string representing the font.&lt;br /&gt;
* '''anim:''' The easing or animation type. See https://wiki.multitheftauto.com/wiki/Easing] For more Types-&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Clientside script&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function dxDrawAnimWindow(text,height,width,color,font,anim)&lt;br /&gt;
    local x,y = guiGetScreenSize()&lt;br /&gt;
 &lt;br /&gt;
    btwidth = width&lt;br /&gt;
    btheight = height/20&lt;br /&gt;
 &lt;br /&gt;
    local now = getTickCount()&lt;br /&gt;
    local elapsedTime = now - start&lt;br /&gt;
    local endTime = start + 1500&lt;br /&gt;
    local duration = endTime - start&lt;br /&gt;
    local progress = elapsedTime / duration&lt;br /&gt;
    local x1, y1, z1 = interpolateBetween ( 0, 0, 0, width, height, 255, progress, anim)&lt;br /&gt;
    local x2, y2, z2 = interpolateBetween ( 0, 0, 0, btwidth, btheight, btheight/11, progress, anim)&lt;br /&gt;
 &lt;br /&gt;
    posx = (x/2)-(x1/2)&lt;br /&gt;
    posy = (y/2)-(y1/2)&lt;br /&gt;
 &lt;br /&gt;
    dxDrawRectangle ( posx, posy-y2, x2, y2, color )&lt;br /&gt;
    dxDrawRectangle ( posx, posy, x1, y1, tocolor ( 0, 0, 0, 200 ) )&lt;br /&gt;
    dxDrawText ( text, 0, -(y1)-y2, x, y, tocolor ( 255, 255, 255, 255 ), z2,font,&amp;quot;center&amp;quot;,&amp;quot;center&amp;quot;)   &lt;br /&gt;
 &lt;br /&gt;
 &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;
==Use==&lt;br /&gt;
Always remeber to define the &amp;quot;start&amp;quot; value with getTickCount() and use onClientRender or onClientPreRender&lt;br /&gt;
&amp;lt;section name=&amp;quot;Clientside example&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
--Example Needed &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Author: Bc#&lt;br /&gt;
 // Added to Wiki By: CiBeR~&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Useful_Functions}}&lt;/div&gt;</summary>
		<author><name>Kevin Gross</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=DxDrawAnimWindow&amp;diff=37992</id>
		<title>DxDrawAnimWindow</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=DxDrawAnimWindow&amp;diff=37992"/>
		<updated>2013-12-23T00:43:15Z</updated>

		<summary type="html">&lt;p&gt;Kevin Gross: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Useful Function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function is for creating and animating a dX Window.&lt;br /&gt;
* '''NOTE:''' This is made to be used clientside!.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;bool dxDrawAnimWindow ( string text, int height, int width, int color, string element font, string anim)&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
* '''text:''' The text of the window&lt;br /&gt;
* '''height:''' The height of the window&lt;br /&gt;
* '''width:''' The width of the window&lt;br /&gt;
* '''color:''' The color of the window&lt;br /&gt;
* '''font:''' A element or string representing the font.&lt;br /&gt;
* '''anim:''' The easing or animation type. See https://wiki.multitheftauto.com/wiki/Easing] For more Types-&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Clientside script&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function dxDrawAnimWindow(text,height,width,color,font,anim)&lt;br /&gt;
    local x,y = guiGetScreenSize()&lt;br /&gt;
 &lt;br /&gt;
    btwidth = width&lt;br /&gt;
    btheight = height/20&lt;br /&gt;
 &lt;br /&gt;
    local now = getTickCount()&lt;br /&gt;
    local elapsedTime = now - start&lt;br /&gt;
    local endTime = start + 1500&lt;br /&gt;
    local duration = endTime - start&lt;br /&gt;
    local progress = elapsedTime / duration&lt;br /&gt;
    local x1, y1, z1 = interpolateBetween ( 0, 0, 0, width, height, 255, progress, anim)&lt;br /&gt;
    local x2, y2, z2 = interpolateBetween ( 0, 0, 0, btwidth, btheight, btheight/11, progress, anim)&lt;br /&gt;
 &lt;br /&gt;
    posx = (x/2)-(x1/2)&lt;br /&gt;
    posy = (y/2)-(y1/2)&lt;br /&gt;
 &lt;br /&gt;
    dxDrawRectangle ( posx, posy-y2, x2, y2, color )&lt;br /&gt;
    dxDrawRectangle ( posx, posy, x1, y1, tocolor ( 0, 0, 0, 200 ) )&lt;br /&gt;
    dxDrawText ( text, 0, -(y1)-y2, x, y, tocolor ( 255, 255, 255, 255 ), z2,font,&amp;quot;center&amp;quot;,&amp;quot;center&amp;quot;)   &lt;br /&gt;
 &lt;br /&gt;
 &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;
==Use==&lt;br /&gt;
Always remeber to define the &amp;quot;start&amp;quot; value with getTickCount()&lt;br /&gt;
&amp;lt;section name=&amp;quot;Clientside example&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
--Example Needed &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Author: Bc#&lt;br /&gt;
 // Added to Wiki By: CiBeR~&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Useful_Functions}}&lt;/div&gt;</summary>
		<author><name>Kevin Gross</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=DxDrawAnimWindow&amp;diff=37991</id>
		<title>DxDrawAnimWindow</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=DxDrawAnimWindow&amp;diff=37991"/>
		<updated>2013-12-23T00:40:17Z</updated>

		<summary type="html">&lt;p&gt;Kevin Gross: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Useful Function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function is for creating and animating a dX Window.&lt;br /&gt;
* '''NOTE:''' This is made to be used clientside!.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;bool dxDrawAnimWindow ( string text, int alto, int ancho, int color, string element font, string anim)&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
* '''text:''' The text of the window&lt;br /&gt;
* '''alto:''' The height of the window&lt;br /&gt;
* '''ancho:''' The width of the window&lt;br /&gt;
* '''color:''' The color of the window&lt;br /&gt;
* '''font:''' A element or string representing the font.&lt;br /&gt;
* '''anim:''' The easing or animation type. See https://wiki.multitheftauto.com/wiki/Easing] For more Types-&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Clientside script&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function dxDrawAnimWindow(text,alto,ancho,color,font,anim)&lt;br /&gt;
    local x,y = guiGetScreenSize()&lt;br /&gt;
 &lt;br /&gt;
    btAncho = ancho&lt;br /&gt;
    btAlto = alto/20&lt;br /&gt;
 &lt;br /&gt;
    local now = getTickCount()&lt;br /&gt;
    local elapsedTime = now - start&lt;br /&gt;
    local endTime = start + 1500&lt;br /&gt;
    local duration = endTime - start&lt;br /&gt;
    local progress = elapsedTime / duration&lt;br /&gt;
    local x1, y1, z1 = interpolateBetween ( 0, 0, 0, ancho, alto, 255, progress, anim)&lt;br /&gt;
    local x2, y2, z2 = interpolateBetween ( 0, 0, 0, btAncho, btAlto, btAlto/11, progress, anim)&lt;br /&gt;
 &lt;br /&gt;
    posx = (x/2)-(x1/2)&lt;br /&gt;
    posy = (y/2)-(y1/2)&lt;br /&gt;
 &lt;br /&gt;
    dxDrawRectangle ( posx, posy-y2, x2, y2, color )&lt;br /&gt;
    dxDrawRectangle ( posx, posy, x1, y1, tocolor ( 0, 0, 0, 200 ) )&lt;br /&gt;
    dxDrawText ( text, 0, -(y1)-y2, x, y, tocolor ( 255, 255, 255, 255 ), z2,font,&amp;quot;center&amp;quot;,&amp;quot;center&amp;quot;)   &lt;br /&gt;
   &lt;br /&gt;
 &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;
==Use==&lt;br /&gt;
Always remeber to define the &amp;quot;start&amp;quot; value with getTickCount()&lt;br /&gt;
&amp;lt;section name=&amp;quot;Clientside example&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
--Example Needed &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Author: Bc#&lt;br /&gt;
 // Added to Wiki By: CiBeR~&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Useful_Functions}}&lt;/div&gt;</summary>
		<author><name>Kevin Gross</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=DxDrawAnimWindow&amp;diff=37990</id>
		<title>DxDrawAnimWindow</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=DxDrawAnimWindow&amp;diff=37990"/>
		<updated>2013-12-23T00:36:26Z</updated>

		<summary type="html">&lt;p&gt;Kevin Gross: /* Use */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Useful Function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function is for creating and animating a dX Window.&lt;br /&gt;
* '''NOTE:''' This is made to be used clientside!.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;bool dxDrawAnimWindow ( string text, int alto, int ancho, int color, string element font, string anim)&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
* '''text:''' The text of the window&lt;br /&gt;
* '''alto:''' The height of the window&lt;br /&gt;
* '''ancho:''' The width of the window&lt;br /&gt;
* '''color:''' The color of the window&lt;br /&gt;
* '''font:''' A element or string representing the font.&lt;br /&gt;
* '''anim:''' The easing or animation type. See https://wiki.multitheftauto.com/wiki/Easing] For more Types-&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Clientside script&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function dxDrawAnimWindow(text,alto,ancho,color,font,anim)&lt;br /&gt;
    local x,y = guiGetScreenSize()&lt;br /&gt;
 &lt;br /&gt;
    btAncho = ancho&lt;br /&gt;
    btAlto = alto/20&lt;br /&gt;
 &lt;br /&gt;
    local now = getTickCount()&lt;br /&gt;
    local elapsedTime = now - start&lt;br /&gt;
    local endTime = start + 1500&lt;br /&gt;
    local duration = endTime - start&lt;br /&gt;
    local progress = elapsedTime / duration&lt;br /&gt;
    local x1, y1, z1 = interpolateBetween ( 0, 0, 0, ancho, alto, 255, progress, anim)&lt;br /&gt;
    local x2, y2, z2 = interpolateBetween ( 0, 0, 0, btAncho, btAlto, btAlto/11, progress, anim)&lt;br /&gt;
 &lt;br /&gt;
    posx = (x/2)-(x1/2)&lt;br /&gt;
    posy = (y/2)-(y1/2)&lt;br /&gt;
 &lt;br /&gt;
    dxDrawRectangle ( posx, posy-y2, x2, y2, color )&lt;br /&gt;
    dxDrawRectangle ( posx, posy, x1, y1, tocolor ( 0, 0, 0, 200 ) )&lt;br /&gt;
    dxDrawText ( text, 0, -(y1)-y2, x, y, tocolor ( 255, 255, 255, 255 ), z2,font,&amp;quot;center&amp;quot;,&amp;quot;center&amp;quot;)   &lt;br /&gt;
   &lt;br /&gt;
 &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;
==Use==&lt;br /&gt;
Always remeber to define the &amp;quot;start&amp;quot; value with getTickCount()&lt;br /&gt;
&amp;lt;section name=&amp;quot;Clientside example&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
--Example Needed &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Author: Bc#&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Useful_Functions}}&lt;/div&gt;</summary>
		<author><name>Kevin Gross</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Template:Useful_Functions&amp;diff=37989</id>
		<title>Template:Useful Functions</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Template:Useful_Functions&amp;diff=37989"/>
		<updated>2013-12-23T00:34:43Z</updated>

		<summary type="html">&lt;p&gt;Kevin Gross: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;*[[callClientFunction]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to call any clientside function from the server's side.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[callServerFunction]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to call any server-side function from the client's side.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[centerWindow]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function center the window in any resolution.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[Check]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks if it's arguments are of the right types and calls the error-function if one isn't.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[convertNumber]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function converts large numbers and adds commas to it. (Example: 100000 -&amp;gt; 100,000)&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[coroutine.resume]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» Fix for hidden coroutine error messages&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawAnimWindow]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» Create Animated Dx Window&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawCircle]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function draws a 2D line in a circle shape on the screen.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawColorText]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function draws a dx text with #RRGGBB color codes support.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawGifImage]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function simulates the effect of a GIF image by using image sprites.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawImage3D]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function draws a 3D image.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawPartialCircle]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function draws a 2D line in a partial circle shape on the screen.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawRectangle3D]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function draws a 3D rectangle.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxGetFontSizeFromHeight]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function calculate a font size from given height for dxDraw.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxGetRealFontHeight]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» Accurately measures the pixel height of a font.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[findRotation]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» Takes two points and returns the direction from point A to point B.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[FormatDate]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» Formats a date on the basis of a format string and returns it.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[GenerateString]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» With this function you can generate a random string with any characters.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getAge]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function calculates the age of a birthday.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getAlivePlayers (Client)|getAlivePlayers]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns all the alive players by a client side, so you can store them into a Gridlist or something like that, faster.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getAlivePlayersInTeam]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table of the alive players in a team.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getBoundControls]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a list of control names that are bound to the specified key.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getCursorMoveOn]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks in which way the cursor is currently moving.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getDistanceBetweenPointAndSegment2D]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» Takes point coordinates and line (a segment) starting and ending coordinates. It returns the shortest distance between the point and the line.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getElementSpeed]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to get element speed in kph or mph units.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getElementsInDimension]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function gets the elements that are in the specified dimension.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getElementsWithinMarker]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function gets the elements that are in a markers colshape.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getJetpackWeaponsEnabled]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table of enabled weapons usable on a jetpack.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getOffsetFromXYZ]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to take an entity and a position and calculate the relative offset between them accounting for rotations.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getOnlineAdmins]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function will give the online admins.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getOnlineStaff]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» Returns all online staff, names separated by two spaces.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPlayersByData]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function gets players who have data name you passed to it.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPlayerFromNamePart]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to get player From his Name part.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPlayersInPhotograph]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function gets all the players in a photograph.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPlayerFromSerial]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function gets an online player from their serial.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPointFromDistanceRotation]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» Finds a point based on a starting point, direction and distance.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getResourceSettings]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table of the resource settings.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getRGColorFromPercentage]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia', sans-serif; font-size:smaller;&amp;quot;&amp;gt;»This function returns two integers representing Red and Green colors according to the percentage requested.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getTeamFromColor]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function gets a team from it's color. (Related to: [[getTeamFromName]])&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getTimestamp]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» With this function you can get the UNIX timestamp.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getValidVehicleModels]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table containing valid MTA Vehicle models.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getXMLNodes]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» Returns all children of a node&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getVehicleRespawnPosition]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to get the spawn position of a vehicle.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[guiComboBoxAdjustHeight]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» Adjusts the combobox to have a correct height.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[IfElse]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» Returns one of two values based on a boolean expression.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isElementInPhotograph]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks if an element was in the player's camera picture.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isElementInRange]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to check is the element's range to the main point is smaller than (or as big as) the maximum range.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isElementMoving]]&amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks if an element is moving.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isElementWithinAColShape]]&amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks if the [[element]] is in a [[colshape]].&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isPedAiming]]&amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks if a ped is aiming.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isPlayerInACL]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function will check to see if a player element is in an ACL group.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isPlayerInTeam]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function check if the player in the team.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isLeapYear]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» Checks if the given year is a leap year.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isVehicleOnRoof]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks whether vehicle is on roof.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isVehicleEmpty]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks whether a vehicle is empty.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[iterElements]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» Returns an iterator for your for loops saving time typing ipairs( getElementsByType( type ) ), instead you type: iterElements( type ).&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[mathNumber]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function is a workaround for the clientside floating-point precision of 24-bits&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[math.round]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» Rounds a number whereas the number of decimals to keep and the method may be set.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[multi_check]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks one element to many, handy and clean.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[onVehicleWeaponFire]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This code implements an event that is triggered when a player in a vehicle fires a vehicles weapon.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[RGBToHex]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a string representing the color in hexadecimal.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[setElementSpeed]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to set moving element speed in kph or mph units.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[setTableProtected]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» Protects a table and makes it read-only.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[setVehicleGravityPoint]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This clientside function sets a vehicle's gravity in the direction of a 3 dimensional coordinate with the strength specified.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[smoothMoveCamera]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This clientside function allows you to create a cinematic camera flight.&lt;br /&gt;
*[[string.count]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function counts a text from a text.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[string.explode]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function splits a string at a given separator pattern and returns a table with the pieces.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[switch]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allow the value of a variable or expression to control the flow of program execution via a multiway branch.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[table.copy]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function copies a whole table and all the tables in that table.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[table.compare]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function check if both tables is equal. &amp;lt;/span&amp;gt;&lt;br /&gt;
*[[table.empty]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function check is empty table or not.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[table.map]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function goes through a table and replaces every field with the return of the passed function, where the field's value is passed as first argument and optionally more arguments.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[table.merge]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» Merges two or more tables in the first.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[table.random]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function retrieves a random variable from a table.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[table.size]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» Finds the absolute size of a table.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[toHex]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function converts a decimal number to a hexadecimal number, as a fix to be used clientside.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[var dump]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function outputs information about one or more variables using outputConsole()&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[wavelengthToRGBA]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function converts a phisical wavelength of light to a RGBA color.&amp;lt;/span&amp;gt;&lt;br /&gt;
[[Category:Useful Functions]]&lt;/div&gt;</summary>
		<author><name>Kevin Gross</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=DxDrawAnimWindow&amp;diff=37986</id>
		<title>DxDrawAnimWindow</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=DxDrawAnimWindow&amp;diff=37986"/>
		<updated>2013-12-22T18:09:55Z</updated>

		<summary type="html">&lt;p&gt;Kevin Gross: /* Use */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Useful Function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function is for creating and animating a dX Window.&lt;br /&gt;
* '''NOTE:''' This is made to be used clientside!.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;bool dxDrawAnimWindow ( string text, int alto, int ancho, int color, string element font, string anim)&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
* '''text:''' The text of the window&lt;br /&gt;
* '''alto:''' The height of the window&lt;br /&gt;
* '''ancho:''' The width of the window&lt;br /&gt;
* '''color:''' The color of the window&lt;br /&gt;
* '''font:''' A element or string representing the font.&lt;br /&gt;
* '''anim:''' The easing or animation type. See https://wiki.multitheftauto.com/wiki/Easing] For more Types-&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Clientside script&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function dxDrawAnimWindow(text,alto,ancho,color,font,anim)&lt;br /&gt;
    local x,y = guiGetScreenSize()&lt;br /&gt;
 &lt;br /&gt;
    btAncho = ancho&lt;br /&gt;
    btAlto = alto/20&lt;br /&gt;
 &lt;br /&gt;
    local now = getTickCount()&lt;br /&gt;
    local elapsedTime = now - start&lt;br /&gt;
    local endTime = start + 1500&lt;br /&gt;
    local duration = endTime - start&lt;br /&gt;
    local progress = elapsedTime / duration&lt;br /&gt;
    local x1, y1, z1 = interpolateBetween ( 0, 0, 0, ancho, alto, 255, progress, anim)&lt;br /&gt;
    local x2, y2, z2 = interpolateBetween ( 0, 0, 0, btAncho, btAlto, btAlto/11, progress, anim)&lt;br /&gt;
 &lt;br /&gt;
    posx = (x/2)-(x1/2)&lt;br /&gt;
    posy = (y/2)-(y1/2)&lt;br /&gt;
 &lt;br /&gt;
    dxDrawRectangle ( posx, posy-y2, x2, y2, color )&lt;br /&gt;
    dxDrawRectangle ( posx, posy, x1, y1, tocolor ( 0, 0, 0, 200 ) )&lt;br /&gt;
    dxDrawText ( text, 0, -(y1)-y2, x, y, tocolor ( 255, 255, 255, 255 ), z2,font,&amp;quot;center&amp;quot;,&amp;quot;center&amp;quot;)   &lt;br /&gt;
   &lt;br /&gt;
 &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;
==Use==&lt;br /&gt;
Always remeber to define the &amp;quot;start&amp;quot; value with getTickCount()&lt;br /&gt;
&amp;lt;section name=&amp;quot;Clientside example&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function start()&lt;br /&gt;
start = getTickCount()&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler(&amp;quot;gettick&amp;quot;,start)&lt;br /&gt;
--&lt;br /&gt;
function dxDrawAnimWindow(text,alto,ancho,color,font,anim)&lt;br /&gt;
    local x,y = guiGetScreenSize()&lt;br /&gt;
 &lt;br /&gt;
    btAncho = ancho&lt;br /&gt;
    btAlto = alto/20&lt;br /&gt;
 &lt;br /&gt;
    local now = getTickCount()&lt;br /&gt;
    local elapsedTime = now - start&lt;br /&gt;
    local endTime = start + 1500&lt;br /&gt;
    local duration = endTime - start&lt;br /&gt;
    local progress = elapsedTime / duration&lt;br /&gt;
    local x1, y1, z1 = interpolateBetween ( 0, 0, 0, ancho, alto, 255, progress, anim)&lt;br /&gt;
    local x2, y2, z2 = interpolateBetween ( 0, 0, 0, btAncho, btAlto, btAlto/11, progress, anim)&lt;br /&gt;
 &lt;br /&gt;
    posx = (x/2)-(x1/2)&lt;br /&gt;
    posy = (y/2)-(y1/2)&lt;br /&gt;
 &lt;br /&gt;
    dxDrawRectangle ( posx, posy-y2, x2, y2, color )&lt;br /&gt;
    dxDrawRectangle ( posx, posy, x1, y1, tocolor ( 0, 0, 0, 200 ) )&lt;br /&gt;
    dxDrawText ( text, 0, -(y1)-y2, x, y, tocolor ( 255, 255, 255, 255 ), z2,font,&amp;quot;center&amp;quot;,&amp;quot;center&amp;quot;)   &lt;br /&gt;
   &lt;br /&gt;
 &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;
&lt;br /&gt;
Author: Bc#&lt;br /&gt;
 // Added to Wiki By: CiBeR~&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Useful_Functions}}&lt;/div&gt;</summary>
		<author><name>Kevin Gross</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Template:Useful_Functions&amp;diff=37985</id>
		<title>Template:Useful Functions</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Template:Useful_Functions&amp;diff=37985"/>
		<updated>2013-12-22T18:00:02Z</updated>

		<summary type="html">&lt;p&gt;Kevin Gross: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;*[[dxDrawAnimWindow]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» Create Animated Dx Window&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[callClientFunction]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to call any clientside function from the server's side.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[callServerFunction]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to call any server-side function from the client's side.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[centerWindow]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function center the window in any resolution.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[Check]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks if it's arguments are of the right types and calls the error-function if one isn't.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[convertNumber]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function converts large numbers and adds commas to it. (Example: 100000 -&amp;gt; 100,000)&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[coroutine.resume]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» Fix for hidden coroutine error messages&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawCircle]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function draws a 2D line in a circle shape on the screen.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawColorText]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function draws a dx text with #RRGGBB color codes support.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawGifImage]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function simulates the effect of a GIF image by using image sprites.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawImage3D]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function draws a 3D image.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawPartialCircle]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function draws a 2D line in a partial circle shape on the screen.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawRectangle3D]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function draws a 3D rectangle.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxGetFontSizeFromHeight]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function calculate a font size from given height for dxDraw.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxGetRealFontHeight]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» Accurately measures the pixel height of a font.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[findRotation]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» Takes two points and returns the direction from point A to point B.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[FormatDate]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» Formats a date on the basis of a format string and returns it.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[GenerateString]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» With this function you can generate a random string with any characters.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getAge]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function calculates the age of a birthday.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getAlivePlayers (Client)|getAlivePlayers]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns all the alive players by a client side, so you can store them into a Gridlist or something like that, faster.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getAlivePlayersInTeam]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table of the alive players in a team.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getBoundControls]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a list of control names that are bound to the specified key.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getCursorMoveOn]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks in which way the cursor is currently moving.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getDistanceBetweenPointAndSegment2D]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» Takes point coordinates and line (a segment) starting and ending coordinates. It returns the shortest distance between the point and the line.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getElementSpeed]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to get element speed in kph or mph units.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getElementsInDimension]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function gets the elements that are in the specified dimension.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getElementsWithinMarker]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function gets the elements that are in a markers colshape.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getJetpackWeaponsEnabled]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table of enabled weapons usable on a jetpack.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getOffsetFromXYZ]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to take an entity and a position and calculate the relative offset between them accounting for rotations.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getOnlineAdmins]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function will give the online admins.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getOnlineStaff]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» Returns all online staff, names separated by two spaces.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPlayersByData]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function gets players who have data name you passed to it.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPlayerFromNamePart]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to get player From his Name part.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPlayersInPhotograph]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function gets all the players in a photograph.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPlayerFromSerial]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function gets an online player from their serial.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPointFromDistanceRotation]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» Finds a point based on a starting point, direction and distance.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getResourceSettings]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table of the resource settings.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getTeamFromColor]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function gets a team from it's color. (Related to: [[getTeamFromName]])&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getTimestamp]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» With this function you can get the UNIX timestamp.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getValidVehicleModels]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table containing valid MTA Vehicle models.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getXMLNodes]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» Returns all children of a node&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getVehicleRespawnPosition]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to get the spawn position of a vehicle.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[guiComboBoxAdjustHeight]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» Adjusts the combobox to have a correct height.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[IfElse]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» Returns one of two values based on a boolean expression.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isElementInPhotograph]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks if an element was in the player's camera picture.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isElementInRange]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to check is the element's range to the main point is smaller than (or as big as) the maximum range.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isElementMoving]]&amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks if an element is moving.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isElementWithinAColShape]]&amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks if the [[element]] is in a [[colshape]].&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isPedAiming]]&amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks if a ped is aiming.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isPlayerInACL]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function will check to see if a player element is in an ACL group.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isPlayerInTeam]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function check if the player in the team.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isLeapYear]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» Checks if the given year is a leap year.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isVehicleOnRoof]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks whether vehicle is on roof.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isVehicleEmpty]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks whether a vehicle is empty.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[iterElements]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» Returns an iterator for your for loops saving time typing ipairs( getElementsByType( type ) ), instead you type: iterElements( type ).&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[mathNumber]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function is a workaround for the clientside floating-point precision of 24-bits&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[math.round]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» Rounds a number whereas the number of decimals to keep and the method may be set.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[multi_check]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks one element to many, handy and clean.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[onVehicleWeaponFire]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This code implements an event that is triggered when a player in a vehicle fires a vehicles weapon.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[RGBToHex]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a string representing the color in hexadecimal.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[setElementSpeed]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to set moving element speed in kph or mph units.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[setTableProtected]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» Protects a table and makes it read-only.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[setVehicleGravityPoint]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This clientside function sets a vehicle's gravity in the direction of a 3 dimensional coordinate with the strength specified.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[smoothMoveCamera]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This clientside function allows you to create a cinematic camera flight.&lt;br /&gt;
*[[string.count]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function counts a text from a text.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[string.explode]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function splits a string at a given separator pattern and returns a table with the pieces.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[switch]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allow the value of a variable or expression to control the flow of program execution via a multiway branch.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[table.copy]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function copies a whole table and all the tables in that table.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[table.compare]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function check if both tables is equal. &amp;lt;/span&amp;gt;&lt;br /&gt;
*[[table.empty]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function check is empty table or not.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[table.map]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function goes through a table and replaces every field with the return of the passed function, where the field's value is passed as first argument and optionally more arguments.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[table.merge]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» Merges two or more tables in the first.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[table.random]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function retrieves a random variable from a table.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[table.size]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» Finds the absolute size of a table.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[toHex]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function converts a decimal number to a hexadecimal number, as a fix to be used clientside.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[var dump]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function outputs information about one or more variables using outputConsole()&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[wavelengthToRGBA]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function converts a phisical wavelength of light to a RGBA color.&amp;lt;/span&amp;gt;&lt;br /&gt;
[[Category:Useful Functions]]&lt;/div&gt;</summary>
		<author><name>Kevin Gross</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=DxDrawAnimWindow&amp;diff=37984</id>
		<title>DxDrawAnimWindow</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=DxDrawAnimWindow&amp;diff=37984"/>
		<updated>2013-12-22T17:56:34Z</updated>

		<summary type="html">&lt;p&gt;Kevin Gross: /* Required Arguments */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Useful Function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function is for creating and animating a dX Window.&lt;br /&gt;
* '''NOTE:''' This is made to be used clientside!.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;bool dxDrawAnimWindow ( string text, int alto, int ancho, int color, string element font, string anim)&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
* '''text:''' The text of the window&lt;br /&gt;
* '''alto:''' The height of the window&lt;br /&gt;
* '''ancho:''' The width of the window&lt;br /&gt;
* '''color:''' The color of the window&lt;br /&gt;
* '''font:''' A element or string representing the font.&lt;br /&gt;
* '''anim:''' The easing or animation type. See https://wiki.multitheftauto.com/wiki/Easing] For more Types-&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Clientside script&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function dxDrawAnimWindow(text,alto,ancho,color,font,anim)&lt;br /&gt;
    local x,y = guiGetScreenSize()&lt;br /&gt;
 &lt;br /&gt;
    btAncho = ancho&lt;br /&gt;
    btAlto = alto/20&lt;br /&gt;
 &lt;br /&gt;
    local now = getTickCount()&lt;br /&gt;
    local elapsedTime = now - start&lt;br /&gt;
    local endTime = start + 1500&lt;br /&gt;
    local duration = endTime - start&lt;br /&gt;
    local progress = elapsedTime / duration&lt;br /&gt;
    local x1, y1, z1 = interpolateBetween ( 0, 0, 0, ancho, alto, 255, progress, anim)&lt;br /&gt;
    local x2, y2, z2 = interpolateBetween ( 0, 0, 0, btAncho, btAlto, btAlto/11, progress, anim)&lt;br /&gt;
 &lt;br /&gt;
    posx = (x/2)-(x1/2)&lt;br /&gt;
    posy = (y/2)-(y1/2)&lt;br /&gt;
 &lt;br /&gt;
    dxDrawRectangle ( posx, posy-y2, x2, y2, color )&lt;br /&gt;
    dxDrawRectangle ( posx, posy, x1, y1, tocolor ( 0, 0, 0, 200 ) )&lt;br /&gt;
    dxDrawText ( text, 0, -(y1)-y2, x, y, tocolor ( 255, 255, 255, 255 ), z2,font,&amp;quot;center&amp;quot;,&amp;quot;center&amp;quot;)   &lt;br /&gt;
   &lt;br /&gt;
 &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;
==Use==&lt;br /&gt;
Always remeber to define the &amp;quot;start&amp;quot; value with getTickCount()&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function start()&lt;br /&gt;
start = getTickCount()&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler(&amp;quot;gettick&amp;quot;,start)&lt;br /&gt;
--&lt;br /&gt;
function dxDrawAnimWindow(text,alto,ancho,color,font,anim)&lt;br /&gt;
    local x,y = guiGetScreenSize()&lt;br /&gt;
 &lt;br /&gt;
    btAncho = ancho&lt;br /&gt;
    btAlto = alto/20&lt;br /&gt;
 &lt;br /&gt;
    local now = getTickCount()&lt;br /&gt;
    local elapsedTime = now - start&lt;br /&gt;
    local endTime = start + 1500&lt;br /&gt;
    local duration = endTime - start&lt;br /&gt;
    local progress = elapsedTime / duration&lt;br /&gt;
    local x1, y1, z1 = interpolateBetween ( 0, 0, 0, ancho, alto, 255, progress, anim)&lt;br /&gt;
    local x2, y2, z2 = interpolateBetween ( 0, 0, 0, btAncho, btAlto, btAlto/11, progress, anim)&lt;br /&gt;
 &lt;br /&gt;
    posx = (x/2)-(x1/2)&lt;br /&gt;
    posy = (y/2)-(y1/2)&lt;br /&gt;
 &lt;br /&gt;
    dxDrawRectangle ( posx, posy-y2, x2, y2, color )&lt;br /&gt;
    dxDrawRectangle ( posx, posy, x1, y1, tocolor ( 0, 0, 0, 200 ) )&lt;br /&gt;
    dxDrawText ( text, 0, -(y1)-y2, x, y, tocolor ( 255, 255, 255, 255 ), z2,font,&amp;quot;center&amp;quot;,&amp;quot;center&amp;quot;)   &lt;br /&gt;
   &lt;br /&gt;
 &lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Author: Bc#&lt;br /&gt;
 // Added to Wiki By: CiBeR~&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Useful_Functions}}&lt;/div&gt;</summary>
		<author><name>Kevin Gross</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=DxDrawAnimWindow&amp;diff=37983</id>
		<title>DxDrawAnimWindow</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=DxDrawAnimWindow&amp;diff=37983"/>
		<updated>2013-12-22T17:56:05Z</updated>

		<summary type="html">&lt;p&gt;Kevin Gross: /* Syntax */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Useful Function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function is for creating and animating a dX Window.&lt;br /&gt;
* '''NOTE:''' This is made to be used clientside!.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;bool dxDrawAnimWindow ( string text, int alto, int ancho, int color, string element font, string anim)&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
* '''text:''' The text of the window&lt;br /&gt;
* '''alto:''' The height of the window&lt;br /&gt;
* '''ancho:''' The width of the window&lt;br /&gt;
* '''color:''' The color of the window&lt;br /&gt;
* '''font:''' A element or string representing the font.&lt;br /&gt;
* '''anim:''' The easing or animation type. See [url=https://wiki.multitheftauto.com/wiki/Easing]Easying Types[/url] For more Types-&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Clientside script&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function dxDrawAnimWindow(text,alto,ancho,color,font,anim)&lt;br /&gt;
    local x,y = guiGetScreenSize()&lt;br /&gt;
 &lt;br /&gt;
    btAncho = ancho&lt;br /&gt;
    btAlto = alto/20&lt;br /&gt;
 &lt;br /&gt;
    local now = getTickCount()&lt;br /&gt;
    local elapsedTime = now - start&lt;br /&gt;
    local endTime = start + 1500&lt;br /&gt;
    local duration = endTime - start&lt;br /&gt;
    local progress = elapsedTime / duration&lt;br /&gt;
    local x1, y1, z1 = interpolateBetween ( 0, 0, 0, ancho, alto, 255, progress, anim)&lt;br /&gt;
    local x2, y2, z2 = interpolateBetween ( 0, 0, 0, btAncho, btAlto, btAlto/11, progress, anim)&lt;br /&gt;
 &lt;br /&gt;
    posx = (x/2)-(x1/2)&lt;br /&gt;
    posy = (y/2)-(y1/2)&lt;br /&gt;
 &lt;br /&gt;
    dxDrawRectangle ( posx, posy-y2, x2, y2, color )&lt;br /&gt;
    dxDrawRectangle ( posx, posy, x1, y1, tocolor ( 0, 0, 0, 200 ) )&lt;br /&gt;
    dxDrawText ( text, 0, -(y1)-y2, x, y, tocolor ( 255, 255, 255, 255 ), z2,font,&amp;quot;center&amp;quot;,&amp;quot;center&amp;quot;)   &lt;br /&gt;
   &lt;br /&gt;
 &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;
==Use==&lt;br /&gt;
Always remeber to define the &amp;quot;start&amp;quot; value with getTickCount()&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function start()&lt;br /&gt;
start = getTickCount()&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler(&amp;quot;gettick&amp;quot;,start)&lt;br /&gt;
--&lt;br /&gt;
function dxDrawAnimWindow(text,alto,ancho,color,font,anim)&lt;br /&gt;
    local x,y = guiGetScreenSize()&lt;br /&gt;
 &lt;br /&gt;
    btAncho = ancho&lt;br /&gt;
    btAlto = alto/20&lt;br /&gt;
 &lt;br /&gt;
    local now = getTickCount()&lt;br /&gt;
    local elapsedTime = now - start&lt;br /&gt;
    local endTime = start + 1500&lt;br /&gt;
    local duration = endTime - start&lt;br /&gt;
    local progress = elapsedTime / duration&lt;br /&gt;
    local x1, y1, z1 = interpolateBetween ( 0, 0, 0, ancho, alto, 255, progress, anim)&lt;br /&gt;
    local x2, y2, z2 = interpolateBetween ( 0, 0, 0, btAncho, btAlto, btAlto/11, progress, anim)&lt;br /&gt;
 &lt;br /&gt;
    posx = (x/2)-(x1/2)&lt;br /&gt;
    posy = (y/2)-(y1/2)&lt;br /&gt;
 &lt;br /&gt;
    dxDrawRectangle ( posx, posy-y2, x2, y2, color )&lt;br /&gt;
    dxDrawRectangle ( posx, posy, x1, y1, tocolor ( 0, 0, 0, 200 ) )&lt;br /&gt;
    dxDrawText ( text, 0, -(y1)-y2, x, y, tocolor ( 255, 255, 255, 255 ), z2,font,&amp;quot;center&amp;quot;,&amp;quot;center&amp;quot;)   &lt;br /&gt;
   &lt;br /&gt;
 &lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Author: Bc#&lt;br /&gt;
 // Added to Wiki By: CiBeR~&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Useful_Functions}}&lt;/div&gt;</summary>
		<author><name>Kevin Gross</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=DxDrawAnimWindow&amp;diff=37982</id>
		<title>DxDrawAnimWindow</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=DxDrawAnimWindow&amp;diff=37982"/>
		<updated>2013-12-22T17:55:51Z</updated>

		<summary type="html">&lt;p&gt;Kevin Gross: /* Syntax */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Useful Function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function is for creating and animating a dX Window.&lt;br /&gt;
* '''NOTE:''' This is made to be used clientside!.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;bool dxDraw3AnimWindow ( string text, int alto, int ancho, int color, string element font, string anim)&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
* '''text:''' The text of the window&lt;br /&gt;
* '''alto:''' The height of the window&lt;br /&gt;
* '''ancho:''' The width of the window&lt;br /&gt;
* '''color:''' The color of the window&lt;br /&gt;
* '''font:''' A element or string representing the font.&lt;br /&gt;
* '''anim:''' The easing or animation type. See [url=https://wiki.multitheftauto.com/wiki/Easing]Easying Types[/url] For more Types-&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Clientside script&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function dxDrawAnimWindow(text,alto,ancho,color,font,anim)&lt;br /&gt;
    local x,y = guiGetScreenSize()&lt;br /&gt;
 &lt;br /&gt;
    btAncho = ancho&lt;br /&gt;
    btAlto = alto/20&lt;br /&gt;
 &lt;br /&gt;
    local now = getTickCount()&lt;br /&gt;
    local elapsedTime = now - start&lt;br /&gt;
    local endTime = start + 1500&lt;br /&gt;
    local duration = endTime - start&lt;br /&gt;
    local progress = elapsedTime / duration&lt;br /&gt;
    local x1, y1, z1 = interpolateBetween ( 0, 0, 0, ancho, alto, 255, progress, anim)&lt;br /&gt;
    local x2, y2, z2 = interpolateBetween ( 0, 0, 0, btAncho, btAlto, btAlto/11, progress, anim)&lt;br /&gt;
 &lt;br /&gt;
    posx = (x/2)-(x1/2)&lt;br /&gt;
    posy = (y/2)-(y1/2)&lt;br /&gt;
 &lt;br /&gt;
    dxDrawRectangle ( posx, posy-y2, x2, y2, color )&lt;br /&gt;
    dxDrawRectangle ( posx, posy, x1, y1, tocolor ( 0, 0, 0, 200 ) )&lt;br /&gt;
    dxDrawText ( text, 0, -(y1)-y2, x, y, tocolor ( 255, 255, 255, 255 ), z2,font,&amp;quot;center&amp;quot;,&amp;quot;center&amp;quot;)   &lt;br /&gt;
   &lt;br /&gt;
 &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;
==Use==&lt;br /&gt;
Always remeber to define the &amp;quot;start&amp;quot; value with getTickCount()&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function start()&lt;br /&gt;
start = getTickCount()&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler(&amp;quot;gettick&amp;quot;,start)&lt;br /&gt;
--&lt;br /&gt;
function dxDrawAnimWindow(text,alto,ancho,color,font,anim)&lt;br /&gt;
    local x,y = guiGetScreenSize()&lt;br /&gt;
 &lt;br /&gt;
    btAncho = ancho&lt;br /&gt;
    btAlto = alto/20&lt;br /&gt;
 &lt;br /&gt;
    local now = getTickCount()&lt;br /&gt;
    local elapsedTime = now - start&lt;br /&gt;
    local endTime = start + 1500&lt;br /&gt;
    local duration = endTime - start&lt;br /&gt;
    local progress = elapsedTime / duration&lt;br /&gt;
    local x1, y1, z1 = interpolateBetween ( 0, 0, 0, ancho, alto, 255, progress, anim)&lt;br /&gt;
    local x2, y2, z2 = interpolateBetween ( 0, 0, 0, btAncho, btAlto, btAlto/11, progress, anim)&lt;br /&gt;
 &lt;br /&gt;
    posx = (x/2)-(x1/2)&lt;br /&gt;
    posy = (y/2)-(y1/2)&lt;br /&gt;
 &lt;br /&gt;
    dxDrawRectangle ( posx, posy-y2, x2, y2, color )&lt;br /&gt;
    dxDrawRectangle ( posx, posy, x1, y1, tocolor ( 0, 0, 0, 200 ) )&lt;br /&gt;
    dxDrawText ( text, 0, -(y1)-y2, x, y, tocolor ( 255, 255, 255, 255 ), z2,font,&amp;quot;center&amp;quot;,&amp;quot;center&amp;quot;)   &lt;br /&gt;
   &lt;br /&gt;
 &lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Author: Bc#&lt;br /&gt;
 // Added to Wiki By: CiBeR~&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Useful_Functions}}&lt;/div&gt;</summary>
		<author><name>Kevin Gross</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=DxDrawAnimWindow&amp;diff=37981</id>
		<title>DxDrawAnimWindow</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=DxDrawAnimWindow&amp;diff=37981"/>
		<updated>2013-12-22T17:54:06Z</updated>

		<summary type="html">&lt;p&gt;Kevin Gross: Created page with &amp;quot;{{Useful Function}} __NOTOC__ This function is for creating and animating a dX Window. * '''NOTE:''' This is made to be used clientside!.  ==Syntax== &amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;bool dxDraw3DIm...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Useful Function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function is for creating and animating a dX Window.&lt;br /&gt;
* '''NOTE:''' This is made to be used clientside!.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;bool dxDraw3DImage ( string text, int alto, int ancho, int color, string element font, string anim)&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
* '''text:''' The text of the window&lt;br /&gt;
* '''alto:''' The height of the window&lt;br /&gt;
* '''ancho:''' The width of the window&lt;br /&gt;
* '''color:''' The color of the window&lt;br /&gt;
* '''font:''' A element or string representing the font.&lt;br /&gt;
* '''anim:''' The easing or animation type. See [url=https://wiki.multitheftauto.com/wiki/Easing]Easying Types[/url] For more Types-&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Clientside script&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function dxDrawAnimWindow(text,alto,ancho,color,font,anim)&lt;br /&gt;
    local x,y = guiGetScreenSize()&lt;br /&gt;
 &lt;br /&gt;
    btAncho = ancho&lt;br /&gt;
    btAlto = alto/20&lt;br /&gt;
 &lt;br /&gt;
    local now = getTickCount()&lt;br /&gt;
    local elapsedTime = now - start&lt;br /&gt;
    local endTime = start + 1500&lt;br /&gt;
    local duration = endTime - start&lt;br /&gt;
    local progress = elapsedTime / duration&lt;br /&gt;
    local x1, y1, z1 = interpolateBetween ( 0, 0, 0, ancho, alto, 255, progress, anim)&lt;br /&gt;
    local x2, y2, z2 = interpolateBetween ( 0, 0, 0, btAncho, btAlto, btAlto/11, progress, anim)&lt;br /&gt;
 &lt;br /&gt;
    posx = (x/2)-(x1/2)&lt;br /&gt;
    posy = (y/2)-(y1/2)&lt;br /&gt;
 &lt;br /&gt;
    dxDrawRectangle ( posx, posy-y2, x2, y2, color )&lt;br /&gt;
    dxDrawRectangle ( posx, posy, x1, y1, tocolor ( 0, 0, 0, 200 ) )&lt;br /&gt;
    dxDrawText ( text, 0, -(y1)-y2, x, y, tocolor ( 255, 255, 255, 255 ), z2,font,&amp;quot;center&amp;quot;,&amp;quot;center&amp;quot;)   &lt;br /&gt;
   &lt;br /&gt;
 &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;
==Use==&lt;br /&gt;
Always remeber to define the &amp;quot;start&amp;quot; value with getTickCount()&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function start()&lt;br /&gt;
start = getTickCount()&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler(&amp;quot;gettick&amp;quot;,start)&lt;br /&gt;
--&lt;br /&gt;
function dxDrawAnimWindow(text,alto,ancho,color,font,anim)&lt;br /&gt;
    local x,y = guiGetScreenSize()&lt;br /&gt;
 &lt;br /&gt;
    btAncho = ancho&lt;br /&gt;
    btAlto = alto/20&lt;br /&gt;
 &lt;br /&gt;
    local now = getTickCount()&lt;br /&gt;
    local elapsedTime = now - start&lt;br /&gt;
    local endTime = start + 1500&lt;br /&gt;
    local duration = endTime - start&lt;br /&gt;
    local progress = elapsedTime / duration&lt;br /&gt;
    local x1, y1, z1 = interpolateBetween ( 0, 0, 0, ancho, alto, 255, progress, anim)&lt;br /&gt;
    local x2, y2, z2 = interpolateBetween ( 0, 0, 0, btAncho, btAlto, btAlto/11, progress, anim)&lt;br /&gt;
 &lt;br /&gt;
    posx = (x/2)-(x1/2)&lt;br /&gt;
    posy = (y/2)-(y1/2)&lt;br /&gt;
 &lt;br /&gt;
    dxDrawRectangle ( posx, posy-y2, x2, y2, color )&lt;br /&gt;
    dxDrawRectangle ( posx, posy, x1, y1, tocolor ( 0, 0, 0, 200 ) )&lt;br /&gt;
    dxDrawText ( text, 0, -(y1)-y2, x, y, tocolor ( 255, 255, 255, 255 ), z2,font,&amp;quot;center&amp;quot;,&amp;quot;center&amp;quot;)   &lt;br /&gt;
   &lt;br /&gt;
 &lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Author: Bc#&lt;br /&gt;
 // Added to Wiki By: CiBeR~&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Useful_Functions}}&lt;/div&gt;</summary>
		<author><name>Kevin Gross</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Template:Useful_Functions&amp;diff=37980</id>
		<title>Template:Useful Functions</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Template:Useful_Functions&amp;diff=37980"/>
		<updated>2013-12-22T17:34:36Z</updated>

		<summary type="html">&lt;p&gt;Kevin Gross: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;*[[callClientFunction]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to call any clientside function from the server's side.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[callServerFunction]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to call any server-side function from the client's side.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[centerWindow]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function center the window in any resolution.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[Check]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks if it's arguments are of the right types and calls the error-function if one isn't.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[convertNumber]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function converts large numbers and adds commas to it. (Example: 100000 -&amp;gt; 100,000)&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[coroutine.resume]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» Fix for hidden coroutine error messages&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawAnimWindow]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» Create Animated Dx Window&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawCircle]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function draws a 2D line in a circle shape on the screen.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawColorText]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function draws a dx text with #RRGGBB color codes support.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawGifImage]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function simulates the effect of a GIF image by using image sprites.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawImage3D]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function draws a 3D image.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawPartialCircle]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function draws a 2D line in a partial circle shape on the screen.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxDrawRectangle3D]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function draws a 3D rectangle.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxGetFontSizeFromHeight]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function calculate a font size from given height for dxDraw.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[dxGetRealFontHeight]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» Accurately measures the pixel height of a font.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[findRotation]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» Takes two points and returns the direction from point A to point B.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[FormatDate]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» Formats a date on the basis of a format string and returns it.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[GenerateString]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» With this function you can generate a random string with any characters.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getAge]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function calculates the age of a birthday.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getAlivePlayers (Client)|getAlivePlayers]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns all the alive players by a client side, so you can store them into a Gridlist or something like that, faster.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getAlivePlayersInTeam]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table of the alive players in a team.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getBoundControls]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a list of control names that are bound to the specified key.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getCursorMoveOn]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks in which way the cursor is currently moving.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getDistanceBetweenPointAndSegment2D]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» Takes point coordinates and line (a segment) starting and ending coordinates. It returns the shortest distance between the point and the line.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getElementSpeed]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to get element speed in kph or mph units.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getElementsInDimension]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function gets the elements that are in the specified dimension.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getElementsWithinMarker]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function gets the elements that are in a markers colshape.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getJetpackWeaponsEnabled]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table of enabled weapons usable on a jetpack.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getOffsetFromXYZ]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to take an entity and a position and calculate the relative offset between them accounting for rotations.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getOnlineAdmins]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function will give the online admins.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getOnlineStaff]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» Returns all online staff, names separated by two spaces.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPlayersByData]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function gets players who have data name you passed to it.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPlayerFromNamePart]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to get player From his Name part.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPlayersInPhotograph]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function gets all the players in a photograph.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPlayerFromSerial]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function gets an online player from their serial.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getPointFromDistanceRotation]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» Finds a point based on a starting point, direction and distance.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getResourceSettings]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table of the resource settings.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getTeamFromColor]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function gets a team from it's color. (Related to: [[getTeamFromName]])&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getTimestamp]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» With this function you can get the UNIX timestamp.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getValidVehicleModels]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table containing valid MTA Vehicle models.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getXMLNodes]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» Returns all children of a node&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[getVehicleRespawnPosition]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to get the spawn position of a vehicle.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[guiComboBoxAdjustHeight]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» Adjusts the combobox to have a correct height.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[IfElse]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» Returns one of two values based on a boolean expression.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isElementInPhotograph]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks if an element was in the player's camera picture.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isElementInRange]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to check is the element's range to the main point is smaller than (or as big as) the maximum range.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isElementMoving]]&amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks if an element is moving.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isElementWithinAColShape]]&amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks if the [[element]] is in a [[colshape]].&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isPedAiming]]&amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks if a ped is aiming.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isPlayerInACL]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function will check to see if a player element is in an ACL group.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isPlayerInTeam]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function check if the player in the team.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isLeapYear]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» Checks if the given year is a leap year.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isVehicleOnRoof]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks whether vehicle is on roof.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[isVehicleEmpty]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks whether a vehicle is empty.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[iterElements]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» Returns an iterator for your for loops saving time typing ipairs( getElementsByType( type ) ), instead you type: iterElements( type ).&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[mathNumber]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function is a workaround for the clientside floating-point precision of 24-bits&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[math.round]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» Rounds a number whereas the number of decimals to keep and the method may be set.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[multi_check]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks one element to many, handy and clean.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[onVehicleWeaponFire]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This code implements an event that is triggered when a player in a vehicle fires a vehicles weapon.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[RGBToHex]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a string representing the color in hexadecimal.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[setElementSpeed]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to set moving element speed in kph or mph units.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[setTableProtected]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» Protects a table and makes it read-only.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[setVehicleGravityPoint]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This clientside function sets a vehicle's gravity in the direction of a 3 dimensional coordinate with the strength specified.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[smoothMoveCamera]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This clientside function allows you to create a cinematic camera flight.&lt;br /&gt;
*[[string.count]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function counts a text from a text.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[string.explode]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function splits a string at a given separator pattern and returns a table with the pieces.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[switch]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allow the value of a variable or expression to control the flow of program execution via a multiway branch.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[table.copy]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function copies a whole table and all the tables in that table.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[table.compare]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function check if both tables is equal. &amp;lt;/span&amp;gt;&lt;br /&gt;
*[[table.empty]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function check is empty table or not.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[table.map]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function goes through a table and replaces every field with the return of the passed function, where the field's value is passed as first argument and optionally more arguments.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[table.merge]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» Merges two or more tables in the first.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[table.random]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function retrieves a random variable from a table.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[table.size]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» Finds the absolute size of a table.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[toHex]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function converts a decimal number to a hexadecimal number, as a fix to be used clientside.&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[var dump]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function outputs information about one or more variables using outputConsole()&amp;lt;/span&amp;gt;&lt;br /&gt;
*[[wavelengthToRGBA]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function converts a phisical wavelength of light to a RGBA color.&amp;lt;/span&amp;gt;&lt;br /&gt;
[[Category:Useful Functions]]&lt;/div&gt;</summary>
		<author><name>Kevin Gross</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=ES/addEvent&amp;diff=36699</id>
		<title>ES/addEvent</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=ES/addEvent&amp;diff=36699"/>
		<updated>2013-07-16T21:54:40Z</updated>

		<summary type="html">&lt;p&gt;Kevin Gross: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Server client function}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Syntaxis== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool addEvent ( string nombreEvento [, bool permitirtrigerremoto = false ] )   &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Argumentos Requeridos=== &lt;br /&gt;
*'''nombreEvento:''' El nombre del evento que deseas crear&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
*'''permitirtrigerremoto:''' Un boolean determinando si puedes trigear el evento remotamente.&lt;br /&gt;
===Returns===&lt;br /&gt;
Devuelve ''true'' si el evento fue agregado exitosamente, ''false'' si el evento ya esta agregado.&lt;br /&gt;
&lt;br /&gt;
==Ejemplo== &lt;br /&gt;
Este ejemplo definira un nuevo evento llamado ''onSpecialEvent''.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- Agregar un nuevo evento llamado onSpecialEvent&lt;br /&gt;
addEvent ( &amp;quot;onSpecialEvent&amp;quot;, true )&lt;br /&gt;
&lt;br /&gt;
-- Define nuestra funcion handler, que toma un texto y la postea en el chat&lt;br /&gt;
function specialEventHandler ( text )&lt;br /&gt;
	outputChatBox ( text )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Agrega el handler del evento&lt;br /&gt;
addEventHandler ( &amp;quot;onSpecialEvent&amp;quot;, getRootElement(), specialEventHandler )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Luego puedes trigear nuestro evento usando:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
	triggerEvent ( &amp;quot;onSpecialEvent&amp;quot;, getRootElement(), &amp;quot;test&amp;quot; )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Esto va a causar que el evento se trigee, mostrando &amp;quot;test&amp;quot;como texto&lt;br /&gt;
&lt;br /&gt;
Traduccion By CiBeR~!&lt;/div&gt;</summary>
		<author><name>Kevin Gross</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=ES/addEvent&amp;diff=36698</id>
		<title>ES/addEvent</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=ES/addEvent&amp;diff=36698"/>
		<updated>2013-07-16T21:52:54Z</updated>

		<summary type="html">&lt;p&gt;Kevin Gross: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Server client function}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Syntaxis== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool addEvent ( string nombreEvento [, bool permitirtrigerremoto = false ] )   &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Argumentos Requeridos=== &lt;br /&gt;
*'''nombreEvento:''' El nombre del evento que deseas crear&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
*'''permitirtrigerremoto:''' Un boolean determinando si puedes trigear el evento remotamente.&lt;br /&gt;
===Returns===&lt;br /&gt;
Devuelve ''true'' si el evento fue agregado exitosamente, ''false'' si el evento ya esta agregado.&lt;br /&gt;
&lt;br /&gt;
==Ejemplo== &lt;br /&gt;
Este ejemplo definira un nuevo evento llamado ''onSpecialEvent''.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- Agregar un nuevo evento llamado onSpecialEvent&lt;br /&gt;
addEvent ( &amp;quot;onSpecialEvent&amp;quot;, true )&lt;br /&gt;
&lt;br /&gt;
-- Define nuestra funcion handler, que toma un texto y la postea en el chat&lt;br /&gt;
function specialEventHandler ( text )&lt;br /&gt;
	outputChatBox ( text )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Agrega el handler del evento&lt;br /&gt;
addEventHandler ( &amp;quot;onSpecialEvent&amp;quot;, getRootElement(), specialEventHandler )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Luego puedes trigear nuestro evento usando:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
	triggerEvent ( &amp;quot;onSpecialEvent&amp;quot;, getRootElement(), &amp;quot;test&amp;quot; )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Esto va a causar que el evento se trigee, mostrando &amp;quot;test&amp;quot;como texto&lt;/div&gt;</summary>
		<author><name>Kevin Gross</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=ES/addEvent&amp;diff=36697</id>
		<title>ES/addEvent</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=ES/addEvent&amp;diff=36697"/>
		<updated>2013-07-16T21:50:21Z</updated>

		<summary type="html">&lt;p&gt;Kevin Gross: Created page with &amp;quot;__NOTOC__  {{Server client function}}   ==Syntaxis==  &amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt; bool addEvent ( string nombreEvento [, bool permitirtrigerremoto = false ] )    &amp;lt;/syntaxhighlight&amp;gt;   ===Argumentos Requer...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Server client function}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Syntaxis== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool addEvent ( string nombreEvento [, bool permitirtrigerremoto = false ] )   &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Argumentos Requeridos=== &lt;br /&gt;
*'''nombreEvento:''' El nombre del evento que deseas crear&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
*'''permitirtrigerremoto:''' Un boolean determinando si puedes trigear el evento remotamente.&lt;br /&gt;
===Returns===&lt;br /&gt;
Devuelve ''true'' si el evento fue agregado exitosamente, ''false'' si el evento ya esta agregado.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
This example will define a new event called ''onSpecialEvent''.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- Add a new event called onSpecialEvent&lt;br /&gt;
addEvent ( &amp;quot;onSpecialEvent&amp;quot;, true )&lt;br /&gt;
&lt;br /&gt;
-- Define our handler function, that takes a &amp;quot;text&amp;quot; parameter and outputs it to the chatbox&lt;br /&gt;
function specialEventHandler ( text )&lt;br /&gt;
	outputChatBox ( text )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Add it as a handler for our event&lt;br /&gt;
addEventHandler ( &amp;quot;onSpecialEvent&amp;quot;, getRootElement(), specialEventHandler )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can then trigger this event later on using:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
	triggerEvent ( &amp;quot;onSpecialEvent&amp;quot;, getRootElement(), &amp;quot;test&amp;quot; )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will cause the handler to be triggered, so &amp;quot;test&amp;quot; will be output to the chatbox.&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Event functions}}&lt;br /&gt;
&lt;br /&gt;
[[ru:addEvent]]&lt;/div&gt;</summary>
		<author><name>Kevin Gross</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=ES/aclGet&amp;diff=36696</id>
		<title>ES/aclGet</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=ES/aclGet&amp;diff=36696"/>
		<updated>2013-07-16T21:45:31Z</updated>

		<summary type="html">&lt;p&gt;Kevin Gross: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Server function}} &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Syntaxis== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
acl aclGet ( string aclNombre )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Argumentos Requeridos=== &lt;br /&gt;
*'''aclNombre:''' El nombre con el cual obtener el ACL&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Devuelve el ACL con el nombre indicado, ''false''/''nil'' si el ACL no existe o por alguna razon dio error.&lt;/div&gt;</summary>
		<author><name>Kevin Gross</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=ES/aclGet&amp;diff=36695</id>
		<title>ES/aclGet</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=ES/aclGet&amp;diff=36695"/>
		<updated>2013-07-16T21:42:21Z</updated>

		<summary type="html">&lt;p&gt;Kevin Gross: Traducido 16/07/2013 By CiBeR~!&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
acl aclGet ( string aclName )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Argumentos Requeridos=== &lt;br /&gt;
*'''aclName:''' El nombre con el cual obtener el ACL&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Devuelve el ACL con el nombre indicado, ''false''/''nil'' si el ACL no existe o por alguna razon dio error.&lt;/div&gt;</summary>
		<author><name>Kevin Gross</name></author>
	</entry>
</feed>