<?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=Stanley+Sathler+.</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=Stanley+Sathler+."/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/wiki/Special:Contributions/Stanley_Sathler_."/>
	<updated>2026-05-13T13:41:06Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=PT-BR/Introdu%C3%A7%C3%A3o_ao_Scripting&amp;diff=31119</id>
		<title>PT-BR/Introdução ao Scripting</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=PT-BR/Introdu%C3%A7%C3%A3o_ao_Scripting&amp;diff=31119"/>
		<updated>2012-05-22T22:53:32Z</updated>

		<summary type="html">&lt;p&gt;Stanley Sathler .: /* Sobre os lançadores de comandos (responsáveis por criar os comandos) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Os recursos (resources) são uma &amp;quot;chave&amp;quot; do MTA. Um recurso é uma pasta ou um arquivo comprimido (em .zip, e não em .rar) contendo um conjunto de arquivos, juntos a um ''meta.xml'' que informa ao servidor como/quais recursos devem ser carregados e quais arquivos estes possuem. Um recurso pode ser visto como um programa de computador, onde pode ser iniciado/interrompido a qualquer momento, além de poder rodar junto a diversos outros recursos ao mesmo tempo.&lt;br /&gt;
&lt;br /&gt;
Tudo relacionado a scripting (programação em linguagem Lua, neste caso) tem relação com os recursos, afinal, os recursos nada mais são do que, normalmente, um conjunto de scripts escritos em Lua destinados a realizar alguma tarefa. O que um recurso define é se determinados arquivos definem um gamemode (estilo de jogo, como corrida, deathmatch, entre outros), um mapa ou qualquer outra coisa. O MTA já vem por padrão com alguns recursos interessantes que você pode, além de reaproveitá-los, adaptá-los às suas necessidades (como por exemplo, um limitador de áreas que impede que um jogador se afaste de um determinado local, ou scripts que criam objetos &amp;quot;pegáveis&amp;quot; no mapa, como colete e armas). {{tip|Para facilitar seus primeiros passos na programação em linguagem Lua, é recomendado que se utilize um editor de textos com highlight, ou seja, &amp;quot;cores&amp;quot; para cada comando. Isso facilita a leitura e escrita de qualquer código independente da linguagem. Muito utilizado e recomendado por nós é o [http://notepad-plus.sourceforge.net/uk/site.htm Notepad++] ou [http://luaedit.sourceforge.net/ LuaEdit]. Há também um editor de códigos (criado por fãs do MTA) com foco na linguagem Lua para o MTA: [[MTASE|MTA Script Editor]] (ainda em fase de desenvolvimento, mas você já pode testá-lo). }}&lt;br /&gt;
&lt;br /&gt;
==Criando nosso primeiro script==&lt;br /&gt;
Nós primeiro vamos aprender a criar um script que permita que o jogador ande pela cidade, passo-a-passo.&lt;br /&gt;
===Onde estão todos os scripts?===&lt;br /&gt;
Vamos dar uma olhada na estrutura dos scripts. Vá até a pasta de instalação do seu MTA (padrão: C:\Arquivo de Programas\MTA San Andreas 1.x\) e siga os passos abaixo:&lt;br /&gt;
&lt;br /&gt;
	/server/mods/deathmatch/resources/&lt;br /&gt;
&lt;br /&gt;
Você irá ver diversos arquivos .zip, que são os simples scripts que vêm por padrão junto ao MTA. Cada arquivo é um &amp;quot;recurso&amp;quot;, e eles serão todos descompactados e carregados pelo servidor quando ele for iniciado. Para criar seu próprio resource, simplesmente crie uma pasta com um nome de sua preferência. Nós iremos usar o nome &amp;quot;myserver&amp;quot; para este tutorial.&lt;br /&gt;
&lt;br /&gt;
Após a criação da pasta (myserver), acessamos-a:&lt;br /&gt;
&lt;br /&gt;
	/server/mods/deathmatch/resources/myserver/&lt;br /&gt;
&lt;br /&gt;
===Identificando seu recurso===&lt;br /&gt;
Para que o servidor reconheça os arquivos de um determinado recurso (para carregá-los), um arquivo ''meta.xml'' deve ser criado, contendo uma lista de todo o conteúdo do recurso. O arquivo ''meta.xml'' deve ser salvo na pasta principal (nesse caso, na pasta &amp;quot;myserver&amp;quot;). Então, abra um editor de textos (recomenda-se o Notepad++) e salve-o com o nome de &amp;quot;meta.xml&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Entre com as seguintes linhas no arquivo ''meta.xml'':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;meta&amp;gt;&lt;br /&gt;
     &amp;lt;info author=&amp;quot;Seu_Nome&amp;quot; type=&amp;quot;gamemode&amp;quot; name=&amp;quot;Meu_Servidor&amp;quot; description=&amp;quot;Meu primeiro recurso&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;
Na tag ''&amp;lt;info /&amp;gt;'', existe o campo ''&amp;quot;type&amp;quot;'', que indica que o recurso criado é um ''gamemode''. Pode também ser um ''map'' (mapa), que iremos explicar depois.&lt;br /&gt;
Um gamemode é o que você precisa para criar um servidor independente.&lt;br /&gt;
&lt;br /&gt;
A tag ''&amp;lt;script /&amp;gt;'' indica o caminho dos arquivos (escritos em Lua) presentes no seu recurso. O do exemplo (script.lua), criaremos no próximo passo.&lt;br /&gt;
&lt;br /&gt;
===Criando um script simples===&lt;br /&gt;
Observe que na tag ''&amp;lt;script /&amp;gt;'' anterior, o arquivo .lua está presente na pasta principal do recurso (e não em uma subpasta). Então precisamos salvar o script na pasta principal, assim como indicado na tag. Salve o seguinte código no arquivo script.lua:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local spawnX, spawnY, spawnZ = 1959.55, -1714.46, 10&lt;br /&gt;
function joinHandler()&lt;br /&gt;
	spawnPlayer(source, spawnX, spawnY, spawnZ)&lt;br /&gt;
	fadeCamera(source, true)&lt;br /&gt;
	setCameraTarget(source, source)&lt;br /&gt;
	outputChatBox(&amp;quot;Bem-vindo ao meu servidor!&amp;quot;, source)&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onPlayerJoin&amp;quot;, getRootElement(), joinHandler)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
O script irá gerar o seu personagem (seu boneco) nas coordenadas (x, y, z) especificadas assim que você entrar no jogo. Note que a função ''fadeCamera()'' precisa ser usada ou, do contrário, a tela ficará preta (e você não verá nada). Outra função é a ''setCameraTarget()'', que foca a câmera do jogo no seu personagem (do contrário, a câmera estaria virada para o céu).&lt;br /&gt;
&lt;br /&gt;
A variável '''source''' representa o elemento responsável pela chamada do evento (você verá mais sobre eventos mais adiante). Assim, quando um jogador entra no jogo, o evento &amp;quot;onPlayerJoin&amp;quot; é chamado e, em seguida, chama a função. O evento automaticamente define o jogador na variável ''source'' (obs: a variável ''source'' armazena sempre o elemento que chamou determinado evento. Ou seja, nem sempre ''source'' será o jogador. Cuidado com isso.)&lt;br /&gt;
&lt;br /&gt;
Se olharmos bem para o [[addEventHandler]], veremos 3 argumentos: 'onPlayerJoin', que indica o evento que chamará a função (no caso, esse evento é chamado assim que o jogador entra no jogo, logo, a função é chamada assim que o jogador entra no jogo); 'getRootElement()', que indica quem poderá chamar o evento (ou seja, todos os elementos, incluindo todos os jogadores); 'joinHandler', que indica o nome da função que será chamada quando o evento for chamado. Maiores detalhes serão explicados mais adiante. Vamos agora simplesmente rodar nosso servidor e testar nosso script.&lt;br /&gt;
&lt;br /&gt;
===Executando o script===&lt;br /&gt;
Para iniciar o servidor, simplesmente execute o arquivo &amp;quot;MTA Server.exe&amp;quot; (presente na pasta de instalação do MTA:SA). Primeiramente é mostrada uma lista com os principais status do seu servidor; observe o número da porta, que você irá precisar quando entrar no jogo. Logo após, o servidor carrega todos os resources (caso todos estejam corretos) que estão presentes no diretório /resource/ e então &amp;quot;fica pronto para aceitar conexões&amp;quot; (ready to accept connections!).&lt;br /&gt;
&lt;br /&gt;
Antes de se conectar ao seu servidor, você precisa executar o gamemode que criou. Para isso, digite no console (a janela do MTA Server.exe) o comando ''gamemode myserver'' (obs: &amp;quot;myserver&amp;quot; é o nome da pasta que você criou no início deste tutorial e, consequentemente, o nome do seu recurso) e pressione Enter. O servidor irá carregar o gamemode que você criou e irá mostrar os erros (caso existam) do seu script. Agora você pode se conectar ao seu servidor de duas diferentes maneiras: clicando em &amp;quot;Quick Connect&amp;quot; e inserindo o endereço IP do seu servidor e o número da porta, ou clicando em &amp;quot;Server Browser&amp;quot;, acessando a aba &amp;quot;Local&amp;quot; e clicando duas vezes no seu servidor. Se tudo correr bem, seu personagem será criado nas coordenadas especificadas.&lt;br /&gt;
&lt;br /&gt;
No próximo tópico iremos criar um comando para que o jogador possa gerar um veículo ao seu lado. Se preferir (embora não recomendado caso seja iniciante), você pode visitar alguns scripts mais avançados clicando [[Map manager|aqui]], ou prossiga com este tutorial. Outra parte interessante deste tutorial é [[PT-BR/Introducao_ao_GUI|Iniciando com GUIs]], no qual aborda a criação de interfaces gráficas (janelas, botões, etc) para seus scripts.&lt;br /&gt;
&lt;br /&gt;
==Criando um comando simples==&lt;br /&gt;
Vamos voltar ao arquivo ''script.lua'' (abra-o novamente). Como mencionado anteriormente, vamos criar agora um comando (para executá-lo, digite no chat ''/seucomando'') que irá gerar um carro ao lado do seu personagem. Antes de tudo precisamos criar uma função que iremos chamar posteriormente e um [[addCommandHandler]](), responsável por criar o comando.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- cria a funcao que sera chamada pelo comando. Os argumentos sao: thePlayer, command, vehicleModel&lt;br /&gt;
function createVehicleForPlayer(thePlayer, command, vehicleModel)&lt;br /&gt;
   -- cria um veiculo&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- cria um lancador de comandos&lt;br /&gt;
addCommandHandler(&amp;quot;createvehicle&amp;quot;, createVehicleForPlayer)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
''Nota: Você pode clicar nas funções dos códigos para obter uma explicação de cada uma delas.&lt;br /&gt;
&lt;br /&gt;
====Sobre os lançadores de comandos (responsáveis por criar os comandos)====&lt;br /&gt;
O primeiro argumento do [[addCommandHandler]] é o nome do comando que o jogador precisará digitar (no exemplo, ele precisará digitar no chat ''/createvehicle &amp;lt;argumento&amp;gt;''. O segundo argumento é a função que será chamada quando o comando for digitado (nesse caso, a função ''createVehicleForPlayer()''.&lt;br /&gt;
&lt;br /&gt;
Se você já possui alguma experiência em programação, sabe que você chama uma função desta forma:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
nomeDaFuncao(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;
nomeDaFuncao(thePlayer, commandName, argumento3, ..)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Se observarmos bem o exemplo acima, podemos ver que o argumento1 é o jogador (quem digita o comando) e o argumento2 é o nome do comando (nesse caso, ''createvehicle''). O argumento3 é o argumento digitado depois do comando (por exemplo, se o jogador digitou ''/createvehicle Infernus'', então a variável argumento3 irá armazenar o texto &amp;quot;Infernus&amp;quot;). Nunca se esqueça que os dois primeiros argumentos são padrões (ou seja, precisam existir), mas você pode nomeá-los com outro nome (mas isto não é necessário agora).&lt;br /&gt;
&lt;br /&gt;
Nós chamamos a função [[addCommandHandler]], que chama a função ''createVehicleForPlayer''.&lt;br /&gt;
&lt;br /&gt;
Por exemplo: alguém digita &amp;quot;createvehicle 468&amp;quot; no chat para gerar uma Sanchez (468 é o ID da Sanchez. Veja mais [[Vehicle_IDs|aqui]]), então o lançador de comandos (quando dizemos &amp;quot;lançador de comandos&amp;quot;, é o mesmo que &amp;quot;criador de comandos&amp;quot;) chama a função createVehicleForPlayer(), como '''se''' nós tivéssemos a seguinte linha no script:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
createVehicleForPlayer(thePlayer,&amp;quot;createvehicle&amp;quot;,&amp;quot;468&amp;quot;) -- thePlayer é o jogador que digitou o comando&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Como podemos ver, a função fornece alguns parâmetros: o jogador quem chamou o comando (armazenado na variável thePlayer), o comando que o jogador executou (nesse caso, &amp;quot;createvehicle&amp;quot;) e o ID do veículo desejado (nesse caso, &amp;quot;468&amp;quot;, referente à Sanchez). Os primeiros dois parâmetros são padrões nos lançadores de comando. Ou seja, sempre que usarmos o addCommandHandler(), teremos automaticamente essas duas primeiras variáveis. Assim, toda função que você desejar chamar usando [[addCommandHandler]] deverá possuir esses dois primeiros parâmetros caso você deseje usar um terceiro parâmetro (por exemplo, colocar uma variável para armazenar o ID do veículo).&lt;br /&gt;
&lt;br /&gt;
''Nota: você precisa adicionar o lançador de comandos DEPOIS que escrever uma função (depois do &amp;quot;end&amp;quot; da função que será chamada) ou, do contrário, a função não será encontrada.''&lt;br /&gt;
&lt;br /&gt;
====Writing the function====&lt;br /&gt;
In order to fill the function we created, we need to think about what we have to do:&lt;br /&gt;
* Get the players position, so we know where to spawn the vehicle (we want it to appear right beside the player)&lt;br /&gt;
* Calculate the position we want to spawn the vehicle at (we don't want it to appear in the player)&lt;br /&gt;
* Spawn the vehicle&lt;br /&gt;
* Check if it has been spawned successfully, or output a message&lt;br /&gt;
&lt;br /&gt;
In order to achieve our goals, we have to use several functions. To find function we need to use, we should visit the [[Scripting Functions|Server Functions List]]. First we need a function to get the players position. Since players are Elements, we first jump to the '''Element functions''' where we find the [[getElementPosition]] function. By clicking on the function name in the list, you get to the function description. There we can see the syntax, what it returns and usually an example. The syntax shows us what arguments we can or have to submit.&lt;br /&gt;
&lt;br /&gt;
For [[getElementPosition]], the syntax is:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
float, float, float getElementPosition ( element theElement )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The three ''float'' in front of the function name are the return type. In this case it means the function returns three floating point numbers. (x, y and z) Within the parentheses, you can see what arguments you have to submit. In this case only the element whose position you want to get, which is the player in our example.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function createVehicleForPlayer(thePlayer, command, vehicleModel)&lt;br /&gt;
	-- get the position and put it in the x,y,z variables&lt;br /&gt;
	-- (local means, the variables only exist in the current scope, in this case, the function)&lt;br /&gt;
	local x,y,z = getElementPosition(thePlayer)&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next we want to ensure that the vehicle won't spawn directly in the player, so we add a few units to the ''x'' variable, which will make it spawn east from the player.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function createVehicleForPlayer(thePlayer, command, vehicleModel)&lt;br /&gt;
	local x,y,z = getElementPosition(thePlayer) -- get the position of the player&lt;br /&gt;
	x = x + 5 -- add 5 units to the x position&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now we need another function, one to spawn a vehicle. We once again search for it on the [[Scripting Functions|Server Functions List]], this time - since we are talking about vehicles - in the '''Vehicle functions''' section, where we will choose [[createVehicle]]. In this function's syntax, we only have one return type (which is more common), a vehicle element that points to the vehicle we just created. Also, we see that some arguments are enclosed within [ ] which means that those are optional.&lt;br /&gt;
&lt;br /&gt;
We already have all arguments we need for [[createVehicle]] in our function: The position we just calculated in the ''x,y,z'' variables and the model id that we provided through the command (&amp;quot;createvehicle 468&amp;quot;) and can access in the function as ''vehicleModel'' variable.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function createVehicleForPlayer(thePlayer, command, vehicleModel)&lt;br /&gt;
	local x,y,z = getElementPosition(thePlayer) -- get the position of the player&lt;br /&gt;
	x = x + 5 -- add 5 units to the x position&lt;br /&gt;
	-- create the vehicle and store the returned vehicle element in the ''createdVehicle'' variable&lt;br /&gt;
	local createdVehicle = createVehicle(tonumber(vehicleModel),x,y,z)&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Of course this code can be improved in many ways, but at least we want to add a check whether the vehicle was created successfully or not. As we can read on the [[createVehicle]] page under '''Returns''', the function returns ''false'' when it was unable to create the vehicle. Thus, we check the value of the ''createVehicle'' variable.&lt;br /&gt;
&lt;br /&gt;
Now we have our complete script:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function createVehicleForPlayer(thePlayer, command, vehicleModel)&lt;br /&gt;
	local x,y,z = getElementPosition(thePlayer) -- get the position of the player&lt;br /&gt;
	x = x + 5 -- add 5 units to the x position&lt;br /&gt;
	local createdVehicle = createVehicle(tonumber(vehicleModel),x,y,z)&lt;br /&gt;
	-- check if the return value was ''false''&lt;br /&gt;
	if (createdVehicle == false) then&lt;br /&gt;
		-- if so, output a message to the chatbox, but only to this player.&lt;br /&gt;
		outputChatBox(&amp;quot;Failed to create vehicle.&amp;quot;,thePlayer)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler(&amp;quot;createvehicle&amp;quot;, createVehicleForPlayer)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As you can see, we introduced another function with [[outputChatBox]]. By now, you should be able to explore the function's documentation page yourself. For more advanced scripting, please check out the [[Map manager|Map Manager]].&lt;br /&gt;
&lt;br /&gt;
==What you need to know==&lt;br /&gt;
You already read some things about resources, command handlers and finding functions in the documentation in the first paragraph, but there is much more to learn. This section will give you a rather short overview over some of these things, while linking to related pages if possible.&lt;br /&gt;
===Clientside and Serverside scripts===&lt;br /&gt;
You may have already noticed these or similiar terms (Server/Client) somewhere on this wiki, mostly in conjunction with functions. MTA not only supports scripts that run on the server and provide commands (like the one we wrote above) or other features, but also scripts that run on the MTA client the players use to connect to the server. The reason for this is, that some features MTA provides have to be clientside (like a GUI - Graphical User Interface), others should be because they work better and still others are better off to be serverside or just don't work clientside.&lt;br /&gt;
&lt;br /&gt;
Most scripts you will make (gamemodes, maps) will probably be serverside, like the one we wrote in the first section. If you run into something that can't be solved serverside, you will probably have to make it clientside. For a clientside script for example, you would create a ordinary script file (for example called ''client.lua'') and specify it in the meta.xml, like this:&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;
The ''type'' attribute defaults to 'server', so you only need to specify it for clientside scripts. When you do this, the clientside script will be downloaded to the player's computer once he connects to the server. Read more about [[Client side scripts]].&lt;br /&gt;
&lt;br /&gt;
===More complex resources===&lt;br /&gt;
The previous section showed briefly how to add clientside scripts to the resource, but there is also much more possible. As mentioned at the very top of this page, resources can be pretty much everything. Their purpose is defined by what they do. Let's have some theoretical resources, by looking at the files it contains, the ''meta.xml'' and what they might do:&lt;br /&gt;
&lt;br /&gt;
====First example - A utility script====&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;Someguy&amp;quot; description=&amp;quot;admin commands&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;
* The ''commands.lua'' provides some admin commands, like banning a player, muting or something else that can be used to admin the server&lt;br /&gt;
* The ''client.lua'' provides a GUI to be able to perform the mentioned actions easily&lt;br /&gt;
&lt;br /&gt;
This example might be running all the time (maybe even auto-started when the server starts) as it's useful during the whole gaming experience and also wont interfere with the gameplay, unless an admin decides to take some action of course.&lt;br /&gt;
&lt;br /&gt;
====Second example - A gamemode====&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;Someguy&amp;quot; description=&amp;quot;Counterstrike remake&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;
* The ''counterstrike.lua'' contains similiar to the following features:&lt;br /&gt;
** Let players choose their team and spawn them&lt;br /&gt;
** Provide them with weapons, targets and instructions (maybe read from a Map, see below)&lt;br /&gt;
** Define the game's rules, e.g. when does the round end, what happens when a player dies&lt;br /&gt;
** .. and maybe some more&lt;br /&gt;
* The ''buymenu.lua'' is a clientside script and creates a menu to buy weapons&lt;br /&gt;
&lt;br /&gt;
This example can be called a gamemode, since it not only intereferes with the gameplay, but actually defines the rules of it. The ''type'' attribute indicates that this example works with the [[Map manager]], yet another resource that was written by the QA Team to manage gamemodes and map loading. It is highly recommended that you base your gamemodes on the techniques it provides.&lt;br /&gt;
&lt;br /&gt;
This also means that the gamemode probably won't run without a map. Gamemodes should always be as generic as possible. An example for a map is stated in the next example.&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;
===Events===&lt;br /&gt;
Events are the way MTA tells scripts about things that happen. For example when a player dies, the [[onPlayerWasted]] event is triggered. In order to perform any actions when a player dies, you have to prepare yourself similiar to adding a command handler, as shown in [[#Writing_the_script|the first chapter]].&lt;br /&gt;
&lt;br /&gt;
This example will output a message with the name of the player who died:&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;
==Where to go from here==&lt;br /&gt;
You should now be familiar with the most basic aspects of MTA scripting and also a bit with the documentation. The [[Main Page]] provides you with links to more information, Tutorials and References that allow a deeper look into the topics you desire to learn about.&lt;br /&gt;
{{note|From here we recommend reading the [[debugging]] tutorial. Good debugging skills are an absolute necessity when you are making scripts. We also recommend you to use the [[predefined variables list]] to help you with certain tasks and make scripting easier and faster.}}&lt;br /&gt;
'''See also:'''&lt;br /&gt;
* [[Advanced Topics]]&lt;br /&gt;
[[ru:Scripting Introduction]]&lt;br /&gt;
[[it:Introduzione allo scripting]]&lt;br /&gt;
[[es:Introducción a la Programación]]&lt;br /&gt;
[[nl:Scripting_introductie]]&lt;/div&gt;</summary>
		<author><name>Stanley Sathler .</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=PT-BR/Introdu%C3%A7%C3%A3o_ao_Scripting&amp;diff=31118</id>
		<title>PT-BR/Introdução ao Scripting</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=PT-BR/Introdu%C3%A7%C3%A3o_ao_Scripting&amp;diff=31118"/>
		<updated>2012-05-22T22:35:18Z</updated>

		<summary type="html">&lt;p&gt;Stanley Sathler .: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Os recursos (resources) são uma &amp;quot;chave&amp;quot; do MTA. Um recurso é uma pasta ou um arquivo comprimido (em .zip, e não em .rar) contendo um conjunto de arquivos, juntos a um ''meta.xml'' que informa ao servidor como/quais recursos devem ser carregados e quais arquivos estes possuem. Um recurso pode ser visto como um programa de computador, onde pode ser iniciado/interrompido a qualquer momento, além de poder rodar junto a diversos outros recursos ao mesmo tempo.&lt;br /&gt;
&lt;br /&gt;
Tudo relacionado a scripting (programação em linguagem Lua, neste caso) tem relação com os recursos, afinal, os recursos nada mais são do que, normalmente, um conjunto de scripts escritos em Lua destinados a realizar alguma tarefa. O que um recurso define é se determinados arquivos definem um gamemode (estilo de jogo, como corrida, deathmatch, entre outros), um mapa ou qualquer outra coisa. O MTA já vem por padrão com alguns recursos interessantes que você pode, além de reaproveitá-los, adaptá-los às suas necessidades (como por exemplo, um limitador de áreas que impede que um jogador se afaste de um determinado local, ou scripts que criam objetos &amp;quot;pegáveis&amp;quot; no mapa, como colete e armas). {{tip|Para facilitar seus primeiros passos na programação em linguagem Lua, é recomendado que se utilize um editor de textos com highlight, ou seja, &amp;quot;cores&amp;quot; para cada comando. Isso facilita a leitura e escrita de qualquer código independente da linguagem. Muito utilizado e recomendado por nós é o [http://notepad-plus.sourceforge.net/uk/site.htm Notepad++] ou [http://luaedit.sourceforge.net/ LuaEdit]. Há também um editor de códigos (criado por fãs do MTA) com foco na linguagem Lua para o MTA: [[MTASE|MTA Script Editor]] (ainda em fase de desenvolvimento, mas você já pode testá-lo). }}&lt;br /&gt;
&lt;br /&gt;
==Criando nosso primeiro script==&lt;br /&gt;
Nós primeiro vamos aprender a criar um script que permita que o jogador ande pela cidade, passo-a-passo.&lt;br /&gt;
===Onde estão todos os scripts?===&lt;br /&gt;
Vamos dar uma olhada na estrutura dos scripts. Vá até a pasta de instalação do seu MTA (padrão: C:\Arquivo de Programas\MTA San Andreas 1.x\) e siga os passos abaixo:&lt;br /&gt;
&lt;br /&gt;
	/server/mods/deathmatch/resources/&lt;br /&gt;
&lt;br /&gt;
Você irá ver diversos arquivos .zip, que são os simples scripts que vêm por padrão junto ao MTA. Cada arquivo é um &amp;quot;recurso&amp;quot;, e eles serão todos descompactados e carregados pelo servidor quando ele for iniciado. Para criar seu próprio resource, simplesmente crie uma pasta com um nome de sua preferência. Nós iremos usar o nome &amp;quot;myserver&amp;quot; para este tutorial.&lt;br /&gt;
&lt;br /&gt;
Após a criação da pasta (myserver), acessamos-a:&lt;br /&gt;
&lt;br /&gt;
	/server/mods/deathmatch/resources/myserver/&lt;br /&gt;
&lt;br /&gt;
===Identificando seu recurso===&lt;br /&gt;
Para que o servidor reconheça os arquivos de um determinado recurso (para carregá-los), um arquivo ''meta.xml'' deve ser criado, contendo uma lista de todo o conteúdo do recurso. O arquivo ''meta.xml'' deve ser salvo na pasta principal (nesse caso, na pasta &amp;quot;myserver&amp;quot;). Então, abra um editor de textos (recomenda-se o Notepad++) e salve-o com o nome de &amp;quot;meta.xml&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Entre com as seguintes linhas no arquivo ''meta.xml'':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;meta&amp;gt;&lt;br /&gt;
     &amp;lt;info author=&amp;quot;Seu_Nome&amp;quot; type=&amp;quot;gamemode&amp;quot; name=&amp;quot;Meu_Servidor&amp;quot; description=&amp;quot;Meu primeiro recurso&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;
Na tag ''&amp;lt;info /&amp;gt;'', existe o campo ''&amp;quot;type&amp;quot;'', que indica que o recurso criado é um ''gamemode''. Pode também ser um ''map'' (mapa), que iremos explicar depois.&lt;br /&gt;
Um gamemode é o que você precisa para criar um servidor independente.&lt;br /&gt;
&lt;br /&gt;
A tag ''&amp;lt;script /&amp;gt;'' indica o caminho dos arquivos (escritos em Lua) presentes no seu recurso. O do exemplo (script.lua), criaremos no próximo passo.&lt;br /&gt;
&lt;br /&gt;
===Criando um script simples===&lt;br /&gt;
Observe que na tag ''&amp;lt;script /&amp;gt;'' anterior, o arquivo .lua está presente na pasta principal do recurso (e não em uma subpasta). Então precisamos salvar o script na pasta principal, assim como indicado na tag. Salve o seguinte código no arquivo script.lua:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local spawnX, spawnY, spawnZ = 1959.55, -1714.46, 10&lt;br /&gt;
function joinHandler()&lt;br /&gt;
	spawnPlayer(source, spawnX, spawnY, spawnZ)&lt;br /&gt;
	fadeCamera(source, true)&lt;br /&gt;
	setCameraTarget(source, source)&lt;br /&gt;
	outputChatBox(&amp;quot;Bem-vindo ao meu servidor!&amp;quot;, source)&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onPlayerJoin&amp;quot;, getRootElement(), joinHandler)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
O script irá gerar o seu personagem (seu boneco) nas coordenadas (x, y, z) especificadas assim que você entrar no jogo. Note que a função ''fadeCamera()'' precisa ser usada ou, do contrário, a tela ficará preta (e você não verá nada). Outra função é a ''setCameraTarget()'', que foca a câmera do jogo no seu personagem (do contrário, a câmera estaria virada para o céu).&lt;br /&gt;
&lt;br /&gt;
A variável '''source''' representa o elemento responsável pela chamada do evento (você verá mais sobre eventos mais adiante). Assim, quando um jogador entra no jogo, o evento &amp;quot;onPlayerJoin&amp;quot; é chamado e, em seguida, chama a função. O evento automaticamente define o jogador na variável ''source'' (obs: a variável ''source'' armazena sempre o elemento que chamou determinado evento. Ou seja, nem sempre ''source'' será o jogador. Cuidado com isso.)&lt;br /&gt;
&lt;br /&gt;
Se olharmos bem para o [[addEventHandler]], veremos 3 argumentos: 'onPlayerJoin', que indica o evento que chamará a função (no caso, esse evento é chamado assim que o jogador entra no jogo, logo, a função é chamada assim que o jogador entra no jogo); 'getRootElement()', que indica quem poderá chamar o evento (ou seja, todos os elementos, incluindo todos os jogadores); 'joinHandler', que indica o nome da função que será chamada quando o evento for chamado. Maiores detalhes serão explicados mais adiante. Vamos agora simplesmente rodar nosso servidor e testar nosso script.&lt;br /&gt;
&lt;br /&gt;
===Executando o script===&lt;br /&gt;
Para iniciar o servidor, simplesmente execute o arquivo &amp;quot;MTA Server.exe&amp;quot; (presente na pasta de instalação do MTA:SA). Primeiramente é mostrada uma lista com os principais status do seu servidor; observe o número da porta, que você irá precisar quando entrar no jogo. Logo após, o servidor carrega todos os resources (caso todos estejam corretos) que estão presentes no diretório /resource/ e então &amp;quot;fica pronto para aceitar conexões&amp;quot; (ready to accept connections!).&lt;br /&gt;
&lt;br /&gt;
Antes de se conectar ao seu servidor, você precisa executar o gamemode que criou. Para isso, digite no console (a janela do MTA Server.exe) o comando ''gamemode myserver'' (obs: &amp;quot;myserver&amp;quot; é o nome da pasta que você criou no início deste tutorial e, consequentemente, o nome do seu recurso) e pressione Enter. O servidor irá carregar o gamemode que você criou e irá mostrar os erros (caso existam) do seu script. Agora você pode se conectar ao seu servidor de duas diferentes maneiras: clicando em &amp;quot;Quick Connect&amp;quot; e inserindo o endereço IP do seu servidor e o número da porta, ou clicando em &amp;quot;Server Browser&amp;quot;, acessando a aba &amp;quot;Local&amp;quot; e clicando duas vezes no seu servidor. Se tudo correr bem, seu personagem será criado nas coordenadas especificadas.&lt;br /&gt;
&lt;br /&gt;
No próximo tópico iremos criar um comando para que o jogador possa gerar um veículo ao seu lado. Se preferir (embora não recomendado caso seja iniciante), você pode visitar alguns scripts mais avançados clicando [[Map manager|aqui]], ou prossiga com este tutorial. Outra parte interessante deste tutorial é [[PT-BR/Introducao_ao_GUI|Iniciando com GUIs]], no qual aborda a criação de interfaces gráficas (janelas, botões, etc) para seus scripts.&lt;br /&gt;
&lt;br /&gt;
==Criando um comando simples==&lt;br /&gt;
Vamos voltar ao arquivo ''script.lua'' (abra-o novamente). Como mencionado anteriormente, vamos criar agora um comando (para executá-lo, digite no chat ''/seucomando'') que irá gerar um carro ao lado do seu personagem. Antes de tudo precisamos criar uma função que iremos chamar posteriormente e um [[addCommandHandler]](), responsável por criar o comando.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- cria a funcao que sera chamada pelo comando. Os argumentos sao: thePlayer, command, vehicleModel&lt;br /&gt;
function createVehicleForPlayer(thePlayer, command, vehicleModel)&lt;br /&gt;
   -- cria um veiculo&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- cria um lancador de comandos&lt;br /&gt;
addCommandHandler(&amp;quot;createvehicle&amp;quot;, createVehicleForPlayer)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
''Nota: Você pode clicar nas funções dos códigos para obter uma explicação de cada uma delas.&lt;br /&gt;
&lt;br /&gt;
====Sobre os lançadores de comandos (responsáveis por criar os comandos)====&lt;br /&gt;
O primeiro argumento do [[addCommandHandler]] é o nome do comando que o jogador precisará digitar (no exemplo, ele precisará digitar no chat ''/createvehicle &amp;lt;argumento&amp;gt;''. O segundo argumento é a função que será chamada quando o comando for digitado (nesse caso, a função ''createVehicleForPlayer()''.&lt;br /&gt;
&lt;br /&gt;
Se você já possui alguma experiência em programação, sabe que você chama uma função desta forma:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
nomeDaFuncao(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;
nomeDaFuncao(thePlayer, commandName, argumento3, ..)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Se observarmos bem o exemplo acima, podemos ver que o argumento1 é o jogador (quem digita o comando) e o argumento2 é o nome do comando (nesse caso, ''createvehicle''). O argumento3 é o argumento digitado depois do comando (por exemplo, se o jogador digitou ''/createvehicle Infernus'', então a variável argumento3 irá armazenar o texto &amp;quot;Infernus&amp;quot;). Nunca se esqueça que os dois primeiros argumentos são padrões (ou seja, precisam existir), mas você pode nomeá-los com outro nome (mas isto não é necessário agora).&lt;br /&gt;
&lt;br /&gt;
Nós chamamos a função [[addCommandHandler]], que chama a função ''createVehicleForPlayer''.&lt;br /&gt;
&lt;br /&gt;
Por exemplo: alguém digita &amp;quot;createvehicle 468&amp;quot; no chat para gerar uma Sanchez (468 é o ID da Sanchez. Veja mais [[Vehicle_IDs|aqui]]), então o lançador de comandos (quando dizemos &amp;quot;lançador de comandos&amp;quot;, é o mesmo que &amp;quot;criador de comandos&amp;quot;) chama a função createVehicleForPlayer(), como '''se''' nós tivéssemos a seguinte linha no script:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
createVehicleForPlayer(thePlayer,&amp;quot;createvehicle&amp;quot;,&amp;quot;468&amp;quot;) -- thePlayer e o jogador que digitou o comando&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
As we can see, it provides several parameters: the player who called the command, the command he entered and whatever text he had after that, in this case &amp;quot;468&amp;quot; as vehicle id for the Sanchez. The first two parameters are the same with all command handlers, which you can read on the [[addEventHandler]] page. For this fact, you always have to define at least those two parameters to use any after that (for example to process text that was entered after the command, like in our example the vehicle model id).&lt;br /&gt;
&lt;br /&gt;
''Note: You have to add the command handler AFTER you defined the handler function, else it can't find it. The order of execution matters.''&lt;br /&gt;
&lt;br /&gt;
====Writing the function====&lt;br /&gt;
In order to fill the function we created, we need to think about what we have to do:&lt;br /&gt;
* Get the players position, so we know where to spawn the vehicle (we want it to appear right beside the player)&lt;br /&gt;
* Calculate the position we want to spawn the vehicle at (we don't want it to appear in the player)&lt;br /&gt;
* Spawn the vehicle&lt;br /&gt;
* Check if it has been spawned successfully, or output a message&lt;br /&gt;
&lt;br /&gt;
In order to achieve our goals, we have to use several functions. To find function we need to use, we should visit the [[Scripting Functions|Server Functions List]]. First we need a function to get the players position. Since players are Elements, we first jump to the '''Element functions''' where we find the [[getElementPosition]] function. By clicking on the function name in the list, you get to the function description. There we can see the syntax, what it returns and usually an example. The syntax shows us what arguments we can or have to submit.&lt;br /&gt;
&lt;br /&gt;
For [[getElementPosition]], the syntax is:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
float, float, float getElementPosition ( element theElement )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The three ''float'' in front of the function name are the return type. In this case it means the function returns three floating point numbers. (x, y and z) Within the parentheses, you can see what arguments you have to submit. In this case only the element whose position you want to get, which is the player in our example.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function createVehicleForPlayer(thePlayer, command, vehicleModel)&lt;br /&gt;
	-- get the position and put it in the x,y,z variables&lt;br /&gt;
	-- (local means, the variables only exist in the current scope, in this case, the function)&lt;br /&gt;
	local x,y,z = getElementPosition(thePlayer)&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next we want to ensure that the vehicle won't spawn directly in the player, so we add a few units to the ''x'' variable, which will make it spawn east from the player.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function createVehicleForPlayer(thePlayer, command, vehicleModel)&lt;br /&gt;
	local x,y,z = getElementPosition(thePlayer) -- get the position of the player&lt;br /&gt;
	x = x + 5 -- add 5 units to the x position&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now we need another function, one to spawn a vehicle. We once again search for it on the [[Scripting Functions|Server Functions List]], this time - since we are talking about vehicles - in the '''Vehicle functions''' section, where we will choose [[createVehicle]]. In this function's syntax, we only have one return type (which is more common), a vehicle element that points to the vehicle we just created. Also, we see that some arguments are enclosed within [ ] which means that those are optional.&lt;br /&gt;
&lt;br /&gt;
We already have all arguments we need for [[createVehicle]] in our function: The position we just calculated in the ''x,y,z'' variables and the model id that we provided through the command (&amp;quot;createvehicle 468&amp;quot;) and can access in the function as ''vehicleModel'' variable.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function createVehicleForPlayer(thePlayer, command, vehicleModel)&lt;br /&gt;
	local x,y,z = getElementPosition(thePlayer) -- get the position of the player&lt;br /&gt;
	x = x + 5 -- add 5 units to the x position&lt;br /&gt;
	-- create the vehicle and store the returned vehicle element in the ''createdVehicle'' variable&lt;br /&gt;
	local createdVehicle = createVehicle(tonumber(vehicleModel),x,y,z)&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Of course this code can be improved in many ways, but at least we want to add a check whether the vehicle was created successfully or not. As we can read on the [[createVehicle]] page under '''Returns''', the function returns ''false'' when it was unable to create the vehicle. Thus, we check the value of the ''createVehicle'' variable.&lt;br /&gt;
&lt;br /&gt;
Now we have our complete script:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function createVehicleForPlayer(thePlayer, command, vehicleModel)&lt;br /&gt;
	local x,y,z = getElementPosition(thePlayer) -- get the position of the player&lt;br /&gt;
	x = x + 5 -- add 5 units to the x position&lt;br /&gt;
	local createdVehicle = createVehicle(tonumber(vehicleModel),x,y,z)&lt;br /&gt;
	-- check if the return value was ''false''&lt;br /&gt;
	if (createdVehicle == false) then&lt;br /&gt;
		-- if so, output a message to the chatbox, but only to this player.&lt;br /&gt;
		outputChatBox(&amp;quot;Failed to create vehicle.&amp;quot;,thePlayer)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler(&amp;quot;createvehicle&amp;quot;, createVehicleForPlayer)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As you can see, we introduced another function with [[outputChatBox]]. By now, you should be able to explore the function's documentation page yourself. For more advanced scripting, please check out the [[Map manager|Map Manager]].&lt;br /&gt;
&lt;br /&gt;
==What you need to know==&lt;br /&gt;
You already read some things about resources, command handlers and finding functions in the documentation in the first paragraph, but there is much more to learn. This section will give you a rather short overview over some of these things, while linking to related pages if possible.&lt;br /&gt;
===Clientside and Serverside scripts===&lt;br /&gt;
You may have already noticed these or similiar terms (Server/Client) somewhere on this wiki, mostly in conjunction with functions. MTA not only supports scripts that run on the server and provide commands (like the one we wrote above) or other features, but also scripts that run on the MTA client the players use to connect to the server. The reason for this is, that some features MTA provides have to be clientside (like a GUI - Graphical User Interface), others should be because they work better and still others are better off to be serverside or just don't work clientside.&lt;br /&gt;
&lt;br /&gt;
Most scripts you will make (gamemodes, maps) will probably be serverside, like the one we wrote in the first section. If you run into something that can't be solved serverside, you will probably have to make it clientside. For a clientside script for example, you would create a ordinary script file (for example called ''client.lua'') and specify it in the meta.xml, like this:&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;
The ''type'' attribute defaults to 'server', so you only need to specify it for clientside scripts. When you do this, the clientside script will be downloaded to the player's computer once he connects to the server. Read more about [[Client side scripts]].&lt;br /&gt;
&lt;br /&gt;
===More complex resources===&lt;br /&gt;
The previous section showed briefly how to add clientside scripts to the resource, but there is also much more possible. As mentioned at the very top of this page, resources can be pretty much everything. Their purpose is defined by what they do. Let's have some theoretical resources, by looking at the files it contains, the ''meta.xml'' and what they might do:&lt;br /&gt;
&lt;br /&gt;
====First example - A utility script====&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;Someguy&amp;quot; description=&amp;quot;admin commands&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;
* The ''commands.lua'' provides some admin commands, like banning a player, muting or something else that can be used to admin the server&lt;br /&gt;
* The ''client.lua'' provides a GUI to be able to perform the mentioned actions easily&lt;br /&gt;
&lt;br /&gt;
This example might be running all the time (maybe even auto-started when the server starts) as it's useful during the whole gaming experience and also wont interfere with the gameplay, unless an admin decides to take some action of course.&lt;br /&gt;
&lt;br /&gt;
====Second example - A gamemode====&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;Someguy&amp;quot; description=&amp;quot;Counterstrike remake&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;
* The ''counterstrike.lua'' contains similiar to the following features:&lt;br /&gt;
** Let players choose their team and spawn them&lt;br /&gt;
** Provide them with weapons, targets and instructions (maybe read from a Map, see below)&lt;br /&gt;
** Define the game's rules, e.g. when does the round end, what happens when a player dies&lt;br /&gt;
** .. and maybe some more&lt;br /&gt;
* The ''buymenu.lua'' is a clientside script and creates a menu to buy weapons&lt;br /&gt;
&lt;br /&gt;
This example can be called a gamemode, since it not only intereferes with the gameplay, but actually defines the rules of it. The ''type'' attribute indicates that this example works with the [[Map manager]], yet another resource that was written by the QA Team to manage gamemodes and map loading. It is highly recommended that you base your gamemodes on the techniques it provides.&lt;br /&gt;
&lt;br /&gt;
This also means that the gamemode probably won't run without a map. Gamemodes should always be as generic as possible. An example for a map is stated in the next example.&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;
===Events===&lt;br /&gt;
Events are the way MTA tells scripts about things that happen. For example when a player dies, the [[onPlayerWasted]] event is triggered. In order to perform any actions when a player dies, you have to prepare yourself similiar to adding a command handler, as shown in [[#Writing_the_script|the first chapter]].&lt;br /&gt;
&lt;br /&gt;
This example will output a message with the name of the player who died:&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;
==Where to go from here==&lt;br /&gt;
You should now be familiar with the most basic aspects of MTA scripting and also a bit with the documentation. The [[Main Page]] provides you with links to more information, Tutorials and References that allow a deeper look into the topics you desire to learn about.&lt;br /&gt;
{{note|From here we recommend reading the [[debugging]] tutorial. Good debugging skills are an absolute necessity when you are making scripts. We also recommend you to use the [[predefined variables list]] to help you with certain tasks and make scripting easier and faster.}}&lt;br /&gt;
'''See also:'''&lt;br /&gt;
* [[Advanced Topics]]&lt;br /&gt;
[[ru:Scripting Introduction]]&lt;br /&gt;
[[it:Introduzione allo scripting]]&lt;br /&gt;
[[es:Introducción a la Programación]]&lt;br /&gt;
[[nl:Scripting_introductie]]&lt;/div&gt;</summary>
		<author><name>Stanley Sathler .</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=PT-BR/Introdu%C3%A7%C3%A3o_ao_Scripting&amp;diff=31117</id>
		<title>PT-BR/Introdução ao Scripting</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=PT-BR/Introdu%C3%A7%C3%A3o_ao_Scripting&amp;diff=31117"/>
		<updated>2012-05-22T22:34:45Z</updated>

		<summary type="html">&lt;p&gt;Stanley Sathler .: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Os recursos (resources) são uma &amp;quot;chave&amp;quot; do MTA. Um recurso é uma pasta ou um arquivo comprimido (em .zip, e não em .rar) contendo um conjunto de arquivos, juntos a um ''meta.xml'' que informa ao servidor como/quais recursos devem ser carregados e quais arquivos estes possuem. Um recurso pode ser visto como um programa de computador, onde pode ser iniciado/interrompido a qualquer momento, além de poder rodar junto a diversos outros recursos ao mesmo tempo.&lt;br /&gt;
&lt;br /&gt;
Tudo relacionado a scripting (programação em linguagem Lua, neste caso) tem relação com os recursos, afinal, os recursos nada mais são do que, normalmente, um conjunto de scripts escritos em Lua destinados a realizar alguma tarefa. O que um recurso define é se determinados arquivos definem um gamemode (estilo de jogo, como corrida, deathmatch, entre outros), um mapa ou qualquer outra coisa. O MTA já vem por padrão com alguns recursos interessantes que você pode, além de reaproveitá-los, adaptá-los às suas necessidades (como por exemplo, um limitador de áreas que impede que um jogador se afaste de um determinado local, ou scripts que criam objetos &amp;quot;pegáveis&amp;quot; no mapa, como colete e armas). {{tip|Para facilitar seus primeiros passos na programação em linguagem Lua, é recomendado que se utilize um editor de textos com highlight, ou seja, &amp;quot;cores&amp;quot; para cada comando. Isso facilita a leitura e escrita de qualquer código independente da linguagem. Muito utilizado e recomendado por nós é o [http://notepad-plus.sourceforge.net/uk/site.htm Notepad++] ou [http://luaedit.sourceforge.net/ LuaEdit]. Há também um editor de códigos (criado por fãs do MTA) com foco na linguagem Lua para o MTA: [[MTASE|MTA Script Editor]] (ainda em fase de desenvolvimento, mas você já pode testá-lo).&lt;br /&gt;
&lt;br /&gt;
==Criando nosso primeiro script==&lt;br /&gt;
Nós primeiro vamos aprender a criar um script que permita que o jogador ande pela cidade, passo-a-passo.&lt;br /&gt;
===Onde estão todos os scripts?===&lt;br /&gt;
Vamos dar uma olhada na estrutura dos scripts. Vá até a pasta de instalação do seu MTA (padrão: C:\Arquivo de Programas\MTA San Andreas 1.x\) e siga os passos abaixo:&lt;br /&gt;
&lt;br /&gt;
	/server/mods/deathmatch/resources/&lt;br /&gt;
&lt;br /&gt;
Você irá ver diversos arquivos .zip, que são os simples scripts que vêm por padrão junto ao MTA. Cada arquivo é um &amp;quot;recurso&amp;quot;, e eles serão todos descompactados e carregados pelo servidor quando ele for iniciado. Para criar seu próprio resource, simplesmente crie uma pasta com um nome de sua preferência. Nós iremos usar o nome &amp;quot;myserver&amp;quot; para este tutorial.&lt;br /&gt;
&lt;br /&gt;
Após a criação da pasta (myserver), acessamos-a:&lt;br /&gt;
&lt;br /&gt;
	/server/mods/deathmatch/resources/myserver/&lt;br /&gt;
&lt;br /&gt;
===Identificando seu recurso===&lt;br /&gt;
Para que o servidor reconheça os arquivos de um determinado recurso (para carregá-los), um arquivo ''meta.xml'' deve ser criado, contendo uma lista de todo o conteúdo do recurso. O arquivo ''meta.xml'' deve ser salvo na pasta principal (nesse caso, na pasta &amp;quot;myserver&amp;quot;). Então, abra um editor de textos (recomenda-se o Notepad++) e salve-o com o nome de &amp;quot;meta.xml&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Entre com as seguintes linhas no arquivo ''meta.xml'':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;meta&amp;gt;&lt;br /&gt;
     &amp;lt;info author=&amp;quot;Seu_Nome&amp;quot; type=&amp;quot;gamemode&amp;quot; name=&amp;quot;Meu_Servidor&amp;quot; description=&amp;quot;Meu primeiro recurso&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;
Na tag ''&amp;lt;info /&amp;gt;'', existe o campo ''&amp;quot;type&amp;quot;'', que indica que o recurso criado é um ''gamemode''. Pode também ser um ''map'' (mapa), que iremos explicar depois.&lt;br /&gt;
Um gamemode é o que você precisa para criar um servidor independente.&lt;br /&gt;
&lt;br /&gt;
A tag ''&amp;lt;script /&amp;gt;'' indica o caminho dos arquivos (escritos em Lua) presentes no seu recurso. O do exemplo (script.lua), criaremos no próximo passo.&lt;br /&gt;
&lt;br /&gt;
===Criando um script simples===&lt;br /&gt;
Observe que na tag ''&amp;lt;script /&amp;gt;'' anterior, o arquivo .lua está presente na pasta principal do recurso (e não em uma subpasta). Então precisamos salvar o script na pasta principal, assim como indicado na tag. Salve o seguinte código no arquivo script.lua:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local spawnX, spawnY, spawnZ = 1959.55, -1714.46, 10&lt;br /&gt;
function joinHandler()&lt;br /&gt;
	spawnPlayer(source, spawnX, spawnY, spawnZ)&lt;br /&gt;
	fadeCamera(source, true)&lt;br /&gt;
	setCameraTarget(source, source)&lt;br /&gt;
	outputChatBox(&amp;quot;Bem-vindo ao meu servidor!&amp;quot;, source)&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onPlayerJoin&amp;quot;, getRootElement(), joinHandler)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
O script irá gerar o seu personagem (seu boneco) nas coordenadas (x, y, z) especificadas assim que você entrar no jogo. Note que a função ''fadeCamera()'' precisa ser usada ou, do contrário, a tela ficará preta (e você não verá nada). Outra função é a ''setCameraTarget()'', que foca a câmera do jogo no seu personagem (do contrário, a câmera estaria virada para o céu).&lt;br /&gt;
&lt;br /&gt;
A variável '''source''' representa o elemento responsável pela chamada do evento (você verá mais sobre eventos mais adiante). Assim, quando um jogador entra no jogo, o evento &amp;quot;onPlayerJoin&amp;quot; é chamado e, em seguida, chama a função. O evento automaticamente define o jogador na variável ''source'' (obs: a variável ''source'' armazena sempre o elemento que chamou determinado evento. Ou seja, nem sempre ''source'' será o jogador. Cuidado com isso.)&lt;br /&gt;
&lt;br /&gt;
Se olharmos bem para o [[addEventHandler]], veremos 3 argumentos: 'onPlayerJoin', que indica o evento que chamará a função (no caso, esse evento é chamado assim que o jogador entra no jogo, logo, a função é chamada assim que o jogador entra no jogo); 'getRootElement()', que indica quem poderá chamar o evento (ou seja, todos os elementos, incluindo todos os jogadores); 'joinHandler', que indica o nome da função que será chamada quando o evento for chamado. Maiores detalhes serão explicados mais adiante. Vamos agora simplesmente rodar nosso servidor e testar nosso script.&lt;br /&gt;
&lt;br /&gt;
===Executando o script===&lt;br /&gt;
Para iniciar o servidor, simplesmente execute o arquivo &amp;quot;MTA Server.exe&amp;quot; (presente na pasta de instalação do MTA:SA). Primeiramente é mostrada uma lista com os principais status do seu servidor; observe o número da porta, que você irá precisar quando entrar no jogo. Logo após, o servidor carrega todos os resources (caso todos estejam corretos) que estão presentes no diretório /resource/ e então &amp;quot;fica pronto para aceitar conexões&amp;quot; (ready to accept connections!).&lt;br /&gt;
&lt;br /&gt;
Antes de se conectar ao seu servidor, você precisa executar o gamemode que criou. Para isso, digite no console (a janela do MTA Server.exe) o comando ''gamemode myserver'' (obs: &amp;quot;myserver&amp;quot; é o nome da pasta que você criou no início deste tutorial e, consequentemente, o nome do seu recurso) e pressione Enter. O servidor irá carregar o gamemode que você criou e irá mostrar os erros (caso existam) do seu script. Agora você pode se conectar ao seu servidor de duas diferentes maneiras: clicando em &amp;quot;Quick Connect&amp;quot; e inserindo o endereço IP do seu servidor e o número da porta, ou clicando em &amp;quot;Server Browser&amp;quot;, acessando a aba &amp;quot;Local&amp;quot; e clicando duas vezes no seu servidor. Se tudo correr bem, seu personagem será criado nas coordenadas especificadas.&lt;br /&gt;
&lt;br /&gt;
No próximo tópico iremos criar um comando para que o jogador possa gerar um veículo ao seu lado. Se preferir (embora não recomendado caso seja iniciante), você pode visitar alguns scripts mais avançados clicando [[Map manager|aqui]], ou prossiga com este tutorial. Outra parte interessante deste tutorial é [[PT-BR/Introducao_ao_GUI|Iniciando com GUIs]], no qual aborda a criação de interfaces gráficas (janelas, botões, etc) para seus scripts.&lt;br /&gt;
&lt;br /&gt;
==Criando um comando simples==&lt;br /&gt;
Vamos voltar ao arquivo ''script.lua'' (abra-o novamente). Como mencionado anteriormente, vamos criar agora um comando (para executá-lo, digite no chat ''/seucomando'') que irá gerar um carro ao lado do seu personagem. Antes de tudo precisamos criar uma função que iremos chamar posteriormente e um [[addCommandHandler]](), responsável por criar o comando.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- cria a funcao que sera chamada pelo comando. Os argumentos sao: thePlayer, command, vehicleModel&lt;br /&gt;
function createVehicleForPlayer(thePlayer, command, vehicleModel)&lt;br /&gt;
   -- cria um veiculo&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- cria um lancador de comandos&lt;br /&gt;
addCommandHandler(&amp;quot;createvehicle&amp;quot;, createVehicleForPlayer)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
''Nota: Você pode clicar nas funções dos códigos para obter uma explicação de cada uma delas.&lt;br /&gt;
&lt;br /&gt;
====Sobre os lançadores de comandos (responsáveis por criar os comandos)====&lt;br /&gt;
O primeiro argumento do [[addCommandHandler]] é o nome do comando que o jogador precisará digitar (no exemplo, ele precisará digitar no chat ''/createvehicle &amp;lt;argumento&amp;gt;''. O segundo argumento é a função que será chamada quando o comando for digitado (nesse caso, a função ''createVehicleForPlayer()''.&lt;br /&gt;
&lt;br /&gt;
Se você já possui alguma experiência em programação, sabe que você chama uma função desta forma:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
nomeDaFuncao(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;
nomeDaFuncao(thePlayer, commandName, argumento3, ..)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Se observarmos bem o exemplo acima, podemos ver que o argumento1 é o jogador (quem digita o comando) e o argumento2 é o nome do comando (nesse caso, ''createvehicle''). O argumento3 é o argumento digitado depois do comando (por exemplo, se o jogador digitou ''/createvehicle Infernus'', então a variável argumento3 irá armazenar o texto &amp;quot;Infernus&amp;quot;). Nunca se esqueça que os dois primeiros argumentos são padrões (ou seja, precisam existir), mas você pode nomeá-los com outro nome (mas isto não é necessário agora).&lt;br /&gt;
&lt;br /&gt;
Nós chamamos a função [[addCommandHandler]], que chama a função ''createVehicleForPlayer''.&lt;br /&gt;
&lt;br /&gt;
Por exemplo: alguém digita &amp;quot;createvehicle 468&amp;quot; no chat para gerar uma Sanchez (468 é o ID da Sanchez. Veja mais [[Vehicle_IDs|aqui]]), então o lançador de comandos (quando dizemos &amp;quot;lançador de comandos&amp;quot;, é o mesmo que &amp;quot;criador de comandos&amp;quot;) chama a função createVehicleForPlayer(), como '''se''' nós tivéssemos a seguinte linha no script:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
createVehicleForPlayer(thePlayer,&amp;quot;createvehicle&amp;quot;,&amp;quot;468&amp;quot;) -- thePlayer e o jogador que digitou o comando&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
As we can see, it provides several parameters: the player who called the command, the command he entered and whatever text he had after that, in this case &amp;quot;468&amp;quot; as vehicle id for the Sanchez. The first two parameters are the same with all command handlers, which you can read on the [[addEventHandler]] page. For this fact, you always have to define at least those two parameters to use any after that (for example to process text that was entered after the command, like in our example the vehicle model id).&lt;br /&gt;
&lt;br /&gt;
''Note: You have to add the command handler AFTER you defined the handler function, else it can't find it. The order of execution matters.''&lt;br /&gt;
&lt;br /&gt;
====Writing the function====&lt;br /&gt;
In order to fill the function we created, we need to think about what we have to do:&lt;br /&gt;
* Get the players position, so we know where to spawn the vehicle (we want it to appear right beside the player)&lt;br /&gt;
* Calculate the position we want to spawn the vehicle at (we don't want it to appear in the player)&lt;br /&gt;
* Spawn the vehicle&lt;br /&gt;
* Check if it has been spawned successfully, or output a message&lt;br /&gt;
&lt;br /&gt;
In order to achieve our goals, we have to use several functions. To find function we need to use, we should visit the [[Scripting Functions|Server Functions List]]. First we need a function to get the players position. Since players are Elements, we first jump to the '''Element functions''' where we find the [[getElementPosition]] function. By clicking on the function name in the list, you get to the function description. There we can see the syntax, what it returns and usually an example. The syntax shows us what arguments we can or have to submit.&lt;br /&gt;
&lt;br /&gt;
For [[getElementPosition]], the syntax is:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
float, float, float getElementPosition ( element theElement )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The three ''float'' in front of the function name are the return type. In this case it means the function returns three floating point numbers. (x, y and z) Within the parentheses, you can see what arguments you have to submit. In this case only the element whose position you want to get, which is the player in our example.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function createVehicleForPlayer(thePlayer, command, vehicleModel)&lt;br /&gt;
	-- get the position and put it in the x,y,z variables&lt;br /&gt;
	-- (local means, the variables only exist in the current scope, in this case, the function)&lt;br /&gt;
	local x,y,z = getElementPosition(thePlayer)&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next we want to ensure that the vehicle won't spawn directly in the player, so we add a few units to the ''x'' variable, which will make it spawn east from the player.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function createVehicleForPlayer(thePlayer, command, vehicleModel)&lt;br /&gt;
	local x,y,z = getElementPosition(thePlayer) -- get the position of the player&lt;br /&gt;
	x = x + 5 -- add 5 units to the x position&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now we need another function, one to spawn a vehicle. We once again search for it on the [[Scripting Functions|Server Functions List]], this time - since we are talking about vehicles - in the '''Vehicle functions''' section, where we will choose [[createVehicle]]. In this function's syntax, we only have one return type (which is more common), a vehicle element that points to the vehicle we just created. Also, we see that some arguments are enclosed within [ ] which means that those are optional.&lt;br /&gt;
&lt;br /&gt;
We already have all arguments we need for [[createVehicle]] in our function: The position we just calculated in the ''x,y,z'' variables and the model id that we provided through the command (&amp;quot;createvehicle 468&amp;quot;) and can access in the function as ''vehicleModel'' variable.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function createVehicleForPlayer(thePlayer, command, vehicleModel)&lt;br /&gt;
	local x,y,z = getElementPosition(thePlayer) -- get the position of the player&lt;br /&gt;
	x = x + 5 -- add 5 units to the x position&lt;br /&gt;
	-- create the vehicle and store the returned vehicle element in the ''createdVehicle'' variable&lt;br /&gt;
	local createdVehicle = createVehicle(tonumber(vehicleModel),x,y,z)&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Of course this code can be improved in many ways, but at least we want to add a check whether the vehicle was created successfully or not. As we can read on the [[createVehicle]] page under '''Returns''', the function returns ''false'' when it was unable to create the vehicle. Thus, we check the value of the ''createVehicle'' variable.&lt;br /&gt;
&lt;br /&gt;
Now we have our complete script:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function createVehicleForPlayer(thePlayer, command, vehicleModel)&lt;br /&gt;
	local x,y,z = getElementPosition(thePlayer) -- get the position of the player&lt;br /&gt;
	x = x + 5 -- add 5 units to the x position&lt;br /&gt;
	local createdVehicle = createVehicle(tonumber(vehicleModel),x,y,z)&lt;br /&gt;
	-- check if the return value was ''false''&lt;br /&gt;
	if (createdVehicle == false) then&lt;br /&gt;
		-- if so, output a message to the chatbox, but only to this player.&lt;br /&gt;
		outputChatBox(&amp;quot;Failed to create vehicle.&amp;quot;,thePlayer)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler(&amp;quot;createvehicle&amp;quot;, createVehicleForPlayer)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As you can see, we introduced another function with [[outputChatBox]]. By now, you should be able to explore the function's documentation page yourself. For more advanced scripting, please check out the [[Map manager|Map Manager]].&lt;br /&gt;
&lt;br /&gt;
==What you need to know==&lt;br /&gt;
You already read some things about resources, command handlers and finding functions in the documentation in the first paragraph, but there is much more to learn. This section will give you a rather short overview over some of these things, while linking to related pages if possible.&lt;br /&gt;
===Clientside and Serverside scripts===&lt;br /&gt;
You may have already noticed these or similiar terms (Server/Client) somewhere on this wiki, mostly in conjunction with functions. MTA not only supports scripts that run on the server and provide commands (like the one we wrote above) or other features, but also scripts that run on the MTA client the players use to connect to the server. The reason for this is, that some features MTA provides have to be clientside (like a GUI - Graphical User Interface), others should be because they work better and still others are better off to be serverside or just don't work clientside.&lt;br /&gt;
&lt;br /&gt;
Most scripts you will make (gamemodes, maps) will probably be serverside, like the one we wrote in the first section. If you run into something that can't be solved serverside, you will probably have to make it clientside. For a clientside script for example, you would create a ordinary script file (for example called ''client.lua'') and specify it in the meta.xml, like this:&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;
The ''type'' attribute defaults to 'server', so you only need to specify it for clientside scripts. When you do this, the clientside script will be downloaded to the player's computer once he connects to the server. Read more about [[Client side scripts]].&lt;br /&gt;
&lt;br /&gt;
===More complex resources===&lt;br /&gt;
The previous section showed briefly how to add clientside scripts to the resource, but there is also much more possible. As mentioned at the very top of this page, resources can be pretty much everything. Their purpose is defined by what they do. Let's have some theoretical resources, by looking at the files it contains, the ''meta.xml'' and what they might do:&lt;br /&gt;
&lt;br /&gt;
====First example - A utility script====&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;Someguy&amp;quot; description=&amp;quot;admin commands&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;
* The ''commands.lua'' provides some admin commands, like banning a player, muting or something else that can be used to admin the server&lt;br /&gt;
* The ''client.lua'' provides a GUI to be able to perform the mentioned actions easily&lt;br /&gt;
&lt;br /&gt;
This example might be running all the time (maybe even auto-started when the server starts) as it's useful during the whole gaming experience and also wont interfere with the gameplay, unless an admin decides to take some action of course.&lt;br /&gt;
&lt;br /&gt;
====Second example - A gamemode====&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;Someguy&amp;quot; description=&amp;quot;Counterstrike remake&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;
* The ''counterstrike.lua'' contains similiar to the following features:&lt;br /&gt;
** Let players choose their team and spawn them&lt;br /&gt;
** Provide them with weapons, targets and instructions (maybe read from a Map, see below)&lt;br /&gt;
** Define the game's rules, e.g. when does the round end, what happens when a player dies&lt;br /&gt;
** .. and maybe some more&lt;br /&gt;
* The ''buymenu.lua'' is a clientside script and creates a menu to buy weapons&lt;br /&gt;
&lt;br /&gt;
This example can be called a gamemode, since it not only intereferes with the gameplay, but actually defines the rules of it. The ''type'' attribute indicates that this example works with the [[Map manager]], yet another resource that was written by the QA Team to manage gamemodes and map loading. It is highly recommended that you base your gamemodes on the techniques it provides.&lt;br /&gt;
&lt;br /&gt;
This also means that the gamemode probably won't run without a map. Gamemodes should always be as generic as possible. An example for a map is stated in the next example.&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;
===Events===&lt;br /&gt;
Events are the way MTA tells scripts about things that happen. For example when a player dies, the [[onPlayerWasted]] event is triggered. In order to perform any actions when a player dies, you have to prepare yourself similiar to adding a command handler, as shown in [[#Writing_the_script|the first chapter]].&lt;br /&gt;
&lt;br /&gt;
This example will output a message with the name of the player who died:&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;
==Where to go from here==&lt;br /&gt;
You should now be familiar with the most basic aspects of MTA scripting and also a bit with the documentation. The [[Main Page]] provides you with links to more information, Tutorials and References that allow a deeper look into the topics you desire to learn about.&lt;br /&gt;
{{note|From here we recommend reading the [[debugging]] tutorial. Good debugging skills are an absolute necessity when you are making scripts. We also recommend you to use the [[predefined variables list]] to help you with certain tasks and make scripting easier and faster.}}&lt;br /&gt;
'''See also:'''&lt;br /&gt;
* [[Advanced Topics]]&lt;br /&gt;
[[ru:Scripting Introduction]]&lt;br /&gt;
[[it:Introduzione allo scripting]]&lt;br /&gt;
[[es:Introducción a la Programación]]&lt;br /&gt;
[[nl:Scripting_introductie]]&lt;/div&gt;</summary>
		<author><name>Stanley Sathler .</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=P%C3%A1gina_Inicial&amp;diff=31054</id>
		<title>Página Inicial</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=P%C3%A1gina_Inicial&amp;diff=31054"/>
		<updated>2012-05-20T23:17:23Z</updated>

		<summary type="html">&lt;p&gt;Stanley Sathler .: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| width=&amp;quot;100%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;0&amp;quot;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px solid #D8D8D8; padding: 5px; height: 130px;&amp;quot;&amp;gt;&lt;br /&gt;
[[File:Mtalogo.png|left|100px]]'''Bem Vindo ao Multi Theft Auto wiki em Português.''' Aqui você encontra toda a informação sobre o uso do Multi Theft Auto.&lt;br /&gt;
&lt;br /&gt;
Há muitas [[How you can help|coisas em que você pode nos ajudar]] para melhorar o MTA, como criar um mapa, um modo de jogo (gamemode), documentar as funções de programação, escrever códigos como exemplo, fazer tutoriais ou somente jogar o MTA e reportar falhas/bugs que encontrar.&lt;br /&gt;
&lt;br /&gt;
Se você tem alguma pergunta ou problema em relação à programação, sinta-se a vontade para nos comunicar em nosso [[IRC Channel|Canal IRC]].&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;[ Stop playing with yourself ]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
{| width=&amp;quot;100%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;0&amp;quot;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |&lt;br /&gt;
|-&lt;br /&gt;
|width=&amp;quot;50%&amp;quot; style=&amp;quot;vertical-align:top;&amp;quot; |&amp;lt;div style=&amp;quot;border: 1px solid #D8D8D8; padding:4px 8px 8px 8px; margin:10px; background: #FFFCF2;&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|link=]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Jogar&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;background: #FFEEAA; border: 1px solid #FFCD19;&amp;quot;&amp;gt;&lt;br /&gt;
[[File:Go-down.png|link=http://mtasa.com/]] ''' [http://mtasa.com/ Download Multi Theft Auto: San Andreas {{Current Version|full}}]'''&amp;lt;/div&amp;gt;&lt;br /&gt;
* [[Image:iBR.png|Em Português|20px]] [[PT-BR/Manual_do_Cliente|Manual do Cliente]]&lt;br /&gt;
* [[Image:iUS.png|Em Inglês|20px]] [[Changes_in_{{padleft:|3|{{Current Version|full}}}}| Mudanças na versão {{padleft:|3|{{Current Version|full}}}}]]&lt;br /&gt;
* [[Image:iBR.png|Em Português|20px]] [[PT-BR/Soluções_de_Problemas_-_FAQ|Solução de Problemas (FAQ)]]&lt;br /&gt;
* [[Image:iUS.png|Em Inglês|20px]] [[Upgrading_from_MTA:Race|Migrando do MTA:Race ao MTA:SA {{padleft:|3|{{Current Version|full}}}}]]&lt;br /&gt;
* [[Image:iBR.png|Em Inglês|20px]] [[PT-BR/Manual_do_Servidor|Manual do Servidor]]&lt;br /&gt;
* [[Image:iUS.png|Em Inglês|20px]] [[Map manager|Map Manager]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Editor de Mapas&amp;lt;/h3&amp;gt;&lt;br /&gt;
* [[Image:iUS.png|Em Inglês|20px]] [[Resource:Editor|Manual do Editor]]&lt;br /&gt;
* [[Image:iUS.png|Em Inglês|20px]] [[Resource:Editor/EDF|Formato de Definições do Editor (EDF)]]&lt;br /&gt;
* [[Image:iUS.png|Em Inglês|20px]] [[Resource:Editor/Plugins|Extensões para o Editor]]&lt;br /&gt;
* [[Image:iUS.png|Em Inglês|20px]] [[Resource:Editor#FAQ|Perguntas Frequentes]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px solid #D8D8D8; padding:4px 8px 8px 8px; margin:10px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;float:right; width: 32px;&amp;quot;&amp;gt;[[File:Package-x-generic.png|link=]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Banco de Dados&amp;lt;/h3&amp;gt;&lt;br /&gt;
Esta sessão abrange todo tipo de conteúdo referente à scripts em LUA e recursos para o MTA.&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]] [[:Category:Resource|Catálogo de Recursos]] - Ótimos exemplos para aprender à programar com eficiência.&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]] [[Client side scripts|Scripts do Cliente]]&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]] [[Modules|Módulos]]&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|link=]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Desenvolvendo o Multi Theft Auto&amp;lt;/h3&amp;gt;&lt;br /&gt;
[[File:Go-down.png|link=http://nightly.mtasa.com/]] [http://nightly.mtasa.com/ Nightly builds]&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]]  [[Compiling_MTASA|Compilando o MTASA no Windows]]&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]]  [[Building_MTASA_Server_on_Mac_OS_X|Compilando o MTASA no Mac OS X]]&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]]  [[Building_MTASA_Server_on_GNU_Linux|Compilando o MTASA no GNU/Linux]]&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]]  [[Coding guidelines|Guia do Desenvolvedor]]&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]]  [http://code.google.com/p/mtasa-blue Google Code SVN]&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]]  [[Roadmap|Roteiro para versões futuras]]&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]]  [http://bugs.mtasa.com/ Bugtracker Central de Bugs]&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|link=]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Wiki - Como você pode ajudar&amp;lt;/h3&amp;gt;&lt;br /&gt;
* Terminar os documentários de [[:Category:Incomplete|funções incompletas]].&lt;br /&gt;
* [[:Category:Needs_Example |Adicionar exemplos para funções e eventos]].&lt;br /&gt;
* Revisar e verificar as [[:Category:Needs Checking|páginas que necessitam de revisão]].&lt;br /&gt;
* Escrever tutoriais para ajudar novatos.&lt;br /&gt;
* Traduzir as páginas do 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|link=]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Comunidade&amp;lt;/h3&amp;gt;&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]] [http://forum.multitheftauto.com/ Forum]&lt;br /&gt;
* [[Image:iBR.png|Em Português|20px]] [http://forum.multitheftauto.com/viewforum.php?f=120&amp;amp;sid=79576f41173f69a47135647007d58d64 Fórum em Português]&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]] IRC: [irc://irc.multitheftauto.com/mta irc.multitheftauto.com #mta]&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]] [http://community.mtasa.com/ MTA Community] - Compartilhe e baixe recursos.&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]] [http://twitter.com/#!/MTAQA/ Twitter] - [http://www.youtube.com/user/MTAQA Youtube] - [http://plus.google.com/102014133442331779727/ Google+] - [http://www.moddb.com/mods/multi-theft-auto-san-andreas ModDB]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
| width=&amp;quot;50%&amp;quot; style=&amp;quot;vertical-align:top;&amp;quot; |&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px solid #D8D8D8; padding:4px 8px 8px 8px; margin:10px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;float:right; width: 32px;&amp;quot;&amp;gt;[[File:Accessories-text-editor.png|link=]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Scripting&amp;lt;/h3&amp;gt;&lt;br /&gt;
* [[File:iBR.png|Em Português|20px]] [[PT-BR/Introducao_ao_Scripting|Introdução ao Scripting]] - (Em processo de tradução)&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]] [[Introduction to Scripting the GUI|Introdução ao GUI Scripting]]&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]] [[Debugging|Depuração]] - Como achar erros em seus Scripts&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]] [[Resources|Introdução aos Recursos]]&lt;br /&gt;
** [[File:iUS.png|Em Inglês|20px]] [[Resource Web Access| Acesso Web via Recursos ]] - Como fazemos páginas de internet via recursos&lt;br /&gt;
** [[File:iUS.png|Em Inglês|20px]] [[:Category:Resource|Catálogo de Recursos]]&lt;br /&gt;
** [[File:iUS.png|Em Inglês|20px]] [[Meta.xml|O arquivo meta.xml]] - Dentro de cada recurso, há um arquivo chamado meta o indentificando&lt;br /&gt;
** [[File:iUS.png|Em Inglês|20px]] [[ACL]] - Access Control List, isto é importantíssimo para scripts complexos funcionarem&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]] [[Writing_Gamemodes|Programando um modo de Jogo]]&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]] [[Useful_Functions|Funções úteis]]&lt;br /&gt;
&amp;lt;div style=&amp;quot;float:right; width: 32px;&amp;quot;&amp;gt;[[File:start-here.png|link=]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Ajuda geral em Lua&amp;lt;/h3&amp;gt;&lt;br /&gt;
Páginas criadas para ajudar à entender o Lua&lt;br /&gt;
* [[Image:iBR.png|Em Português|20px]] [http://www.lua.org/portugues.html Introdução a linguagem Lua]&lt;br /&gt;
* [[Image:iBR.png|Em Português|20px]] [http://www.lua.org/manual/5.1/pt/ Manual &amp;quot;Programando em Lua&amp;quot;]&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]] [http://lua-users.org/wiki/TutorialDirectory Lua Wiki em inglês]&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]] [http://nixstaller.berlios.de/manual/0.2/nixstaller_9.html Um Guia geral de Nixstaller]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px solid #D8D8D8; padding:4px 8px 8px 8px; margin:10px; background:#F2F2FF;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;float:right; width: 32px;&amp;quot;&amp;gt;[[File:Preferences-system.png|link=]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Referência&amp;lt;/h3&amp;gt;&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]] [[Client Scripting Functions|Funções do Cliente]]&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]] [[Client Scripting Events|Eventos do Cliente]]&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]] [[Server Scripting Functions|Funções do Servidor]]&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]] [[Server Scripting Events|Eventos do Servidor]]&lt;br /&gt;
&amp;lt;!-- Incomplete * [[Module functions|Server-side external module scripting functions list]] --&amp;gt;&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]] [[MTA Classes]] - Descrições detalhadas de todos os tipos de coisas que o MTA usa&lt;br /&gt;
** [[File:iUS.png|Em Inglês|20px]] [[Element|Elementos do MTA]] / [[Element tree|Hierarquia dos Elementos]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px solid #D8D8D8; padding:4px 8px 8px 8px; margin:10px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;float:right; width: 32px;&amp;quot;&amp;gt;[[File:System-file-manager.png|link=]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;[[Id|Lista de ID's]]&amp;lt;/h3&amp;gt;&lt;br /&gt;
*[[Animations|Animações]]&lt;br /&gt;
*[[Character Skins|Skins de Pedestres]]&lt;br /&gt;
*[[CJ_Clothes|Roupas do CJ]]&lt;br /&gt;
*[[Garage|Garagens]]&lt;br /&gt;
*[[Interior IDs|Interiores]]&lt;br /&gt;
*[[Material IDs|Materiais]]&lt;br /&gt;
*[[Projectiles|Projéteis]]&lt;br /&gt;
*[[Radar Blips|Ponteiros do Radar]]&lt;br /&gt;
*[[Sounds|Efeitos Sonoros]]&lt;br /&gt;
*[[Vehicle IDs|Veículos]]&lt;br /&gt;
*[[Vehicle Colors|Cores para Veículos]]&lt;br /&gt;
*[[Vehicle Upgrades|Asessórios para Veículos]]&lt;br /&gt;
*[[Vehicle variants|Vehicle Variants]]&lt;br /&gt;
*[[Weapons|Armas]]&lt;br /&gt;
*[[Weather|Climas]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px dotted #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:pBR.png|32px]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Sobre a Tradução&amp;lt;/h3&amp;gt;&lt;br /&gt;
* Tradutores:&lt;br /&gt;
** &amp;lt;span style=&amp;quot;color: blue&amp;quot;&amp;gt;RaceXtreme&amp;lt;/span&amp;gt;&lt;br /&gt;
** &amp;lt;span style=&amp;quot;color: blue&amp;quot;&amp;gt;StanleySathler&amp;lt;/span&amp;gt;&lt;br /&gt;
É importante que todos colaborem para que nossa página em português fique melhor a cada dia!&lt;br /&gt;
&lt;br /&gt;
[[File:Osi symbol.png|75px|link=http://opensource.org/]]&lt;br /&gt;
'''Multi Theft Auto''' é um projeto '''Open Source'''. &amp;lt;br&amp;gt;&lt;br /&gt;
Isso significa que todos nós podemos contribuir para fazer um Multi Theft Auto muito melhor!&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |&lt;br /&gt;
|}&lt;br /&gt;
{| width=&amp;quot;100%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;0&amp;quot;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |&lt;br /&gt;
&amp;lt;div style=&amp;quot;padding-left: 15px; padding-right: 15px;&amp;quot; class=&amp;quot;plainlinks&amp;quot;&amp;gt;&lt;br /&gt;
[[File:MTALogo_8ball.png|left|85px|link=Archive]]&lt;br /&gt;
&amp;lt;ul style=&amp;quot;list-style: none; width: 200px; float: left;&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;'''Sobre Multi Theft Auto'''&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;[[Archive|Museu]]&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;[[Press Coverage|Eventos]]&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;[http://code.google.com/p/mtasa-blue/people/list Desenvolvedores]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;ul style=&amp;quot;list-style: none; width: 200px; float: left;&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;'''Multi Theft Auto 0.5'''&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;[[Archive#Multi_Theft_Auto_0.5|Download]]&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;[[MTA 0.5r2 Known Issues|Solução de Problemas]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;ul style=&amp;quot;list-style: none; width: 200px; float: left;&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;'''Status do Wiki'''&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;{{NUMBEROFARTICLES}} Artigos&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;{{NUMBEROFPAGES}} Páginas&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;{{NUMBEROFUSERS}} Usuários Registrados&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;br /&gt;
__NOEDITSECTION__&lt;br /&gt;
{{Languages list|pt-br}}&lt;/div&gt;</summary>
		<author><name>Stanley Sathler .</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=P%C3%A1gina_Inicial&amp;diff=31053</id>
		<title>Página Inicial</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=P%C3%A1gina_Inicial&amp;diff=31053"/>
		<updated>2012-05-20T23:16:02Z</updated>

		<summary type="html">&lt;p&gt;Stanley Sathler .: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| width=&amp;quot;100%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;0&amp;quot;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px solid #D8D8D8; padding: 5px; height: 130px;&amp;quot;&amp;gt;&lt;br /&gt;
[[File:Mtalogo.png|left|100px]]'''Bem Vindo ao Multi Theft Auto wiki em Português.''' Aqui você encontra toda a informação sobre o uso do Multi Theft Auto.&lt;br /&gt;
&lt;br /&gt;
Há muitas [[How you can help|coisas em que você pode nos ajudar]] para melhorar o MTA, como criar um mapa, um modo de jogo (gamemode), documentar as funções de programação, escrever códigos como exemplo, fazer tutoriais ou somente jogar o MTA e reportar falhas/bugs que encontrar.&lt;br /&gt;
&lt;br /&gt;
Se você tem alguma pergunta ou problema em relação à programação, sinta-se a vontade para nos comunicar em nosso [[IRC Channel|Canal IRC]].&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;[ Stop playing with yourself ]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
{| width=&amp;quot;100%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;0&amp;quot;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |&lt;br /&gt;
|-&lt;br /&gt;
|width=&amp;quot;50%&amp;quot; style=&amp;quot;vertical-align:top;&amp;quot; |&amp;lt;div style=&amp;quot;border: 1px solid #D8D8D8; padding:4px 8px 8px 8px; margin:10px; background: #FFFCF2;&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|link=]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Jogar&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;background: #FFEEAA; border: 1px solid #FFCD19;&amp;quot;&amp;gt;&lt;br /&gt;
[[File:Go-down.png|link=http://mtasa.com/]] ''' [http://mtasa.com/ Download Multi Theft Auto: San Andreas {{Current Version|full}}]'''&amp;lt;/div&amp;gt;&lt;br /&gt;
* [[Image:iBR.png|Em Português|20px]] [[PT-BR/Manual_do_Cliente|Manual do Cliente]]&lt;br /&gt;
* [[Image:iUS.png|Em Inglês|20px]] [[Changes_in_{{padleft:|3|{{Current Version|full}}}}| Mudanças na versão {{padleft:|3|{{Current Version|full}}}}]]&lt;br /&gt;
* [[Image:iBR.png|Em Português|20px]] [[PT-BR/Soluções_de_Problemas_-_FAQ|Solução de Problemas (FAQ)]]&lt;br /&gt;
* [[Image:iUS.png|Em Inglês|20px]] [[Upgrading_from_MTA:Race|Migrando do MTA:Race ao MTA:SA {{padleft:|3|{{Current Version|full}}}}]]&lt;br /&gt;
* [[Image:iBR.png|Em Inglês|20px]] [[PT-BR/Manual_do_Servidor|Manual do Servidor]]&lt;br /&gt;
* [[Image:iUS.png|Em Inglês|20px]] [[Map manager|Map Manager]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Editor de Mapas&amp;lt;/h3&amp;gt;&lt;br /&gt;
* [[Image:iUS.png|Em Inglês|20px]] [[Resource:Editor|Manual do Editor]]&lt;br /&gt;
* [[Image:iUS.png|Em Inglês|20px]] [[Resource:Editor/EDF|Formato de Definições do Editor (EDF)]]&lt;br /&gt;
* [[Image:iUS.png|Em Inglês|20px]] [[Resource:Editor/Plugins|Extensões para o Editor]]&lt;br /&gt;
* [[Image:iUS.png|Em Inglês|20px]] [[Resource:Editor#FAQ|Perguntas Frequentes]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px solid #D8D8D8; padding:4px 8px 8px 8px; margin:10px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;float:right; width: 32px;&amp;quot;&amp;gt;[[File:Package-x-generic.png|link=]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Banco de Dados&amp;lt;/h3&amp;gt;&lt;br /&gt;
Esta sessão abrange todo tipo de conteúdo referente à scripts em LUA e recursos para o MTA.&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]] [[:Category:Resource|Catálogo de Recursos]] - Ótimos exemplos para aprender à programar com eficiência.&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]] [[Client side scripts|Scripts do Cliente]]&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]] [[Modules|Módulos]]&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|link=]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Desenvolvendo o Multi Theft Auto&amp;lt;/h3&amp;gt;&lt;br /&gt;
[[File:Go-down.png|link=http://nightly.mtasa.com/]] [http://nightly.mtasa.com/ Nightly builds]&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]]  [[Compiling_MTASA|Compilando o MTASA no Windows]]&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]]  [[Building_MTASA_Server_on_Mac_OS_X|Compilando o MTASA no Mac OS X]]&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]]  [[Building_MTASA_Server_on_GNU_Linux|Compilando o MTASA no GNU/Linux]]&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]]  [[Coding guidelines|Guia do Desenvolvedor]]&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]]  [http://code.google.com/p/mtasa-blue Google Code SVN]&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]]  [[Roadmap|Roteiro para versões futuras]]&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]]  [http://bugs.mtasa.com/ Bugtracker Central de Bugs]&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|link=]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Wiki - Como você pode ajudar&amp;lt;/h3&amp;gt;&lt;br /&gt;
* Terminar os documentários de [[:Category:Incomplete|funções incompletas]].&lt;br /&gt;
* [[:Category:Needs_Example |Adicionar exemplos para funções e eventos]].&lt;br /&gt;
* Revisar e verificar as [[:Category:Needs Checking|páginas que necessitam de revisão]].&lt;br /&gt;
* Escrever tutoriais para ajudar novatos.&lt;br /&gt;
* Traduzir as páginas do 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|link=]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Comunidade&amp;lt;/h3&amp;gt;&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]] [http://forum.multitheftauto.com/ Forum]&lt;br /&gt;
* [[Image:iBR.png|Em Português|20px]] [http://forum.multitheftauto.com/viewforum.php?f=120&amp;amp;sid=79576f41173f69a47135647007d58d64 Fórum em Português]&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]] IRC: [irc://irc.multitheftauto.com/mta irc.multitheftauto.com #mta]&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]] [http://community.mtasa.com/ MTA Community] - Compartilhe e baixe recursos.&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]] [http://twitter.com/#!/MTAQA/ Twitter] - [http://www.youtube.com/user/MTAQA Youtube] - [http://plus.google.com/102014133442331779727/ Google+] - [http://www.moddb.com/mods/multi-theft-auto-san-andreas ModDB]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
| width=&amp;quot;50%&amp;quot; style=&amp;quot;vertical-align:top;&amp;quot; |&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px solid #D8D8D8; padding:4px 8px 8px 8px; margin:10px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;float:right; width: 32px;&amp;quot;&amp;gt;[[File:Accessories-text-editor.png|link=]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Scripting&amp;lt;/h3&amp;gt;&lt;br /&gt;
* [[File:iBR.png|Em processo de tradução|20px]] [[PT-BR/Introducao_ao_Scripting|Introdução ao Scripting]]&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]] [[Introduction to Scripting the GUI|Introdução ao GUI Scripting]]&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]] [[Debugging|Depuração]] - Como achar erros em seus Scripts&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]] [[Resources|Introdução aos Recursos]]&lt;br /&gt;
** [[File:iUS.png|Em Inglês|20px]] [[Resource Web Access| Acesso Web via Recursos ]] - Como fazemos páginas de internet via recursos&lt;br /&gt;
** [[File:iUS.png|Em Inglês|20px]] [[:Category:Resource|Catálogo de Recursos]]&lt;br /&gt;
** [[File:iUS.png|Em Inglês|20px]] [[Meta.xml|O arquivo meta.xml]] - Dentro de cada recurso, há um arquivo chamado meta o indentificando&lt;br /&gt;
** [[File:iUS.png|Em Inglês|20px]] [[ACL]] - Access Control List, isto é importantíssimo para scripts complexos funcionarem&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]] [[Writing_Gamemodes|Programando um modo de Jogo]]&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]] [[Useful_Functions|Funções úteis]]&lt;br /&gt;
&amp;lt;div style=&amp;quot;float:right; width: 32px;&amp;quot;&amp;gt;[[File:start-here.png|link=]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Ajuda geral em Lua&amp;lt;/h3&amp;gt;&lt;br /&gt;
Páginas criadas para ajudar à entender o Lua&lt;br /&gt;
* [[Image:iBR.png|Em Português|20px]] [http://www.lua.org/portugues.html Introdução a linguagem Lua]&lt;br /&gt;
* [[Image:iBR.png|Em Português|20px]] [http://www.lua.org/manual/5.1/pt/ Manual &amp;quot;Programando em Lua&amp;quot;]&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]] [http://lua-users.org/wiki/TutorialDirectory Lua Wiki em inglês]&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]] [http://nixstaller.berlios.de/manual/0.2/nixstaller_9.html Um Guia geral de Nixstaller]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px solid #D8D8D8; padding:4px 8px 8px 8px; margin:10px; background:#F2F2FF;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;float:right; width: 32px;&amp;quot;&amp;gt;[[File:Preferences-system.png|link=]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Referência&amp;lt;/h3&amp;gt;&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]] [[Client Scripting Functions|Funções do Cliente]]&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]] [[Client Scripting Events|Eventos do Cliente]]&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]] [[Server Scripting Functions|Funções do Servidor]]&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]] [[Server Scripting Events|Eventos do Servidor]]&lt;br /&gt;
&amp;lt;!-- Incomplete * [[Module functions|Server-side external module scripting functions list]] --&amp;gt;&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]] [[MTA Classes]] - Descrições detalhadas de todos os tipos de coisas que o MTA usa&lt;br /&gt;
** [[File:iUS.png|Em Inglês|20px]] [[Element|Elementos do MTA]] / [[Element tree|Hierarquia dos Elementos]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px solid #D8D8D8; padding:4px 8px 8px 8px; margin:10px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;float:right; width: 32px;&amp;quot;&amp;gt;[[File:System-file-manager.png|link=]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;[[Id|Lista de ID's]]&amp;lt;/h3&amp;gt;&lt;br /&gt;
*[[Animations|Animações]]&lt;br /&gt;
*[[Character Skins|Skins de Pedestres]]&lt;br /&gt;
*[[CJ_Clothes|Roupas do CJ]]&lt;br /&gt;
*[[Garage|Garagens]]&lt;br /&gt;
*[[Interior IDs|Interiores]]&lt;br /&gt;
*[[Material IDs|Materiais]]&lt;br /&gt;
*[[Projectiles|Projéteis]]&lt;br /&gt;
*[[Radar Blips|Ponteiros do Radar]]&lt;br /&gt;
*[[Sounds|Efeitos Sonoros]]&lt;br /&gt;
*[[Vehicle IDs|Veículos]]&lt;br /&gt;
*[[Vehicle Colors|Cores para Veículos]]&lt;br /&gt;
*[[Vehicle Upgrades|Asessórios para Veículos]]&lt;br /&gt;
*[[Vehicle variants|Vehicle Variants]]&lt;br /&gt;
*[[Weapons|Armas]]&lt;br /&gt;
*[[Weather|Climas]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px dotted #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:pBR.png|32px]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Sobre a Tradução&amp;lt;/h3&amp;gt;&lt;br /&gt;
* Tradutores:&lt;br /&gt;
** &amp;lt;span style=&amp;quot;color: blue&amp;quot;&amp;gt;RaceXtreme&amp;lt;/span&amp;gt;&lt;br /&gt;
** &amp;lt;span style=&amp;quot;color: blue&amp;quot;&amp;gt;StanleySathler&amp;lt;/span&amp;gt;&lt;br /&gt;
É importante que todos colaborem para que nossa página em português fique melhor a cada dia!&lt;br /&gt;
&lt;br /&gt;
[[File:Osi symbol.png|75px|link=http://opensource.org/]]&lt;br /&gt;
'''Multi Theft Auto''' é um projeto '''Open Source'''. &amp;lt;br&amp;gt;&lt;br /&gt;
Isso significa que todos nós podemos contribuir para fazer um Multi Theft Auto muito melhor!&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |&lt;br /&gt;
|}&lt;br /&gt;
{| width=&amp;quot;100%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;0&amp;quot;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |&lt;br /&gt;
&amp;lt;div style=&amp;quot;padding-left: 15px; padding-right: 15px;&amp;quot; class=&amp;quot;plainlinks&amp;quot;&amp;gt;&lt;br /&gt;
[[File:MTALogo_8ball.png|left|85px|link=Archive]]&lt;br /&gt;
&amp;lt;ul style=&amp;quot;list-style: none; width: 200px; float: left;&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;'''Sobre Multi Theft Auto'''&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;[[Archive|Museu]]&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;[[Press Coverage|Eventos]]&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;[http://code.google.com/p/mtasa-blue/people/list Desenvolvedores]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;ul style=&amp;quot;list-style: none; width: 200px; float: left;&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;'''Multi Theft Auto 0.5'''&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;[[Archive#Multi_Theft_Auto_0.5|Download]]&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;[[MTA 0.5r2 Known Issues|Solução de Problemas]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;ul style=&amp;quot;list-style: none; width: 200px; float: left;&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;'''Status do Wiki'''&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;{{NUMBEROFARTICLES}} Artigos&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;{{NUMBEROFPAGES}} Páginas&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;{{NUMBEROFUSERS}} Usuários Registrados&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;br /&gt;
__NOEDITSECTION__&lt;br /&gt;
{{Languages list|pt-br}}&lt;/div&gt;</summary>
		<author><name>Stanley Sathler .</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=PT-BR/Introdu%C3%A7%C3%A3o_ao_Scripting&amp;diff=31052</id>
		<title>PT-BR/Introdução ao Scripting</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=PT-BR/Introdu%C3%A7%C3%A3o_ao_Scripting&amp;diff=31052"/>
		<updated>2012-05-20T23:14:23Z</updated>

		<summary type="html">&lt;p&gt;Stanley Sathler .: /* Creating a simple command */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Resources are a key part of MTA. A resource is essentially a folder or zip file that contains a collection of files, plus a meta file that describes to the server how the resource should be loaded and what files it does contain. A resource can be seen as being partly equivalent to a program running in an operating system - it can be started and stopped, and multiple resources can run at once.&lt;br /&gt;
&lt;br /&gt;
Everything that has to do with scripting happens in resources, what a resource does defines if it is a gamemode, a map or anything else. MTA comes with resources that you can optionally use in your gamemodes, such as maplimits to keep playings within a playing area or deathpickups to create weapon pickups.&lt;br /&gt;
{{tip|Your first step to begin Lua scripting should be using an Lua editor. This makes scripting much easier. We recommend [http://notepad-plus.sourceforge.net/uk/site.htm Notepad++] or [http://luaedit.sourceforge.net/ LuaEdit]. There is also an unofficial [[MTASE|MTA Script Editor]] (in work-in-progress state) that you can test out.}}&lt;br /&gt;
&lt;br /&gt;
==Criando nosso primeiro script==&lt;br /&gt;
Nós primeiro vamos aprender a criar um script que permita que o jogador ande pela cidade, passo-a-passo.&lt;br /&gt;
===Onde estão todos os scripts?===&lt;br /&gt;
Vamos dar uma olhada na estrutura dos scripts. Vá até a pasta de instalação do seu MTA (padrão: C:\Arquivo de Programas\MTA San Andreas 1.x\) e siga os passos abaixo:&lt;br /&gt;
&lt;br /&gt;
	/server/mods/deathmatch/resources/&lt;br /&gt;
&lt;br /&gt;
Você irá ver diversos arquivos .zip, que são os simples scripts que vêm por padrão junto ao MTA. Cada arquivo é um &amp;quot;recurso&amp;quot;, e eles serão todos descompactados e carregados pelo servidor quando ele for iniciado. Para criar seu próprio resource, simplesmente crie uma pasta com um nome de sua preferência. Nós iremos usar o nome &amp;quot;myserver&amp;quot; para este tutorial.&lt;br /&gt;
&lt;br /&gt;
Após a criação da pasta (myserver), acessamos-a:&lt;br /&gt;
&lt;br /&gt;
	/server/mods/deathmatch/resources/myserver/&lt;br /&gt;
&lt;br /&gt;
===Identificando seu recurso===&lt;br /&gt;
Para que o servidor reconheça os arquivos de um determinado recurso (para carregá-los), um arquivo ''meta.xml'' deve ser criado, contendo uma lista de todo o conteúdo do recurso. O arquivo ''meta.xml'' deve ser salvo na pasta principal (nesse caso, na pasta &amp;quot;myserver&amp;quot;). Então, abra um editor de textos (recomenda-se o Notepad++) e salve-o com o nome de &amp;quot;meta.xml&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Entre com as seguintes linhas no arquivo ''meta.xml'':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;meta&amp;gt;&lt;br /&gt;
     &amp;lt;info author=&amp;quot;Seu_Nome&amp;quot; type=&amp;quot;gamemode&amp;quot; name=&amp;quot;Meu_Servidor&amp;quot; description=&amp;quot;Meu primeiro recurso&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;
Na tag ''&amp;lt;info /&amp;gt;'', existe o campo ''&amp;quot;type&amp;quot;'', que indica que o recurso criado é um ''gamemode''. Pode também ser um ''map'' (mapa), que iremos explicar depois.&lt;br /&gt;
Um gamemode é o que você precisa para criar um servidor independente.&lt;br /&gt;
&lt;br /&gt;
A tag ''&amp;lt;script /&amp;gt;'' indica o caminho dos arquivos (escritos em Lua) presentes no seu recurso. O do exemplo (script.lua), criaremos no próximo passo.&lt;br /&gt;
&lt;br /&gt;
===Criando um script simples===&lt;br /&gt;
Observe que na tag ''&amp;lt;script /&amp;gt;'' anterior, o arquivo .lua está presente na pasta principal do recurso (e não em uma subpasta). Então precisamos salvar o script na pasta principal, assim como indicado na tag. Salve o seguinte código no arquivo script.lua:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local spawnX, spawnY, spawnZ = 1959.55, -1714.46, 10&lt;br /&gt;
function joinHandler()&lt;br /&gt;
	spawnPlayer(source, spawnX, spawnY, spawnZ)&lt;br /&gt;
	fadeCamera(source, true)&lt;br /&gt;
	setCameraTarget(source, source)&lt;br /&gt;
	outputChatBox(&amp;quot;Bem-vindo ao meu servidor!&amp;quot;, source)&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onPlayerJoin&amp;quot;, getRootElement(), joinHandler)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
O script irá gerar o seu personagem (seu boneco) nas coordenadas (x, y, z) especificadas assim que você entrar no jogo. Note que a função ''fadeCamera()'' precisa ser usada ou, do contrário, a tela ficará preta (e você não verá nada). Outra função é a ''setCameraTarget()'', que foca a câmera do jogo no seu personagem (do contrário, a câmera estaria virada para o céu).&lt;br /&gt;
&lt;br /&gt;
A variável '''source''' representa o elemento responsável pela chamada do evento (você verá mais sobre eventos mais adiante). Assim, quando um jogador entra no jogo, o evento &amp;quot;onPlayerJoin&amp;quot; é chamado e, em seguida, chama a função. O evento automaticamente define o jogador na variável ''source'' (obs: a variável ''source'' armazena sempre o elemento que chamou determinado evento. Ou seja, nem sempre ''source'' será o jogador. Cuidado com isso.)&lt;br /&gt;
&lt;br /&gt;
Se olharmos bem para o [[addEventHandler]], veremos 3 argumentos: 'onPlayerJoin', que indica o evento que chamará a função (no caso, esse evento é chamado assim que o jogador entra no jogo, logo, a função é chamada assim que o jogador entra no jogo); 'getRootElement()', que indica quem poderá chamar o evento (ou seja, todos os elementos, incluindo todos os jogadores); 'joinHandler', que indica o nome da função que será chamada quando o evento for chamado. Maiores detalhes serão explicados mais adiante. Vamos agora simplesmente rodar nosso servidor e testar nosso script.&lt;br /&gt;
&lt;br /&gt;
===Executando o script===&lt;br /&gt;
Para iniciar o servidor, simplesmente execute o arquivo &amp;quot;MTA Server.exe&amp;quot; (presente na pasta de instalação do MTA:SA). Primeiramente é mostrada uma lista com os principais status do seu servidor; observe o número da porta, que você irá precisar quando entrar no jogo. Logo após, o servidor carrega todos os resources (caso todos estejam corretos) que estão presentes no diretório /resource/ e então &amp;quot;fica pronto para aceitar conexões&amp;quot; (ready to accept connections!).&lt;br /&gt;
&lt;br /&gt;
Antes de se conectar ao seu servidor, você precisa executar o gamemode que criou. Para isso, digite no console (a janela do MTA Server.exe) o comando ''gamemode myserver'' (obs: &amp;quot;myserver&amp;quot; é o nome da pasta que você criou no início deste tutorial e, consequentemente, o nome do seu recurso) e pressione Enter. O servidor irá carregar o gamemode que você criou e irá mostrar os erros (caso existam) do seu script. Agora você pode se conectar ao seu servidor de duas diferentes maneiras: clicando em &amp;quot;Quick Connect&amp;quot; e inserindo o endereço IP do seu servidor e o número da porta, ou clicando em &amp;quot;Server Browser&amp;quot;, acessando a aba &amp;quot;Local&amp;quot; e clicando duas vezes no seu servidor. Se tudo correr bem, seu personagem será criado nas coordenadas especificadas.&lt;br /&gt;
&lt;br /&gt;
No próximo tópico iremos criar um comando para que o jogador possa gerar um veículo ao seu lado. Se preferir (embora não recomendado caso seja iniciante), você pode visitar alguns scripts mais avançados clicando [[Map manager|aqui]], ou prossiga com este tutorial. Outra parte interessante deste tutorial é [[PT-BR/Introducao_ao_GUI|Iniciando com GUIs]], no qual aborda a criação de interfaces gráficas (janelas, botões, etc) para seus scripts.&lt;br /&gt;
&lt;br /&gt;
==Criando um comando simples==&lt;br /&gt;
Vamos voltar ao arquivo ''script.lua'' (abra-o novamente). Como mencionado anteriormente, vamos criar agora um comando (para executá-lo, digite no chat ''/seucomando'') que irá gerar um carro ao lado do seu personagem. Antes de tudo precisamos criar uma função que iremos chamar posteriormente e um [[addCommandHandler]](), responsável por criar o comando.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- cria a funcao que sera chamada pelo comando. Os argumentos sao: thePlayer, command, vehicleModel&lt;br /&gt;
function createVehicleForPlayer(thePlayer, command, vehicleModel)&lt;br /&gt;
   -- cria um veiculo&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- cria um lancador de comandos&lt;br /&gt;
addCommandHandler(&amp;quot;createvehicle&amp;quot;, createVehicleForPlayer)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
''Nota: Você pode clicar nas funções dos códigos para obter uma explicação de cada uma delas.&lt;br /&gt;
&lt;br /&gt;
====Sobre os lançadores de comandos (responsáveis por criar os comandos)====&lt;br /&gt;
O primeiro argumento do [[addCommandHandler]] é o nome do comando que o jogador precisará digitar (no exemplo, ele precisará digitar no chat ''/createvehicle &amp;lt;argumento&amp;gt;''. O segundo argumento é a função que será chamada quando o comando for digitado (nesse caso, a função ''createVehicleForPlayer()''.&lt;br /&gt;
&lt;br /&gt;
Se você já possui alguma experiência em programação, sabe que você chama uma função desta forma:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
nomeDaFuncao(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;
nomeDaFuncao(thePlayer, commandName, argumento3, ..)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Se observarmos bem o exemplo acima, podemos ver que o argumento1 é o jogador (quem digita o comando) e o argumento2 é o nome do comando (nesse caso, ''createvehicle''). O argumento3 é o argumento digitado depois do comando (por exemplo, se o jogador digitou ''/createvehicle Infernus'', então a variável argumento3 irá armazenar o texto &amp;quot;Infernus&amp;quot;). Nunca se esqueça que os dois primeiros argumentos são padrões (ou seja, precisam existir), mas você pode nomeá-los com outro nome (mas isto não é necessário agora).&lt;br /&gt;
&lt;br /&gt;
Nós chamamos a função [[addCommandHandler]], que chama a função ''createVehicleForPlayer''.&lt;br /&gt;
&lt;br /&gt;
Por exemplo: alguém digita &amp;quot;createvehicle 468&amp;quot; no chat para gerar uma Sanchez (468 é o ID da Sanchez. Veja mais [[Vehicle_IDs|aqui]]), então o lançador de comandos (quando dizemos &amp;quot;lançador de comandos&amp;quot;, é o mesmo que &amp;quot;criador de comandos&amp;quot;) chama a função createVehicleForPlayer(), como '''se''' nós tivéssemos a seguinte linha no script:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
createVehicleForPlayer(thePlayer,&amp;quot;createvehicle&amp;quot;,&amp;quot;468&amp;quot;) -- thePlayer e o jogador que digitou o comando&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
As we can see, it provides several parameters: the player who called the command, the command he entered and whatever text he had after that, in this case &amp;quot;468&amp;quot; as vehicle id for the Sanchez. The first two parameters are the same with all command handlers, which you can read on the [[addEventHandler]] page. For this fact, you always have to define at least those two parameters to use any after that (for example to process text that was entered after the command, like in our example the vehicle model id).&lt;br /&gt;
&lt;br /&gt;
''Note: You have to add the command handler AFTER you defined the handler function, else it can't find it. The order of execution matters.''&lt;br /&gt;
&lt;br /&gt;
====Writing the function====&lt;br /&gt;
In order to fill the function we created, we need to think about what we have to do:&lt;br /&gt;
* Get the players position, so we know where to spawn the vehicle (we want it to appear right beside the player)&lt;br /&gt;
* Calculate the position we want to spawn the vehicle at (we don't want it to appear in the player)&lt;br /&gt;
* Spawn the vehicle&lt;br /&gt;
* Check if it has been spawned successfully, or output a message&lt;br /&gt;
&lt;br /&gt;
In order to achieve our goals, we have to use several functions. To find function we need to use, we should visit the [[Scripting Functions|Server Functions List]]. First we need a function to get the players position. Since players are Elements, we first jump to the '''Element functions''' where we find the [[getElementPosition]] function. By clicking on the function name in the list, you get to the function description. There we can see the syntax, what it returns and usually an example. The syntax shows us what arguments we can or have to submit.&lt;br /&gt;
&lt;br /&gt;
For [[getElementPosition]], the syntax is:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
float, float, float getElementPosition ( element theElement )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The three ''float'' in front of the function name are the return type. In this case it means the function returns three floating point numbers. (x, y and z) Within the parentheses, you can see what arguments you have to submit. In this case only the element whose position you want to get, which is the player in our example.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function createVehicleForPlayer(thePlayer, command, vehicleModel)&lt;br /&gt;
	-- get the position and put it in the x,y,z variables&lt;br /&gt;
	-- (local means, the variables only exist in the current scope, in this case, the function)&lt;br /&gt;
	local x,y,z = getElementPosition(thePlayer)&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next we want to ensure that the vehicle won't spawn directly in the player, so we add a few units to the ''x'' variable, which will make it spawn east from the player.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function createVehicleForPlayer(thePlayer, command, vehicleModel)&lt;br /&gt;
	local x,y,z = getElementPosition(thePlayer) -- get the position of the player&lt;br /&gt;
	x = x + 5 -- add 5 units to the x position&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now we need another function, one to spawn a vehicle. We once again search for it on the [[Scripting Functions|Server Functions List]], this time - since we are talking about vehicles - in the '''Vehicle functions''' section, where we will choose [[createVehicle]]. In this function's syntax, we only have one return type (which is more common), a vehicle element that points to the vehicle we just created. Also, we see that some arguments are enclosed within [ ] which means that those are optional.&lt;br /&gt;
&lt;br /&gt;
We already have all arguments we need for [[createVehicle]] in our function: The position we just calculated in the ''x,y,z'' variables and the model id that we provided through the command (&amp;quot;createvehicle 468&amp;quot;) and can access in the function as ''vehicleModel'' variable.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function createVehicleForPlayer(thePlayer, command, vehicleModel)&lt;br /&gt;
	local x,y,z = getElementPosition(thePlayer) -- get the position of the player&lt;br /&gt;
	x = x + 5 -- add 5 units to the x position&lt;br /&gt;
	-- create the vehicle and store the returned vehicle element in the ''createdVehicle'' variable&lt;br /&gt;
	local createdVehicle = createVehicle(tonumber(vehicleModel),x,y,z)&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Of course this code can be improved in many ways, but at least we want to add a check whether the vehicle was created successfully or not. As we can read on the [[createVehicle]] page under '''Returns''', the function returns ''false'' when it was unable to create the vehicle. Thus, we check the value of the ''createVehicle'' variable.&lt;br /&gt;
&lt;br /&gt;
Now we have our complete script:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function createVehicleForPlayer(thePlayer, command, vehicleModel)&lt;br /&gt;
	local x,y,z = getElementPosition(thePlayer) -- get the position of the player&lt;br /&gt;
	x = x + 5 -- add 5 units to the x position&lt;br /&gt;
	local createdVehicle = createVehicle(tonumber(vehicleModel),x,y,z)&lt;br /&gt;
	-- check if the return value was ''false''&lt;br /&gt;
	if (createdVehicle == false) then&lt;br /&gt;
		-- if so, output a message to the chatbox, but only to this player.&lt;br /&gt;
		outputChatBox(&amp;quot;Failed to create vehicle.&amp;quot;,thePlayer)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler(&amp;quot;createvehicle&amp;quot;, createVehicleForPlayer)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As you can see, we introduced another function with [[outputChatBox]]. By now, you should be able to explore the function's documentation page yourself. For more advanced scripting, please check out the [[Map manager|Map Manager]].&lt;br /&gt;
&lt;br /&gt;
==What you need to know==&lt;br /&gt;
You already read some things about resources, command handlers and finding functions in the documentation in the first paragraph, but there is much more to learn. This section will give you a rather short overview over some of these things, while linking to related pages if possible.&lt;br /&gt;
===Clientside and Serverside scripts===&lt;br /&gt;
You may have already noticed these or similiar terms (Server/Client) somewhere on this wiki, mostly in conjunction with functions. MTA not only supports scripts that run on the server and provide commands (like the one we wrote above) or other features, but also scripts that run on the MTA client the players use to connect to the server. The reason for this is, that some features MTA provides have to be clientside (like a GUI - Graphical User Interface), others should be because they work better and still others are better off to be serverside or just don't work clientside.&lt;br /&gt;
&lt;br /&gt;
Most scripts you will make (gamemodes, maps) will probably be serverside, like the one we wrote in the first section. If you run into something that can't be solved serverside, you will probably have to make it clientside. For a clientside script for example, you would create a ordinary script file (for example called ''client.lua'') and specify it in the meta.xml, like this:&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;
The ''type'' attribute defaults to 'server', so you only need to specify it for clientside scripts. When you do this, the clientside script will be downloaded to the player's computer once he connects to the server. Read more about [[Client side scripts]].&lt;br /&gt;
&lt;br /&gt;
===More complex resources===&lt;br /&gt;
The previous section showed briefly how to add clientside scripts to the resource, but there is also much more possible. As mentioned at the very top of this page, resources can be pretty much everything. Their purpose is defined by what they do. Let's have some theoretical resources, by looking at the files it contains, the ''meta.xml'' and what they might do:&lt;br /&gt;
&lt;br /&gt;
====First example - A utility script====&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;Someguy&amp;quot; description=&amp;quot;admin commands&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;
* The ''commands.lua'' provides some admin commands, like banning a player, muting or something else that can be used to admin the server&lt;br /&gt;
* The ''client.lua'' provides a GUI to be able to perform the mentioned actions easily&lt;br /&gt;
&lt;br /&gt;
This example might be running all the time (maybe even auto-started when the server starts) as it's useful during the whole gaming experience and also wont interfere with the gameplay, unless an admin decides to take some action of course.&lt;br /&gt;
&lt;br /&gt;
====Second example - A gamemode====&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;Someguy&amp;quot; description=&amp;quot;Counterstrike remake&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;
* The ''counterstrike.lua'' contains similiar to the following features:&lt;br /&gt;
** Let players choose their team and spawn them&lt;br /&gt;
** Provide them with weapons, targets and instructions (maybe read from a Map, see below)&lt;br /&gt;
** Define the game's rules, e.g. when does the round end, what happens when a player dies&lt;br /&gt;
** .. and maybe some more&lt;br /&gt;
* The ''buymenu.lua'' is a clientside script and creates a menu to buy weapons&lt;br /&gt;
&lt;br /&gt;
This example can be called a gamemode, since it not only intereferes with the gameplay, but actually defines the rules of it. The ''type'' attribute indicates that this example works with the [[Map manager]], yet another resource that was written by the QA Team to manage gamemodes and map loading. It is highly recommended that you base your gamemodes on the techniques it provides.&lt;br /&gt;
&lt;br /&gt;
This also means that the gamemode probably won't run without a map. Gamemodes should always be as generic as possible. An example for a map is stated in the next example.&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;
===Events===&lt;br /&gt;
Events are the way MTA tells scripts about things that happen. For example when a player dies, the [[onPlayerWasted]] event is triggered. In order to perform any actions when a player dies, you have to prepare yourself similiar to adding a command handler, as shown in [[#Writing_the_script|the first chapter]].&lt;br /&gt;
&lt;br /&gt;
This example will output a message with the name of the player who died:&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;
==Where to go from here==&lt;br /&gt;
You should now be familiar with the most basic aspects of MTA scripting and also a bit with the documentation. The [[Main Page]] provides you with links to more information, Tutorials and References that allow a deeper look into the topics you desire to learn about.&lt;br /&gt;
{{note|From here we recommend reading the [[debugging]] tutorial. Good debugging skills are an absolute necessity when you are making scripts. We also recommend you to use the [[predefined variables list]] to help you with certain tasks and make scripting easier and faster.}}&lt;br /&gt;
'''See also:'''&lt;br /&gt;
* [[Advanced Topics]]&lt;br /&gt;
[[ru:Scripting Introduction]]&lt;br /&gt;
[[it:Introduzione allo scripting]]&lt;br /&gt;
[[es:Introducción a la Programación]]&lt;br /&gt;
[[nl:Scripting_introductie]]&lt;/div&gt;</summary>
		<author><name>Stanley Sathler .</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=PT-BR/Introdu%C3%A7%C3%A3o_ao_Scripting&amp;diff=31051</id>
		<title>PT-BR/Introdução ao Scripting</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=PT-BR/Introdu%C3%A7%C3%A3o_ao_Scripting&amp;diff=31051"/>
		<updated>2012-05-20T22:58:24Z</updated>

		<summary type="html">&lt;p&gt;Stanley Sathler .: /* Running the script */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Resources are a key part of MTA. A resource is essentially a folder or zip file that contains a collection of files, plus a meta file that describes to the server how the resource should be loaded and what files it does contain. A resource can be seen as being partly equivalent to a program running in an operating system - it can be started and stopped, and multiple resources can run at once.&lt;br /&gt;
&lt;br /&gt;
Everything that has to do with scripting happens in resources, what a resource does defines if it is a gamemode, a map or anything else. MTA comes with resources that you can optionally use in your gamemodes, such as maplimits to keep playings within a playing area or deathpickups to create weapon pickups.&lt;br /&gt;
{{tip|Your first step to begin Lua scripting should be using an Lua editor. This makes scripting much easier. We recommend [http://notepad-plus.sourceforge.net/uk/site.htm Notepad++] or [http://luaedit.sourceforge.net/ LuaEdit]. There is also an unofficial [[MTASE|MTA Script Editor]] (in work-in-progress state) that you can test out.}}&lt;br /&gt;
&lt;br /&gt;
==Criando nosso primeiro script==&lt;br /&gt;
Nós primeiro vamos aprender a criar um script que permita que o jogador ande pela cidade, passo-a-passo.&lt;br /&gt;
===Onde estão todos os scripts?===&lt;br /&gt;
Vamos dar uma olhada na estrutura dos scripts. Vá até a pasta de instalação do seu MTA (padrão: C:\Arquivo de Programas\MTA San Andreas 1.x\) e siga os passos abaixo:&lt;br /&gt;
&lt;br /&gt;
	/server/mods/deathmatch/resources/&lt;br /&gt;
&lt;br /&gt;
Você irá ver diversos arquivos .zip, que são os simples scripts que vêm por padrão junto ao MTA. Cada arquivo é um &amp;quot;recurso&amp;quot;, e eles serão todos descompactados e carregados pelo servidor quando ele for iniciado. Para criar seu próprio resource, simplesmente crie uma pasta com um nome de sua preferência. Nós iremos usar o nome &amp;quot;myserver&amp;quot; para este tutorial.&lt;br /&gt;
&lt;br /&gt;
Após a criação da pasta (myserver), acessamos-a:&lt;br /&gt;
&lt;br /&gt;
	/server/mods/deathmatch/resources/myserver/&lt;br /&gt;
&lt;br /&gt;
===Identificando seu recurso===&lt;br /&gt;
Para que o servidor reconheça os arquivos de um determinado recurso (para carregá-los), um arquivo ''meta.xml'' deve ser criado, contendo uma lista de todo o conteúdo do recurso. O arquivo ''meta.xml'' deve ser salvo na pasta principal (nesse caso, na pasta &amp;quot;myserver&amp;quot;). Então, abra um editor de textos (recomenda-se o Notepad++) e salve-o com o nome de &amp;quot;meta.xml&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Entre com as seguintes linhas no arquivo ''meta.xml'':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;meta&amp;gt;&lt;br /&gt;
     &amp;lt;info author=&amp;quot;Seu_Nome&amp;quot; type=&amp;quot;gamemode&amp;quot; name=&amp;quot;Meu_Servidor&amp;quot; description=&amp;quot;Meu primeiro recurso&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;
Na tag ''&amp;lt;info /&amp;gt;'', existe o campo ''&amp;quot;type&amp;quot;'', que indica que o recurso criado é um ''gamemode''. Pode também ser um ''map'' (mapa), que iremos explicar depois.&lt;br /&gt;
Um gamemode é o que você precisa para criar um servidor independente.&lt;br /&gt;
&lt;br /&gt;
A tag ''&amp;lt;script /&amp;gt;'' indica o caminho dos arquivos (escritos em Lua) presentes no seu recurso. O do exemplo (script.lua), criaremos no próximo passo.&lt;br /&gt;
&lt;br /&gt;
===Criando um script simples===&lt;br /&gt;
Observe que na tag ''&amp;lt;script /&amp;gt;'' anterior, o arquivo .lua está presente na pasta principal do recurso (e não em uma subpasta). Então precisamos salvar o script na pasta principal, assim como indicado na tag. Salve o seguinte código no arquivo script.lua:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local spawnX, spawnY, spawnZ = 1959.55, -1714.46, 10&lt;br /&gt;
function joinHandler()&lt;br /&gt;
	spawnPlayer(source, spawnX, spawnY, spawnZ)&lt;br /&gt;
	fadeCamera(source, true)&lt;br /&gt;
	setCameraTarget(source, source)&lt;br /&gt;
	outputChatBox(&amp;quot;Bem-vindo ao meu servidor!&amp;quot;, source)&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onPlayerJoin&amp;quot;, getRootElement(), joinHandler)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
O script irá gerar o seu personagem (seu boneco) nas coordenadas (x, y, z) especificadas assim que você entrar no jogo. Note que a função ''fadeCamera()'' precisa ser usada ou, do contrário, a tela ficará preta (e você não verá nada). Outra função é a ''setCameraTarget()'', que foca a câmera do jogo no seu personagem (do contrário, a câmera estaria virada para o céu).&lt;br /&gt;
&lt;br /&gt;
A variável '''source''' representa o elemento responsável pela chamada do evento (você verá mais sobre eventos mais adiante). Assim, quando um jogador entra no jogo, o evento &amp;quot;onPlayerJoin&amp;quot; é chamado e, em seguida, chama a função. O evento automaticamente define o jogador na variável ''source'' (obs: a variável ''source'' armazena sempre o elemento que chamou determinado evento. Ou seja, nem sempre ''source'' será o jogador. Cuidado com isso.)&lt;br /&gt;
&lt;br /&gt;
Se olharmos bem para o [[addEventHandler]], veremos 3 argumentos: 'onPlayerJoin', que indica o evento que chamará a função (no caso, esse evento é chamado assim que o jogador entra no jogo, logo, a função é chamada assim que o jogador entra no jogo); 'getRootElement()', que indica quem poderá chamar o evento (ou seja, todos os elementos, incluindo todos os jogadores); 'joinHandler', que indica o nome da função que será chamada quando o evento for chamado. Maiores detalhes serão explicados mais adiante. Vamos agora simplesmente rodar nosso servidor e testar nosso script.&lt;br /&gt;
&lt;br /&gt;
===Executando o script===&lt;br /&gt;
Para iniciar o servidor, simplesmente execute o arquivo &amp;quot;MTA Server.exe&amp;quot; (presente na pasta de instalação do MTA:SA). Primeiramente é mostrada uma lista com os principais status do seu servidor; observe o número da porta, que você irá precisar quando entrar no jogo. Logo após, o servidor carrega todos os resources (caso todos estejam corretos) que estão presentes no diretório /resource/ e então &amp;quot;fica pronto para aceitar conexões&amp;quot; (ready to accept connections!).&lt;br /&gt;
&lt;br /&gt;
Antes de se conectar ao seu servidor, você precisa executar o gamemode que criou. Para isso, digite no console (a janela do MTA Server.exe) o comando ''gamemode myserver'' (obs: &amp;quot;myserver&amp;quot; é o nome da pasta que você criou no início deste tutorial e, consequentemente, o nome do seu recurso) e pressione Enter. O servidor irá carregar o gamemode que você criou e irá mostrar os erros (caso existam) do seu script. Agora você pode se conectar ao seu servidor de duas diferentes maneiras: clicando em &amp;quot;Quick Connect&amp;quot; e inserindo o endereço IP do seu servidor e o número da porta, ou clicando em &amp;quot;Server Browser&amp;quot;, acessando a aba &amp;quot;Local&amp;quot; e clicando duas vezes no seu servidor. Se tudo correr bem, seu personagem será criado nas coordenadas especificadas.&lt;br /&gt;
&lt;br /&gt;
No próximo tópico iremos criar um comando para que o jogador possa gerar um veículo ao seu lado. Se preferir (embora não recomendado caso seja iniciante), você pode visitar alguns scripts mais avançados clicando [[Map manager|aqui]], ou prossiga com este tutorial. Outra parte interessante deste tutorial é [[PT-BR/Introducao_ao_GUI|Iniciando com GUIs]], no qual aborda a criação de interfaces gráficas (janelas, botões, etc) para seus scripts.&lt;br /&gt;
&lt;br /&gt;
==Creating a simple command==&lt;br /&gt;
Let's go back to the content of the ''script.lua'' file. As mentioned above, we want to provide a command to create a vehicle beside your current position in the game. Firstly we need to create a function we want to call and a command handler that creates the command the player will be able to enter in the console.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- create the function the command handler calls, with the arguments: thePlayer, command, vehicleModel&lt;br /&gt;
function createVehicleForPlayer(thePlayer, command, vehicleModel)&lt;br /&gt;
   -- create a vehicle and stuff&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- create a command handler&lt;br /&gt;
addCommandHandler(&amp;quot;createvehicle&amp;quot;, createVehicleForPlayer)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
''Note: Function names are clickable in code examples on the wiki and linked to the functions' documentation.''&lt;br /&gt;
&lt;br /&gt;
====About command handlers====&lt;br /&gt;
The first argument of [[addCommandHandler]] is the name of the command the player will be able to enter, the second argument is the function this will call, in this case ''createVehicleForPlayer''.&lt;br /&gt;
&lt;br /&gt;
If you have already experience in scripting, you will know that you call a function like this:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
functionName(argument1, argument2, argument3, ..)&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;
functionName(thePlayer, commandName, argument3, ..)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
If we have a closer look on the lower example above, we can see argument1 is thePlayer and argument2 the commandName. thePlayer is simply the one who typed the command, so whatever you call it, the variable will contain the player who activated the command. commandName is simply the command they typed. So if they typed &amp;quot;/greet&amp;quot;, this argument will contain &amp;quot;greet&amp;quot;. Argument 3 is something extra the player typed, you'll learn it a little bit further in the tutorial. Never forget that the first 2 arguments are standard arguments, but you can name them to anything you want.&lt;br /&gt;
&lt;br /&gt;
We called the [[addCommandHandler]] function this way already and since ''createVehicleForPlayer'' is a function too, it can be called that way as well. But we are using a command handler for that, which calls it in a similiar manner, internally.&lt;br /&gt;
&lt;br /&gt;
For example: Someone types &amp;quot;createvehicle 468&amp;quot; ingame in the console to spawn a Sanchez, the command handler calls the createVehicleForPlayer function, as '''if''' we would have this line of code in the script:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
createVehicleForPlayer(thePlayer,&amp;quot;createvehicle&amp;quot;,&amp;quot;468&amp;quot;) -- thePlayer is the player element of the player who entered the command&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
As we can see, it provides several parameters: the player who called the command, the command he entered and whatever text he had after that, in this case &amp;quot;468&amp;quot; as vehicle id for the Sanchez. The first two parameters are the same with all command handlers, which you can read on the [[addEventHandler]] page. For this fact, you always have to define at least those two parameters to use any after that (for example to process text that was entered after the command, like in our example the vehicle model id).&lt;br /&gt;
&lt;br /&gt;
''Note: You have to add the command handler AFTER you defined the handler function, else it can't find it. The order of execution matters.''&lt;br /&gt;
&lt;br /&gt;
====Writing the function====&lt;br /&gt;
In order to fill the function we created, we need to think about what we have to do:&lt;br /&gt;
* Get the players position, so we know where to spawn the vehicle (we want it to appear right beside the player)&lt;br /&gt;
* Calculate the position we want to spawn the vehicle at (we don't want it to appear in the player)&lt;br /&gt;
* Spawn the vehicle&lt;br /&gt;
* Check if it has been spawned successfully, or output a message&lt;br /&gt;
&lt;br /&gt;
In order to achieve our goals, we have to use several functions. To find function we need to use, we should visit the [[Scripting Functions|Server Functions List]]. First we need a function to get the players position. Since players are Elements, we first jump to the '''Element functions''' where we find the [[getElementPosition]] function. By clicking on the function name in the list, you get to the function description. There we can see the syntax, what it returns and usually an example. The syntax shows us what arguments we can or have to submit.&lt;br /&gt;
&lt;br /&gt;
For [[getElementPosition]], the syntax is:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
float, float, float getElementPosition ( element theElement )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The three ''float'' in front of the function name are the return type. In this case it means the function returns three floating point numbers. (x, y and z) Within the parentheses, you can see what arguments you have to submit. In this case only the element whose position you want to get, which is the player in our example.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function createVehicleForPlayer(thePlayer, command, vehicleModel)&lt;br /&gt;
	-- get the position and put it in the x,y,z variables&lt;br /&gt;
	-- (local means, the variables only exist in the current scope, in this case, the function)&lt;br /&gt;
	local x,y,z = getElementPosition(thePlayer)&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next we want to ensure that the vehicle won't spawn directly in the player, so we add a few units to the ''x'' variable, which will make it spawn east from the player.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function createVehicleForPlayer(thePlayer, command, vehicleModel)&lt;br /&gt;
	local x,y,z = getElementPosition(thePlayer) -- get the position of the player&lt;br /&gt;
	x = x + 5 -- add 5 units to the x position&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now we need another function, one to spawn a vehicle. We once again search for it on the [[Scripting Functions|Server Functions List]], this time - since we are talking about vehicles - in the '''Vehicle functions''' section, where we will choose [[createVehicle]]. In this function's syntax, we only have one return type (which is more common), a vehicle element that points to the vehicle we just created. Also, we see that some arguments are enclosed within [ ] which means that those are optional.&lt;br /&gt;
&lt;br /&gt;
We already have all arguments we need for [[createVehicle]] in our function: The position we just calculated in the ''x,y,z'' variables and the model id that we provided through the command (&amp;quot;createvehicle 468&amp;quot;) and can access in the function as ''vehicleModel'' variable.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function createVehicleForPlayer(thePlayer, command, vehicleModel)&lt;br /&gt;
	local x,y,z = getElementPosition(thePlayer) -- get the position of the player&lt;br /&gt;
	x = x + 5 -- add 5 units to the x position&lt;br /&gt;
	-- create the vehicle and store the returned vehicle element in the ''createdVehicle'' variable&lt;br /&gt;
	local createdVehicle = createVehicle(tonumber(vehicleModel),x,y,z)&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Of course this code can be improved in many ways, but at least we want to add a check whether the vehicle was created successfully or not. As we can read on the [[createVehicle]] page under '''Returns''', the function returns ''false'' when it was unable to create the vehicle. Thus, we check the value of the ''createVehicle'' variable.&lt;br /&gt;
&lt;br /&gt;
Now we have our complete script:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function createVehicleForPlayer(thePlayer, command, vehicleModel)&lt;br /&gt;
	local x,y,z = getElementPosition(thePlayer) -- get the position of the player&lt;br /&gt;
	x = x + 5 -- add 5 units to the x position&lt;br /&gt;
	local createdVehicle = createVehicle(tonumber(vehicleModel),x,y,z)&lt;br /&gt;
	-- check if the return value was ''false''&lt;br /&gt;
	if (createdVehicle == false) then&lt;br /&gt;
		-- if so, output a message to the chatbox, but only to this player.&lt;br /&gt;
		outputChatBox(&amp;quot;Failed to create vehicle.&amp;quot;,thePlayer)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler(&amp;quot;createvehicle&amp;quot;, createVehicleForPlayer)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As you can see, we introduced another function with [[outputChatBox]]. By now, you should be able to explore the function's documentation page yourself. For more advanced scripting, please check out the [[Map manager|Map Manager]].&lt;br /&gt;
&lt;br /&gt;
==What you need to know==&lt;br /&gt;
You already read some things about resources, command handlers and finding functions in the documentation in the first paragraph, but there is much more to learn. This section will give you a rather short overview over some of these things, while linking to related pages if possible.&lt;br /&gt;
===Clientside and Serverside scripts===&lt;br /&gt;
You may have already noticed these or similiar terms (Server/Client) somewhere on this wiki, mostly in conjunction with functions. MTA not only supports scripts that run on the server and provide commands (like the one we wrote above) or other features, but also scripts that run on the MTA client the players use to connect to the server. The reason for this is, that some features MTA provides have to be clientside (like a GUI - Graphical User Interface), others should be because they work better and still others are better off to be serverside or just don't work clientside.&lt;br /&gt;
&lt;br /&gt;
Most scripts you will make (gamemodes, maps) will probably be serverside, like the one we wrote in the first section. If you run into something that can't be solved serverside, you will probably have to make it clientside. For a clientside script for example, you would create a ordinary script file (for example called ''client.lua'') and specify it in the meta.xml, like this:&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;
The ''type'' attribute defaults to 'server', so you only need to specify it for clientside scripts. When you do this, the clientside script will be downloaded to the player's computer once he connects to the server. Read more about [[Client side scripts]].&lt;br /&gt;
&lt;br /&gt;
===More complex resources===&lt;br /&gt;
The previous section showed briefly how to add clientside scripts to the resource, but there is also much more possible. As mentioned at the very top of this page, resources can be pretty much everything. Their purpose is defined by what they do. Let's have some theoretical resources, by looking at the files it contains, the ''meta.xml'' and what they might do:&lt;br /&gt;
&lt;br /&gt;
====First example - A utility script====&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;Someguy&amp;quot; description=&amp;quot;admin commands&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;
* The ''commands.lua'' provides some admin commands, like banning a player, muting or something else that can be used to admin the server&lt;br /&gt;
* The ''client.lua'' provides a GUI to be able to perform the mentioned actions easily&lt;br /&gt;
&lt;br /&gt;
This example might be running all the time (maybe even auto-started when the server starts) as it's useful during the whole gaming experience and also wont interfere with the gameplay, unless an admin decides to take some action of course.&lt;br /&gt;
&lt;br /&gt;
====Second example - A gamemode====&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;Someguy&amp;quot; description=&amp;quot;Counterstrike remake&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;
* The ''counterstrike.lua'' contains similiar to the following features:&lt;br /&gt;
** Let players choose their team and spawn them&lt;br /&gt;
** Provide them with weapons, targets and instructions (maybe read from a Map, see below)&lt;br /&gt;
** Define the game's rules, e.g. when does the round end, what happens when a player dies&lt;br /&gt;
** .. and maybe some more&lt;br /&gt;
* The ''buymenu.lua'' is a clientside script and creates a menu to buy weapons&lt;br /&gt;
&lt;br /&gt;
This example can be called a gamemode, since it not only intereferes with the gameplay, but actually defines the rules of it. The ''type'' attribute indicates that this example works with the [[Map manager]], yet another resource that was written by the QA Team to manage gamemodes and map loading. It is highly recommended that you base your gamemodes on the techniques it provides.&lt;br /&gt;
&lt;br /&gt;
This also means that the gamemode probably won't run without a map. Gamemodes should always be as generic as possible. An example for a map is stated in the next example.&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;
===Events===&lt;br /&gt;
Events are the way MTA tells scripts about things that happen. For example when a player dies, the [[onPlayerWasted]] event is triggered. In order to perform any actions when a player dies, you have to prepare yourself similiar to adding a command handler, as shown in [[#Writing_the_script|the first chapter]].&lt;br /&gt;
&lt;br /&gt;
This example will output a message with the name of the player who died:&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;
==Where to go from here==&lt;br /&gt;
You should now be familiar with the most basic aspects of MTA scripting and also a bit with the documentation. The [[Main Page]] provides you with links to more information, Tutorials and References that allow a deeper look into the topics you desire to learn about.&lt;br /&gt;
{{note|From here we recommend reading the [[debugging]] tutorial. Good debugging skills are an absolute necessity when you are making scripts. We also recommend you to use the [[predefined variables list]] to help you with certain tasks and make scripting easier and faster.}}&lt;br /&gt;
'''See also:'''&lt;br /&gt;
* [[Advanced Topics]]&lt;br /&gt;
[[ru:Scripting Introduction]]&lt;br /&gt;
[[it:Introduzione allo scripting]]&lt;br /&gt;
[[es:Introducción a la Programación]]&lt;br /&gt;
[[nl:Scripting_introductie]]&lt;/div&gt;</summary>
		<author><name>Stanley Sathler .</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=PT-BR/Introdu%C3%A7%C3%A3o_ao_Scripting&amp;diff=31050</id>
		<title>PT-BR/Introdução ao Scripting</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=PT-BR/Introdu%C3%A7%C3%A3o_ao_Scripting&amp;diff=31050"/>
		<updated>2012-05-20T22:45:58Z</updated>

		<summary type="html">&lt;p&gt;Stanley Sathler .: /* Criando um script simples */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Resources are a key part of MTA. A resource is essentially a folder or zip file that contains a collection of files, plus a meta file that describes to the server how the resource should be loaded and what files it does contain. A resource can be seen as being partly equivalent to a program running in an operating system - it can be started and stopped, and multiple resources can run at once.&lt;br /&gt;
&lt;br /&gt;
Everything that has to do with scripting happens in resources, what a resource does defines if it is a gamemode, a map or anything else. MTA comes with resources that you can optionally use in your gamemodes, such as maplimits to keep playings within a playing area or deathpickups to create weapon pickups.&lt;br /&gt;
{{tip|Your first step to begin Lua scripting should be using an Lua editor. This makes scripting much easier. We recommend [http://notepad-plus.sourceforge.net/uk/site.htm Notepad++] or [http://luaedit.sourceforge.net/ LuaEdit]. There is also an unofficial [[MTASE|MTA Script Editor]] (in work-in-progress state) that you can test out.}}&lt;br /&gt;
&lt;br /&gt;
==Criando nosso primeiro script==&lt;br /&gt;
Nós primeiro vamos aprender a criar um script que permita que o jogador ande pela cidade, passo-a-passo.&lt;br /&gt;
===Onde estão todos os scripts?===&lt;br /&gt;
Vamos dar uma olhada na estrutura dos scripts. Vá até a pasta de instalação do seu MTA (padrão: C:\Arquivo de Programas\MTA San Andreas 1.x\) e siga os passos abaixo:&lt;br /&gt;
&lt;br /&gt;
	/server/mods/deathmatch/resources/&lt;br /&gt;
&lt;br /&gt;
Você irá ver diversos arquivos .zip, que são os simples scripts que vêm por padrão junto ao MTA. Cada arquivo é um &amp;quot;recurso&amp;quot;, e eles serão todos descompactados e carregados pelo servidor quando ele for iniciado. Para criar seu próprio resource, simplesmente crie uma pasta com um nome de sua preferência. Nós iremos usar o nome &amp;quot;myserver&amp;quot; para este tutorial.&lt;br /&gt;
&lt;br /&gt;
Após a criação da pasta (myserver), acessamos-a:&lt;br /&gt;
&lt;br /&gt;
	/server/mods/deathmatch/resources/myserver/&lt;br /&gt;
&lt;br /&gt;
===Identificando seu recurso===&lt;br /&gt;
Para que o servidor reconheça os arquivos de um determinado recurso (para carregá-los), um arquivo ''meta.xml'' deve ser criado, contendo uma lista de todo o conteúdo do recurso. O arquivo ''meta.xml'' deve ser salvo na pasta principal (nesse caso, na pasta &amp;quot;myserver&amp;quot;). Então, abra um editor de textos (recomenda-se o Notepad++) e salve-o com o nome de &amp;quot;meta.xml&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Entre com as seguintes linhas no arquivo ''meta.xml'':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;meta&amp;gt;&lt;br /&gt;
     &amp;lt;info author=&amp;quot;Seu_Nome&amp;quot; type=&amp;quot;gamemode&amp;quot; name=&amp;quot;Meu_Servidor&amp;quot; description=&amp;quot;Meu primeiro recurso&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;
Na tag ''&amp;lt;info /&amp;gt;'', existe o campo ''&amp;quot;type&amp;quot;'', que indica que o recurso criado é um ''gamemode''. Pode também ser um ''map'' (mapa), que iremos explicar depois.&lt;br /&gt;
Um gamemode é o que você precisa para criar um servidor independente.&lt;br /&gt;
&lt;br /&gt;
A tag ''&amp;lt;script /&amp;gt;'' indica o caminho dos arquivos (escritos em Lua) presentes no seu recurso. O do exemplo (script.lua), criaremos no próximo passo.&lt;br /&gt;
&lt;br /&gt;
===Criando um script simples===&lt;br /&gt;
Observe que na tag ''&amp;lt;script /&amp;gt;'' anterior, o arquivo .lua está presente na pasta principal do recurso (e não em uma subpasta). Então precisamos salvar o script na pasta principal, assim como indicado na tag. Salve o seguinte código no arquivo script.lua:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local spawnX, spawnY, spawnZ = 1959.55, -1714.46, 10&lt;br /&gt;
function joinHandler()&lt;br /&gt;
	spawnPlayer(source, spawnX, spawnY, spawnZ)&lt;br /&gt;
	fadeCamera(source, true)&lt;br /&gt;
	setCameraTarget(source, source)&lt;br /&gt;
	outputChatBox(&amp;quot;Bem-vindo ao meu servidor!&amp;quot;, source)&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onPlayerJoin&amp;quot;, getRootElement(), joinHandler)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
O script irá gerar o seu personagem (seu boneco) nas coordenadas (x, y, z) especificadas assim que você entrar no jogo. Note que a função ''fadeCamera()'' precisa ser usada ou, do contrário, a tela ficará preta (e você não verá nada). Outra função é a ''setCameraTarget()'', que foca a câmera do jogo no seu personagem (do contrário, a câmera estaria virada para o céu).&lt;br /&gt;
&lt;br /&gt;
A variável '''source''' representa o elemento responsável pela chamada do evento (você verá mais sobre eventos mais adiante). Assim, quando um jogador entra no jogo, o evento &amp;quot;onPlayerJoin&amp;quot; é chamado e, em seguida, chama a função. O evento automaticamente define o jogador na variável ''source'' (obs: a variável ''source'' armazena sempre o elemento que chamou determinado evento. Ou seja, nem sempre ''source'' será o jogador. Cuidado com isso.)&lt;br /&gt;
&lt;br /&gt;
Se olharmos bem para o [[addEventHandler]], veremos 3 argumentos: 'onPlayerJoin', que indica o evento que chamará a função (no caso, esse evento é chamado assim que o jogador entra no jogo, logo, a função é chamada assim que o jogador entra no jogo); 'getRootElement()', que indica quem poderá chamar o evento (ou seja, todos os elementos, incluindo todos os jogadores); 'joinHandler', que indica o nome da função que será chamada quando o evento for chamado. Maiores detalhes serão explicados mais adiante. Vamos agora simplesmente rodar nosso servidor e testar nosso script.&lt;br /&gt;
&lt;br /&gt;
===Running the script===&lt;br /&gt;
To get the server started, simply run the executable under the MTA DM directory. A list of server stats will be shown first; note the port number, which you'll need when joining the game. Then the server loads all the resources under the /resource/ directory, and then &amp;quot;ready to accept connections!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Before you connect to the server, you must run the gamemode. Type &amp;quot;gamemode myserver&amp;quot; and press Enter. The server will start the gamemode you just created, and will also show any errors and warnings from this point on. Now you can start the MTA DM client, and &amp;quot;Quick Connect&amp;quot; using the IP address of your server and the port number you saw earlier. If all goes well, after a few seconds your character will be walking on the streets of Los Santos.&lt;br /&gt;
&lt;br /&gt;
Next we'll add a command to your script that players can use to spawn a vehicle beside their position. You may skip it and check out more advanced scripting with the [[Map manager|Map Manager]], which continues this tutorial. Another branch from this tutorial is [[Introduction to Scripting GUI]], you may follow it to see how Graphical User Interface in MTA:DM is drawn and scripted.&lt;br /&gt;
&lt;br /&gt;
==Creating a simple command==&lt;br /&gt;
Let's go back to the content of the ''script.lua'' file. As mentioned above, we want to provide a command to create a vehicle beside your current position in the game. Firstly we need to create a function we want to call and a command handler that creates the command the player will be able to enter in the console.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- create the function the command handler calls, with the arguments: thePlayer, command, vehicleModel&lt;br /&gt;
function createVehicleForPlayer(thePlayer, command, vehicleModel)&lt;br /&gt;
   -- create a vehicle and stuff&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- create a command handler&lt;br /&gt;
addCommandHandler(&amp;quot;createvehicle&amp;quot;, createVehicleForPlayer)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
''Note: Function names are clickable in code examples on the wiki and linked to the functions' documentation.''&lt;br /&gt;
&lt;br /&gt;
====About command handlers====&lt;br /&gt;
The first argument of [[addCommandHandler]] is the name of the command the player will be able to enter, the second argument is the function this will call, in this case ''createVehicleForPlayer''.&lt;br /&gt;
&lt;br /&gt;
If you have already experience in scripting, you will know that you call a function like this:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
functionName(argument1, argument2, argument3, ..)&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;
functionName(thePlayer, commandName, argument3, ..)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
If we have a closer look on the lower example above, we can see argument1 is thePlayer and argument2 the commandName. thePlayer is simply the one who typed the command, so whatever you call it, the variable will contain the player who activated the command. commandName is simply the command they typed. So if they typed &amp;quot;/greet&amp;quot;, this argument will contain &amp;quot;greet&amp;quot;. Argument 3 is something extra the player typed, you'll learn it a little bit further in the tutorial. Never forget that the first 2 arguments are standard arguments, but you can name them to anything you want.&lt;br /&gt;
&lt;br /&gt;
We called the [[addCommandHandler]] function this way already and since ''createVehicleForPlayer'' is a function too, it can be called that way as well. But we are using a command handler for that, which calls it in a similiar manner, internally.&lt;br /&gt;
&lt;br /&gt;
For example: Someone types &amp;quot;createvehicle 468&amp;quot; ingame in the console to spawn a Sanchez, the command handler calls the createVehicleForPlayer function, as '''if''' we would have this line of code in the script:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
createVehicleForPlayer(thePlayer,&amp;quot;createvehicle&amp;quot;,&amp;quot;468&amp;quot;) -- thePlayer is the player element of the player who entered the command&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
As we can see, it provides several parameters: the player who called the command, the command he entered and whatever text he had after that, in this case &amp;quot;468&amp;quot; as vehicle id for the Sanchez. The first two parameters are the same with all command handlers, which you can read on the [[addEventHandler]] page. For this fact, you always have to define at least those two parameters to use any after that (for example to process text that was entered after the command, like in our example the vehicle model id).&lt;br /&gt;
&lt;br /&gt;
''Note: You have to add the command handler AFTER you defined the handler function, else it can't find it. The order of execution matters.''&lt;br /&gt;
&lt;br /&gt;
====Writing the function====&lt;br /&gt;
In order to fill the function we created, we need to think about what we have to do:&lt;br /&gt;
* Get the players position, so we know where to spawn the vehicle (we want it to appear right beside the player)&lt;br /&gt;
* Calculate the position we want to spawn the vehicle at (we don't want it to appear in the player)&lt;br /&gt;
* Spawn the vehicle&lt;br /&gt;
* Check if it has been spawned successfully, or output a message&lt;br /&gt;
&lt;br /&gt;
In order to achieve our goals, we have to use several functions. To find function we need to use, we should visit the [[Scripting Functions|Server Functions List]]. First we need a function to get the players position. Since players are Elements, we first jump to the '''Element functions''' where we find the [[getElementPosition]] function. By clicking on the function name in the list, you get to the function description. There we can see the syntax, what it returns and usually an example. The syntax shows us what arguments we can or have to submit.&lt;br /&gt;
&lt;br /&gt;
For [[getElementPosition]], the syntax is:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
float, float, float getElementPosition ( element theElement )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The three ''float'' in front of the function name are the return type. In this case it means the function returns three floating point numbers. (x, y and z) Within the parentheses, you can see what arguments you have to submit. In this case only the element whose position you want to get, which is the player in our example.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function createVehicleForPlayer(thePlayer, command, vehicleModel)&lt;br /&gt;
	-- get the position and put it in the x,y,z variables&lt;br /&gt;
	-- (local means, the variables only exist in the current scope, in this case, the function)&lt;br /&gt;
	local x,y,z = getElementPosition(thePlayer)&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next we want to ensure that the vehicle won't spawn directly in the player, so we add a few units to the ''x'' variable, which will make it spawn east from the player.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function createVehicleForPlayer(thePlayer, command, vehicleModel)&lt;br /&gt;
	local x,y,z = getElementPosition(thePlayer) -- get the position of the player&lt;br /&gt;
	x = x + 5 -- add 5 units to the x position&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now we need another function, one to spawn a vehicle. We once again search for it on the [[Scripting Functions|Server Functions List]], this time - since we are talking about vehicles - in the '''Vehicle functions''' section, where we will choose [[createVehicle]]. In this function's syntax, we only have one return type (which is more common), a vehicle element that points to the vehicle we just created. Also, we see that some arguments are enclosed within [ ] which means that those are optional.&lt;br /&gt;
&lt;br /&gt;
We already have all arguments we need for [[createVehicle]] in our function: The position we just calculated in the ''x,y,z'' variables and the model id that we provided through the command (&amp;quot;createvehicle 468&amp;quot;) and can access in the function as ''vehicleModel'' variable.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function createVehicleForPlayer(thePlayer, command, vehicleModel)&lt;br /&gt;
	local x,y,z = getElementPosition(thePlayer) -- get the position of the player&lt;br /&gt;
	x = x + 5 -- add 5 units to the x position&lt;br /&gt;
	-- create the vehicle and store the returned vehicle element in the ''createdVehicle'' variable&lt;br /&gt;
	local createdVehicle = createVehicle(tonumber(vehicleModel),x,y,z)&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Of course this code can be improved in many ways, but at least we want to add a check whether the vehicle was created successfully or not. As we can read on the [[createVehicle]] page under '''Returns''', the function returns ''false'' when it was unable to create the vehicle. Thus, we check the value of the ''createVehicle'' variable.&lt;br /&gt;
&lt;br /&gt;
Now we have our complete script:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function createVehicleForPlayer(thePlayer, command, vehicleModel)&lt;br /&gt;
	local x,y,z = getElementPosition(thePlayer) -- get the position of the player&lt;br /&gt;
	x = x + 5 -- add 5 units to the x position&lt;br /&gt;
	local createdVehicle = createVehicle(tonumber(vehicleModel),x,y,z)&lt;br /&gt;
	-- check if the return value was ''false''&lt;br /&gt;
	if (createdVehicle == false) then&lt;br /&gt;
		-- if so, output a message to the chatbox, but only to this player.&lt;br /&gt;
		outputChatBox(&amp;quot;Failed to create vehicle.&amp;quot;,thePlayer)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler(&amp;quot;createvehicle&amp;quot;, createVehicleForPlayer)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As you can see, we introduced another function with [[outputChatBox]]. By now, you should be able to explore the function's documentation page yourself. For more advanced scripting, please check out the [[Map manager|Map Manager]].&lt;br /&gt;
&lt;br /&gt;
==What you need to know==&lt;br /&gt;
You already read some things about resources, command handlers and finding functions in the documentation in the first paragraph, but there is much more to learn. This section will give you a rather short overview over some of these things, while linking to related pages if possible.&lt;br /&gt;
===Clientside and Serverside scripts===&lt;br /&gt;
You may have already noticed these or similiar terms (Server/Client) somewhere on this wiki, mostly in conjunction with functions. MTA not only supports scripts that run on the server and provide commands (like the one we wrote above) or other features, but also scripts that run on the MTA client the players use to connect to the server. The reason for this is, that some features MTA provides have to be clientside (like a GUI - Graphical User Interface), others should be because they work better and still others are better off to be serverside or just don't work clientside.&lt;br /&gt;
&lt;br /&gt;
Most scripts you will make (gamemodes, maps) will probably be serverside, like the one we wrote in the first section. If you run into something that can't be solved serverside, you will probably have to make it clientside. For a clientside script for example, you would create a ordinary script file (for example called ''client.lua'') and specify it in the meta.xml, like this:&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;
The ''type'' attribute defaults to 'server', so you only need to specify it for clientside scripts. When you do this, the clientside script will be downloaded to the player's computer once he connects to the server. Read more about [[Client side scripts]].&lt;br /&gt;
&lt;br /&gt;
===More complex resources===&lt;br /&gt;
The previous section showed briefly how to add clientside scripts to the resource, but there is also much more possible. As mentioned at the very top of this page, resources can be pretty much everything. Their purpose is defined by what they do. Let's have some theoretical resources, by looking at the files it contains, the ''meta.xml'' and what they might do:&lt;br /&gt;
&lt;br /&gt;
====First example - A utility script====&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;Someguy&amp;quot; description=&amp;quot;admin commands&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;
* The ''commands.lua'' provides some admin commands, like banning a player, muting or something else that can be used to admin the server&lt;br /&gt;
* The ''client.lua'' provides a GUI to be able to perform the mentioned actions easily&lt;br /&gt;
&lt;br /&gt;
This example might be running all the time (maybe even auto-started when the server starts) as it's useful during the whole gaming experience and also wont interfere with the gameplay, unless an admin decides to take some action of course.&lt;br /&gt;
&lt;br /&gt;
====Second example - A gamemode====&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;Someguy&amp;quot; description=&amp;quot;Counterstrike remake&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;
* The ''counterstrike.lua'' contains similiar to the following features:&lt;br /&gt;
** Let players choose their team and spawn them&lt;br /&gt;
** Provide them with weapons, targets and instructions (maybe read from a Map, see below)&lt;br /&gt;
** Define the game's rules, e.g. when does the round end, what happens when a player dies&lt;br /&gt;
** .. and maybe some more&lt;br /&gt;
* The ''buymenu.lua'' is a clientside script and creates a menu to buy weapons&lt;br /&gt;
&lt;br /&gt;
This example can be called a gamemode, since it not only intereferes with the gameplay, but actually defines the rules of it. The ''type'' attribute indicates that this example works with the [[Map manager]], yet another resource that was written by the QA Team to manage gamemodes and map loading. It is highly recommended that you base your gamemodes on the techniques it provides.&lt;br /&gt;
&lt;br /&gt;
This also means that the gamemode probably won't run without a map. Gamemodes should always be as generic as possible. An example for a map is stated in the next example.&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;
===Events===&lt;br /&gt;
Events are the way MTA tells scripts about things that happen. For example when a player dies, the [[onPlayerWasted]] event is triggered. In order to perform any actions when a player dies, you have to prepare yourself similiar to adding a command handler, as shown in [[#Writing_the_script|the first chapter]].&lt;br /&gt;
&lt;br /&gt;
This example will output a message with the name of the player who died:&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;
==Where to go from here==&lt;br /&gt;
You should now be familiar with the most basic aspects of MTA scripting and also a bit with the documentation. The [[Main Page]] provides you with links to more information, Tutorials and References that allow a deeper look into the topics you desire to learn about.&lt;br /&gt;
{{note|From here we recommend reading the [[debugging]] tutorial. Good debugging skills are an absolute necessity when you are making scripts. We also recommend you to use the [[predefined variables list]] to help you with certain tasks and make scripting easier and faster.}}&lt;br /&gt;
'''See also:'''&lt;br /&gt;
* [[Advanced Topics]]&lt;br /&gt;
[[ru:Scripting Introduction]]&lt;br /&gt;
[[it:Introduzione allo scripting]]&lt;br /&gt;
[[es:Introducción a la Programación]]&lt;br /&gt;
[[nl:Scripting_introductie]]&lt;/div&gt;</summary>
		<author><name>Stanley Sathler .</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=PT-BR/Introdu%C3%A7%C3%A3o_ao_Scripting&amp;diff=31049</id>
		<title>PT-BR/Introdução ao Scripting</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=PT-BR/Introdu%C3%A7%C3%A3o_ao_Scripting&amp;diff=31049"/>
		<updated>2012-05-20T22:22:37Z</updated>

		<summary type="html">&lt;p&gt;Stanley Sathler .: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Resources are a key part of MTA. A resource is essentially a folder or zip file that contains a collection of files, plus a meta file that describes to the server how the resource should be loaded and what files it does contain. A resource can be seen as being partly equivalent to a program running in an operating system - it can be started and stopped, and multiple resources can run at once.&lt;br /&gt;
&lt;br /&gt;
Everything that has to do with scripting happens in resources, what a resource does defines if it is a gamemode, a map or anything else. MTA comes with resources that you can optionally use in your gamemodes, such as maplimits to keep playings within a playing area or deathpickups to create weapon pickups.&lt;br /&gt;
{{tip|Your first step to begin Lua scripting should be using an Lua editor. This makes scripting much easier. We recommend [http://notepad-plus.sourceforge.net/uk/site.htm Notepad++] or [http://luaedit.sourceforge.net/ LuaEdit]. There is also an unofficial [[MTASE|MTA Script Editor]] (in work-in-progress state) that you can test out.}}&lt;br /&gt;
&lt;br /&gt;
==Criando nosso primeiro script==&lt;br /&gt;
Nós primeiro vamos aprender a criar um script que permita que o jogador ande pela cidade, passo-a-passo.&lt;br /&gt;
===Onde estão todos os scripts?===&lt;br /&gt;
Vamos dar uma olhada na estrutura dos scripts. Vá até a pasta de instalação do seu MTA (padrão: C:\Arquivo de Programas\MTA San Andreas 1.x\) e siga os passos abaixo:&lt;br /&gt;
&lt;br /&gt;
	/server/mods/deathmatch/resources/&lt;br /&gt;
&lt;br /&gt;
Você irá ver diversos arquivos .zip, que são os simples scripts que vêm por padrão junto ao MTA. Cada arquivo é um &amp;quot;recurso&amp;quot;, e eles serão todos descompactados e carregados pelo servidor quando ele for iniciado. Para criar seu próprio resource, simplesmente crie uma pasta com um nome de sua preferência. Nós iremos usar o nome &amp;quot;myserver&amp;quot; para este tutorial.&lt;br /&gt;
&lt;br /&gt;
Após a criação da pasta (myserver), acessamos-a:&lt;br /&gt;
&lt;br /&gt;
	/server/mods/deathmatch/resources/myserver/&lt;br /&gt;
&lt;br /&gt;
===Identificando seu recurso===&lt;br /&gt;
Para que o servidor reconheça os arquivos de um determinado recurso (para carregá-los), um arquivo ''meta.xml'' deve ser criado, contendo uma lista de todo o conteúdo do recurso. O arquivo ''meta.xml'' deve ser salvo na pasta principal (nesse caso, na pasta &amp;quot;myserver&amp;quot;). Então, abra um editor de textos (recomenda-se o Notepad++) e salve-o com o nome de &amp;quot;meta.xml&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Entre com as seguintes linhas no arquivo ''meta.xml'':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;meta&amp;gt;&lt;br /&gt;
     &amp;lt;info author=&amp;quot;Seu_Nome&amp;quot; type=&amp;quot;gamemode&amp;quot; name=&amp;quot;Meu_Servidor&amp;quot; description=&amp;quot;Meu primeiro recurso&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;
Na tag ''&amp;lt;info /&amp;gt;'', existe o campo ''&amp;quot;type&amp;quot;'', que indica que o recurso criado é um ''gamemode''. Pode também ser um ''map'' (mapa), que iremos explicar depois.&lt;br /&gt;
Um gamemode é o que você precisa para criar um servidor independente.&lt;br /&gt;
&lt;br /&gt;
A tag ''&amp;lt;script /&amp;gt;'' indica o caminho dos arquivos (escritos em Lua) presentes no seu recurso. O do exemplo (script.lua), criaremos no próximo passo.&lt;br /&gt;
&lt;br /&gt;
===Criando um script simples===&lt;br /&gt;
Observe que na tag ''&amp;lt;script /&amp;gt;'' anterior, o arquivo .lua está presente na pasta principal do recurso (e não em uma subpasta). Então precisamos salvar o script na pasta principal, assim como indicado na tag. Salve o seguinte código no arquivo script.lua:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local spawnX, spawnY, spawnZ = 1959.55, -1714.46, 10&lt;br /&gt;
function joinHandler()&lt;br /&gt;
	spawnPlayer(source, spawnX, spawnY, spawnZ)&lt;br /&gt;
	fadeCamera(source, true)&lt;br /&gt;
	setCameraTarget(source, source)&lt;br /&gt;
	outputChatBox(&amp;quot;Welcome to My Server&amp;quot;, source)&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onPlayerJoin&amp;quot;, getRootElement(), joinHandler)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
The script will spawn you at the coordinate (x, y, z) specified above, when you join the game. Note that the ''fadeCamera'' function must be used or the screen will be black. Also, in releases after DP2, you need to set the camera target (otherwise all the player will see is blue sky).&lt;br /&gt;
&lt;br /&gt;
The '''source''' variable indicates who triggered the event. Since a player has joined when the code is triggered, you use this variable to look which has joined. So it'll spawn that player instead of everyone or a random person.&lt;br /&gt;
&lt;br /&gt;
If we have a closer look on [[addEventHandler]], you can see 3 things: 'onPlayerJoin', which indicates when it's triggered. getRootElement(), which shows by what/who it can be triggered. (getRootElement() is everything/everyone) And joinHandler, which indicates the function that has to be triggered after the event is triggered. Other details will be explained later in another example, now let's just run the server and try it out!&lt;br /&gt;
&lt;br /&gt;
===Running the script===&lt;br /&gt;
To get the server started, simply run the executable under the MTA DM directory. A list of server stats will be shown first; note the port number, which you'll need when joining the game. Then the server loads all the resources under the /resource/ directory, and then &amp;quot;ready to accept connections!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Before you connect to the server, you must run the gamemode. Type &amp;quot;gamemode myserver&amp;quot; and press Enter. The server will start the gamemode you just created, and will also show any errors and warnings from this point on. Now you can start the MTA DM client, and &amp;quot;Quick Connect&amp;quot; using the IP address of your server and the port number you saw earlier. If all goes well, after a few seconds your character will be walking on the streets of Los Santos.&lt;br /&gt;
&lt;br /&gt;
Next we'll add a command to your script that players can use to spawn a vehicle beside their position. You may skip it and check out more advanced scripting with the [[Map manager|Map Manager]], which continues this tutorial. Another branch from this tutorial is [[Introduction to Scripting GUI]], you may follow it to see how Graphical User Interface in MTA:DM is drawn and scripted.&lt;br /&gt;
&lt;br /&gt;
==Creating a simple command==&lt;br /&gt;
Let's go back to the content of the ''script.lua'' file. As mentioned above, we want to provide a command to create a vehicle beside your current position in the game. Firstly we need to create a function we want to call and a command handler that creates the command the player will be able to enter in the console.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- create the function the command handler calls, with the arguments: thePlayer, command, vehicleModel&lt;br /&gt;
function createVehicleForPlayer(thePlayer, command, vehicleModel)&lt;br /&gt;
   -- create a vehicle and stuff&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- create a command handler&lt;br /&gt;
addCommandHandler(&amp;quot;createvehicle&amp;quot;, createVehicleForPlayer)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
''Note: Function names are clickable in code examples on the wiki and linked to the functions' documentation.''&lt;br /&gt;
&lt;br /&gt;
====About command handlers====&lt;br /&gt;
The first argument of [[addCommandHandler]] is the name of the command the player will be able to enter, the second argument is the function this will call, in this case ''createVehicleForPlayer''.&lt;br /&gt;
&lt;br /&gt;
If you have already experience in scripting, you will know that you call a function like this:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
functionName(argument1, argument2, argument3, ..)&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;
functionName(thePlayer, commandName, argument3, ..)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
If we have a closer look on the lower example above, we can see argument1 is thePlayer and argument2 the commandName. thePlayer is simply the one who typed the command, so whatever you call it, the variable will contain the player who activated the command. commandName is simply the command they typed. So if they typed &amp;quot;/greet&amp;quot;, this argument will contain &amp;quot;greet&amp;quot;. Argument 3 is something extra the player typed, you'll learn it a little bit further in the tutorial. Never forget that the first 2 arguments are standard arguments, but you can name them to anything you want.&lt;br /&gt;
&lt;br /&gt;
We called the [[addCommandHandler]] function this way already and since ''createVehicleForPlayer'' is a function too, it can be called that way as well. But we are using a command handler for that, which calls it in a similiar manner, internally.&lt;br /&gt;
&lt;br /&gt;
For example: Someone types &amp;quot;createvehicle 468&amp;quot; ingame in the console to spawn a Sanchez, the command handler calls the createVehicleForPlayer function, as '''if''' we would have this line of code in the script:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
createVehicleForPlayer(thePlayer,&amp;quot;createvehicle&amp;quot;,&amp;quot;468&amp;quot;) -- thePlayer is the player element of the player who entered the command&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
As we can see, it provides several parameters: the player who called the command, the command he entered and whatever text he had after that, in this case &amp;quot;468&amp;quot; as vehicle id for the Sanchez. The first two parameters are the same with all command handlers, which you can read on the [[addEventHandler]] page. For this fact, you always have to define at least those two parameters to use any after that (for example to process text that was entered after the command, like in our example the vehicle model id).&lt;br /&gt;
&lt;br /&gt;
''Note: You have to add the command handler AFTER you defined the handler function, else it can't find it. The order of execution matters.''&lt;br /&gt;
&lt;br /&gt;
====Writing the function====&lt;br /&gt;
In order to fill the function we created, we need to think about what we have to do:&lt;br /&gt;
* Get the players position, so we know where to spawn the vehicle (we want it to appear right beside the player)&lt;br /&gt;
* Calculate the position we want to spawn the vehicle at (we don't want it to appear in the player)&lt;br /&gt;
* Spawn the vehicle&lt;br /&gt;
* Check if it has been spawned successfully, or output a message&lt;br /&gt;
&lt;br /&gt;
In order to achieve our goals, we have to use several functions. To find function we need to use, we should visit the [[Scripting Functions|Server Functions List]]. First we need a function to get the players position. Since players are Elements, we first jump to the '''Element functions''' where we find the [[getElementPosition]] function. By clicking on the function name in the list, you get to the function description. There we can see the syntax, what it returns and usually an example. The syntax shows us what arguments we can or have to submit.&lt;br /&gt;
&lt;br /&gt;
For [[getElementPosition]], the syntax is:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
float, float, float getElementPosition ( element theElement )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The three ''float'' in front of the function name are the return type. In this case it means the function returns three floating point numbers. (x, y and z) Within the parentheses, you can see what arguments you have to submit. In this case only the element whose position you want to get, which is the player in our example.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function createVehicleForPlayer(thePlayer, command, vehicleModel)&lt;br /&gt;
	-- get the position and put it in the x,y,z variables&lt;br /&gt;
	-- (local means, the variables only exist in the current scope, in this case, the function)&lt;br /&gt;
	local x,y,z = getElementPosition(thePlayer)&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next we want to ensure that the vehicle won't spawn directly in the player, so we add a few units to the ''x'' variable, which will make it spawn east from the player.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function createVehicleForPlayer(thePlayer, command, vehicleModel)&lt;br /&gt;
	local x,y,z = getElementPosition(thePlayer) -- get the position of the player&lt;br /&gt;
	x = x + 5 -- add 5 units to the x position&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now we need another function, one to spawn a vehicle. We once again search for it on the [[Scripting Functions|Server Functions List]], this time - since we are talking about vehicles - in the '''Vehicle functions''' section, where we will choose [[createVehicle]]. In this function's syntax, we only have one return type (which is more common), a vehicle element that points to the vehicle we just created. Also, we see that some arguments are enclosed within [ ] which means that those are optional.&lt;br /&gt;
&lt;br /&gt;
We already have all arguments we need for [[createVehicle]] in our function: The position we just calculated in the ''x,y,z'' variables and the model id that we provided through the command (&amp;quot;createvehicle 468&amp;quot;) and can access in the function as ''vehicleModel'' variable.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function createVehicleForPlayer(thePlayer, command, vehicleModel)&lt;br /&gt;
	local x,y,z = getElementPosition(thePlayer) -- get the position of the player&lt;br /&gt;
	x = x + 5 -- add 5 units to the x position&lt;br /&gt;
	-- create the vehicle and store the returned vehicle element in the ''createdVehicle'' variable&lt;br /&gt;
	local createdVehicle = createVehicle(tonumber(vehicleModel),x,y,z)&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Of course this code can be improved in many ways, but at least we want to add a check whether the vehicle was created successfully or not. As we can read on the [[createVehicle]] page under '''Returns''', the function returns ''false'' when it was unable to create the vehicle. Thus, we check the value of the ''createVehicle'' variable.&lt;br /&gt;
&lt;br /&gt;
Now we have our complete script:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function createVehicleForPlayer(thePlayer, command, vehicleModel)&lt;br /&gt;
	local x,y,z = getElementPosition(thePlayer) -- get the position of the player&lt;br /&gt;
	x = x + 5 -- add 5 units to the x position&lt;br /&gt;
	local createdVehicle = createVehicle(tonumber(vehicleModel),x,y,z)&lt;br /&gt;
	-- check if the return value was ''false''&lt;br /&gt;
	if (createdVehicle == false) then&lt;br /&gt;
		-- if so, output a message to the chatbox, but only to this player.&lt;br /&gt;
		outputChatBox(&amp;quot;Failed to create vehicle.&amp;quot;,thePlayer)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler(&amp;quot;createvehicle&amp;quot;, createVehicleForPlayer)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As you can see, we introduced another function with [[outputChatBox]]. By now, you should be able to explore the function's documentation page yourself. For more advanced scripting, please check out the [[Map manager|Map Manager]].&lt;br /&gt;
&lt;br /&gt;
==What you need to know==&lt;br /&gt;
You already read some things about resources, command handlers and finding functions in the documentation in the first paragraph, but there is much more to learn. This section will give you a rather short overview over some of these things, while linking to related pages if possible.&lt;br /&gt;
===Clientside and Serverside scripts===&lt;br /&gt;
You may have already noticed these or similiar terms (Server/Client) somewhere on this wiki, mostly in conjunction with functions. MTA not only supports scripts that run on the server and provide commands (like the one we wrote above) or other features, but also scripts that run on the MTA client the players use to connect to the server. The reason for this is, that some features MTA provides have to be clientside (like a GUI - Graphical User Interface), others should be because they work better and still others are better off to be serverside or just don't work clientside.&lt;br /&gt;
&lt;br /&gt;
Most scripts you will make (gamemodes, maps) will probably be serverside, like the one we wrote in the first section. If you run into something that can't be solved serverside, you will probably have to make it clientside. For a clientside script for example, you would create a ordinary script file (for example called ''client.lua'') and specify it in the meta.xml, like this:&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;
The ''type'' attribute defaults to 'server', so you only need to specify it for clientside scripts. When you do this, the clientside script will be downloaded to the player's computer once he connects to the server. Read more about [[Client side scripts]].&lt;br /&gt;
&lt;br /&gt;
===More complex resources===&lt;br /&gt;
The previous section showed briefly how to add clientside scripts to the resource, but there is also much more possible. As mentioned at the very top of this page, resources can be pretty much everything. Their purpose is defined by what they do. Let's have some theoretical resources, by looking at the files it contains, the ''meta.xml'' and what they might do:&lt;br /&gt;
&lt;br /&gt;
====First example - A utility script====&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;Someguy&amp;quot; description=&amp;quot;admin commands&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;
* The ''commands.lua'' provides some admin commands, like banning a player, muting or something else that can be used to admin the server&lt;br /&gt;
* The ''client.lua'' provides a GUI to be able to perform the mentioned actions easily&lt;br /&gt;
&lt;br /&gt;
This example might be running all the time (maybe even auto-started when the server starts) as it's useful during the whole gaming experience and also wont interfere with the gameplay, unless an admin decides to take some action of course.&lt;br /&gt;
&lt;br /&gt;
====Second example - A gamemode====&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;Someguy&amp;quot; description=&amp;quot;Counterstrike remake&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;
* The ''counterstrike.lua'' contains similiar to the following features:&lt;br /&gt;
** Let players choose their team and spawn them&lt;br /&gt;
** Provide them with weapons, targets and instructions (maybe read from a Map, see below)&lt;br /&gt;
** Define the game's rules, e.g. when does the round end, what happens when a player dies&lt;br /&gt;
** .. and maybe some more&lt;br /&gt;
* The ''buymenu.lua'' is a clientside script and creates a menu to buy weapons&lt;br /&gt;
&lt;br /&gt;
This example can be called a gamemode, since it not only intereferes with the gameplay, but actually defines the rules of it. The ''type'' attribute indicates that this example works with the [[Map manager]], yet another resource that was written by the QA Team to manage gamemodes and map loading. It is highly recommended that you base your gamemodes on the techniques it provides.&lt;br /&gt;
&lt;br /&gt;
This also means that the gamemode probably won't run without a map. Gamemodes should always be as generic as possible. An example for a map is stated in the next example.&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;
===Events===&lt;br /&gt;
Events are the way MTA tells scripts about things that happen. For example when a player dies, the [[onPlayerWasted]] event is triggered. In order to perform any actions when a player dies, you have to prepare yourself similiar to adding a command handler, as shown in [[#Writing_the_script|the first chapter]].&lt;br /&gt;
&lt;br /&gt;
This example will output a message with the name of the player who died:&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;
==Where to go from here==&lt;br /&gt;
You should now be familiar with the most basic aspects of MTA scripting and also a bit with the documentation. The [[Main Page]] provides you with links to more information, Tutorials and References that allow a deeper look into the topics you desire to learn about.&lt;br /&gt;
{{note|From here we recommend reading the [[debugging]] tutorial. Good debugging skills are an absolute necessity when you are making scripts. We also recommend you to use the [[predefined variables list]] to help you with certain tasks and make scripting easier and faster.}}&lt;br /&gt;
'''See also:'''&lt;br /&gt;
* [[Advanced Topics]]&lt;br /&gt;
[[ru:Scripting Introduction]]&lt;br /&gt;
[[it:Introduzione allo scripting]]&lt;br /&gt;
[[es:Introducción a la Programación]]&lt;br /&gt;
[[nl:Scripting_introductie]]&lt;/div&gt;</summary>
		<author><name>Stanley Sathler .</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=PT-BR/Introdu%C3%A7%C3%A3o_ao_Scripting&amp;diff=31047</id>
		<title>PT-BR/Introdução ao Scripting</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=PT-BR/Introdu%C3%A7%C3%A3o_ao_Scripting&amp;diff=31047"/>
		<updated>2012-05-20T22:08:51Z</updated>

		<summary type="html">&lt;p&gt;Stanley Sathler .: Created page with &amp;quot;Resources are a key part of MTA. A resource is essentially a folder or zip file that contains a collection of files, plus a meta file that describes to the server how the resourc...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Resources are a key part of MTA. A resource is essentially a folder or zip file that contains a collection of files, plus a meta file that describes to the server how the resource should be loaded and what files it does contain. A resource can be seen as being partly equivalent to a program running in an operating system - it can be started and stopped, and multiple resources can run at once.&lt;br /&gt;
&lt;br /&gt;
Everything that has to do with scripting happens in resources, what a resource does defines if it is a gamemode, a map or anything else. MTA comes with resources that you can optionally use in your gamemodes, such as maplimits to keep playings within a playing area or deathpickups to create weapon pickups.&lt;br /&gt;
{{tip|Your first step to begin Lua scripting should be using an Lua editor. This makes scripting much easier. We recommend [http://notepad-plus.sourceforge.net/uk/site.htm Notepad++] or [http://luaedit.sourceforge.net/ LuaEdit]. There is also an unofficial [[MTASE|MTA Script Editor]] (in work-in-progress state) that you can test out.}}&lt;br /&gt;
&lt;br /&gt;
==Creating a working script==&lt;br /&gt;
We will first learn how to make a basic script that lets the player walk around in the city, step by step.&lt;br /&gt;
===Where are all the scripts?===&lt;br /&gt;
Let's take a look at the script's file structure. Go to your MTA Server folder, and follow the path below:&lt;br /&gt;
&lt;br /&gt;
	/Your MTA Server/mods/deathmatch/resources/&lt;br /&gt;
&lt;br /&gt;
You will see a lot of .zip files, which are the packaged sample scripts shipped with MTA DM. Each file is a &amp;quot;resource&amp;quot;, and they will all be unzipped and loaded by the server when it starts. To create your own resource, simply make a folder with your preferred name. We'll use &amp;quot;myserver&amp;quot; for this tutorial.&lt;br /&gt;
&lt;br /&gt;
Now you should be under this directory: &lt;br /&gt;
&lt;br /&gt;
	/Your MTA Server/mods/deathmatch/resources/myserver/&lt;br /&gt;
&lt;br /&gt;
===Identifying your resource===&lt;br /&gt;
In order to let the server know what's in the resource, a ''meta.xml'' file must be created to list the resource's content. It must be located in the resource's root directory, which is the &amp;quot;myserver&amp;quot; folder in our case. So create a text file and name it &amp;quot;meta.xml&amp;quot;, and open it with notepad.&lt;br /&gt;
&lt;br /&gt;
Enter the following codes in the ''meta.xml'' file:&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;YourName&amp;quot; type=&amp;quot;gamemode&amp;quot; name=&amp;quot;My Server&amp;quot; description=&amp;quot;My first MTA DM server&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;
In the ''&amp;lt;info /&amp;gt;'' tag, there's a &amp;quot;type&amp;quot; field which indicates that the resource is a ''gamemode'' instead of a regular include or a ''map'', which will be explained later. A gamemode is what you need to make a stand-alone server. &lt;br /&gt;
&lt;br /&gt;
The ''&amp;lt;script /&amp;gt;'' tag indicates the script files contained in the resource, which we will create next.&lt;br /&gt;
===Creating a simple script===&lt;br /&gt;
Note that in the ''&amp;lt;script /&amp;gt;'' tag above, the .lua file is not under another directory. Therefore we'll create the file in the same folder as meta.xml. Now you can copy and paste the following code into script.lua:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local spawnX, spawnY, spawnZ = 1959.55, -1714.46, 10&lt;br /&gt;
function joinHandler()&lt;br /&gt;
	spawnPlayer(source, spawnX, spawnY, spawnZ)&lt;br /&gt;
	fadeCamera(source, true)&lt;br /&gt;
	setCameraTarget(source, source)&lt;br /&gt;
	outputChatBox(&amp;quot;Welcome to My Server&amp;quot;, source)&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onPlayerJoin&amp;quot;, getRootElement(), joinHandler)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
The script will spawn you at the coordinate (x, y, z) specified above, when you join the game. Note that the ''fadeCamera'' function must be used or the screen will be black. Also, in releases after DP2, you need to set the camera target (otherwise all the player will see is blue sky).&lt;br /&gt;
&lt;br /&gt;
The '''source''' variable indicates who triggered the event. Since a player has joined when the code is triggered, you use this variable to look which has joined. So it'll spawn that player instead of everyone or a random person.&lt;br /&gt;
&lt;br /&gt;
If we have a closer look on [[addEventHandler]], you can see 3 things: 'onPlayerJoin', which indicates when it's triggered. getRootElement(), which shows by what/who it can be triggered. (getRootElement() is everything/everyone) And joinHandler, which indicates the function that has to be triggered after the event is triggered. Other details will be explained later in another example, now let's just run the server and try it out!&lt;br /&gt;
&lt;br /&gt;
===Running the script===&lt;br /&gt;
To get the server started, simply run the executable under the MTA DM directory. A list of server stats will be shown first; note the port number, which you'll need when joining the game. Then the server loads all the resources under the /resource/ directory, and then &amp;quot;ready to accept connections!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Before you connect to the server, you must run the gamemode. Type &amp;quot;gamemode myserver&amp;quot; and press Enter. The server will start the gamemode you just created, and will also show any errors and warnings from this point on. Now you can start the MTA DM client, and &amp;quot;Quick Connect&amp;quot; using the IP address of your server and the port number you saw earlier. If all goes well, after a few seconds your character will be walking on the streets of Los Santos.&lt;br /&gt;
&lt;br /&gt;
Next we'll add a command to your script that players can use to spawn a vehicle beside their position. You may skip it and check out more advanced scripting with the [[Map manager|Map Manager]], which continues this tutorial. Another branch from this tutorial is [[Introduction to Scripting GUI]], you may follow it to see how Graphical User Interface in MTA:DM is drawn and scripted.&lt;br /&gt;
&lt;br /&gt;
==Creating a simple command==&lt;br /&gt;
Let's go back to the content of the ''script.lua'' file. As mentioned above, we want to provide a command to create a vehicle beside your current position in the game. Firstly we need to create a function we want to call and a command handler that creates the command the player will be able to enter in the console.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- create the function the command handler calls, with the arguments: thePlayer, command, vehicleModel&lt;br /&gt;
function createVehicleForPlayer(thePlayer, command, vehicleModel)&lt;br /&gt;
   -- create a vehicle and stuff&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- create a command handler&lt;br /&gt;
addCommandHandler(&amp;quot;createvehicle&amp;quot;, createVehicleForPlayer)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
''Note: Function names are clickable in code examples on the wiki and linked to the functions' documentation.''&lt;br /&gt;
&lt;br /&gt;
====About command handlers====&lt;br /&gt;
The first argument of [[addCommandHandler]] is the name of the command the player will be able to enter, the second argument is the function this will call, in this case ''createVehicleForPlayer''.&lt;br /&gt;
&lt;br /&gt;
If you have already experience in scripting, you will know that you call a function like this:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
functionName(argument1, argument2, argument3, ..)&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;
functionName(thePlayer, commandName, argument3, ..)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
If we have a closer look on the lower example above, we can see argument1 is thePlayer and argument2 the commandName. thePlayer is simply the one who typed the command, so whatever you call it, the variable will contain the player who activated the command. commandName is simply the command they typed. So if they typed &amp;quot;/greet&amp;quot;, this argument will contain &amp;quot;greet&amp;quot;. Argument 3 is something extra the player typed, you'll learn it a little bit further in the tutorial. Never forget that the first 2 arguments are standard arguments, but you can name them to anything you want.&lt;br /&gt;
&lt;br /&gt;
We called the [[addCommandHandler]] function this way already and since ''createVehicleForPlayer'' is a function too, it can be called that way as well. But we are using a command handler for that, which calls it in a similiar manner, internally.&lt;br /&gt;
&lt;br /&gt;
For example: Someone types &amp;quot;createvehicle 468&amp;quot; ingame in the console to spawn a Sanchez, the command handler calls the createVehicleForPlayer function, as '''if''' we would have this line of code in the script:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
createVehicleForPlayer(thePlayer,&amp;quot;createvehicle&amp;quot;,&amp;quot;468&amp;quot;) -- thePlayer is the player element of the player who entered the command&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
As we can see, it provides several parameters: the player who called the command, the command he entered and whatever text he had after that, in this case &amp;quot;468&amp;quot; as vehicle id for the Sanchez. The first two parameters are the same with all command handlers, which you can read on the [[addEventHandler]] page. For this fact, you always have to define at least those two parameters to use any after that (for example to process text that was entered after the command, like in our example the vehicle model id).&lt;br /&gt;
&lt;br /&gt;
''Note: You have to add the command handler AFTER you defined the handler function, else it can't find it. The order of execution matters.''&lt;br /&gt;
&lt;br /&gt;
====Writing the function====&lt;br /&gt;
In order to fill the function we created, we need to think about what we have to do:&lt;br /&gt;
* Get the players position, so we know where to spawn the vehicle (we want it to appear right beside the player)&lt;br /&gt;
* Calculate the position we want to spawn the vehicle at (we don't want it to appear in the player)&lt;br /&gt;
* Spawn the vehicle&lt;br /&gt;
* Check if it has been spawned successfully, or output a message&lt;br /&gt;
&lt;br /&gt;
In order to achieve our goals, we have to use several functions. To find function we need to use, we should visit the [[Scripting Functions|Server Functions List]]. First we need a function to get the players position. Since players are Elements, we first jump to the '''Element functions''' where we find the [[getElementPosition]] function. By clicking on the function name in the list, you get to the function description. There we can see the syntax, what it returns and usually an example. The syntax shows us what arguments we can or have to submit.&lt;br /&gt;
&lt;br /&gt;
For [[getElementPosition]], the syntax is:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
float, float, float getElementPosition ( element theElement )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The three ''float'' in front of the function name are the return type. In this case it means the function returns three floating point numbers. (x, y and z) Within the parentheses, you can see what arguments you have to submit. In this case only the element whose position you want to get, which is the player in our example.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function createVehicleForPlayer(thePlayer, command, vehicleModel)&lt;br /&gt;
	-- get the position and put it in the x,y,z variables&lt;br /&gt;
	-- (local means, the variables only exist in the current scope, in this case, the function)&lt;br /&gt;
	local x,y,z = getElementPosition(thePlayer)&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next we want to ensure that the vehicle won't spawn directly in the player, so we add a few units to the ''x'' variable, which will make it spawn east from the player.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function createVehicleForPlayer(thePlayer, command, vehicleModel)&lt;br /&gt;
	local x,y,z = getElementPosition(thePlayer) -- get the position of the player&lt;br /&gt;
	x = x + 5 -- add 5 units to the x position&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now we need another function, one to spawn a vehicle. We once again search for it on the [[Scripting Functions|Server Functions List]], this time - since we are talking about vehicles - in the '''Vehicle functions''' section, where we will choose [[createVehicle]]. In this function's syntax, we only have one return type (which is more common), a vehicle element that points to the vehicle we just created. Also, we see that some arguments are enclosed within [ ] which means that those are optional.&lt;br /&gt;
&lt;br /&gt;
We already have all arguments we need for [[createVehicle]] in our function: The position we just calculated in the ''x,y,z'' variables and the model id that we provided through the command (&amp;quot;createvehicle 468&amp;quot;) and can access in the function as ''vehicleModel'' variable.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function createVehicleForPlayer(thePlayer, command, vehicleModel)&lt;br /&gt;
	local x,y,z = getElementPosition(thePlayer) -- get the position of the player&lt;br /&gt;
	x = x + 5 -- add 5 units to the x position&lt;br /&gt;
	-- create the vehicle and store the returned vehicle element in the ''createdVehicle'' variable&lt;br /&gt;
	local createdVehicle = createVehicle(tonumber(vehicleModel),x,y,z)&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Of course this code can be improved in many ways, but at least we want to add a check whether the vehicle was created successfully or not. As we can read on the [[createVehicle]] page under '''Returns''', the function returns ''false'' when it was unable to create the vehicle. Thus, we check the value of the ''createVehicle'' variable.&lt;br /&gt;
&lt;br /&gt;
Now we have our complete script:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function createVehicleForPlayer(thePlayer, command, vehicleModel)&lt;br /&gt;
	local x,y,z = getElementPosition(thePlayer) -- get the position of the player&lt;br /&gt;
	x = x + 5 -- add 5 units to the x position&lt;br /&gt;
	local createdVehicle = createVehicle(tonumber(vehicleModel),x,y,z)&lt;br /&gt;
	-- check if the return value was ''false''&lt;br /&gt;
	if (createdVehicle == false) then&lt;br /&gt;
		-- if so, output a message to the chatbox, but only to this player.&lt;br /&gt;
		outputChatBox(&amp;quot;Failed to create vehicle.&amp;quot;,thePlayer)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler(&amp;quot;createvehicle&amp;quot;, createVehicleForPlayer)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As you can see, we introduced another function with [[outputChatBox]]. By now, you should be able to explore the function's documentation page yourself. For more advanced scripting, please check out the [[Map manager|Map Manager]].&lt;br /&gt;
&lt;br /&gt;
==What you need to know==&lt;br /&gt;
You already read some things about resources, command handlers and finding functions in the documentation in the first paragraph, but there is much more to learn. This section will give you a rather short overview over some of these things, while linking to related pages if possible.&lt;br /&gt;
===Clientside and Serverside scripts===&lt;br /&gt;
You may have already noticed these or similiar terms (Server/Client) somewhere on this wiki, mostly in conjunction with functions. MTA not only supports scripts that run on the server and provide commands (like the one we wrote above) or other features, but also scripts that run on the MTA client the players use to connect to the server. The reason for this is, that some features MTA provides have to be clientside (like a GUI - Graphical User Interface), others should be because they work better and still others are better off to be serverside or just don't work clientside.&lt;br /&gt;
&lt;br /&gt;
Most scripts you will make (gamemodes, maps) will probably be serverside, like the one we wrote in the first section. If you run into something that can't be solved serverside, you will probably have to make it clientside. For a clientside script for example, you would create a ordinary script file (for example called ''client.lua'') and specify it in the meta.xml, like this:&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;
The ''type'' attribute defaults to 'server', so you only need to specify it for clientside scripts. When you do this, the clientside script will be downloaded to the player's computer once he connects to the server. Read more about [[Client side scripts]].&lt;br /&gt;
&lt;br /&gt;
===More complex resources===&lt;br /&gt;
The previous section showed briefly how to add clientside scripts to the resource, but there is also much more possible. As mentioned at the very top of this page, resources can be pretty much everything. Their purpose is defined by what they do. Let's have some theoretical resources, by looking at the files it contains, the ''meta.xml'' and what they might do:&lt;br /&gt;
&lt;br /&gt;
====First example - A utility script====&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;Someguy&amp;quot; description=&amp;quot;admin commands&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;
* The ''commands.lua'' provides some admin commands, like banning a player, muting or something else that can be used to admin the server&lt;br /&gt;
* The ''client.lua'' provides a GUI to be able to perform the mentioned actions easily&lt;br /&gt;
&lt;br /&gt;
This example might be running all the time (maybe even auto-started when the server starts) as it's useful during the whole gaming experience and also wont interfere with the gameplay, unless an admin decides to take some action of course.&lt;br /&gt;
&lt;br /&gt;
====Second example - A gamemode====&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;Someguy&amp;quot; description=&amp;quot;Counterstrike remake&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;
* The ''counterstrike.lua'' contains similiar to the following features:&lt;br /&gt;
** Let players choose their team and spawn them&lt;br /&gt;
** Provide them with weapons, targets and instructions (maybe read from a Map, see below)&lt;br /&gt;
** Define the game's rules, e.g. when does the round end, what happens when a player dies&lt;br /&gt;
** .. and maybe some more&lt;br /&gt;
* The ''buymenu.lua'' is a clientside script and creates a menu to buy weapons&lt;br /&gt;
&lt;br /&gt;
This example can be called a gamemode, since it not only intereferes with the gameplay, but actually defines the rules of it. The ''type'' attribute indicates that this example works with the [[Map manager]], yet another resource that was written by the QA Team to manage gamemodes and map loading. It is highly recommended that you base your gamemodes on the techniques it provides.&lt;br /&gt;
&lt;br /&gt;
This also means that the gamemode probably won't run without a map. Gamemodes should always be as generic as possible. An example for a map is stated in the next example.&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;
===Events===&lt;br /&gt;
Events are the way MTA tells scripts about things that happen. For example when a player dies, the [[onPlayerWasted]] event is triggered. In order to perform any actions when a player dies, you have to prepare yourself similiar to adding a command handler, as shown in [[#Writing_the_script|the first chapter]].&lt;br /&gt;
&lt;br /&gt;
This example will output a message with the name of the player who died:&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;
==Where to go from here==&lt;br /&gt;
You should now be familiar with the most basic aspects of MTA scripting and also a bit with the documentation. The [[Main Page]] provides you with links to more information, Tutorials and References that allow a deeper look into the topics you desire to learn about.&lt;br /&gt;
{{note|From here we recommend reading the [[debugging]] tutorial. Good debugging skills are an absolute necessity when you are making scripts. We also recommend you to use the [[predefined variables list]] to help you with certain tasks and make scripting easier and faster.}}&lt;br /&gt;
'''See also:'''&lt;br /&gt;
* [[Advanced Topics]]&lt;br /&gt;
[[ru:Scripting Introduction]]&lt;br /&gt;
[[it:Introduzione allo scripting]]&lt;br /&gt;
[[es:Introducción a la Programación]]&lt;br /&gt;
[[nl:Scripting_introductie]]&lt;/div&gt;</summary>
		<author><name>Stanley Sathler .</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=P%C3%A1gina_Inicial&amp;diff=31046</id>
		<title>Página Inicial</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=P%C3%A1gina_Inicial&amp;diff=31046"/>
		<updated>2012-05-20T22:04:25Z</updated>

		<summary type="html">&lt;p&gt;Stanley Sathler .: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| width=&amp;quot;100%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;0&amp;quot;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px solid #D8D8D8; padding: 5px; height: 130px;&amp;quot;&amp;gt;&lt;br /&gt;
[[File:Mtalogo.png|left|100px]]'''Bem Vindo ao Multi Theft Auto wiki em Português.''' Aqui você encontra toda a informação sobre o uso do Multi Theft Auto.&lt;br /&gt;
&lt;br /&gt;
Há muitas [[How you can help|coisas em que você pode nos ajudar]] para melhorar o MTA, como criar um mapa, um modo de jogo (gamemode), documentar as funções de programação, escrever códigos como exemplo, fazer tutoriais ou somente jogar o MTA e reportar falhas/bugs que encontrar.&lt;br /&gt;
&lt;br /&gt;
Se você tem alguma pergunta ou problema em relação à programação, sinta-se a vontade para nos comunicar em nosso [[IRC Channel|Canal IRC]].&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;[ Stop playing with yourself ]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
{| width=&amp;quot;100%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;0&amp;quot;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |&lt;br /&gt;
|-&lt;br /&gt;
|width=&amp;quot;50%&amp;quot; style=&amp;quot;vertical-align:top;&amp;quot; |&amp;lt;div style=&amp;quot;border: 1px solid #D8D8D8; padding:4px 8px 8px 8px; margin:10px; background: #FFFCF2;&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|link=]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Jogar&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;background: #FFEEAA; border: 1px solid #FFCD19;&amp;quot;&amp;gt;&lt;br /&gt;
[[File:Go-down.png|link=http://mtasa.com/]] ''' [http://mtasa.com/ Download Multi Theft Auto: San Andreas {{Current Version|full}}]'''&amp;lt;/div&amp;gt;&lt;br /&gt;
* [[Image:iBR.png|Em Português|20px]] [[PT-BR/Manual_do_Cliente|Manual do Cliente]]&lt;br /&gt;
* [[Image:iUS.png|Em Inglês|20px]] [[Changes_in_{{padleft:|3|{{Current Version|full}}}}| Mudanças na versão {{padleft:|3|{{Current Version|full}}}}]]&lt;br /&gt;
* [[Image:iBR.png|Em Português|20px]] [[PT-BR/Soluções_de_Problemas_-_FAQ|Solução de Problemas (FAQ)]]&lt;br /&gt;
* [[Image:iUS.png|Em Inglês|20px]] [[Upgrading_from_MTA:Race|Migrando do MTA:Race ao MTA:SA {{padleft:|3|{{Current Version|full}}}}]]&lt;br /&gt;
* [[Image:iBR.png|Em Inglês|20px]] [[PT-BR/Manual_do_Servidor|Manual do Servidor]]&lt;br /&gt;
* [[Image:iUS.png|Em Inglês|20px]] [[Map manager|Map Manager]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Editor de Mapas&amp;lt;/h3&amp;gt;&lt;br /&gt;
* [[Image:iUS.png|Em Inglês|20px]] [[Resource:Editor|Manual do Editor]]&lt;br /&gt;
* [[Image:iUS.png|Em Inglês|20px]] [[Resource:Editor/EDF|Formato de Definições do Editor (EDF)]]&lt;br /&gt;
* [[Image:iUS.png|Em Inglês|20px]] [[Resource:Editor/Plugins|Extensões para o Editor]]&lt;br /&gt;
* [[Image:iUS.png|Em Inglês|20px]] [[Resource:Editor#FAQ|Perguntas Frequentes]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px solid #D8D8D8; padding:4px 8px 8px 8px; margin:10px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;float:right; width: 32px;&amp;quot;&amp;gt;[[File:Package-x-generic.png|link=]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Banco de Dados&amp;lt;/h3&amp;gt;&lt;br /&gt;
Esta sessão abrange todo tipo de conteúdo referente à scripts em LUA e recursos para o MTA.&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]] [[:Category:Resource|Catálogo de Recursos]] - Ótimos exemplos para aprender à programar com eficiência.&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]] [[Client side scripts|Scripts do Cliente]]&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]] [[Modules|Módulos]]&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|link=]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Desenvolvendo o Multi Theft Auto&amp;lt;/h3&amp;gt;&lt;br /&gt;
[[File:Go-down.png|link=http://nightly.mtasa.com/]] [http://nightly.mtasa.com/ Nightly builds]&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]]  [[Compiling_MTASA|Compilando o MTASA no Windows]]&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]]  [[Building_MTASA_Server_on_Mac_OS_X|Compilando o MTASA no Mac OS X]]&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]]  [[Building_MTASA_Server_on_GNU_Linux|Compilando o MTASA no GNU/Linux]]&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]]  [[Coding guidelines|Guia do Desenvolvedor]]&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]]  [http://code.google.com/p/mtasa-blue Google Code SVN]&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]]  [[Roadmap|Roteiro para versões futuras]]&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]]  [http://bugs.mtasa.com/ Bugtracker Central de Bugs]&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|link=]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Wiki - Como você pode ajudar&amp;lt;/h3&amp;gt;&lt;br /&gt;
* Terminar os documentários de [[:Category:Incomplete|funções incompletas]].&lt;br /&gt;
* [[:Category:Needs_Example |Adicionar exemplos para funções e eventos]].&lt;br /&gt;
* Revisar e verificar as [[:Category:Needs Checking|páginas que necessitam de revisão]].&lt;br /&gt;
* Escrever tutoriais para ajudar novatos.&lt;br /&gt;
* Traduzir as páginas do 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|link=]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Comunidade&amp;lt;/h3&amp;gt;&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]] [http://forum.multitheftauto.com/ Forum]&lt;br /&gt;
* [[Image:iBR.png|Em Português|20px]] [http://forum.multitheftauto.com/viewforum.php?f=120&amp;amp;sid=79576f41173f69a47135647007d58d64 Fórum em Português]&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]] IRC: [irc://irc.multitheftauto.com/mta irc.multitheftauto.com #mta]&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]] [http://community.mtasa.com/ MTA Community] - Compartilhe e baixe recursos.&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]] [http://twitter.com/#!/MTAQA/ Twitter] - [http://www.youtube.com/user/MTAQA Youtube] - [http://plus.google.com/102014133442331779727/ Google+] - [http://www.moddb.com/mods/multi-theft-auto-san-andreas ModDB]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
| width=&amp;quot;50%&amp;quot; style=&amp;quot;vertical-align:top;&amp;quot; |&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px solid #D8D8D8; padding:4px 8px 8px 8px; margin:10px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;float:right; width: 32px;&amp;quot;&amp;gt;[[File:Accessories-text-editor.png|link=]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Scripting&amp;lt;/h3&amp;gt;&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]] [[Scripting Introduction|Introdução ao Scripting]]&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]] [[Introduction to Scripting the GUI|Introdução ao GUI Scripting]]&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]] [[Debugging|Depuração]] - Como achar erros em seus Scripts&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]] [[Resources|Introdução aos Recursos]]&lt;br /&gt;
** [[File:iUS.png|Em Inglês|20px]] [[Resource Web Access| Acesso Web via Recursos ]] - Como fazemos páginas de internet via recursos&lt;br /&gt;
** [[File:iUS.png|Em Inglês|20px]] [[:Category:Resource|Catálogo de Recursos]]&lt;br /&gt;
** [[File:iUS.png|Em Inglês|20px]] [[Meta.xml|O arquivo meta.xml]] - Dentro de cada recurso, há um arquivo chamado meta o indentificando&lt;br /&gt;
** [[File:iUS.png|Em Inglês|20px]] [[ACL]] - Access Control List, isto é importantíssimo para scripts complexos funcionarem&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]] [[Writing_Gamemodes|Programando um modo de Jogo]]&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]] [[Useful_Functions|Funções úteis]]&lt;br /&gt;
&amp;lt;div style=&amp;quot;float:right; width: 32px;&amp;quot;&amp;gt;[[File:start-here.png|link=]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Ajuda geral em Lua&amp;lt;/h3&amp;gt;&lt;br /&gt;
Páginas criadas para ajudar à entender o Lua&lt;br /&gt;
* [[Image:iBR.png|Em Português|20px]] [http://www.lua.org/portugues.html Introdução a linguagem Lua]&lt;br /&gt;
* [[Image:iBR.png|Em Português|20px]] [http://www.lua.org/manual/5.1/pt/ Manual &amp;quot;Programando em Lua&amp;quot;]&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]] [http://lua-users.org/wiki/TutorialDirectory Lua Wiki em inglês]&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]] [http://nixstaller.berlios.de/manual/0.2/nixstaller_9.html Um Guia geral de Nixstaller]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px solid #D8D8D8; padding:4px 8px 8px 8px; margin:10px; background:#F2F2FF;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;float:right; width: 32px;&amp;quot;&amp;gt;[[File:Preferences-system.png|link=]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Referência&amp;lt;/h3&amp;gt;&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]] [[Client Scripting Functions|Funções do Cliente]]&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]] [[Client Scripting Events|Eventos do Cliente]]&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]] [[Server Scripting Functions|Funções do Servidor]]&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]] [[Server Scripting Events|Eventos do Servidor]]&lt;br /&gt;
&amp;lt;!-- Incomplete * [[Module functions|Server-side external module scripting functions list]] --&amp;gt;&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]] [[MTA Classes]] - Descrições detalhadas de todos os tipos de coisas que o MTA usa&lt;br /&gt;
** [[File:iUS.png|Em Inglês|20px]] [[Element|Elementos do MTA]] / [[Element tree|Hierarquia dos Elementos]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px solid #D8D8D8; padding:4px 8px 8px 8px; margin:10px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;float:right; width: 32px;&amp;quot;&amp;gt;[[File:System-file-manager.png|link=]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;[[Id|Lista de ID's]]&amp;lt;/h3&amp;gt;&lt;br /&gt;
*[[Animations|Animações]]&lt;br /&gt;
*[[Character Skins|Skins de Pedestres]]&lt;br /&gt;
*[[CJ_Clothes|Roupas do CJ]]&lt;br /&gt;
*[[Garage|Garagens]]&lt;br /&gt;
*[[Interior IDs|Interiores]]&lt;br /&gt;
*[[Material IDs|Materiais]]&lt;br /&gt;
*[[Projectiles|Projéteis]]&lt;br /&gt;
*[[Radar Blips|Ponteiros do Radar]]&lt;br /&gt;
*[[Sounds|Efeitos Sonoros]]&lt;br /&gt;
*[[Vehicle IDs|Veículos]]&lt;br /&gt;
*[[Vehicle Colors|Cores para Veículos]]&lt;br /&gt;
*[[Vehicle Upgrades|Asessórios para Veículos]]&lt;br /&gt;
*[[Vehicle variants|Vehicle Variants]]&lt;br /&gt;
*[[Weapons|Armas]]&lt;br /&gt;
*[[Weather|Climas]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px dotted #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:pBR.png|32px]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Sobre a Tradução&amp;lt;/h3&amp;gt;&lt;br /&gt;
* Tradutores:&lt;br /&gt;
** &amp;lt;span style=&amp;quot;color: blue&amp;quot;&amp;gt;RaceXtreme&amp;lt;/span&amp;gt;&lt;br /&gt;
** &amp;lt;span style=&amp;quot;color: blue&amp;quot;&amp;gt;StanleySathler&amp;lt;/span&amp;gt;&lt;br /&gt;
É importante que todos colaborem para que nossa página em português fique melhor a cada dia!&lt;br /&gt;
&lt;br /&gt;
[[File:Osi symbol.png|75px|link=http://opensource.org/]]&lt;br /&gt;
'''Multi Theft Auto''' é um projeto '''Open Source'''. &amp;lt;br&amp;gt;&lt;br /&gt;
Isso significa que todos nós podemos contribuir para fazer um Multi Theft Auto muito melhor!&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |&lt;br /&gt;
|}&lt;br /&gt;
{| width=&amp;quot;100%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;0&amp;quot;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |&lt;br /&gt;
&amp;lt;div style=&amp;quot;padding-left: 15px; padding-right: 15px;&amp;quot; class=&amp;quot;plainlinks&amp;quot;&amp;gt;&lt;br /&gt;
[[File:MTALogo_8ball.png|left|85px|link=Archive]]&lt;br /&gt;
&amp;lt;ul style=&amp;quot;list-style: none; width: 200px; float: left;&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;'''Sobre Multi Theft Auto'''&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;[[Archive|Museu]]&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;[[Press Coverage|Eventos]]&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;[http://code.google.com/p/mtasa-blue/people/list Desenvolvedores]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;ul style=&amp;quot;list-style: none; width: 200px; float: left;&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;'''Multi Theft Auto 0.5'''&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;[[Archive#Multi_Theft_Auto_0.5|Download]]&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;[[MTA 0.5r2 Known Issues|Solução de Problemas]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;ul style=&amp;quot;list-style: none; width: 200px; float: left;&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;'''Status do Wiki'''&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;{{NUMBEROFARTICLES}} Artigos&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;{{NUMBEROFPAGES}} Páginas&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;{{NUMBEROFUSERS}} Usuários Registrados&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;br /&gt;
__NOEDITSECTION__&lt;br /&gt;
{{Languages list|pt-br}}&lt;/div&gt;</summary>
		<author><name>Stanley Sathler .</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=PT-BR/Manual_do_Servidor&amp;diff=31045</id>
		<title>PT-BR/Manual do Servidor</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=PT-BR/Manual_do_Servidor&amp;diff=31045"/>
		<updated>2012-05-20T22:02:53Z</updated>

		<summary type="html">&lt;p&gt;Stanley Sathler .: /* Using the web interface */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[PT-BR/Manual_do_Servidor]] &lt;br /&gt;
==Introdução==&lt;br /&gt;
Configurar um servidor e disponibilizá-lo para que seus amigos joguem via Internet ou LAN é mais fácil do que parece. Neste artigo estaremos abordando os passos iniciais para que você possa criar o seu próprio servidor para o MTA.&lt;br /&gt;
&lt;br /&gt;
==Instalando o servidor==&lt;br /&gt;
A primeira parte consiste na instalação do servidor. Abaixo há dois tópicos, abordando a instalação em plataformas Linux e Windows, respectivamente.&lt;br /&gt;
&lt;br /&gt;
===Instalando no Linux===&lt;br /&gt;
Há diversas maneiras de instalar, configurar e iniciar um servidor no Linux:&lt;br /&gt;
* [[Image:iUS.png|Em Inglês|20px]] [[Building MTASA Server on GNU Linux|Configurando um Servidor de MTASA no GNU Linux (Em Inglês)]]&lt;br /&gt;
* [[Image:iUS.png|Em Inglês|20px]] [http://linux.mtasa.com Baixando o servidor para Linux]&lt;br /&gt;
&lt;br /&gt;
===Instalando no Windows===&lt;br /&gt;
Instalar um servidor do MTA:SA no Windows é bem simples:&lt;br /&gt;
:*Vá para [http://mtasa.com/ página de download] do MTA:SA e baixe o instalador.&lt;br /&gt;
:*Após o término do download, execute o arquivo.&lt;br /&gt;
:*Clique em Next e depois em &amp;quot;I Agree&amp;quot;.&lt;br /&gt;
:*Nesta etapa você pode selecionar os componentes que deseja ou não instalar: &lt;br /&gt;
:**Para instalar somente o servidor, mude a opção &amp;quot;Client and Server&amp;quot; para &amp;quot;Server Only&amp;quot;&lt;br /&gt;
:**Next para continuar.&lt;br /&gt;
:*Selecione a pasta na qual deseja instalar o servidor. Em seguida, Next.&lt;br /&gt;
:*Clique em Install.&lt;br /&gt;
:*Pronto!&lt;br /&gt;
&lt;br /&gt;
''Qual a função do arquivo acl.xml (access control list)? Para saber mais, leia o artigo em: &lt;br /&gt;
* [[Image:iUS.png|Em Inglês|20px]] [[Access_Control_List|Access Control List]]''&lt;br /&gt;
&lt;br /&gt;
==Configurando o servidor==&lt;br /&gt;
O servidor dedicado do Multi Theft Auto pode ser configurado através...&lt;br /&gt;
&lt;br /&gt;
*De uma espécie de prompt de comando chamado '''console''', ou seja, um programa onde comandos não são enviados através de cliques, mas sim através de linhas de comando digitadas pelo usuário.&lt;br /&gt;
** Esse programa está localizado em &amp;quot;MTA San Andreas 1.3\server\MTA Server.exe&amp;quot;.&lt;br /&gt;
** Ele é idêntico a janela ''cmd'' do windows.&lt;br /&gt;
** Enquanto este estiver executando, o servidor vai permanecer online, caso contrário, o servidor sai do ar.&lt;br /&gt;
&lt;br /&gt;
*'''Do próprio jogo'''! &lt;br /&gt;
**Os comandos para configurar o servidor são enviados a partir do chat.&lt;br /&gt;
** Para que estes comandos sejam efetivamente enviados, é necessário o uso da &amp;quot;/&amp;quot; antes do comando em si, pois esta identifica que o que vem logo em seguida faz parte de um comando.. Exemplo &amp;quot;/addaccount&amp;quot;.&lt;br /&gt;
*'''De um navegador de internet'''. Um website pode receber informações e configurar um servidor de MTA.&lt;br /&gt;
&lt;br /&gt;
''Para que possa configurar um servidor do MTASA no jogo ou via website é necessário que pelo menos uma conta com privilégios de administrador seja adicionada no '''acl.xml'''.''&lt;br /&gt;
&lt;br /&gt;
===Configurações Gerais===&lt;br /&gt;
Todas as configurações gerais podem ser encontradas no arquivo &amp;quot;[[Server_mtaserver.conf|'''mtaserver.conf''']]&amp;quot; localizado na pasta &amp;quot;mods/deathmatch/&amp;quot;. Este arquivo pode ser visualizado em qualquer editor de texto.&lt;br /&gt;
&lt;br /&gt;
Ele é bem simples e direto, toda variável tem uma [[Server_mtaserver.conf|descrição abordando o que esta faz e como usa-la]].&lt;br /&gt;
&lt;br /&gt;
===Configurando as Portas===&lt;br /&gt;
Caso esteja executando um servidor a partir de seu computador e há um roteador entre a internet e sua máquina, então será necessário configurar 3 portas.&lt;br /&gt;
&lt;br /&gt;
Antes de mais nada, abra o arquivo localizado em &amp;quot;mods/deathmatch/[[Server_mtaserver.conf|'''mtaserver.conf''']]&amp;quot; e procure pelas linhas citadas a seguir:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;serverport&amp;gt;22003&amp;lt;/serverport&amp;gt; &lt;br /&gt;
&amp;lt;httpport&amp;gt;22005&amp;lt;/httpport&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Estas portas são necessárias para que o servidor inicie corretamente. Explicaremos com maiores detalhes mais a frente. Se deseja também que seu servidor apareça na lista de servidores do MTA (Server Browser, no menu), será preciso configurar mais uma porta chamada &amp;quot;ASE&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
(Exemplo de como ativar/desativar a porta ASE):&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;ase&amp;gt;1&amp;lt;/ase&amp;gt; &amp;lt;!-- 0 = desligada, 1 = ligada --&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Agora vamos liberar essas portas em seu roteador. Caso todas as portas estejam abertas ou você possui um roteador sem firewall, esta etapa é desnecessária.&lt;br /&gt;
&lt;br /&gt;
Se você não sabe como abrir portas em seu roteador, visite [http://portforward.com/ este site], procure pelo modelo de seu roteador e siga as instruções.&lt;br /&gt;
&lt;br /&gt;
Na maioria dos roteadores, há a opção de selecionar o tipo de porta: UDP ou TCP. A lista a seguir irá explicar qual porta é necessaria para que ela serve:&lt;br /&gt;
&lt;br /&gt;
Porta principal do servidor: UDP (a porta padrão é 22003, mas você pode alterá-la no parâmetro &amp;lt;serverport&amp;gt; do mtaserver.config)&lt;br /&gt;
Porta HTTP: TCP (a porta padrão é 22005, mas você pode alterá-la no parâmetro &amp;lt;httpport&amp;gt; do mtaserver.config)&lt;br /&gt;
Porta ASE: UDP (esta é necessária caso deseje que o servidor apareça na lista de servidores do gamemonitor.com)&lt;br /&gt;
&lt;br /&gt;
Para configurar a porta ASE, somamos 123 (cento e vinte e três) à porta padrão. Exemplo:&lt;br /&gt;
&lt;br /&gt;
Porta padrão: 22003&lt;br /&gt;
ASE: 22003 + 123 = 22126&lt;br /&gt;
&lt;br /&gt;
Boa sorte!&lt;br /&gt;
&lt;br /&gt;
''Na ultima versão do servidor, ao se digitar o comando &amp;quot;/[[Server_Commands#openports|openports]]&amp;quot;, os status de todas as portas serão mostrados.''&lt;br /&gt;
&lt;br /&gt;
===Checagem dos clientes===&lt;br /&gt;
Todo jogador que entra em um servidor passa por várias &amp;quot;avaliações&amp;quot;, também conhecidas como &amp;quot;Client Checks&amp;quot; (em inglês).&lt;br /&gt;
Esse processo é necessário, principalmente, para previnir trapaças no jogo, as quais são feitas através de trainers e/ou modificações realizadas nos arquivos originais do GTA SA.&lt;br /&gt;
Toda essas &amp;quot;avaliações&amp;quot; são dividias em diversos parâmetros, os quais são configuráveis através do arquivo [[Server_mtaserver.conf|'''mtaserver.conf''']] localizado em &amp;quot;mods/deathmatch&amp;quot;.&lt;br /&gt;
Destacamos 2 delas como exemplo:&lt;br /&gt;
&lt;br /&gt;
* O parâmetro '''client-file''' ...&lt;br /&gt;
** Habilita que um ou mais arquivos possam ser modificados no computador do jogador (exemplo: carmods.dat). Por padrão, o MTA não permite que nenhum arquivo da pasta &amp;quot;data&amp;quot; e &amp;quot;anim&amp;quot; do GTA SA seja modificado.&lt;br /&gt;
** Pertence a um grupo denominado Anti-Cheat, pois, por padrão, ele evita que um ou mais jogadores tenham vantagens sobre os outros. Todos os demais parâmetros que fazem parte desse grupo estão detalhados neste Guia [[Anti-cheat_guide|Anti-Cheat]].&lt;br /&gt;
* O parâmetro '''minclientversion'''...&lt;br /&gt;
** Estabelece que todos os jogadores usem uma versão igual ou superior a estipulada (exemplo: 1.3.0).&lt;br /&gt;
** Aqueles que estiverem usando uma versão inferior serão automaticamente desconectados do servidor.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Cada parâmetro contido no arquivo [[Server_mtaserver.conf|'''mtaserver.conf''']] tem um valor atribuido a ele. O que faz que o servidor ignore ou trabalhe de forma diferente ao realizar essas avaliações em cada jogador.&lt;br /&gt;
&lt;br /&gt;
Se deseja definir uma versão mínima do MTA dos seus jogadores, procure pela linha:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;minclientversion&amp;gt;&amp;lt;/minclientversion&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Use valores como: 1.1.1-9.02320&lt;br /&gt;
&lt;br /&gt;
===Adicionando administradores===&lt;br /&gt;
É altamente recomendável adicionar, no mínimo, um administrador em seu servidor. Pois assim você poderá fazer uso de alguns recursos especiais, como o gerenciador Web ou alguns scripts que precisem acessar a lista ACL (painéis administrativos, por exemplo).&lt;br /&gt;
&lt;br /&gt;
Para adicionar um administrador ao seu servidor, siga os seguintes passos:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Enquanto o servidor estiver ligado (MTA Server.exe sendo executado), adicione uma nova conta digitando '''[[Server_Commands#addaccount|addaccount nome senha]]''' no console. Por exemplo, para adicionar o usuário Fulano você poderia digitar:&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin: 10px 10px 10px 10px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
addaccount Fulano minhasenha123&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin: 10px 10px 10px 20px;&amp;quot;&amp;gt;&lt;br /&gt;
''Nota: Se você não tem acesso à janela do console, e o recurso &amp;quot;admin&amp;quot; está sendo executado, você pode adicionar uma nova conta digitando, no chat principal, o comando '''/register Fulano minhasenha123'''''&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;O servidor deverá mostrar uma mensagem confirmando o registo da nova conta.&lt;br /&gt;
&amp;lt;li&amp;gt;A seguir, desligue o servidor digitando '''shutdown''' no console.&lt;br /&gt;
&amp;lt;li&amp;gt;Tenha certeza de que seu servidor foi desligado. Se ele continua online, as informações a seguir serão perdidas&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Abra o arquivo 'mods/deathmatch/'acl.xml'''' com um Editor de Textos qualquer (pode ser o Bloco de Notas).&lt;br /&gt;
&amp;lt;li&amp;gt;Adicione a nova conta no grupo ''Admin'' usando a seguinte sintaxe do XML:&lt;br /&gt;
&amp;lt;div style=&amp;quot;padding: 10px&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;acl&amp;gt;&lt;br /&gt;
  ...&lt;br /&gt;
  &amp;lt;group name=&amp;quot;Admin&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;acl name=&amp;quot;Admin&amp;quot;/&amp;gt;&lt;br /&gt;
    ...&lt;br /&gt;
    &amp;lt;object name=&amp;quot;user.Fulano&amp;quot; /&amp;gt;&lt;br /&gt;
  &amp;lt;/group&amp;gt;&lt;br /&gt;
  ...&lt;br /&gt;
&amp;lt;/acl&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Você pode adicionar o usuário criado no grupo que preferir. Cada grupo é linkado a um ACL ([[Acess Control List]]). Cada ACL contém uma série de ações que você pode ou não realizar dentro deste grupo (como kickar, banir, etc). Estes grupos existem para que diferentes usuários possam ter diferentes direitos em um servidor. O grupo ''Admin'' é apontado no ACL como um grupo poderoso (onde tudo é permitido). Já o grupo ''Everyone'', que significa ''Todos'', é apontado no ACL como um grupo com diversas restrições (ou seja, não podem kickar, banir, mutar, etc.).&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Pronto, você terminou! Agora você pode adicionar diversos usuários (sejam administradores ou usuários comuns). Dê uma olhada também nos outros grupos e ACLs disponíveis. O ACL é também acessível a partir do [[Acess_Control_List|Mecanismo de Scripting Lua]].&amp;lt;br&amp;gt;&lt;br /&gt;
É recomendado também que você dê uma olhada na interface Web. Iremos explicar como a seguir.&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
'''Nota''': Existem também outras formas de adicionar contas e editar as permissões do servidor enquanto ele está sendo executado. &amp;quot;[[Server_Commands#addaccount|addaccount &amp;lt;usuário&amp;gt; &amp;lt;senha&amp;gt;]]&amp;quot; é um comando interno para adicionar contas, mas você vai precisar usar a interface Web para adicionar essas contas a um grupo/ACL específico.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Usando a interface Web===&lt;br /&gt;
O servidor dedicado (o servidor configurado em sua máquina) vem, por padrão, com alguns [[recursos]] em Lua que fornecem uma inteface Web de gerenciamento para seu servidor (melhor dizendo, permite que você gerencie seu servidor através de um site). O recurso pode ser usado para facilitar a manutenção de seu servidor, permitindo adicionar usuários, iniciar/pausar recursos, e muito mais. &lt;br /&gt;
&lt;br /&gt;
A interface Web é habilitada por padrão e são servidos através do protocolo HTTP. Para ter certeza de que o servidor web está rodando na sua porta HTTP (que por padrão é a 22005), siga os seguintes passos:&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Tenha certeza de que seu servidor foi pausado (ou desligado)&lt;br /&gt;
&amp;lt;li&amp;gt;Abra o arquivo 'mods/deathmatch/[[Server_mtaserver.conf|'''mtaserver.conf''']]' com um editor de textos qualquer&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Verifique se o servidor HTTP está ativado:&lt;br /&gt;
&amp;lt;div style=&amp;quot;padding: 10px&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;httpserver&amp;gt;1&amp;lt;/httpserver&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Escolha a sua porta HTTP:&lt;br /&gt;
&amp;lt;div style=&amp;quot;padding: 10px&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;httpport&amp;gt;22005&amp;lt;/httpport&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Salve o arquivo e feche-o&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Inicie seu servidor (MTA Server.exe)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Se você chegou a alterar os recursos que são iniciados por padrão com o seu servidor, então certifique-se de que os seguintes recursos foram iniciados:&lt;br /&gt;
&lt;br /&gt;
# resourcebrowser&lt;br /&gt;
# resourcemanager&lt;br /&gt;
# webadmin&lt;br /&gt;
# webmap&lt;br /&gt;
&lt;br /&gt;
Estes recursos são, por padrão, iniciados automaticamente com seu servidor, no caso de você ter instalado somente o servidor.&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Abra um navegador web (Internet Explorer 6 ou 7 não é suportado; use [http://www.mozilla.com/firefox Mozilla Firefox], [http://www.google.com/chrome Google Chrome], [http://www.apple.com/safari/download Apple Safari], [http://www.opera.com Opera] ou outros) e navegue até o endereço do servidor HTTP:&lt;br /&gt;
'''http://servidor:porta/'''. Por exemplo, se você está rodando o servidor localmente (no seu próprio computador) com a porta 22005 (padrão), use '''http://127.0.0.1:22005/'''.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Entre com o usuário e senha do administrador (que você adicionou nos passos anteriores).&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Agora você deverá estar possibilitado de manipular seu servidor através do gerenciador Web.&lt;br /&gt;
&lt;br /&gt;
=== Configuring an external web server ===&lt;br /&gt;
The built-in web server is also used to serve files that are required by resources running on your server to any player that is connected to your server. For example, if you are running a game script with a scripted graphical user interface, or custom models, these need to be transferred to every connected player in order to function properly. This is done by either the built-in web server, or an external web server (that is usually a bit faster) but needs to be set up separately.&lt;br /&gt;
&lt;br /&gt;
For performance or consistency reasons during the game, you could choose to make use of such an external web server if you have one set up. The external web server needs to be accessible for the public, so any client will be able to download the necessary client-side files in order to join and play on your server.&lt;br /&gt;
&lt;br /&gt;
To enable downloading off an external web server, you should configure the [[Server_mtaserver.conf#httpdownloadurl|httpdownloadurl]] tag in your server configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;padding: 10px&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;	&lt;br /&gt;
&amp;lt;httpdownloadurl&amp;gt;http://www.myserver.tld/directory/here&amp;lt;/httpdownloadurl&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Since all the default resources provided with the dedicated server are zipped, and are normally automatically extracted by the built-in web server, you now have to provide a way for the clients to download the compressed files to their computers. To configure MTA to maintain a copy of only your unzipped client resources, set [[Server_mtaserver.conf#httpautoclientfiles|httpautoclientfiles]] in your server configuration: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;padding: 10px&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;httpautoclientfiles&amp;gt;1&amp;lt;/httpautoclientfiles&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now when you launch the server, the directory '''&amp;lt;SERVER&amp;gt;/mods/deathmatch/resource-cache/http-client-files''' will contain the correct client files for hosting on an external web server. If the web server is on the same machine, you can simply link the appropriate web server directory to '''http-client-files'''. If the web server is on a separate machine, ensure it has access to '''http-client-files''' via a network path, or maintain a remote copy using synchronization software.&lt;br /&gt;
&lt;br /&gt;
'''Note 1''': Please try to avoid any special characters (e.g. ~, !) in your download URLs.&amp;lt;br /&amp;gt;&lt;br /&gt;
'''Note 2''': Please do not use a trailing slash in your download URL (e.g. ''hxxp://www.myserver.tld/directory'' rather than ''hxxp://www.myserver.tld/directory/'')&lt;br /&gt;
&lt;br /&gt;
==Starting your server==&lt;br /&gt;
Begin by making sure that you have finished all configuration of your server, starting your server is the last stage so everything must be ready!&lt;br /&gt;
&lt;br /&gt;
To start your server double click on MTA Server.exe, make sure you allow it through any firewalls and forward ports where necessary.&lt;br /&gt;
&lt;br /&gt;
==Installing/Updating resources on your server==&lt;br /&gt;
Resources can come in two formats, either a ZIP format or just a normal folder with the script files inside it. The MTA:SA server supports both these methods.&lt;br /&gt;
&lt;br /&gt;
# Move or copy the new resource to your &amp;lt;SERVER&amp;gt;\mods\deathmatch\resources folder.&lt;br /&gt;
# In the server window type in the command [[Server_Commands#refresh|refresh]], this will re-scan the resources folder and update the live resources where necessary.&lt;br /&gt;
&lt;br /&gt;
==Uninstalling resources==&lt;br /&gt;
Resources can easily be removed from your server if you no longer want them.&lt;br /&gt;
&lt;br /&gt;
# Delete the ZIP file or the folder of the resource you wish to uninstall&lt;br /&gt;
# In the server window type in the command &amp;quot;refresh&amp;quot; (without the quotes), this will re-scan the resources folder and update the live resources where necessary.&lt;br /&gt;
&lt;br /&gt;
==Administrating your server==&lt;br /&gt;
You can start resources by typing the command &amp;quot;start resourcename&amp;quot; in the server console, or stop ones with &amp;quot;stop resourcename&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
It's also possible to execute these and other admin commands from the in-game console (which you can bring up with the ` key or F8); for this to work, you first need to log in with the command &amp;quot;[[Server_Commands#login|login username password]]&amp;quot;. Additionally, you can press the p key to bring up the admin panel: this is a graphical interface which allows you to easily kick or ban misbehaving players, among others.&lt;br /&gt;
&lt;br /&gt;
For further commands, type [[Server_Commands#help|help]] in a console.&lt;br /&gt;
&lt;br /&gt;
==Starting a map/gamemode==&lt;br /&gt;
See the commands section of the documentation for [[Resource:Map manager|mapmanager]] for more information.&lt;br /&gt;
&lt;br /&gt;
==Useful Notes==&lt;br /&gt;
&lt;br /&gt;
# You may also update the resources while in-game as long as you have the correct access levels by typing &amp;quot;refresh&amp;quot; in the clients console or &amp;quot;/refresh&amp;quot; in the chat window. This may cause a second of lag if you have many resources.&lt;br /&gt;
# In the above instructions, &amp;lt;SERVER&amp;gt; is the path to your server's main directory. In most cases this is C:\Program Files\MTA San Andreas\server&lt;br /&gt;
# You can choose a different config file for the server to use by passing it in the command line after a --config argument, e.g. mtaserver.exe --config anotherconfig.cfg.&lt;br /&gt;
# Do not be alarmed by the warning regarding the parsing of the settings.xml file. This happens because your server installation is still clean and unused.&lt;br /&gt;
&lt;br /&gt;
====Need further help?====&lt;br /&gt;
Why not pop over to our [http://forum.mtasa.com/ Forums] or join us on [irc://irc.multitheftauto.com/mta IRC] (irc.multitheftauto.com #mta - [http://www.mirc.com mIRC])&lt;br /&gt;
&lt;br /&gt;
[[es:Manual Servidor]]&lt;br /&gt;
[[de:Server Anleitung]]&lt;br /&gt;
[[it:Manuale del Server]]&lt;br /&gt;
[[nl:Server Manual]]&lt;br /&gt;
[[ru:Server Manual]]&lt;br /&gt;
[[pl:Server Manual]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Support]]&lt;/div&gt;</summary>
		<author><name>Stanley Sathler .</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=P%C3%A1gina_Inicial&amp;diff=31044</id>
		<title>Página Inicial</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=P%C3%A1gina_Inicial&amp;diff=31044"/>
		<updated>2012-05-20T21:46:22Z</updated>

		<summary type="html">&lt;p&gt;Stanley Sathler .: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| width=&amp;quot;100%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;0&amp;quot;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px solid #D8D8D8; padding: 5px; height: 130px;&amp;quot;&amp;gt;&lt;br /&gt;
[[File:Mtalogo.png|left|100px]]'''Bem Vindo ao Multi Theft Auto wiki em Português.''' Aqui você encontra toda a informação sobre o uso do Multi Theft Auto.&lt;br /&gt;
&lt;br /&gt;
Há muitas [[How you can help|coisas em que você pode nos ajudar]] para melhorar o MTA, como criar um mapa, um modo de jogo (gamemode), documentar as funções de programação, escrever códigos como exemplo, fazer tutoriais ou somente jogar o MTA e reportar falhas/bugs que encontrar.&lt;br /&gt;
&lt;br /&gt;
Se você tem alguma pergunta ou problema em relação à programação, sinta-se a vontade para nos comunicar em nosso [[IRC Channel|Canal IRC]].&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;[ Stop playing with yourself ]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
{| width=&amp;quot;100%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;0&amp;quot;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |&lt;br /&gt;
|-&lt;br /&gt;
|width=&amp;quot;50%&amp;quot; style=&amp;quot;vertical-align:top;&amp;quot; |&amp;lt;div style=&amp;quot;border: 1px solid #D8D8D8; padding:4px 8px 8px 8px; margin:10px; background: #FFFCF2;&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|link=]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Jogar&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;background: #FFEEAA; border: 1px solid #FFCD19;&amp;quot;&amp;gt;&lt;br /&gt;
[[File:Go-down.png|link=http://mtasa.com/]] ''' [http://mtasa.com/ Download Multi Theft Auto: San Andreas {{Current Version|full}}]'''&amp;lt;/div&amp;gt;&lt;br /&gt;
* [[Image:iBR.png|Em Português|20px]] [[PT-BR/Manual_do_Cliente|Manual do Cliente]]&lt;br /&gt;
* [[Image:iUS.png|Em Inglês|20px]] [[Changes_in_{{padleft:|3|{{Current Version|full}}}}| Mudanças na versão {{padleft:|3|{{Current Version|full}}}}]]&lt;br /&gt;
* [[Image:iBR.png|Em Português|20px]] [[PT-BR/Soluções_de_Problemas_-_FAQ|Solução de Problemas (FAQ)]]&lt;br /&gt;
* [[Image:iUS.png|Em Inglês|20px]] [[Upgrading_from_MTA:Race|Migrando do MTA:Race ao MTA:SA {{padleft:|3|{{Current Version|full}}}}]]&lt;br /&gt;
* [[Image:iBR.png|Em Inglês|20px]] [[Manual_do_Servidor|Manual do Servidor]]&lt;br /&gt;
* [[Image:iUS.png|Em Inglês|20px]] [[Map manager|Map Manager]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Editor de Mapas&amp;lt;/h3&amp;gt;&lt;br /&gt;
* [[Image:iUS.png|Em Inglês|20px]] [[Resource:Editor|Manual do Editor]]&lt;br /&gt;
* [[Image:iUS.png|Em Inglês|20px]] [[Resource:Editor/EDF|Formato de Definições do Editor (EDF)]]&lt;br /&gt;
* [[Image:iUS.png|Em Inglês|20px]] [[Resource:Editor/Plugins|Extensões para o Editor]]&lt;br /&gt;
* [[Image:iUS.png|Em Inglês|20px]] [[Resource:Editor#FAQ|Perguntas Frequentes]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px solid #D8D8D8; padding:4px 8px 8px 8px; margin:10px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;float:right; width: 32px;&amp;quot;&amp;gt;[[File:Package-x-generic.png|link=]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Banco de Dados&amp;lt;/h3&amp;gt;&lt;br /&gt;
Esta sessão abrange todo tipo de conteúdo referente à scripts em LUA e recursos para o MTA.&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]] [[:Category:Resource|Catálogo de Recursos]] - Ótimos exemplos para aprender à programar com eficiência.&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]] [[Client side scripts|Scripts do Cliente]]&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]] [[Modules|Módulos]]&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|link=]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Desenvolvendo o Multi Theft Auto&amp;lt;/h3&amp;gt;&lt;br /&gt;
[[File:Go-down.png|link=http://nightly.mtasa.com/]] [http://nightly.mtasa.com/ Nightly builds]&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]]  [[Compiling_MTASA|Compilando o MTASA no Windows]]&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]]  [[Building_MTASA_Server_on_Mac_OS_X|Compilando o MTASA no Mac OS X]]&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]]  [[Building_MTASA_Server_on_GNU_Linux|Compilando o MTASA no GNU/Linux]]&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]]  [[Coding guidelines|Guia do Desenvolvedor]]&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]]  [http://code.google.com/p/mtasa-blue Google Code SVN]&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]]  [[Roadmap|Roteiro para versões futuras]]&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]]  [http://bugs.mtasa.com/ Bugtracker Central de Bugs]&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|link=]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Wiki - Como você pode ajudar&amp;lt;/h3&amp;gt;&lt;br /&gt;
* Terminar os documentários de [[:Category:Incomplete|funções incompletas]].&lt;br /&gt;
* [[:Category:Needs_Example |Adicionar exemplos para funções e eventos]].&lt;br /&gt;
* Revisar e verificar as [[:Category:Needs Checking|páginas que necessitam de revisão]].&lt;br /&gt;
* Escrever tutoriais para ajudar novatos.&lt;br /&gt;
* Traduzir as páginas do 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|link=]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Comunidade&amp;lt;/h3&amp;gt;&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]] [http://forum.multitheftauto.com/ Forum]&lt;br /&gt;
* [[Image:iBR.png|Em Português|20px]] [http://forum.multitheftauto.com/viewforum.php?f=120&amp;amp;sid=79576f41173f69a47135647007d58d64 Fórum em Português]&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]] IRC: [irc://irc.multitheftauto.com/mta irc.multitheftauto.com #mta]&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]] [http://community.mtasa.com/ MTA Community] - Compartilhe e baixe recursos.&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]] [http://twitter.com/#!/MTAQA/ Twitter] - [http://www.youtube.com/user/MTAQA Youtube] - [http://plus.google.com/102014133442331779727/ Google+] - [http://www.moddb.com/mods/multi-theft-auto-san-andreas ModDB]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
| width=&amp;quot;50%&amp;quot; style=&amp;quot;vertical-align:top;&amp;quot; |&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px solid #D8D8D8; padding:4px 8px 8px 8px; margin:10px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;float:right; width: 32px;&amp;quot;&amp;gt;[[File:Accessories-text-editor.png|link=]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Scripting&amp;lt;/h3&amp;gt;&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]] [[Scripting Introduction|Introdução ao Scripting]]&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]] [[Introduction to Scripting the GUI|Introdução ao GUI Scripting]]&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]] [[Debugging|Depuração]] - Como achar erros em seus Scripts&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]] [[Resources|Introdução aos Recursos]]&lt;br /&gt;
** [[File:iUS.png|Em Inglês|20px]] [[Resource Web Access| Acesso Web via Recursos ]] - Como fazemos páginas de internet via recursos&lt;br /&gt;
** [[File:iUS.png|Em Inglês|20px]] [[:Category:Resource|Catálogo de Recursos]]&lt;br /&gt;
** [[File:iUS.png|Em Inglês|20px]] [[Meta.xml|O arquivo meta.xml]] - Dentro de cada recurso, há um arquivo chamado meta o indentificando&lt;br /&gt;
** [[File:iUS.png|Em Inglês|20px]] [[ACL]] - Access Control List, isto é importantíssimo para scripts complexos funcionarem&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]] [[Writing_Gamemodes|Programando um modo de Jogo]]&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]] [[Useful_Functions|Funções úteis]]&lt;br /&gt;
&amp;lt;div style=&amp;quot;float:right; width: 32px;&amp;quot;&amp;gt;[[File:start-here.png|link=]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Ajuda geral em Lua&amp;lt;/h3&amp;gt;&lt;br /&gt;
Páginas criadas para ajudar à entender o Lua&lt;br /&gt;
* [[Image:iBR.png|Em Português|20px]] [http://www.lua.org/portugues.html Introdução a linguagem Lua]&lt;br /&gt;
* [[Image:iBR.png|Em Português|20px]] [http://www.lua.org/manual/5.1/pt/ Manual &amp;quot;Programando em Lua&amp;quot;]&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]] [http://lua-users.org/wiki/TutorialDirectory Lua Wiki em inglês]&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]] [http://nixstaller.berlios.de/manual/0.2/nixstaller_9.html Um Guia geral de Nixstaller]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px solid #D8D8D8; padding:4px 8px 8px 8px; margin:10px; background:#F2F2FF;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;float:right; width: 32px;&amp;quot;&amp;gt;[[File:Preferences-system.png|link=]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Referência&amp;lt;/h3&amp;gt;&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]] [[Client Scripting Functions|Funções do Cliente]]&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]] [[Client Scripting Events|Eventos do Cliente]]&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]] [[Server Scripting Functions|Funções do Servidor]]&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]] [[Server Scripting Events|Eventos do Servidor]]&lt;br /&gt;
&amp;lt;!-- Incomplete * [[Module functions|Server-side external module scripting functions list]] --&amp;gt;&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]] [[MTA Classes]] - Descrições detalhadas de todos os tipos de coisas que o MTA usa&lt;br /&gt;
** [[File:iUS.png|Em Inglês|20px]] [[Element|Elementos do MTA]] / [[Element tree|Hierarquia dos Elementos]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px solid #D8D8D8; padding:4px 8px 8px 8px; margin:10px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;float:right; width: 32px;&amp;quot;&amp;gt;[[File:System-file-manager.png|link=]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;[[Id|Lista de ID's]]&amp;lt;/h3&amp;gt;&lt;br /&gt;
*[[Animations|Animações]]&lt;br /&gt;
*[[Character Skins|Skins de Pedestres]]&lt;br /&gt;
*[[CJ_Clothes|Roupas do CJ]]&lt;br /&gt;
*[[Garage|Garagens]]&lt;br /&gt;
*[[Interior IDs|Interiores]]&lt;br /&gt;
*[[Material IDs|Materiais]]&lt;br /&gt;
*[[Projectiles|Projéteis]]&lt;br /&gt;
*[[Radar Blips|Ponteiros do Radar]]&lt;br /&gt;
*[[Sounds|Efeitos Sonoros]]&lt;br /&gt;
*[[Vehicle IDs|Veículos]]&lt;br /&gt;
*[[Vehicle Colors|Cores para Veículos]]&lt;br /&gt;
*[[Vehicle Upgrades|Asessórios para Veículos]]&lt;br /&gt;
*[[Vehicle variants|Vehicle Variants]]&lt;br /&gt;
*[[Weapons|Armas]]&lt;br /&gt;
*[[Weather|Climas]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px dotted #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:pBR.png|32px]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Sobre a Tradução&amp;lt;/h3&amp;gt;&lt;br /&gt;
* Tradutores:&lt;br /&gt;
** &amp;lt;span style=&amp;quot;color: blue&amp;quot;&amp;gt;RaceXtreme&amp;lt;/span&amp;gt;&lt;br /&gt;
** &amp;lt;span style=&amp;quot;color: blue&amp;quot;&amp;gt;StanleySathler&amp;lt;/span&amp;gt;&lt;br /&gt;
É importante que todos colaborem para que nossa página em português fique melhor a cada dia!&lt;br /&gt;
&lt;br /&gt;
[[File:Osi symbol.png|75px|link=http://opensource.org/]]&lt;br /&gt;
'''Multi Theft Auto''' é um projeto '''Open Source'''. &amp;lt;br&amp;gt;&lt;br /&gt;
Isso significa que todos nós podemos contribuir para fazer um Multi Theft Auto muito melhor!&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |&lt;br /&gt;
|}&lt;br /&gt;
{| width=&amp;quot;100%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;0&amp;quot;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |&lt;br /&gt;
&amp;lt;div style=&amp;quot;padding-left: 15px; padding-right: 15px;&amp;quot; class=&amp;quot;plainlinks&amp;quot;&amp;gt;&lt;br /&gt;
[[File:MTALogo_8ball.png|left|85px|link=Archive]]&lt;br /&gt;
&amp;lt;ul style=&amp;quot;list-style: none; width: 200px; float: left;&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;'''Sobre Multi Theft Auto'''&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;[[Archive|Museu]]&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;[[Press Coverage|Eventos]]&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;[http://code.google.com/p/mtasa-blue/people/list Desenvolvedores]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;ul style=&amp;quot;list-style: none; width: 200px; float: left;&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;'''Multi Theft Auto 0.5'''&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;[[Archive#Multi_Theft_Auto_0.5|Download]]&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;[[MTA 0.5r2 Known Issues|Solução de Problemas]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;ul style=&amp;quot;list-style: none; width: 200px; float: left;&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;'''Status do Wiki'''&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;{{NUMBEROFARTICLES}} Artigos&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;{{NUMBEROFPAGES}} Páginas&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;{{NUMBEROFUSERS}} Usuários Registrados&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;br /&gt;
__NOEDITSECTION__&lt;br /&gt;
{{Languages list|pt-br}}&lt;/div&gt;</summary>
		<author><name>Stanley Sathler .</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Server_Manual&amp;diff=31043</id>
		<title>Server Manual</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Server_Manual&amp;diff=31043"/>
		<updated>2012-05-20T21:43:09Z</updated>

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

		<summary type="html">&lt;p&gt;Stanley Sathler .: /* Client Checks */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[PT-BR/Manual_do_Servidor]] &lt;br /&gt;
==Introdução==&lt;br /&gt;
Configurar um servidor e disponibilizá-lo para que seus amigos joguem via Internet ou LAN é mais fácil do que parece. Neste artigo estaremos abordando os passos iniciais para que você possa criar o seu próprio servidor para o MTA.&lt;br /&gt;
&lt;br /&gt;
==Instalando o servidor==&lt;br /&gt;
A primeira parte consiste na instalação do servidor. Abaixo há dois tópicos, abordando a instalação em plataformas Linux e Windows, respectivamente.&lt;br /&gt;
&lt;br /&gt;
===Instalando no Linux===&lt;br /&gt;
Há diversas maneiras de instalar, configurar e iniciar um servidor no Linux:&lt;br /&gt;
* [[Image:iUS.png|Em Inglês|20px]] [[Building MTASA Server on GNU Linux|Configurando um Servidor de MTASA no GNU Linux (Em Inglês)]]&lt;br /&gt;
* [[Image:iUS.png|Em Inglês|20px]] [http://linux.mtasa.com Baixando o servidor para Linux]&lt;br /&gt;
&lt;br /&gt;
===Instalando no Windows===&lt;br /&gt;
Instalar um servidor do MTA:SA no Windows é bem simples:&lt;br /&gt;
:*Vá para [http://mtasa.com/ página de download] do MTA:SA e baixe o instalador.&lt;br /&gt;
:*Após o término do download, execute o arquivo.&lt;br /&gt;
:*Clique em Next e depois em &amp;quot;I Agree&amp;quot;.&lt;br /&gt;
:*Nesta etapa você pode selecionar os componentes que deseja ou não instalar: &lt;br /&gt;
:**Para instalar somente o servidor, mude a opção &amp;quot;Client and Server&amp;quot; para &amp;quot;Server Only&amp;quot;&lt;br /&gt;
:**Next para continuar.&lt;br /&gt;
:*Selecione a pasta na qual deseja instalar o servidor. Em seguida, Next.&lt;br /&gt;
:*Clique em Install.&lt;br /&gt;
:*Pronto!&lt;br /&gt;
&lt;br /&gt;
''Qual a função do arquivo acl.xml (access control list)? Para saber mais, leia o artigo em: &lt;br /&gt;
* [[Image:iUS.png|Em Inglês|20px]] [[Access_Control_List|Access Control List]]''&lt;br /&gt;
&lt;br /&gt;
==Configurando o servidor==&lt;br /&gt;
O servidor dedicado do Multi Theft Auto pode ser configurado através...&lt;br /&gt;
&lt;br /&gt;
*De uma espécie de prompt de comando chamado '''console''', ou seja, um programa onde comandos não são enviados através de cliques, mas sim através de linhas de comando digitadas pelo usuário.&lt;br /&gt;
** Esse programa está localizado em &amp;quot;MTA San Andreas 1.3\server\MTA Server.exe&amp;quot;.&lt;br /&gt;
** Ele é idêntico a janela ''cmd'' do windows.&lt;br /&gt;
** Enquanto este estiver executando, o servidor vai permanecer online, caso contrário, o servidor sai do ar.&lt;br /&gt;
&lt;br /&gt;
*'''Do próprio jogo'''! &lt;br /&gt;
**Os comandos para configurar o servidor são enviados a partir do chat.&lt;br /&gt;
** Para que estes comandos sejam efetivamente enviados, é necessário o uso da &amp;quot;/&amp;quot; antes do comando em si, pois esta identifica que o que vem logo em seguida faz parte de um comando.. Exemplo &amp;quot;/addaccount&amp;quot;.&lt;br /&gt;
*'''De um navegador de internet'''. Um website pode receber informações e configurar um servidor de MTA.&lt;br /&gt;
&lt;br /&gt;
''Para que possa configurar um servidor do MTASA no jogo ou via website é necessário que pelo menos uma conta com privilégios de administrador seja adicionada no '''acl.xml'''.''&lt;br /&gt;
&lt;br /&gt;
===Configurações Gerais===&lt;br /&gt;
Todas as configurações gerais podem ser encontradas no arquivo &amp;quot;[[Server_mtaserver.conf|'''mtaserver.conf''']]&amp;quot; localizado na pasta &amp;quot;mods/deathmatch/&amp;quot;. Este arquivo pode ser visualizado em qualquer editor de texto.&lt;br /&gt;
&lt;br /&gt;
Ele é bem simples e direto, toda variável tem uma [[Server_mtaserver.conf|descrição abordando o que esta faz e como usa-la]].&lt;br /&gt;
&lt;br /&gt;
===Configurando as Portas===&lt;br /&gt;
Caso esteja executando um servidor a partir de seu computador e há um roteador entre a internet e sua máquina, então será necessário configurar 3 portas.&lt;br /&gt;
&lt;br /&gt;
Antes de mais nada, abra o arquivo localizado em &amp;quot;mods/deathmatch/[[Server_mtaserver.conf|'''mtaserver.conf''']]&amp;quot; e procure pelas linhas citadas a seguir:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;serverport&amp;gt;22003&amp;lt;/serverport&amp;gt; &lt;br /&gt;
&amp;lt;httpport&amp;gt;22005&amp;lt;/httpport&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Estas portas são necessárias para que o servidor inicie corretamente. Explicaremos com maiores detalhes mais a frente. Se deseja também que seu servidor apareça na lista de servidores do MTA (Server Browser, no menu), será preciso configurar mais uma porta chamada &amp;quot;ASE&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
(Exemplo de como ativar/desativar a porta ASE):&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;ase&amp;gt;1&amp;lt;/ase&amp;gt; &amp;lt;!-- 0 = desligada, 1 = ligada --&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Agora vamos liberar essas portas em seu roteador. Caso todas as portas estejam abertas ou você possui um roteador sem firewall, esta etapa é desnecessária.&lt;br /&gt;
&lt;br /&gt;
Se você não sabe como abrir portas em seu roteador, visite [http://portforward.com/ este site], procure pelo modelo de seu roteador e siga as instruções.&lt;br /&gt;
&lt;br /&gt;
Na maioria dos roteadores, há a opção de selecionar o tipo de porta: UDP ou TCP. A lista a seguir irá explicar qual porta é necessaria para que ela serve:&lt;br /&gt;
&lt;br /&gt;
Porta principal do servidor: UDP (a porta padrão é 22003, mas você pode alterá-la no parâmetro &amp;lt;serverport&amp;gt; do mtaserver.config)&lt;br /&gt;
Porta HTTP: TCP (a porta padrão é 22005, mas você pode alterá-la no parâmetro &amp;lt;httpport&amp;gt; do mtaserver.config)&lt;br /&gt;
Porta ASE: UDP (esta é necessária caso deseje que o servidor apareça na lista de servidores do gamemonitor.com)&lt;br /&gt;
&lt;br /&gt;
Para configurar a porta ASE, somamos 123 (cento e vinte e três) à porta padrão. Exemplo:&lt;br /&gt;
&lt;br /&gt;
Porta padrão: 22003&lt;br /&gt;
ASE: 22003 + 123 = 22126&lt;br /&gt;
&lt;br /&gt;
Boa sorte!&lt;br /&gt;
&lt;br /&gt;
''Na ultima versão do servidor, ao se digitar o comando &amp;quot;/[[Server_Commands#openports|openports]]&amp;quot;, os status de todas as portas serão mostrados.''&lt;br /&gt;
&lt;br /&gt;
===Checagem dos clientes===&lt;br /&gt;
Todo jogador que entra em um servidor passa por várias &amp;quot;avaliações&amp;quot;, também conhecidas como &amp;quot;Client Checks&amp;quot; (em inglês).&lt;br /&gt;
Esse processo é necessário, principalmente, para previnir trapaças no jogo, as quais são feitas através de trainers e/ou modificações realizadas nos arquivos originais do GTA SA.&lt;br /&gt;
Toda essas &amp;quot;avaliações&amp;quot; são dividias em diversos parâmetros, os quais são configuráveis através do arquivo [[Server_mtaserver.conf|'''mtaserver.conf''']] localizado em &amp;quot;mods/deathmatch&amp;quot;.&lt;br /&gt;
Destacamos 2 delas como exemplo:&lt;br /&gt;
&lt;br /&gt;
* O parâmetro '''client-file''' ...&lt;br /&gt;
** Habilita que um ou mais arquivos possam ser modificados no computador do jogador (exemplo: carmods.dat). Por padrão, o MTA não permite que nenhum arquivo da pasta &amp;quot;data&amp;quot; e &amp;quot;anim&amp;quot; do GTA SA seja modificado.&lt;br /&gt;
** Pertence a um grupo denominado Anti-Cheat, pois, por padrão, ele evita que um ou mais jogadores tenham vantagens sobre os outros. Todos os demais parâmetros que fazem parte desse grupo estão detalhados neste Guia [[Anti-cheat_guide|Anti-Cheat]].&lt;br /&gt;
* O parâmetro '''minclientversion'''...&lt;br /&gt;
** Estabelece que todos os jogadores usem uma versão igual ou superior a estipulada (exemplo: 1.3.0).&lt;br /&gt;
** Aqueles que estiverem usando uma versão inferior serão automaticamente desconectados do servidor.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Cada parâmetro contido no arquivo [[Server_mtaserver.conf|'''mtaserver.conf''']] tem um valor atribuido a ele. O que faz que o servidor ignore ou trabalhe de forma diferente ao realizar essas avaliações em cada jogador.&lt;br /&gt;
&lt;br /&gt;
Se deseja definir uma versão mínima do MTA dos seus jogadores, procure pela linha:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;minclientversion&amp;gt;&amp;lt;/minclientversion&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Use valores como: 1.1.1-9.02320&lt;br /&gt;
&lt;br /&gt;
===Adicionando administradores===&lt;br /&gt;
É altamente recomendável adicionar, no mínimo, um administrador em seu servidor. Pois assim você poderá fazer uso de alguns recursos especiais, como o gerenciador Web ou alguns scripts que precisem acessar a lista ACL (painéis administrativos, por exemplo).&lt;br /&gt;
&lt;br /&gt;
Para adicionar um administrador ao seu servidor, siga os seguintes passos:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Enquanto o servidor estiver ligado (MTA Server.exe sendo executado), adicione uma nova conta digitando '''[[Server_Commands#addaccount|addaccount nome senha]]''' no console. Por exemplo, para adicionar o usuário Fulano você poderia digitar:&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin: 10px 10px 10px 10px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
addaccount Fulano minhasenha123&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin: 10px 10px 10px 20px;&amp;quot;&amp;gt;&lt;br /&gt;
''Nota: Se você não tem acesso à janela do console, e o recurso &amp;quot;admin&amp;quot; está sendo executado, você pode adicionar uma nova conta digitando, no chat principal, o comando '''/register Fulano minhasenha123'''''&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;O servidor deverá mostrar uma mensagem confirmando o registo da nova conta.&lt;br /&gt;
&amp;lt;li&amp;gt;A seguir, desligue o servidor digitando '''shutdown''' no console.&lt;br /&gt;
&amp;lt;li&amp;gt;Tenha certeza de que seu servidor foi desligado. Se ele continua online, as informações a seguir serão perdidas&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Abra o arquivo 'mods/deathmatch/'acl.xml'''' com um Editor de Textos qualquer (pode ser o Bloco de Notas).&lt;br /&gt;
&amp;lt;li&amp;gt;Adicione a nova conta no grupo ''Admin'' usando a seguinte sintaxe do XML:&lt;br /&gt;
&amp;lt;div style=&amp;quot;padding: 10px&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;acl&amp;gt;&lt;br /&gt;
  ...&lt;br /&gt;
  &amp;lt;group name=&amp;quot;Admin&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;acl name=&amp;quot;Admin&amp;quot;/&amp;gt;&lt;br /&gt;
    ...&lt;br /&gt;
    &amp;lt;object name=&amp;quot;user.Fulano&amp;quot; /&amp;gt;&lt;br /&gt;
  &amp;lt;/group&amp;gt;&lt;br /&gt;
  ...&lt;br /&gt;
&amp;lt;/acl&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Você pode adicionar o usuário criado no grupo que preferir. Cada grupo é linkado a um ACL ([[Acess Control List]]). Cada ACL contém uma série de ações que você pode ou não realizar dentro deste grupo (como kickar, banir, etc). Estes grupos existem para que diferentes usuários possam ter diferentes direitos em um servidor. O grupo ''Admin'' é apontado no ACL como um grupo poderoso (onde tudo é permitido). Já o grupo ''Everyone'', que significa ''Todos'', é apontado no ACL como um grupo com diversas restrições (ou seja, não podem kickar, banir, mutar, etc.).&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Pronto, você terminou! Agora você pode adicionar diversos usuários (sejam administradores ou usuários comuns). Dê uma olhada também nos outros grupos e ACLs disponíveis. O ACL é também acessível a partir do [[Acess_Control_List|Mecanismo de Scripting Lua]].&amp;lt;br&amp;gt;&lt;br /&gt;
É recomendado também que você dê uma olhada na interface Web. Iremos explicar como a seguir.&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
'''Nota''': Existem também outras formas de adicionar contas e editar as permissões do servidor enquanto ele está sendo executado. &amp;quot;[[Server_Commands#addaccount|addaccount &amp;lt;usuário&amp;gt; &amp;lt;senha&amp;gt;]]&amp;quot; é um comando interno para adicionar contas, mas você vai precisar usar a interface Web para adicionar essas contas a um grupo/ACL específico.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Using the web interface===&lt;br /&gt;
The dedicated server comes with a few Lua [[resources]] that provide a nice little web interface to your server. This can be used to easily maintain your server, as it allows you to add users, start/stop resources, and more.&lt;br /&gt;
&lt;br /&gt;
The web interface resources are enabled by default and are served through the built-in HTTP web server. To make sure the built-in HTTP web server runs on a port you like (22005 by default), follow these steps:&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Make sure your server is stopped&lt;br /&gt;
&amp;lt;li&amp;gt;Open the file 'mods/deathmatch/[[Server_mtaserver.conf|'''mtaserver.conf''']]' with any text editor&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Verify that the HTTP server is enabled:&lt;br /&gt;
&amp;lt;div style=&amp;quot;padding: 10px&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;httpserver&amp;gt;1&amp;lt;/httpserver&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Change the HTTP server port to your liking:&lt;br /&gt;
&amp;lt;div style=&amp;quot;padding: 10px&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;httpport&amp;gt;22005&amp;lt;/httpport&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Save and close the configuration file&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Start your server&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If you happened to have changed the start-up resources in your configuration file, make sure the following resources are started:&lt;br /&gt;
&lt;br /&gt;
# resourcebrowser&lt;br /&gt;
# resourcemanager&lt;br /&gt;
# webadmin&lt;br /&gt;
# webmap&lt;br /&gt;
&lt;br /&gt;
These are automatically started in the default configuration file, in case you just installed your server.&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Open a web browser (Internet Explorer 6 or 7 are NOT supported; use [http://www.mozilla.com/firefox Mozilla Firefox], [http://www.google.com/chrome Google Chrome], [http://www.apple.com/safari/download Apple Safari], [http://www.opera.com Opera] or others) and navigate to the HTTP server URL: '''http://server:port/'''. For example, If you are running a local server on HTTP port 22005, use '''http://127.0.0.1:22005/'''.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Enter the username and password of the administrator you added in the previous section.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
You should now be able to maintain your server from the web interface.&lt;br /&gt;
&lt;br /&gt;
=== Configuring an external web server ===&lt;br /&gt;
The built-in web server is also used to serve files that are required by resources running on your server to any player that is connected to your server. For example, if you are running a game script with a scripted graphical user interface, or custom models, these need to be transferred to every connected player in order to function properly. This is done by either the built-in web server, or an external web server (that is usually a bit faster) but needs to be set up separately.&lt;br /&gt;
&lt;br /&gt;
For performance or consistency reasons during the game, you could choose to make use of such an external web server if you have one set up. The external web server needs to be accessible for the public, so any client will be able to download the necessary client-side files in order to join and play on your server.&lt;br /&gt;
&lt;br /&gt;
To enable downloading off an external web server, you should configure the [[Server_mtaserver.conf#httpdownloadurl|httpdownloadurl]] tag in your server configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;padding: 10px&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;	&lt;br /&gt;
&amp;lt;httpdownloadurl&amp;gt;http://www.myserver.tld/directory/here&amp;lt;/httpdownloadurl&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Since all the default resources provided with the dedicated server are zipped, and are normally automatically extracted by the built-in web server, you now have to provide a way for the clients to download the compressed files to their computers. To configure MTA to maintain a copy of only your unzipped client resources, set [[Server_mtaserver.conf#httpautoclientfiles|httpautoclientfiles]] in your server configuration: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;padding: 10px&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;httpautoclientfiles&amp;gt;1&amp;lt;/httpautoclientfiles&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now when you launch the server, the directory '''&amp;lt;SERVER&amp;gt;/mods/deathmatch/resource-cache/http-client-files''' will contain the correct client files for hosting on an external web server. If the web server is on the same machine, you can simply link the appropriate web server directory to '''http-client-files'''. If the web server is on a separate machine, ensure it has access to '''http-client-files''' via a network path, or maintain a remote copy using synchronization software.&lt;br /&gt;
&lt;br /&gt;
'''Note 1''': Please try to avoid any special characters (e.g. ~, !) in your download URLs.&amp;lt;br /&amp;gt;&lt;br /&gt;
'''Note 2''': Please do not use a trailing slash in your download URL (e.g. ''hxxp://www.myserver.tld/directory'' rather than ''hxxp://www.myserver.tld/directory/'')&lt;br /&gt;
&lt;br /&gt;
==Starting your server==&lt;br /&gt;
Begin by making sure that you have finished all configuration of your server, starting your server is the last stage so everything must be ready!&lt;br /&gt;
&lt;br /&gt;
To start your server double click on MTA Server.exe, make sure you allow it through any firewalls and forward ports where necessary.&lt;br /&gt;
&lt;br /&gt;
==Installing/Updating resources on your server==&lt;br /&gt;
Resources can come in two formats, either a ZIP format or just a normal folder with the script files inside it. The MTA:SA server supports both these methods.&lt;br /&gt;
&lt;br /&gt;
# Move or copy the new resource to your &amp;lt;SERVER&amp;gt;\mods\deathmatch\resources folder.&lt;br /&gt;
# In the server window type in the command [[Server_Commands#refresh|refresh]], this will re-scan the resources folder and update the live resources where necessary.&lt;br /&gt;
&lt;br /&gt;
==Uninstalling resources==&lt;br /&gt;
Resources can easily be removed from your server if you no longer want them.&lt;br /&gt;
&lt;br /&gt;
# Delete the ZIP file or the folder of the resource you wish to uninstall&lt;br /&gt;
# In the server window type in the command &amp;quot;refresh&amp;quot; (without the quotes), this will re-scan the resources folder and update the live resources where necessary.&lt;br /&gt;
&lt;br /&gt;
==Administrating your server==&lt;br /&gt;
You can start resources by typing the command &amp;quot;start resourcename&amp;quot; in the server console, or stop ones with &amp;quot;stop resourcename&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
It's also possible to execute these and other admin commands from the in-game console (which you can bring up with the ` key or F8); for this to work, you first need to log in with the command &amp;quot;[[Server_Commands#login|login username password]]&amp;quot;. Additionally, you can press the p key to bring up the admin panel: this is a graphical interface which allows you to easily kick or ban misbehaving players, among others.&lt;br /&gt;
&lt;br /&gt;
For further commands, type [[Server_Commands#help|help]] in a console.&lt;br /&gt;
&lt;br /&gt;
==Starting a map/gamemode==&lt;br /&gt;
See the commands section of the documentation for [[Resource:Map manager|mapmanager]] for more information.&lt;br /&gt;
&lt;br /&gt;
==Useful Notes==&lt;br /&gt;
&lt;br /&gt;
# You may also update the resources while in-game as long as you have the correct access levels by typing &amp;quot;refresh&amp;quot; in the clients console or &amp;quot;/refresh&amp;quot; in the chat window. This may cause a second of lag if you have many resources.&lt;br /&gt;
# In the above instructions, &amp;lt;SERVER&amp;gt; is the path to your server's main directory. In most cases this is C:\Program Files\MTA San Andreas\server&lt;br /&gt;
# You can choose a different config file for the server to use by passing it in the command line after a --config argument, e.g. mtaserver.exe --config anotherconfig.cfg.&lt;br /&gt;
# Do not be alarmed by the warning regarding the parsing of the settings.xml file. This happens because your server installation is still clean and unused.&lt;br /&gt;
&lt;br /&gt;
====Need further help?====&lt;br /&gt;
Why not pop over to our [http://forum.mtasa.com/ Forums] or join us on [irc://irc.multitheftauto.com/mta IRC] (irc.multitheftauto.com #mta - [http://www.mirc.com mIRC])&lt;br /&gt;
&lt;br /&gt;
[[es:Manual Servidor]]&lt;br /&gt;
[[de:Server Anleitung]]&lt;br /&gt;
[[it:Manuale del Server]]&lt;br /&gt;
[[nl:Server Manual]]&lt;br /&gt;
[[ru:Server Manual]]&lt;br /&gt;
[[pl:Server Manual]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Support]]&lt;/div&gt;</summary>
		<author><name>Stanley Sathler .</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Server_Manual&amp;diff=31041</id>
		<title>Server Manual</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Server_Manual&amp;diff=31041"/>
		<updated>2012-05-20T21:37:36Z</updated>

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

		<summary type="html">&lt;p&gt;Stanley Sathler .: /* Client Checks */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[PT-BR/Manual_do_Servidor]] &lt;br /&gt;
==Introdução==&lt;br /&gt;
Configurar um servidor e disponibilizá-lo para que seus amigos joguem via Internet ou LAN é mais fácil do que parece. Neste artigo estaremos abordando os passos iniciais para que você possa criar o seu próprio servidor para o MTA.&lt;br /&gt;
&lt;br /&gt;
==Instalando o servidor==&lt;br /&gt;
A primeira parte consiste na instalação do servidor. Abaixo há dois tópicos, abordando a instalação em plataformas Linux e Windows, respectivamente.&lt;br /&gt;
&lt;br /&gt;
===Instalando no Linux===&lt;br /&gt;
Há diversas maneiras de instalar, configurar e iniciar um servidor no Linux:&lt;br /&gt;
* [[Image:iUS.png|Em Inglês|20px]] [[Building MTASA Server on GNU Linux|Configurando um Servidor de MTASA no GNU Linux (Em Inglês)]]&lt;br /&gt;
* [[Image:iUS.png|Em Inglês|20px]] [http://linux.mtasa.com Baixando o servidor para Linux]&lt;br /&gt;
&lt;br /&gt;
===Instalando no Windows===&lt;br /&gt;
Instalar um servidor do MTA:SA no Windows é bem simples:&lt;br /&gt;
:*Vá para [http://mtasa.com/ página de download] do MTA:SA e baixe o instalador.&lt;br /&gt;
:*Após o término do download, execute o arquivo.&lt;br /&gt;
:*Clique em Next e depois em &amp;quot;I Agree&amp;quot;.&lt;br /&gt;
:*Nesta etapa você pode selecionar os componentes que deseja ou não instalar: &lt;br /&gt;
:**Para instalar somente o servidor, mude a opção &amp;quot;Client and Server&amp;quot; para &amp;quot;Server Only&amp;quot;&lt;br /&gt;
:**Next para continuar.&lt;br /&gt;
:*Selecione a pasta na qual deseja instalar o servidor. Em seguida, Next.&lt;br /&gt;
:*Clique em Install.&lt;br /&gt;
:*Pronto!&lt;br /&gt;
&lt;br /&gt;
''Qual a função do arquivo acl.xml (access control list)? Para saber mais, leia o artigo em: &lt;br /&gt;
* [[Image:iUS.png|Em Inglês|20px]] [[Access_Control_List|Access Control List]]''&lt;br /&gt;
&lt;br /&gt;
==Configurando o servidor==&lt;br /&gt;
O servidor dedicado do Multi Theft Auto pode ser configurado através...&lt;br /&gt;
&lt;br /&gt;
*De uma espécie de prompt de comando chamado '''console''', ou seja, um programa onde comandos não são enviados através de cliques, mas sim através de linhas de comando digitadas pelo usuário.&lt;br /&gt;
** Esse programa está localizado em &amp;quot;MTA San Andreas 1.3\server\MTA Server.exe&amp;quot;.&lt;br /&gt;
** Ele é idêntico a janela ''cmd'' do windows.&lt;br /&gt;
** Enquanto este estiver executando, o servidor vai permanecer online, caso contrário, o servidor sai do ar.&lt;br /&gt;
&lt;br /&gt;
*'''Do próprio jogo'''! &lt;br /&gt;
**Os comandos para configurar o servidor são enviados a partir do chat.&lt;br /&gt;
** Para que estes comandos sejam efetivamente enviados, é necessário o uso da &amp;quot;/&amp;quot; antes do comando em si, pois esta identifica que o que vem logo em seguida faz parte de um comando.. Exemplo &amp;quot;/addaccount&amp;quot;.&lt;br /&gt;
*'''De um navegador de internet'''. Um website pode receber informações e configurar um servidor de MTA.&lt;br /&gt;
&lt;br /&gt;
''Para que possa configurar um servidor do MTASA no jogo ou via website é necessário que pelo menos uma conta com privilégios de administrador seja adicionada no '''acl.xml'''.''&lt;br /&gt;
&lt;br /&gt;
===Configurações Gerais===&lt;br /&gt;
Todas as configurações gerais podem ser encontradas no arquivo &amp;quot;[[Server_mtaserver.conf|'''mtaserver.conf''']]&amp;quot; localizado na pasta &amp;quot;mods/deathmatch/&amp;quot;. Este arquivo pode ser visualizado em qualquer editor de texto.&lt;br /&gt;
&lt;br /&gt;
Ele é bem simples e direto, toda variável tem uma [[Server_mtaserver.conf|descrição abordando o que esta faz e como usa-la]].&lt;br /&gt;
&lt;br /&gt;
===Configurando as Portas===&lt;br /&gt;
Caso esteja executando um servidor a partir de seu computador e há um roteador entre a internet e sua máquina, então será necessário configurar 3 portas.&lt;br /&gt;
&lt;br /&gt;
Antes de mais nada, abra o arquivo localizado em &amp;quot;mods/deathmatch/[[Server_mtaserver.conf|'''mtaserver.conf''']]&amp;quot; e procure pelas linhas citadas a seguir:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;serverport&amp;gt;22003&amp;lt;/serverport&amp;gt; &lt;br /&gt;
&amp;lt;httpport&amp;gt;22005&amp;lt;/httpport&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Estas portas são necessárias para que o servidor inicie corretamente. Explicaremos com maiores detalhes mais a frente. Se deseja também que seu servidor apareça na lista de servidores do MTA (Server Browser, no menu), será preciso configurar mais uma porta chamada &amp;quot;ASE&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
(Exemplo de como ativar/desativar a porta ASE):&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;ase&amp;gt;1&amp;lt;/ase&amp;gt; &amp;lt;!-- 0 = desligada, 1 = ligada --&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Agora vamos liberar essas portas em seu roteador. Caso todas as portas estejam abertas ou você possui um roteador sem firewall, esta etapa é desnecessária.&lt;br /&gt;
&lt;br /&gt;
Se você não sabe como abrir portas em seu roteador, visite [http://portforward.com/ este site], procure pelo modelo de seu roteador e siga as instruções.&lt;br /&gt;
&lt;br /&gt;
Na maioria dos roteadores, há a opção de selecionar o tipo de porta: UDP ou TCP. A lista a seguir irá explicar qual porta é necessaria para que ela serve:&lt;br /&gt;
&lt;br /&gt;
Porta principal do servidor: UDP (a porta padrão é 22003, mas você pode alterá-la no parâmetro &amp;lt;serverport&amp;gt; do mtaserver.config)&lt;br /&gt;
Porta HTTP: TCP (a porta padrão é 22005, mas você pode alterá-la no parâmetro &amp;lt;httpport&amp;gt; do mtaserver.config)&lt;br /&gt;
Porta ASE: UDP (esta é necessária caso deseje que o servidor apareça na lista de servidores do gamemonitor.com)&lt;br /&gt;
&lt;br /&gt;
Para configurar a porta ASE, somamos 123 (cento e vinte e três) à porta padrão. Exemplo:&lt;br /&gt;
&lt;br /&gt;
Porta padrão: 22003&lt;br /&gt;
ASE: 22003 + 123 = 22126&lt;br /&gt;
&lt;br /&gt;
Boa sorte!&lt;br /&gt;
&lt;br /&gt;
''Na ultima versão do servidor, ao se digitar o comando &amp;quot;/[[Server_Commands#openports|openports]]&amp;quot;, os status de todas as portas serão mostrados.''&lt;br /&gt;
&lt;br /&gt;
===Checagem dos clientes===&lt;br /&gt;
Todo jogador que entra em um servidor passa por várias &amp;quot;avaliações&amp;quot;, também conhecidas como &amp;quot;Client Checks&amp;quot; (em inglês).&lt;br /&gt;
Esse processo é necessário, principalmente, para previnir trapaças no jogo, as quais são feitas através de trainers e/ou modificações realizadas nos arquivos originais do GTA SA.&lt;br /&gt;
Toda essas &amp;quot;avaliações&amp;quot; são dividias em diversos parâmetros, os quais são configuráveis através do arquivo [[Server_mtaserver.conf|'''mtaserver.conf''']] localizado em &amp;quot;mods/deathmatch&amp;quot;.&lt;br /&gt;
Destacamos 2 delas como exemplo:&lt;br /&gt;
&lt;br /&gt;
* O parâmetro '''client-file''' ...&lt;br /&gt;
** Habilita que um ou mais arquivos possam ser modificados no computador do jogador (exemplo: carmods.dat). Por padrão, o MTA não permite que nenhum arquivo da pasta &amp;quot;data&amp;quot; e &amp;quot;anim&amp;quot; do GTA SA seja modificado.&lt;br /&gt;
** Pertence a um grupo denominado Anti-Cheat, pois, por padrão, ele evita que um ou mais jogadores tenham vantagens sobre os outros. Todos os demais parâmetros que fazem parte desse grupo estão detalhados neste Guia [[Anti-cheat_guide|Anti-Cheat]].&lt;br /&gt;
* O parâmetro '''minclientversion'''...&lt;br /&gt;
** Estabelece que todos os jogadores usem uma versão igual ou superior a estipulada (exemplo: 1.3.0).&lt;br /&gt;
** Aqueles que estiverem usando uma versão inferior serão automaticamente desconectados do servidor.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Cada parâmetro contido no arquivo [[Server_mtaserver.conf|'''mtaserver.conf''']] tem um valor atribuido a ele. O que faz que o servidor ignore ou trabalhe de forma diferente ao realizar essas avaliações em cada jogador.&lt;br /&gt;
&lt;br /&gt;
Se deseja definir uma versão mínima do MTA dos seus jogadores, procure pela linha:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;minclientversion&amp;gt;&amp;lt;/minclientversion&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Use valores como: 1.1.1-9.02320&lt;br /&gt;
&lt;br /&gt;
===Adicionando administradores===&lt;br /&gt;
É altamente recomendável adicionar, no mínimo, um administrador em seu servidor. Pois assim você poderá fazer uso de alguns recursos especiais, como o gerenciador Web ou alguns scripts que precisem acessar a lista ACL (painéis administrativos, por exemplo).&lt;br /&gt;
&lt;br /&gt;
Para adicionar um administrador ao seu servidor, siga os seguintes passos:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Enquanto o servidor estiver ligado (MTA Server.exe sendo executado), adicione uma nova conta digitando '''[[Server_Commands#addaccount|addaccount nome senha]]''' no console. Por exemplo, para adicionar o usuário Fulano você poderia digitar:&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin: 10px 10px 10px 10px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
addaccount Fulano minhasenha123&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin: 10px 10px 10px 20px;&amp;quot;&amp;gt;&lt;br /&gt;
''Nota: Se você não tem acesso à janela do console, e o recurso &amp;quot;admin&amp;quot; está sendo executado, você pode adicionar uma nova conta digitando, no chat principal, o comando '''/register Fulano minhasenha123'''''&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;O servidor deverá mostrar uma mensagem confirmando o registo da nova conta.&lt;br /&gt;
&amp;lt;li&amp;gt;A seguir, desligue o servidor digitando '''shutdown''' no console.&lt;br /&gt;
&amp;lt;li&amp;gt;Tenha certeza de que seu servidor foi desligado. Se ele continua online, as informações a seguir serão perdidas&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Abra o arquivo 'mods/deathmatch/'acl.xml'''' com um Editor de Textos qualquer (pode ser o Bloco de Notas).&lt;br /&gt;
&amp;lt;li&amp;gt;Adicione a nova conta no grupo ''Admin'' usando a seguinte sintaxe do XML:&lt;br /&gt;
&amp;lt;div style=&amp;quot;padding: 10px&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;acl&amp;gt;&lt;br /&gt;
  ...&lt;br /&gt;
  &amp;lt;group name=&amp;quot;Admin&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;acl name=&amp;quot;Admin&amp;quot;/&amp;gt;&lt;br /&gt;
    ...&lt;br /&gt;
    &amp;lt;object name=&amp;quot;user.Fulano&amp;quot; /&amp;gt;&lt;br /&gt;
  &amp;lt;/group&amp;gt;&lt;br /&gt;
  ...&lt;br /&gt;
&amp;lt;/acl&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can actually add your user to any group you want. Each group is linked to an ACL ([[Access Control List]]). Each ACL contains a series of specific allowed or denied rights. These groups exist so different users can be assigned different rights. The ''Admin'' group points to the ''Admin'' ACL, which is empty (thus allowing all possible commands). The ''Everyone'' group points to the ''Default'' ACL that puts a series of restrictions on the available commands (to disallow regular players from using admin commands).&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
You're done! You can add as many administrators or users as you want this way, take a look at some of the other groups and ACLs for example. The ACL is also accessible through the [[Access_Control_List|Lua scripting engine]].&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is recommended to take a look at the web interface, we will explain how to do this below.&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
'''Note''': There are also ways to add accounts and edit rights for the server while it's running. &amp;quot;[[Server_Commands#addaccount|addaccount &amp;lt;user&amp;gt; &amp;lt;password&amp;gt;]]&amp;quot; is an internal command to add accounts, but you will have to use the web interface to add these accounts to specific groups/ACLs!&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Using the web interface===&lt;br /&gt;
The dedicated server comes with a few Lua [[resources]] that provide a nice little web interface to your server. This can be used to easily maintain your server, as it allows you to add users, start/stop resources, and more.&lt;br /&gt;
&lt;br /&gt;
The web interface resources are enabled by default and are served through the built-in HTTP web server. To make sure the built-in HTTP web server runs on a port you like (22005 by default), follow these steps:&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Make sure your server is stopped&lt;br /&gt;
&amp;lt;li&amp;gt;Open the file 'mods/deathmatch/[[Server_mtaserver.conf|'''mtaserver.conf''']]' with any text editor&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Verify that the HTTP server is enabled:&lt;br /&gt;
&amp;lt;div style=&amp;quot;padding: 10px&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;httpserver&amp;gt;1&amp;lt;/httpserver&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Change the HTTP server port to your liking:&lt;br /&gt;
&amp;lt;div style=&amp;quot;padding: 10px&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;httpport&amp;gt;22005&amp;lt;/httpport&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Save and close the configuration file&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Start your server&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If you happened to have changed the start-up resources in your configuration file, make sure the following resources are started:&lt;br /&gt;
&lt;br /&gt;
# resourcebrowser&lt;br /&gt;
# resourcemanager&lt;br /&gt;
# webadmin&lt;br /&gt;
# webmap&lt;br /&gt;
&lt;br /&gt;
These are automatically started in the default configuration file, in case you just installed your server.&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Open a web browser (Internet Explorer 6 or 7 are NOT supported; use [http://www.mozilla.com/firefox Mozilla Firefox], [http://www.google.com/chrome Google Chrome], [http://www.apple.com/safari/download Apple Safari], [http://www.opera.com Opera] or others) and navigate to the HTTP server URL: '''http://server:port/'''. For example, If you are running a local server on HTTP port 22005, use '''http://127.0.0.1:22005/'''.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Enter the username and password of the administrator you added in the previous section.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
You should now be able to maintain your server from the web interface.&lt;br /&gt;
&lt;br /&gt;
=== Configuring an external web server ===&lt;br /&gt;
The built-in web server is also used to serve files that are required by resources running on your server to any player that is connected to your server. For example, if you are running a game script with a scripted graphical user interface, or custom models, these need to be transferred to every connected player in order to function properly. This is done by either the built-in web server, or an external web server (that is usually a bit faster) but needs to be set up separately.&lt;br /&gt;
&lt;br /&gt;
For performance or consistency reasons during the game, you could choose to make use of such an external web server if you have one set up. The external web server needs to be accessible for the public, so any client will be able to download the necessary client-side files in order to join and play on your server.&lt;br /&gt;
&lt;br /&gt;
To enable downloading off an external web server, you should configure the [[Server_mtaserver.conf#httpdownloadurl|httpdownloadurl]] tag in your server configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;padding: 10px&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;	&lt;br /&gt;
&amp;lt;httpdownloadurl&amp;gt;http://www.myserver.tld/directory/here&amp;lt;/httpdownloadurl&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Since all the default resources provided with the dedicated server are zipped, and are normally automatically extracted by the built-in web server, you now have to provide a way for the clients to download the compressed files to their computers. To configure MTA to maintain a copy of only your unzipped client resources, set [[Server_mtaserver.conf#httpautoclientfiles|httpautoclientfiles]] in your server configuration: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;padding: 10px&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;httpautoclientfiles&amp;gt;1&amp;lt;/httpautoclientfiles&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now when you launch the server, the directory '''&amp;lt;SERVER&amp;gt;/mods/deathmatch/resource-cache/http-client-files''' will contain the correct client files for hosting on an external web server. If the web server is on the same machine, you can simply link the appropriate web server directory to '''http-client-files'''. If the web server is on a separate machine, ensure it has access to '''http-client-files''' via a network path, or maintain a remote copy using synchronization software.&lt;br /&gt;
&lt;br /&gt;
'''Note 1''': Please try to avoid any special characters (e.g. ~, !) in your download URLs.&amp;lt;br /&amp;gt;&lt;br /&gt;
'''Note 2''': Please do not use a trailing slash in your download URL (e.g. ''hxxp://www.myserver.tld/directory'' rather than ''hxxp://www.myserver.tld/directory/'')&lt;br /&gt;
&lt;br /&gt;
==Starting your server==&lt;br /&gt;
Begin by making sure that you have finished all configuration of your server, starting your server is the last stage so everything must be ready!&lt;br /&gt;
&lt;br /&gt;
To start your server double click on MTA Server.exe, make sure you allow it through any firewalls and forward ports where necessary.&lt;br /&gt;
&lt;br /&gt;
==Installing/Updating resources on your server==&lt;br /&gt;
Resources can come in two formats, either a ZIP format or just a normal folder with the script files inside it. The MTA:SA server supports both these methods.&lt;br /&gt;
&lt;br /&gt;
# Move or copy the new resource to your &amp;lt;SERVER&amp;gt;\mods\deathmatch\resources folder.&lt;br /&gt;
# In the server window type in the command [[Server_Commands#refresh|refresh]], this will re-scan the resources folder and update the live resources where necessary.&lt;br /&gt;
&lt;br /&gt;
==Uninstalling resources==&lt;br /&gt;
Resources can easily be removed from your server if you no longer want them.&lt;br /&gt;
&lt;br /&gt;
# Delete the ZIP file or the folder of the resource you wish to uninstall&lt;br /&gt;
# In the server window type in the command &amp;quot;refresh&amp;quot; (without the quotes), this will re-scan the resources folder and update the live resources where necessary.&lt;br /&gt;
&lt;br /&gt;
==Administrating your server==&lt;br /&gt;
You can start resources by typing the command &amp;quot;start resourcename&amp;quot; in the server console, or stop ones with &amp;quot;stop resourcename&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
It's also possible to execute these and other admin commands from the in-game console (which you can bring up with the ` key or F8); for this to work, you first need to log in with the command &amp;quot;[[Server_Commands#login|login username password]]&amp;quot;. Additionally, you can press the p key to bring up the admin panel: this is a graphical interface which allows you to easily kick or ban misbehaving players, among others.&lt;br /&gt;
&lt;br /&gt;
For further commands, type [[Server_Commands#help|help]] in a console.&lt;br /&gt;
&lt;br /&gt;
==Starting a map/gamemode==&lt;br /&gt;
See the commands section of the documentation for [[Resource:Map manager|mapmanager]] for more information.&lt;br /&gt;
&lt;br /&gt;
==Useful Notes==&lt;br /&gt;
&lt;br /&gt;
# You may also update the resources while in-game as long as you have the correct access levels by typing &amp;quot;refresh&amp;quot; in the clients console or &amp;quot;/refresh&amp;quot; in the chat window. This may cause a second of lag if you have many resources.&lt;br /&gt;
# In the above instructions, &amp;lt;SERVER&amp;gt; is the path to your server's main directory. In most cases this is C:\Program Files\MTA San Andreas\server&lt;br /&gt;
# You can choose a different config file for the server to use by passing it in the command line after a --config argument, e.g. mtaserver.exe --config anotherconfig.cfg.&lt;br /&gt;
# Do not be alarmed by the warning regarding the parsing of the settings.xml file. This happens because your server installation is still clean and unused.&lt;br /&gt;
&lt;br /&gt;
====Need further help?====&lt;br /&gt;
Why not pop over to our [http://forum.mtasa.com/ Forums] or join us on [irc://irc.multitheftauto.com/mta IRC] (irc.multitheftauto.com #mta - [http://www.mirc.com mIRC])&lt;br /&gt;
&lt;br /&gt;
[[es:Manual Servidor]]&lt;br /&gt;
[[de:Server Anleitung]]&lt;br /&gt;
[[it:Manuale del Server]]&lt;br /&gt;
[[nl:Server Manual]]&lt;br /&gt;
[[ru:Server Manual]]&lt;br /&gt;
[[pl:Server Manual]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Support]]&lt;/div&gt;</summary>
		<author><name>Stanley Sathler .</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=PT-BR/Manual_do_Servidor&amp;diff=31039</id>
		<title>PT-BR/Manual do Servidor</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=PT-BR/Manual_do_Servidor&amp;diff=31039"/>
		<updated>2012-05-20T21:18:05Z</updated>

		<summary type="html">&lt;p&gt;Stanley Sathler .: /* Client Checks */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[PT-BR/Manual_do_Servidor]] &lt;br /&gt;
==Introdução==&lt;br /&gt;
Configurar um servidor e disponibilizá-lo para que seus amigos joguem via Internet ou LAN é mais fácil do que parece. Neste artigo estaremos abordando os passos iniciais para que você possa criar o seu próprio servidor para o MTA.&lt;br /&gt;
&lt;br /&gt;
==Instalando o servidor==&lt;br /&gt;
A primeira parte consiste na instalação do servidor. Abaixo há dois tópicos, abordando a instalação em plataformas Linux e Windows, respectivamente.&lt;br /&gt;
&lt;br /&gt;
===Instalando no Linux===&lt;br /&gt;
Há diversas maneiras de instalar, configurar e iniciar um servidor no Linux:&lt;br /&gt;
* [[Image:iUS.png|Em Inglês|20px]] [[Building MTASA Server on GNU Linux|Configurando um Servidor de MTASA no GNU Linux (Em Inglês)]]&lt;br /&gt;
* [[Image:iUS.png|Em Inglês|20px]] [http://linux.mtasa.com Baixando o servidor para Linux]&lt;br /&gt;
&lt;br /&gt;
===Instalando no Windows===&lt;br /&gt;
Instalar um servidor do MTA:SA no Windows é bem simples:&lt;br /&gt;
:*Vá para [http://mtasa.com/ página de download] do MTA:SA e baixe o instalador.&lt;br /&gt;
:*Após o término do download, execute o arquivo.&lt;br /&gt;
:*Clique em Next e depois em &amp;quot;I Agree&amp;quot;.&lt;br /&gt;
:*Nesta etapa você pode selecionar os componentes que deseja ou não instalar: &lt;br /&gt;
:**Para instalar somente o servidor, mude a opção &amp;quot;Client and Server&amp;quot; para &amp;quot;Server Only&amp;quot;&lt;br /&gt;
:**Next para continuar.&lt;br /&gt;
:*Selecione a pasta na qual deseja instalar o servidor. Em seguida, Next.&lt;br /&gt;
:*Clique em Install.&lt;br /&gt;
:*Pronto!&lt;br /&gt;
&lt;br /&gt;
''Qual a função do arquivo acl.xml (access control list)? Para saber mais, leia o artigo em: &lt;br /&gt;
* [[Image:iUS.png|Em Inglês|20px]] [[Access_Control_List|Access Control List]]''&lt;br /&gt;
&lt;br /&gt;
==Configurando o servidor==&lt;br /&gt;
O servidor dedicado do Multi Theft Auto pode ser configurado através...&lt;br /&gt;
&lt;br /&gt;
*De uma espécie de prompt de comando chamado '''console''', ou seja, um programa onde comandos não são enviados através de cliques, mas sim através de linhas de comando digitadas pelo usuário.&lt;br /&gt;
** Esse programa está localizado em &amp;quot;MTA San Andreas 1.3\server\MTA Server.exe&amp;quot;.&lt;br /&gt;
** Ele é idêntico a janela ''cmd'' do windows.&lt;br /&gt;
** Enquanto este estiver executando, o servidor vai permanecer online, caso contrário, o servidor sai do ar.&lt;br /&gt;
&lt;br /&gt;
*'''Do próprio jogo'''! &lt;br /&gt;
**Os comandos para configurar o servidor são enviados a partir do chat.&lt;br /&gt;
** Para que estes comandos sejam efetivamente enviados, é necessário o uso da &amp;quot;/&amp;quot; antes do comando em si, pois esta identifica que o que vem logo em seguida faz parte de um comando.. Exemplo &amp;quot;/addaccount&amp;quot;.&lt;br /&gt;
*'''De um navegador de internet'''. Um website pode receber informações e configurar um servidor de MTA.&lt;br /&gt;
&lt;br /&gt;
''Para que possa configurar um servidor do MTASA no jogo ou via website é necessário que pelo menos uma conta com privilégios de administrador seja adicionada no '''acl.xml'''.''&lt;br /&gt;
&lt;br /&gt;
===Configurações Gerais===&lt;br /&gt;
Todas as configurações gerais podem ser encontradas no arquivo &amp;quot;[[Server_mtaserver.conf|'''mtaserver.conf''']]&amp;quot; localizado na pasta &amp;quot;mods/deathmatch/&amp;quot;. Este arquivo pode ser visualizado em qualquer editor de texto.&lt;br /&gt;
&lt;br /&gt;
Ele é bem simples e direto, toda variável tem uma [[Server_mtaserver.conf|descrição abordando o que esta faz e como usa-la]].&lt;br /&gt;
&lt;br /&gt;
===Configurando as Portas===&lt;br /&gt;
Caso esteja executando um servidor a partir de seu computador e há um roteador entre a internet e sua máquina, então será necessário configurar 3 portas.&lt;br /&gt;
&lt;br /&gt;
Antes de mais nada, abra o arquivo localizado em &amp;quot;mods/deathmatch/[[Server_mtaserver.conf|'''mtaserver.conf''']]&amp;quot; e procure pelas linhas citadas a seguir:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;serverport&amp;gt;22003&amp;lt;/serverport&amp;gt; &lt;br /&gt;
&amp;lt;httpport&amp;gt;22005&amp;lt;/httpport&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Estas portas são necessárias para que o servidor inicie corretamente. Explicaremos com maiores detalhes mais a frente. Se deseja também que seu servidor apareça na lista de servidores do MTA (Server Browser, no menu), será preciso configurar mais uma porta chamada &amp;quot;ASE&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
(Exemplo de como ativar/desativar a porta ASE):&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;ase&amp;gt;1&amp;lt;/ase&amp;gt; &amp;lt;!-- 0 = desligada, 1 = ligada --&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Agora vamos liberar essas portas em seu roteador. Caso todas as portas estejam abertas ou você possui um roteador sem firewall, esta etapa é desnecessária.&lt;br /&gt;
&lt;br /&gt;
Se você não sabe como abrir portas em seu roteador, visite [http://portforward.com/ este site], procure pelo modelo de seu roteador e siga as instruções.&lt;br /&gt;
&lt;br /&gt;
Na maioria dos roteadores, há a opção de selecionar o tipo de porta: UDP ou TCP. A lista a seguir irá explicar qual porta é necessaria para que ela serve:&lt;br /&gt;
&lt;br /&gt;
Porta principal do servidor: UDP (a porta padrão é 22003, mas você pode alterá-la no parâmetro &amp;lt;serverport&amp;gt; do mtaserver.config)&lt;br /&gt;
Porta HTTP: TCP (a porta padrão é 22005, mas você pode alterá-la no parâmetro &amp;lt;httpport&amp;gt; do mtaserver.config)&lt;br /&gt;
Porta ASE: UDP (esta é necessária caso deseje que o servidor apareça na lista de servidores do gamemonitor.com)&lt;br /&gt;
&lt;br /&gt;
Para configurar a porta ASE, somamos 123 (cento e vinte e três) à porta padrão. Exemplo:&lt;br /&gt;
&lt;br /&gt;
Porta padrão: 22003&lt;br /&gt;
ASE: 22003 + 123 = 22126&lt;br /&gt;
&lt;br /&gt;
Boa sorte!&lt;br /&gt;
&lt;br /&gt;
''Na ultima versão do servidor, ao se digitar o comando &amp;quot;/[[Server_Commands#openports|openports]]&amp;quot;, os status de todas as portas serão mostrados.''&lt;br /&gt;
&lt;br /&gt;
===Client Checks===&lt;br /&gt;
Todo jogador que entra em um servidor passa por várias &amp;quot;avaliações&amp;quot;, também conhecidas como &amp;quot;Client Checks&amp;quot; (em inglês).&lt;br /&gt;
Esse processo é necessário, principalmente, para previnir trapaças no jogo, as quais são feitas através de trainers e/ou modificações realizadas nos arquivos originais do GTA SA.&lt;br /&gt;
Toda essas &amp;quot;avaliações&amp;quot; são dividias em diversos parâmetros, os quais são configuráveis através do arquivo [[Server_mtaserver.conf|'''mtaserver.conf''']] localizado em &amp;quot;mods/deathmatch&amp;quot;.&lt;br /&gt;
Destacamos 2 delas como exemplo:&lt;br /&gt;
&lt;br /&gt;
* O parâmetro '''client-file''' ...&lt;br /&gt;
** Habilita que um ou mais arquivos possam ser modificados no computador do jogador (exemplo: carmods.dat). Por padrão, o MTA não permite que nenhum arquivo da pasta &amp;quot;data&amp;quot; e &amp;quot;anim&amp;quot; do GTA SA seja modificado.&lt;br /&gt;
** Pertence a um grupo denominado Anti-Cheat, pois, por padrão, ele evita que um ou mais jogadores tenham vantagens sobre os outros. Todos os demais parâmetros que fazem parte desse grupo estão detalhados neste Guia [[Anti-cheat_guide|Anti-Cheat]].&lt;br /&gt;
* O parâmetro '''minclientversion'''...&lt;br /&gt;
** Estabelece que todos os jogadores usem uma versão igual ou superior a estipulada (exemplo: 1.3.0).&lt;br /&gt;
** Aqueles que estiverem usando uma versão inferior serão automaticamente desconectados do servidor.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Cada parâmetro contido no arquivo [[Server_mtaserver.conf|'''mtaserver.conf''']] tem um valor atribuido a ele. O que faz que o servidor ignore ou trabalhe de forma diferente ao realizar essas avaliações em cada jogador.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--Se deseja definir uma versão mínima do MTA dos seus jogadores, procure pela linha:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;minclientversion&amp;gt;&amp;lt;/minclientversion&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Use valores como: 1.1.1-9.02320&lt;br /&gt;
&lt;br /&gt;
===Adicionando administradores===&lt;br /&gt;
É altamente recomendável adicionar, no mínimo, um administrador em seu servidor. Pois assim você poderá fazer uso de alguns recursos especiais, como o gerenciador Web ou alguns scripts que precisem acessar a lista ACL (painéis administrativos, por exemplo).&lt;br /&gt;
&lt;br /&gt;
Para adicionar um administrador ao seu servidor, siga os seguintes passos:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Enquanto o servidor estiver ligado (MTA Server.exe sendo executado), adicione uma nova conta digitando '''[[Server_Commands#addaccount|addaccount nome senha]]''' no console. Por exemplo, para adicionar o usuário Fulano você poderia digitar:&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin: 10px 10px 10px 10px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
addaccount Fulano minhasenha123&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin: 10px 10px 10px 20px;&amp;quot;&amp;gt;&lt;br /&gt;
''Nota: Se você não tem acesso à janela do console, e o recurso &amp;quot;admin&amp;quot; está sendo executado, você pode adicionar uma nova conta digitando, no chat principal, o comando '''/register Fulano minhasenha123'''''&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;O servidor deverá mostrar uma mensagem confirmando o registo da nova conta.&lt;br /&gt;
&amp;lt;li&amp;gt;A seguir, desligue o servidor digitando '''shutdown''' no console.&lt;br /&gt;
&amp;lt;li&amp;gt;Tenha certeza de que seu servidor foi desligado. Se ele continua online, as informações a seguir serão perdidas&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Abra o arquivo 'mods/deathmatch/'acl.xml'''' com um Editor de Textos qualquer (pode ser o Bloco de Notas).&lt;br /&gt;
&amp;lt;li&amp;gt;Adicione a nova conta no grupo ''Admin'' usando a seguinte sintaxe do XML:&lt;br /&gt;
&amp;lt;div style=&amp;quot;padding: 10px&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;acl&amp;gt;&lt;br /&gt;
  ...&lt;br /&gt;
  &amp;lt;group name=&amp;quot;Admin&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;acl name=&amp;quot;Admin&amp;quot;/&amp;gt;&lt;br /&gt;
    ...&lt;br /&gt;
    &amp;lt;object name=&amp;quot;user.Fulano&amp;quot; /&amp;gt;&lt;br /&gt;
  &amp;lt;/group&amp;gt;&lt;br /&gt;
  ...&lt;br /&gt;
&amp;lt;/acl&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can actually add your user to any group you want. Each group is linked to an ACL ([[Access Control List]]). Each ACL contains a series of specific allowed or denied rights. These groups exist so different users can be assigned different rights. The ''Admin'' group points to the ''Admin'' ACL, which is empty (thus allowing all possible commands). The ''Everyone'' group points to the ''Default'' ACL that puts a series of restrictions on the available commands (to disallow regular players from using admin commands).&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
You're done! You can add as many administrators or users as you want this way, take a look at some of the other groups and ACLs for example. The ACL is also accessible through the [[Access_Control_List|Lua scripting engine]].&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is recommended to take a look at the web interface, we will explain how to do this below.&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
'''Note''': There are also ways to add accounts and edit rights for the server while it's running. &amp;quot;[[Server_Commands#addaccount|addaccount &amp;lt;user&amp;gt; &amp;lt;password&amp;gt;]]&amp;quot; is an internal command to add accounts, but you will have to use the web interface to add these accounts to specific groups/ACLs!&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Using the web interface===&lt;br /&gt;
The dedicated server comes with a few Lua [[resources]] that provide a nice little web interface to your server. This can be used to easily maintain your server, as it allows you to add users, start/stop resources, and more.&lt;br /&gt;
&lt;br /&gt;
The web interface resources are enabled by default and are served through the built-in HTTP web server. To make sure the built-in HTTP web server runs on a port you like (22005 by default), follow these steps:&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Make sure your server is stopped&lt;br /&gt;
&amp;lt;li&amp;gt;Open the file 'mods/deathmatch/[[Server_mtaserver.conf|'''mtaserver.conf''']]' with any text editor&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Verify that the HTTP server is enabled:&lt;br /&gt;
&amp;lt;div style=&amp;quot;padding: 10px&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;httpserver&amp;gt;1&amp;lt;/httpserver&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Change the HTTP server port to your liking:&lt;br /&gt;
&amp;lt;div style=&amp;quot;padding: 10px&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;httpport&amp;gt;22005&amp;lt;/httpport&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Save and close the configuration file&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Start your server&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If you happened to have changed the start-up resources in your configuration file, make sure the following resources are started:&lt;br /&gt;
&lt;br /&gt;
# resourcebrowser&lt;br /&gt;
# resourcemanager&lt;br /&gt;
# webadmin&lt;br /&gt;
# webmap&lt;br /&gt;
&lt;br /&gt;
These are automatically started in the default configuration file, in case you just installed your server.&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Open a web browser (Internet Explorer 6 or 7 are NOT supported; use [http://www.mozilla.com/firefox Mozilla Firefox], [http://www.google.com/chrome Google Chrome], [http://www.apple.com/safari/download Apple Safari], [http://www.opera.com Opera] or others) and navigate to the HTTP server URL: '''http://server:port/'''. For example, If you are running a local server on HTTP port 22005, use '''http://127.0.0.1:22005/'''.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Enter the username and password of the administrator you added in the previous section.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
You should now be able to maintain your server from the web interface.&lt;br /&gt;
&lt;br /&gt;
=== Configuring an external web server ===&lt;br /&gt;
The built-in web server is also used to serve files that are required by resources running on your server to any player that is connected to your server. For example, if you are running a game script with a scripted graphical user interface, or custom models, these need to be transferred to every connected player in order to function properly. This is done by either the built-in web server, or an external web server (that is usually a bit faster) but needs to be set up separately.&lt;br /&gt;
&lt;br /&gt;
For performance or consistency reasons during the game, you could choose to make use of such an external web server if you have one set up. The external web server needs to be accessible for the public, so any client will be able to download the necessary client-side files in order to join and play on your server.&lt;br /&gt;
&lt;br /&gt;
To enable downloading off an external web server, you should configure the [[Server_mtaserver.conf#httpdownloadurl|httpdownloadurl]] tag in your server configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;padding: 10px&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;	&lt;br /&gt;
&amp;lt;httpdownloadurl&amp;gt;http://www.myserver.tld/directory/here&amp;lt;/httpdownloadurl&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Since all the default resources provided with the dedicated server are zipped, and are normally automatically extracted by the built-in web server, you now have to provide a way for the clients to download the compressed files to their computers. To configure MTA to maintain a copy of only your unzipped client resources, set [[Server_mtaserver.conf#httpautoclientfiles|httpautoclientfiles]] in your server configuration: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;padding: 10px&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;httpautoclientfiles&amp;gt;1&amp;lt;/httpautoclientfiles&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now when you launch the server, the directory '''&amp;lt;SERVER&amp;gt;/mods/deathmatch/resource-cache/http-client-files''' will contain the correct client files for hosting on an external web server. If the web server is on the same machine, you can simply link the appropriate web server directory to '''http-client-files'''. If the web server is on a separate machine, ensure it has access to '''http-client-files''' via a network path, or maintain a remote copy using synchronization software.&lt;br /&gt;
&lt;br /&gt;
'''Note 1''': Please try to avoid any special characters (e.g. ~, !) in your download URLs.&amp;lt;br /&amp;gt;&lt;br /&gt;
'''Note 2''': Please do not use a trailing slash in your download URL (e.g. ''hxxp://www.myserver.tld/directory'' rather than ''hxxp://www.myserver.tld/directory/'')&lt;br /&gt;
&lt;br /&gt;
==Starting your server==&lt;br /&gt;
Begin by making sure that you have finished all configuration of your server, starting your server is the last stage so everything must be ready!&lt;br /&gt;
&lt;br /&gt;
To start your server double click on MTA Server.exe, make sure you allow it through any firewalls and forward ports where necessary.&lt;br /&gt;
&lt;br /&gt;
==Installing/Updating resources on your server==&lt;br /&gt;
Resources can come in two formats, either a ZIP format or just a normal folder with the script files inside it. The MTA:SA server supports both these methods.&lt;br /&gt;
&lt;br /&gt;
# Move or copy the new resource to your &amp;lt;SERVER&amp;gt;\mods\deathmatch\resources folder.&lt;br /&gt;
# In the server window type in the command [[Server_Commands#refresh|refresh]], this will re-scan the resources folder and update the live resources where necessary.&lt;br /&gt;
&lt;br /&gt;
==Uninstalling resources==&lt;br /&gt;
Resources can easily be removed from your server if you no longer want them.&lt;br /&gt;
&lt;br /&gt;
# Delete the ZIP file or the folder of the resource you wish to uninstall&lt;br /&gt;
# In the server window type in the command &amp;quot;refresh&amp;quot; (without the quotes), this will re-scan the resources folder and update the live resources where necessary.&lt;br /&gt;
&lt;br /&gt;
==Administrating your server==&lt;br /&gt;
You can start resources by typing the command &amp;quot;start resourcename&amp;quot; in the server console, or stop ones with &amp;quot;stop resourcename&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
It's also possible to execute these and other admin commands from the in-game console (which you can bring up with the ` key or F8); for this to work, you first need to log in with the command &amp;quot;[[Server_Commands#login|login username password]]&amp;quot;. Additionally, you can press the p key to bring up the admin panel: this is a graphical interface which allows you to easily kick or ban misbehaving players, among others.&lt;br /&gt;
&lt;br /&gt;
For further commands, type [[Server_Commands#help|help]] in a console.&lt;br /&gt;
&lt;br /&gt;
==Starting a map/gamemode==&lt;br /&gt;
See the commands section of the documentation for [[Resource:Map manager|mapmanager]] for more information.&lt;br /&gt;
&lt;br /&gt;
==Useful Notes==&lt;br /&gt;
&lt;br /&gt;
# You may also update the resources while in-game as long as you have the correct access levels by typing &amp;quot;refresh&amp;quot; in the clients console or &amp;quot;/refresh&amp;quot; in the chat window. This may cause a second of lag if you have many resources.&lt;br /&gt;
# In the above instructions, &amp;lt;SERVER&amp;gt; is the path to your server's main directory. In most cases this is C:\Program Files\MTA San Andreas\server&lt;br /&gt;
# You can choose a different config file for the server to use by passing it in the command line after a --config argument, e.g. mtaserver.exe --config anotherconfig.cfg.&lt;br /&gt;
# Do not be alarmed by the warning regarding the parsing of the settings.xml file. This happens because your server installation is still clean and unused.&lt;br /&gt;
&lt;br /&gt;
====Need further help?====&lt;br /&gt;
Why not pop over to our [http://forum.mtasa.com/ Forums] or join us on [irc://irc.multitheftauto.com/mta IRC] (irc.multitheftauto.com #mta - [http://www.mirc.com mIRC])&lt;br /&gt;
&lt;br /&gt;
[[es:Manual Servidor]]&lt;br /&gt;
[[de:Server Anleitung]]&lt;br /&gt;
[[it:Manuale del Server]]&lt;br /&gt;
[[nl:Server Manual]]&lt;br /&gt;
[[ru:Server Manual]]&lt;br /&gt;
[[pl:Server Manual]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Support]]&lt;/div&gt;</summary>
		<author><name>Stanley Sathler .</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=PT-BR/Manual_do_Servidor&amp;diff=31038</id>
		<title>PT-BR/Manual do Servidor</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=PT-BR/Manual_do_Servidor&amp;diff=31038"/>
		<updated>2012-05-20T21:06:18Z</updated>

		<summary type="html">&lt;p&gt;Stanley Sathler .: /* Configurando as Portas */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[PT-BR/Manual_do_Servidor]] &lt;br /&gt;
==Introdução==&lt;br /&gt;
Configurar um servidor e disponibilizá-lo para que seus amigos joguem via Internet ou LAN é mais fácil do que parece. Neste artigo estaremos abordando os passos iniciais para que você possa criar o seu próprio servidor para o MTA.&lt;br /&gt;
&lt;br /&gt;
==Instalando o servidor==&lt;br /&gt;
A primeira parte consiste na instalação do servidor. Abaixo há dois tópicos, abordando a instalação em plataformas Linux e Windows, respectivamente.&lt;br /&gt;
&lt;br /&gt;
===Instalando no Linux===&lt;br /&gt;
Há diversas maneiras de instalar, configurar e iniciar um servidor no Linux:&lt;br /&gt;
* [[Image:iUS.png|Em Inglês|20px]] [[Building MTASA Server on GNU Linux|Configurando um Servidor de MTASA no GNU Linux (Em Inglês)]]&lt;br /&gt;
* [[Image:iUS.png|Em Inglês|20px]] [http://linux.mtasa.com Baixando o servidor para Linux]&lt;br /&gt;
&lt;br /&gt;
===Instalando no Windows===&lt;br /&gt;
Instalar um servidor do MTA:SA no Windows é bem simples:&lt;br /&gt;
:*Vá para [http://mtasa.com/ página de download] do MTA:SA e baixe o instalador.&lt;br /&gt;
:*Após o término do download, execute o arquivo.&lt;br /&gt;
:*Clique em Next e depois em &amp;quot;I Agree&amp;quot;.&lt;br /&gt;
:*Nesta etapa você pode selecionar os componentes que deseja ou não instalar: &lt;br /&gt;
:**Para instalar somente o servidor, mude a opção &amp;quot;Client and Server&amp;quot; para &amp;quot;Server Only&amp;quot;&lt;br /&gt;
:**Next para continuar.&lt;br /&gt;
:*Selecione a pasta na qual deseja instalar o servidor. Em seguida, Next.&lt;br /&gt;
:*Clique em Install.&lt;br /&gt;
:*Pronto!&lt;br /&gt;
&lt;br /&gt;
''Qual a função do arquivo acl.xml (access control list)? Para saber mais, leia o artigo em: &lt;br /&gt;
* [[Image:iUS.png|Em Inglês|20px]] [[Access_Control_List|Access Control List]]''&lt;br /&gt;
&lt;br /&gt;
==Configurando o servidor==&lt;br /&gt;
O servidor dedicado do Multi Theft Auto pode ser configurado através...&lt;br /&gt;
&lt;br /&gt;
*De uma espécie de prompt de comando chamado '''console''', ou seja, um programa onde comandos não são enviados através de cliques, mas sim através de linhas de comando digitadas pelo usuário.&lt;br /&gt;
** Esse programa está localizado em &amp;quot;MTA San Andreas 1.3\server\MTA Server.exe&amp;quot;.&lt;br /&gt;
** Ele é idêntico a janela ''cmd'' do windows.&lt;br /&gt;
** Enquanto este estiver executando, o servidor vai permanecer online, caso contrário, o servidor sai do ar.&lt;br /&gt;
&lt;br /&gt;
*'''Do próprio jogo'''! &lt;br /&gt;
**Os comandos para configurar o servidor são enviados a partir do chat.&lt;br /&gt;
** Para que estes comandos sejam efetivamente enviados, é necessário o uso da &amp;quot;/&amp;quot; antes do comando em si, pois esta identifica que o que vem logo em seguida faz parte de um comando.. Exemplo &amp;quot;/addaccount&amp;quot;.&lt;br /&gt;
*'''De um navegador de internet'''. Um website pode receber informações e configurar um servidor de MTA.&lt;br /&gt;
&lt;br /&gt;
''Para que possa configurar um servidor do MTASA no jogo ou via website é necessário que pelo menos uma conta com privilégios de administrador seja adicionada no '''acl.xml'''.''&lt;br /&gt;
&lt;br /&gt;
===Configurações Gerais===&lt;br /&gt;
Todas as configurações gerais podem ser encontradas no arquivo &amp;quot;[[Server_mtaserver.conf|'''mtaserver.conf''']]&amp;quot; localizado na pasta &amp;quot;mods/deathmatch/&amp;quot;. Este arquivo pode ser visualizado em qualquer editor de texto.&lt;br /&gt;
&lt;br /&gt;
Ele é bem simples e direto, toda variável tem uma [[Server_mtaserver.conf|descrição abordando o que esta faz e como usa-la]].&lt;br /&gt;
&lt;br /&gt;
===Configurando as Portas===&lt;br /&gt;
Caso esteja executando um servidor a partir de seu computador e há um roteador entre a internet e sua máquina, então será necessário configurar 3 portas.&lt;br /&gt;
&lt;br /&gt;
Antes de mais nada, abra o arquivo localizado em &amp;quot;mods/deathmatch/[[Server_mtaserver.conf|'''mtaserver.conf''']]&amp;quot; e procure pelas linhas citadas a seguir:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;serverport&amp;gt;22003&amp;lt;/serverport&amp;gt; &lt;br /&gt;
&amp;lt;httpport&amp;gt;22005&amp;lt;/httpport&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Estas portas são necessárias para que o servidor inicie corretamente. Explicaremos com maiores detalhes mais a frente. Se deseja também que seu servidor apareça na lista de servidores do MTA (Server Browser, no menu), será preciso configurar mais uma porta chamada &amp;quot;ASE&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
(Exemplo de como ativar/desativar a porta ASE):&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;ase&amp;gt;1&amp;lt;/ase&amp;gt; &amp;lt;!-- 0 = desligada, 1 = ligada --&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Agora vamos liberar essas portas em seu roteador. Caso todas as portas estejam abertas ou você possui um roteador sem firewall, esta etapa é desnecessária.&lt;br /&gt;
&lt;br /&gt;
Se você não sabe como abrir portas em seu roteador, visite [http://portforward.com/ este site], procure pelo modelo de seu roteador e siga as instruções.&lt;br /&gt;
&lt;br /&gt;
Na maioria dos roteadores, há a opção de selecionar o tipo de porta: UDP ou TCP. A lista a seguir irá explicar qual porta é necessaria para que ela serve:&lt;br /&gt;
&lt;br /&gt;
Porta principal do servidor: UDP (a porta padrão é 22003, mas você pode alterá-la no parâmetro &amp;lt;serverport&amp;gt; do mtaserver.config)&lt;br /&gt;
Porta HTTP: TCP (a porta padrão é 22005, mas você pode alterá-la no parâmetro &amp;lt;httpport&amp;gt; do mtaserver.config)&lt;br /&gt;
Porta ASE: UDP (esta é necessária caso deseje que o servidor apareça na lista de servidores do gamemonitor.com)&lt;br /&gt;
&lt;br /&gt;
Para configurar a porta ASE, somamos 123 (cento e vinte e três) à porta padrão. Exemplo:&lt;br /&gt;
&lt;br /&gt;
Porta padrão: 22003&lt;br /&gt;
ASE: 22003 + 123 = 22126&lt;br /&gt;
&lt;br /&gt;
Boa sorte!&lt;br /&gt;
&lt;br /&gt;
''Na ultima versão do servidor, ao se digitar o comando &amp;quot;/[[Server_Commands#openports|openports]]&amp;quot;, os status de todas as portas serão mostrados.''&lt;br /&gt;
&lt;br /&gt;
===Client Checks===&lt;br /&gt;
Todo jogador que entra em um servidor passa por várias &amp;quot;avaliações&amp;quot;, também conhecido como &amp;quot;Client Checks&amp;quot; (em inglês).&lt;br /&gt;
Esse processo é necessário, principalmente, para previnir trapaças no jogo, as quais são feitas através de trainers e/ou modificações realizadas nos arquivos originais do GTA SA.&lt;br /&gt;
Toda essas &amp;quot;avaliações&amp;quot; são dividias em diversos parâmetros, os quais são configuráveis através do arquivo [[Server_mtaserver.conf|'''mtaserver.conf''']] localizado em &amp;quot;mods/deathmatch&amp;quot;.&lt;br /&gt;
Destacamos 2 delas como exemplo:&lt;br /&gt;
&lt;br /&gt;
* O parâmetro '''client-file''' ...&lt;br /&gt;
** habilita que um ou mais arquivos possam ser modificados no computador do jogador (exemplo: carmods.dat). Por padrão, o MTA não permite que nenhum arquivo da pasta &amp;quot;data&amp;quot; e &amp;quot;anim&amp;quot; do GTA SA seja modificado.&lt;br /&gt;
** pertênce a um grupo denominado Anti-Cheat, pois, por padrão, ele evita que um ou mais jogadores tenham vantagens sobre os outros. Todos os demais parâmetros que fazem parte desse grupo estão detalhados neste Guia [[Anti-cheat_guide|Anti-Cheat]].&lt;br /&gt;
* O parâmetro '''minclientversion'''...&lt;br /&gt;
** estabelece que todos os jogadores usem uma versão igual ou superior a estipulada (exemplo: 1.3.0).&lt;br /&gt;
** Aqueles que estiverem usando uma versão inferior serão automaticamente desconectados do servidor.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Cada parâmetro contido no arquivo [[Server_mtaserver.conf|'''mtaserver.conf''']] tem um valor atribuido a ele. O que faz que o servidor iginore ou aja de forma diferente ao relaziar essas avaliações em cada jogador.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--If you want to force a minimum client version, search for the following line:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;minclientversion&amp;gt;&amp;lt;/minclientversion&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Accepted values look like: 1.1.1-9.02320&lt;br /&gt;
&lt;br /&gt;
===Adding administrators===&lt;br /&gt;
It is strongly recommended to add at least one administrator to your server in order to make use of the built-in webserver to easily maintain and configure your server. This administrator will then also be able to log-in from within the game and control the server.&lt;br /&gt;
&lt;br /&gt;
To add an administrator to your server, follow these steps:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;While the server is running, add a new account by typing '''[[Server_Commands#addaccount|addaccount name password]]''' into the server window. For example, to add user BennyLava you could type:&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin: 10px 10px 10px 10px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
addaccount BennyLava 123password&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin: 10px 10px 10px 20px;&amp;quot;&amp;gt;&lt;br /&gt;
''Note: If you do not have access to the server window, and the 'admin' resource is running, you can add  the example account by issuing the chatbox command '''/register BennyLava 123password'''''&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The server should display a message confirming the account has been added.&lt;br /&gt;
&amp;lt;li&amp;gt;Next, shutdown the server by typing '''shutdown''' into the server window.&lt;br /&gt;
&amp;lt;li&amp;gt;Make sure your server is stopped; if your server is still running, the following changes you make will be overwritten&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Open the file 'mods/deathmatch/'acl.xml'''' with any text editor&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Add the account to the ''Admin'' group by using the XML-syntax below&lt;br /&gt;
&amp;lt;div style=&amp;quot;padding: 10px&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;acl&amp;gt;&lt;br /&gt;
  ...&lt;br /&gt;
  &amp;lt;group name=&amp;quot;Admin&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;acl name=&amp;quot;Admin&amp;quot;/&amp;gt;&lt;br /&gt;
    ...&lt;br /&gt;
    &amp;lt;object name=&amp;quot;user.BennyLava&amp;quot; /&amp;gt;&lt;br /&gt;
  &amp;lt;/group&amp;gt;&lt;br /&gt;
  ...&lt;br /&gt;
&amp;lt;/acl&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can actually add your user to any group you want. Each group is linked to an ACL ([[Access Control List]]). Each ACL contains a series of specific allowed or denied rights. These groups exist so different users can be assigned different rights. The ''Admin'' group points to the ''Admin'' ACL, which is empty (thus allowing all possible commands). The ''Everyone'' group points to the ''Default'' ACL that puts a series of restrictions on the available commands (to disallow regular players from using admin commands).&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
You're done! You can add as many administrators or users as you want this way, take a look at some of the other groups and ACLs for example. The ACL is also accessible through the [[Access_Control_List|Lua scripting engine]].&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is recommended to take a look at the web interface, we will explain how to do this below.&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
'''Note''': There are also ways to add accounts and edit rights for the server while it's running. &amp;quot;[[Server_Commands#addaccount|addaccount &amp;lt;user&amp;gt; &amp;lt;password&amp;gt;]]&amp;quot; is an internal command to add accounts, but you will have to use the web interface to add these accounts to specific groups/ACLs!&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Using the web interface===&lt;br /&gt;
The dedicated server comes with a few Lua [[resources]] that provide a nice little web interface to your server. This can be used to easily maintain your server, as it allows you to add users, start/stop resources, and more.&lt;br /&gt;
&lt;br /&gt;
The web interface resources are enabled by default and are served through the built-in HTTP web server. To make sure the built-in HTTP web server runs on a port you like (22005 by default), follow these steps:&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Make sure your server is stopped&lt;br /&gt;
&amp;lt;li&amp;gt;Open the file 'mods/deathmatch/[[Server_mtaserver.conf|'''mtaserver.conf''']]' with any text editor&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Verify that the HTTP server is enabled:&lt;br /&gt;
&amp;lt;div style=&amp;quot;padding: 10px&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;httpserver&amp;gt;1&amp;lt;/httpserver&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Change the HTTP server port to your liking:&lt;br /&gt;
&amp;lt;div style=&amp;quot;padding: 10px&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;httpport&amp;gt;22005&amp;lt;/httpport&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Save and close the configuration file&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Start your server&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If you happened to have changed the start-up resources in your configuration file, make sure the following resources are started:&lt;br /&gt;
&lt;br /&gt;
# resourcebrowser&lt;br /&gt;
# resourcemanager&lt;br /&gt;
# webadmin&lt;br /&gt;
# webmap&lt;br /&gt;
&lt;br /&gt;
These are automatically started in the default configuration file, in case you just installed your server.&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Open a web browser (Internet Explorer 6 or 7 are NOT supported; use [http://www.mozilla.com/firefox Mozilla Firefox], [http://www.google.com/chrome Google Chrome], [http://www.apple.com/safari/download Apple Safari], [http://www.opera.com Opera] or others) and navigate to the HTTP server URL: '''http://server:port/'''. For example, If you are running a local server on HTTP port 22005, use '''http://127.0.0.1:22005/'''.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Enter the username and password of the administrator you added in the previous section.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
You should now be able to maintain your server from the web interface.&lt;br /&gt;
&lt;br /&gt;
=== Configuring an external web server ===&lt;br /&gt;
The built-in web server is also used to serve files that are required by resources running on your server to any player that is connected to your server. For example, if you are running a game script with a scripted graphical user interface, or custom models, these need to be transferred to every connected player in order to function properly. This is done by either the built-in web server, or an external web server (that is usually a bit faster) but needs to be set up separately.&lt;br /&gt;
&lt;br /&gt;
For performance or consistency reasons during the game, you could choose to make use of such an external web server if you have one set up. The external web server needs to be accessible for the public, so any client will be able to download the necessary client-side files in order to join and play on your server.&lt;br /&gt;
&lt;br /&gt;
To enable downloading off an external web server, you should configure the [[Server_mtaserver.conf#httpdownloadurl|httpdownloadurl]] tag in your server configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;padding: 10px&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;	&lt;br /&gt;
&amp;lt;httpdownloadurl&amp;gt;http://www.myserver.tld/directory/here&amp;lt;/httpdownloadurl&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Since all the default resources provided with the dedicated server are zipped, and are normally automatically extracted by the built-in web server, you now have to provide a way for the clients to download the compressed files to their computers. To configure MTA to maintain a copy of only your unzipped client resources, set [[Server_mtaserver.conf#httpautoclientfiles|httpautoclientfiles]] in your server configuration: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;padding: 10px&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;httpautoclientfiles&amp;gt;1&amp;lt;/httpautoclientfiles&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now when you launch the server, the directory '''&amp;lt;SERVER&amp;gt;/mods/deathmatch/resource-cache/http-client-files''' will contain the correct client files for hosting on an external web server. If the web server is on the same machine, you can simply link the appropriate web server directory to '''http-client-files'''. If the web server is on a separate machine, ensure it has access to '''http-client-files''' via a network path, or maintain a remote copy using synchronization software.&lt;br /&gt;
&lt;br /&gt;
'''Note 1''': Please try to avoid any special characters (e.g. ~, !) in your download URLs.&amp;lt;br /&amp;gt;&lt;br /&gt;
'''Note 2''': Please do not use a trailing slash in your download URL (e.g. ''hxxp://www.myserver.tld/directory'' rather than ''hxxp://www.myserver.tld/directory/'')&lt;br /&gt;
&lt;br /&gt;
==Starting your server==&lt;br /&gt;
Begin by making sure that you have finished all configuration of your server, starting your server is the last stage so everything must be ready!&lt;br /&gt;
&lt;br /&gt;
To start your server double click on MTA Server.exe, make sure you allow it through any firewalls and forward ports where necessary.&lt;br /&gt;
&lt;br /&gt;
==Installing/Updating resources on your server==&lt;br /&gt;
Resources can come in two formats, either a ZIP format or just a normal folder with the script files inside it. The MTA:SA server supports both these methods.&lt;br /&gt;
&lt;br /&gt;
# Move or copy the new resource to your &amp;lt;SERVER&amp;gt;\mods\deathmatch\resources folder.&lt;br /&gt;
# In the server window type in the command [[Server_Commands#refresh|refresh]], this will re-scan the resources folder and update the live resources where necessary.&lt;br /&gt;
&lt;br /&gt;
==Uninstalling resources==&lt;br /&gt;
Resources can easily be removed from your server if you no longer want them.&lt;br /&gt;
&lt;br /&gt;
# Delete the ZIP file or the folder of the resource you wish to uninstall&lt;br /&gt;
# In the server window type in the command &amp;quot;refresh&amp;quot; (without the quotes), this will re-scan the resources folder and update the live resources where necessary.&lt;br /&gt;
&lt;br /&gt;
==Administrating your server==&lt;br /&gt;
You can start resources by typing the command &amp;quot;start resourcename&amp;quot; in the server console, or stop ones with &amp;quot;stop resourcename&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
It's also possible to execute these and other admin commands from the in-game console (which you can bring up with the ` key or F8); for this to work, you first need to log in with the command &amp;quot;[[Server_Commands#login|login username password]]&amp;quot;. Additionally, you can press the p key to bring up the admin panel: this is a graphical interface which allows you to easily kick or ban misbehaving players, among others.&lt;br /&gt;
&lt;br /&gt;
For further commands, type [[Server_Commands#help|help]] in a console.&lt;br /&gt;
&lt;br /&gt;
==Starting a map/gamemode==&lt;br /&gt;
See the commands section of the documentation for [[Resource:Map manager|mapmanager]] for more information.&lt;br /&gt;
&lt;br /&gt;
==Useful Notes==&lt;br /&gt;
&lt;br /&gt;
# You may also update the resources while in-game as long as you have the correct access levels by typing &amp;quot;refresh&amp;quot; in the clients console or &amp;quot;/refresh&amp;quot; in the chat window. This may cause a second of lag if you have many resources.&lt;br /&gt;
# In the above instructions, &amp;lt;SERVER&amp;gt; is the path to your server's main directory. In most cases this is C:\Program Files\MTA San Andreas\server&lt;br /&gt;
# You can choose a different config file for the server to use by passing it in the command line after a --config argument, e.g. mtaserver.exe --config anotherconfig.cfg.&lt;br /&gt;
# Do not be alarmed by the warning regarding the parsing of the settings.xml file. This happens because your server installation is still clean and unused.&lt;br /&gt;
&lt;br /&gt;
====Need further help?====&lt;br /&gt;
Why not pop over to our [http://forum.mtasa.com/ Forums] or join us on [irc://irc.multitheftauto.com/mta IRC] (irc.multitheftauto.com #mta - [http://www.mirc.com mIRC])&lt;br /&gt;
&lt;br /&gt;
[[es:Manual Servidor]]&lt;br /&gt;
[[de:Server Anleitung]]&lt;br /&gt;
[[it:Manuale del Server]]&lt;br /&gt;
[[nl:Server Manual]]&lt;br /&gt;
[[ru:Server Manual]]&lt;br /&gt;
[[pl:Server Manual]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Support]]&lt;/div&gt;</summary>
		<author><name>Stanley Sathler .</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=PT-BR/Manual_do_Servidor&amp;diff=31037</id>
		<title>PT-BR/Manual do Servidor</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=PT-BR/Manual_do_Servidor&amp;diff=31037"/>
		<updated>2012-05-20T21:05:19Z</updated>

		<summary type="html">&lt;p&gt;Stanley Sathler .: /* Configurando o servidor */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[PT-BR/Manual_do_Servidor]] &lt;br /&gt;
==Introdução==&lt;br /&gt;
Configurar um servidor e disponibilizá-lo para que seus amigos joguem via Internet ou LAN é mais fácil do que parece. Neste artigo estaremos abordando os passos iniciais para que você possa criar o seu próprio servidor para o MTA.&lt;br /&gt;
&lt;br /&gt;
==Instalando o servidor==&lt;br /&gt;
A primeira parte consiste na instalação do servidor. Abaixo há dois tópicos, abordando a instalação em plataformas Linux e Windows, respectivamente.&lt;br /&gt;
&lt;br /&gt;
===Instalando no Linux===&lt;br /&gt;
Há diversas maneiras de instalar, configurar e iniciar um servidor no Linux:&lt;br /&gt;
* [[Image:iUS.png|Em Inglês|20px]] [[Building MTASA Server on GNU Linux|Configurando um Servidor de MTASA no GNU Linux (Em Inglês)]]&lt;br /&gt;
* [[Image:iUS.png|Em Inglês|20px]] [http://linux.mtasa.com Baixando o servidor para Linux]&lt;br /&gt;
&lt;br /&gt;
===Instalando no Windows===&lt;br /&gt;
Instalar um servidor do MTA:SA no Windows é bem simples:&lt;br /&gt;
:*Vá para [http://mtasa.com/ página de download] do MTA:SA e baixe o instalador.&lt;br /&gt;
:*Após o término do download, execute o arquivo.&lt;br /&gt;
:*Clique em Next e depois em &amp;quot;I Agree&amp;quot;.&lt;br /&gt;
:*Nesta etapa você pode selecionar os componentes que deseja ou não instalar: &lt;br /&gt;
:**Para instalar somente o servidor, mude a opção &amp;quot;Client and Server&amp;quot; para &amp;quot;Server Only&amp;quot;&lt;br /&gt;
:**Next para continuar.&lt;br /&gt;
:*Selecione a pasta na qual deseja instalar o servidor. Em seguida, Next.&lt;br /&gt;
:*Clique em Install.&lt;br /&gt;
:*Pronto!&lt;br /&gt;
&lt;br /&gt;
''Qual a função do arquivo acl.xml (access control list)? Para saber mais, leia o artigo em: &lt;br /&gt;
* [[Image:iUS.png|Em Inglês|20px]] [[Access_Control_List|Access Control List]]''&lt;br /&gt;
&lt;br /&gt;
==Configurando o servidor==&lt;br /&gt;
O servidor dedicado do Multi Theft Auto pode ser configurado através...&lt;br /&gt;
&lt;br /&gt;
*De uma espécie de prompt de comando chamado '''console''', ou seja, um programa onde comandos não são enviados através de cliques, mas sim através de linhas de comando digitadas pelo usuário.&lt;br /&gt;
** Esse programa está localizado em &amp;quot;MTA San Andreas 1.3\server\MTA Server.exe&amp;quot;.&lt;br /&gt;
** Ele é idêntico a janela ''cmd'' do windows.&lt;br /&gt;
** Enquanto este estiver executando, o servidor vai permanecer online, caso contrário, o servidor sai do ar.&lt;br /&gt;
&lt;br /&gt;
*'''Do próprio jogo'''! &lt;br /&gt;
**Os comandos para configurar o servidor são enviados a partir do chat.&lt;br /&gt;
** Para que estes comandos sejam efetivamente enviados, é necessário o uso da &amp;quot;/&amp;quot; antes do comando em si, pois esta identifica que o que vem logo em seguida faz parte de um comando.. Exemplo &amp;quot;/addaccount&amp;quot;.&lt;br /&gt;
*'''De um navegador de internet'''. Um website pode receber informações e configurar um servidor de MTA.&lt;br /&gt;
&lt;br /&gt;
''Para que possa configurar um servidor do MTASA no jogo ou via website é necessário que pelo menos uma conta com privilégios de administrador seja adicionada no '''acl.xml'''.''&lt;br /&gt;
&lt;br /&gt;
===Configurações Gerais===&lt;br /&gt;
Todas as configurações gerais podem ser encontradas no arquivo &amp;quot;[[Server_mtaserver.conf|'''mtaserver.conf''']]&amp;quot; localizado na pasta &amp;quot;mods/deathmatch/&amp;quot;. Este arquivo pode ser visualizado em qualquer editor de texto.&lt;br /&gt;
&lt;br /&gt;
Ele é bem simples e direto, toda variável tem uma [[Server_mtaserver.conf|descrição abordando o que esta faz e como usa-la]].&lt;br /&gt;
&lt;br /&gt;
===Configurando as Portas===&lt;br /&gt;
Caso esteja executando um servidor a partir de seu computador e há um roteador entre a internet e sua máquina, então será necessário configurar 3 portas.&lt;br /&gt;
&lt;br /&gt;
Antes de mais nada, abra o arquivo localizado em &amp;quot;mods/deathmatch/[[Server_mtaserver.conf|'''mtaserver.conf''']]&amp;quot; e procure pelas linhas citadas a seguir:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;serverport&amp;gt;22003&amp;lt;/serverport&amp;gt; &lt;br /&gt;
&amp;lt;httpport&amp;gt;22005&amp;lt;/httpport&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Estas portas são necessárias para que o servidor inicie corretamente. Explicaremos com maiores detalhes mais a frente. &lt;br /&gt;
!Se deseja também que seu servidor apareça na lista de servidores do MTA (Server Browser, no menu), será preciso configurar mais uma porta chamada &amp;quot;ASE&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
(Exemplo de como ativar/desativar a porta ASE):&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;ase&amp;gt;1&amp;lt;/ase&amp;gt; &amp;lt;!-- 0 = desligada, 1 = ligada --&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Agora vamos liberar essas portas em seu roteador. Caso todas as portas estejam abertas ou você possui um roteador sem firewall, esta etapa é desnecessária.&lt;br /&gt;
&lt;br /&gt;
Se você não sabe como abrir portas em seu roteador, visite [http://portforward.com/ este site], procure pelo modelo de seu roteador e siga as instruções.&lt;br /&gt;
&lt;br /&gt;
Na maioria dos roteadores, há a opção de selecionar o tipo de porta: UDP ou TCP. A lista a seguir irá explicar qual porta é necessaria para que ela serve:&lt;br /&gt;
&lt;br /&gt;
Porta principal do servidor: UDP (a porta padrão é 22003, mas você pode alterá-la no parâmetro &amp;lt;serverport&amp;gt; do mtaserver.config)&lt;br /&gt;
Porta HTTP: TCP (a porta padrão é 22005, mas você pode alterá-la no parâmetro &amp;lt;httpport&amp;gt; do mtaserver.config)&lt;br /&gt;
Porta ASE: UDP (esta é necessária caso deseje que o servidor apareça na lista de servidores do gamemonitor.com)&lt;br /&gt;
&lt;br /&gt;
Para configurar a porta ASE, somamos 123 (cento e vinte e três) à porta padrão. Exemplo:&lt;br /&gt;
&lt;br /&gt;
Porta padrão: 22003&lt;br /&gt;
ASE: 22003 + 123 = 22126&lt;br /&gt;
&lt;br /&gt;
Boa sorte!&lt;br /&gt;
&lt;br /&gt;
''Na ultima versão do servidor, ao se digitar o comando &amp;quot;/[[Server_Commands#openports|openports]]&amp;quot;, os status de todas as portas serão mostrados.''&lt;br /&gt;
&lt;br /&gt;
===Client Checks===&lt;br /&gt;
Todo jogador que entra em um servidor passa por várias &amp;quot;avaliações&amp;quot;, também conhecido como &amp;quot;Client Checks&amp;quot; (em inglês).&lt;br /&gt;
Esse processo é necessário, principalmente, para previnir trapaças no jogo, as quais são feitas através de trainers e/ou modificações realizadas nos arquivos originais do GTA SA.&lt;br /&gt;
Toda essas &amp;quot;avaliações&amp;quot; são dividias em diversos parâmetros, os quais são configuráveis através do arquivo [[Server_mtaserver.conf|'''mtaserver.conf''']] localizado em &amp;quot;mods/deathmatch&amp;quot;.&lt;br /&gt;
Destacamos 2 delas como exemplo:&lt;br /&gt;
&lt;br /&gt;
* O parâmetro '''client-file''' ...&lt;br /&gt;
** habilita que um ou mais arquivos possam ser modificados no computador do jogador (exemplo: carmods.dat). Por padrão, o MTA não permite que nenhum arquivo da pasta &amp;quot;data&amp;quot; e &amp;quot;anim&amp;quot; do GTA SA seja modificado.&lt;br /&gt;
** pertênce a um grupo denominado Anti-Cheat, pois, por padrão, ele evita que um ou mais jogadores tenham vantagens sobre os outros. Todos os demais parâmetros que fazem parte desse grupo estão detalhados neste Guia [[Anti-cheat_guide|Anti-Cheat]].&lt;br /&gt;
* O parâmetro '''minclientversion'''...&lt;br /&gt;
** estabelece que todos os jogadores usem uma versão igual ou superior a estipulada (exemplo: 1.3.0).&lt;br /&gt;
** Aqueles que estiverem usando uma versão inferior serão automaticamente desconectados do servidor.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Cada parâmetro contido no arquivo [[Server_mtaserver.conf|'''mtaserver.conf''']] tem um valor atribuido a ele. O que faz que o servidor iginore ou aja de forma diferente ao relaziar essas avaliações em cada jogador.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--If you want to force a minimum client version, search for the following line:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;minclientversion&amp;gt;&amp;lt;/minclientversion&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Accepted values look like: 1.1.1-9.02320&lt;br /&gt;
&lt;br /&gt;
===Adding administrators===&lt;br /&gt;
It is strongly recommended to add at least one administrator to your server in order to make use of the built-in webserver to easily maintain and configure your server. This administrator will then also be able to log-in from within the game and control the server.&lt;br /&gt;
&lt;br /&gt;
To add an administrator to your server, follow these steps:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;While the server is running, add a new account by typing '''[[Server_Commands#addaccount|addaccount name password]]''' into the server window. For example, to add user BennyLava you could type:&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin: 10px 10px 10px 10px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
addaccount BennyLava 123password&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin: 10px 10px 10px 20px;&amp;quot;&amp;gt;&lt;br /&gt;
''Note: If you do not have access to the server window, and the 'admin' resource is running, you can add  the example account by issuing the chatbox command '''/register BennyLava 123password'''''&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The server should display a message confirming the account has been added.&lt;br /&gt;
&amp;lt;li&amp;gt;Next, shutdown the server by typing '''shutdown''' into the server window.&lt;br /&gt;
&amp;lt;li&amp;gt;Make sure your server is stopped; if your server is still running, the following changes you make will be overwritten&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Open the file 'mods/deathmatch/'acl.xml'''' with any text editor&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Add the account to the ''Admin'' group by using the XML-syntax below&lt;br /&gt;
&amp;lt;div style=&amp;quot;padding: 10px&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;acl&amp;gt;&lt;br /&gt;
  ...&lt;br /&gt;
  &amp;lt;group name=&amp;quot;Admin&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;acl name=&amp;quot;Admin&amp;quot;/&amp;gt;&lt;br /&gt;
    ...&lt;br /&gt;
    &amp;lt;object name=&amp;quot;user.BennyLava&amp;quot; /&amp;gt;&lt;br /&gt;
  &amp;lt;/group&amp;gt;&lt;br /&gt;
  ...&lt;br /&gt;
&amp;lt;/acl&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can actually add your user to any group you want. Each group is linked to an ACL ([[Access Control List]]). Each ACL contains a series of specific allowed or denied rights. These groups exist so different users can be assigned different rights. The ''Admin'' group points to the ''Admin'' ACL, which is empty (thus allowing all possible commands). The ''Everyone'' group points to the ''Default'' ACL that puts a series of restrictions on the available commands (to disallow regular players from using admin commands).&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
You're done! You can add as many administrators or users as you want this way, take a look at some of the other groups and ACLs for example. The ACL is also accessible through the [[Access_Control_List|Lua scripting engine]].&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is recommended to take a look at the web interface, we will explain how to do this below.&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
'''Note''': There are also ways to add accounts and edit rights for the server while it's running. &amp;quot;[[Server_Commands#addaccount|addaccount &amp;lt;user&amp;gt; &amp;lt;password&amp;gt;]]&amp;quot; is an internal command to add accounts, but you will have to use the web interface to add these accounts to specific groups/ACLs!&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Using the web interface===&lt;br /&gt;
The dedicated server comes with a few Lua [[resources]] that provide a nice little web interface to your server. This can be used to easily maintain your server, as it allows you to add users, start/stop resources, and more.&lt;br /&gt;
&lt;br /&gt;
The web interface resources are enabled by default and are served through the built-in HTTP web server. To make sure the built-in HTTP web server runs on a port you like (22005 by default), follow these steps:&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Make sure your server is stopped&lt;br /&gt;
&amp;lt;li&amp;gt;Open the file 'mods/deathmatch/[[Server_mtaserver.conf|'''mtaserver.conf''']]' with any text editor&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Verify that the HTTP server is enabled:&lt;br /&gt;
&amp;lt;div style=&amp;quot;padding: 10px&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;httpserver&amp;gt;1&amp;lt;/httpserver&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Change the HTTP server port to your liking:&lt;br /&gt;
&amp;lt;div style=&amp;quot;padding: 10px&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;httpport&amp;gt;22005&amp;lt;/httpport&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Save and close the configuration file&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Start your server&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If you happened to have changed the start-up resources in your configuration file, make sure the following resources are started:&lt;br /&gt;
&lt;br /&gt;
# resourcebrowser&lt;br /&gt;
# resourcemanager&lt;br /&gt;
# webadmin&lt;br /&gt;
# webmap&lt;br /&gt;
&lt;br /&gt;
These are automatically started in the default configuration file, in case you just installed your server.&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Open a web browser (Internet Explorer 6 or 7 are NOT supported; use [http://www.mozilla.com/firefox Mozilla Firefox], [http://www.google.com/chrome Google Chrome], [http://www.apple.com/safari/download Apple Safari], [http://www.opera.com Opera] or others) and navigate to the HTTP server URL: '''http://server:port/'''. For example, If you are running a local server on HTTP port 22005, use '''http://127.0.0.1:22005/'''.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Enter the username and password of the administrator you added in the previous section.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
You should now be able to maintain your server from the web interface.&lt;br /&gt;
&lt;br /&gt;
=== Configuring an external web server ===&lt;br /&gt;
The built-in web server is also used to serve files that are required by resources running on your server to any player that is connected to your server. For example, if you are running a game script with a scripted graphical user interface, or custom models, these need to be transferred to every connected player in order to function properly. This is done by either the built-in web server, or an external web server (that is usually a bit faster) but needs to be set up separately.&lt;br /&gt;
&lt;br /&gt;
For performance or consistency reasons during the game, you could choose to make use of such an external web server if you have one set up. The external web server needs to be accessible for the public, so any client will be able to download the necessary client-side files in order to join and play on your server.&lt;br /&gt;
&lt;br /&gt;
To enable downloading off an external web server, you should configure the [[Server_mtaserver.conf#httpdownloadurl|httpdownloadurl]] tag in your server configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;padding: 10px&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;	&lt;br /&gt;
&amp;lt;httpdownloadurl&amp;gt;http://www.myserver.tld/directory/here&amp;lt;/httpdownloadurl&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Since all the default resources provided with the dedicated server are zipped, and are normally automatically extracted by the built-in web server, you now have to provide a way for the clients to download the compressed files to their computers. To configure MTA to maintain a copy of only your unzipped client resources, set [[Server_mtaserver.conf#httpautoclientfiles|httpautoclientfiles]] in your server configuration: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;padding: 10px&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;httpautoclientfiles&amp;gt;1&amp;lt;/httpautoclientfiles&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now when you launch the server, the directory '''&amp;lt;SERVER&amp;gt;/mods/deathmatch/resource-cache/http-client-files''' will contain the correct client files for hosting on an external web server. If the web server is on the same machine, you can simply link the appropriate web server directory to '''http-client-files'''. If the web server is on a separate machine, ensure it has access to '''http-client-files''' via a network path, or maintain a remote copy using synchronization software.&lt;br /&gt;
&lt;br /&gt;
'''Note 1''': Please try to avoid any special characters (e.g. ~, !) in your download URLs.&amp;lt;br /&amp;gt;&lt;br /&gt;
'''Note 2''': Please do not use a trailing slash in your download URL (e.g. ''hxxp://www.myserver.tld/directory'' rather than ''hxxp://www.myserver.tld/directory/'')&lt;br /&gt;
&lt;br /&gt;
==Starting your server==&lt;br /&gt;
Begin by making sure that you have finished all configuration of your server, starting your server is the last stage so everything must be ready!&lt;br /&gt;
&lt;br /&gt;
To start your server double click on MTA Server.exe, make sure you allow it through any firewalls and forward ports where necessary.&lt;br /&gt;
&lt;br /&gt;
==Installing/Updating resources on your server==&lt;br /&gt;
Resources can come in two formats, either a ZIP format or just a normal folder with the script files inside it. The MTA:SA server supports both these methods.&lt;br /&gt;
&lt;br /&gt;
# Move or copy the new resource to your &amp;lt;SERVER&amp;gt;\mods\deathmatch\resources folder.&lt;br /&gt;
# In the server window type in the command [[Server_Commands#refresh|refresh]], this will re-scan the resources folder and update the live resources where necessary.&lt;br /&gt;
&lt;br /&gt;
==Uninstalling resources==&lt;br /&gt;
Resources can easily be removed from your server if you no longer want them.&lt;br /&gt;
&lt;br /&gt;
# Delete the ZIP file or the folder of the resource you wish to uninstall&lt;br /&gt;
# In the server window type in the command &amp;quot;refresh&amp;quot; (without the quotes), this will re-scan the resources folder and update the live resources where necessary.&lt;br /&gt;
&lt;br /&gt;
==Administrating your server==&lt;br /&gt;
You can start resources by typing the command &amp;quot;start resourcename&amp;quot; in the server console, or stop ones with &amp;quot;stop resourcename&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
It's also possible to execute these and other admin commands from the in-game console (which you can bring up with the ` key or F8); for this to work, you first need to log in with the command &amp;quot;[[Server_Commands#login|login username password]]&amp;quot;. Additionally, you can press the p key to bring up the admin panel: this is a graphical interface which allows you to easily kick or ban misbehaving players, among others.&lt;br /&gt;
&lt;br /&gt;
For further commands, type [[Server_Commands#help|help]] in a console.&lt;br /&gt;
&lt;br /&gt;
==Starting a map/gamemode==&lt;br /&gt;
See the commands section of the documentation for [[Resource:Map manager|mapmanager]] for more information.&lt;br /&gt;
&lt;br /&gt;
==Useful Notes==&lt;br /&gt;
&lt;br /&gt;
# You may also update the resources while in-game as long as you have the correct access levels by typing &amp;quot;refresh&amp;quot; in the clients console or &amp;quot;/refresh&amp;quot; in the chat window. This may cause a second of lag if you have many resources.&lt;br /&gt;
# In the above instructions, &amp;lt;SERVER&amp;gt; is the path to your server's main directory. In most cases this is C:\Program Files\MTA San Andreas\server&lt;br /&gt;
# You can choose a different config file for the server to use by passing it in the command line after a --config argument, e.g. mtaserver.exe --config anotherconfig.cfg.&lt;br /&gt;
# Do not be alarmed by the warning regarding the parsing of the settings.xml file. This happens because your server installation is still clean and unused.&lt;br /&gt;
&lt;br /&gt;
====Need further help?====&lt;br /&gt;
Why not pop over to our [http://forum.mtasa.com/ Forums] or join us on [irc://irc.multitheftauto.com/mta IRC] (irc.multitheftauto.com #mta - [http://www.mirc.com mIRC])&lt;br /&gt;
&lt;br /&gt;
[[es:Manual Servidor]]&lt;br /&gt;
[[de:Server Anleitung]]&lt;br /&gt;
[[it:Manuale del Server]]&lt;br /&gt;
[[nl:Server Manual]]&lt;br /&gt;
[[ru:Server Manual]]&lt;br /&gt;
[[pl:Server Manual]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Support]]&lt;/div&gt;</summary>
		<author><name>Stanley Sathler .</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=P%C3%A1gina_Inicial&amp;diff=31036</id>
		<title>Página Inicial</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=P%C3%A1gina_Inicial&amp;diff=31036"/>
		<updated>2012-05-20T20:53:19Z</updated>

		<summary type="html">&lt;p&gt;Stanley Sathler .: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| width=&amp;quot;100%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;0&amp;quot;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px solid #D8D8D8; padding: 5px; height: 130px;&amp;quot;&amp;gt;&lt;br /&gt;
[[File:Mtalogo.png|left|100px]]'''Bem Vindo ao Multi Theft Auto wiki em Português.''' Aqui você encontra toda a informação sobre o uso do Multi Theft Auto.&lt;br /&gt;
&lt;br /&gt;
Há muitas [[How you can help|coisas em que você pode nos ajudar]] para melhorar o MTA, como criar um mapa, um modo de jogo (gamemode), documentar as funções de programação, escrever códigos como exemplo, fazer tutoriais ou somente jogar o MTA e reportar falhas/bugs que encontrar.&lt;br /&gt;
&lt;br /&gt;
Se você tem alguma pergunta ou problema em relação à programação, sinta-se a vontade para nos comunicar em nosso [[IRC Channel|Canal IRC]].&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;[ Stop playing with yourself ]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
{| width=&amp;quot;100%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;0&amp;quot;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |&lt;br /&gt;
|-&lt;br /&gt;
|width=&amp;quot;50%&amp;quot; style=&amp;quot;vertical-align:top;&amp;quot; |&amp;lt;div style=&amp;quot;border: 1px solid #D8D8D8; padding:4px 8px 8px 8px; margin:10px; background: #FFFCF2;&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|link=]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Jogar&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;background: #FFEEAA; border: 1px solid #FFCD19;&amp;quot;&amp;gt;&lt;br /&gt;
[[File:Go-down.png|link=http://mtasa.com/]] ''' [http://mtasa.com/ Download Multi Theft Auto: San Andreas {{Current Version|full}}]'''&amp;lt;/div&amp;gt;&lt;br /&gt;
* [[Image:iBR.png|Em Português|20px]] [[PT-BR/Manual_do_Cliente|Manual do Cliente]]&lt;br /&gt;
* [[Image:iUS.png|Em Inglês|20px]] [[Changes_in_{{padleft:|3|{{Current Version|full}}}}| Mudanças na versão {{padleft:|3|{{Current Version|full}}}}]]&lt;br /&gt;
* [[Image:iBR.png|Em Português|20px]] [[PT-BR/Soluções_de_Problemas_-_FAQ|Solução de Problemas (FAQ)]]&lt;br /&gt;
* [[Image:iUS.png|Em Inglês|20px]] [[Upgrading_from_MTA:Race|Migrando do MTA:Race ao MTA:SA {{padleft:|3|{{Current Version|full}}}}]]&lt;br /&gt;
* [[Image:iUS.png|Em Inglês|20px]] [[Server Manual|Manual do Servidor]]&lt;br /&gt;
* [[Image:iUS.png|Em Inglês|20px]] [[Map manager|Map Manager]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Editor de Mapas&amp;lt;/h3&amp;gt;&lt;br /&gt;
* [[Image:iUS.png|Em Inglês|20px]] [[Resource:Editor|Manual do Editor]]&lt;br /&gt;
* [[Image:iUS.png|Em Inglês|20px]] [[Resource:Editor/EDF|Formato de Definições do Editor (EDF)]]&lt;br /&gt;
* [[Image:iUS.png|Em Inglês|20px]] [[Resource:Editor/Plugins|Extensões para o Editor]]&lt;br /&gt;
* [[Image:iUS.png|Em Inglês|20px]] [[Resource:Editor#FAQ|Perguntas Frequentes]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px solid #D8D8D8; padding:4px 8px 8px 8px; margin:10px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;float:right; width: 32px;&amp;quot;&amp;gt;[[File:Package-x-generic.png|link=]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Banco de Dados&amp;lt;/h3&amp;gt;&lt;br /&gt;
Esta sessão abrange todo tipo de conteúdo referente à scripts em LUA e recursos para o MTA.&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]] [[:Category:Resource|Catálogo de Recursos]] - Ótimos exemplos para aprender à programar com eficiência.&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]] [[Client side scripts|Scripts do Cliente]]&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]] [[Modules|Módulos]]&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|link=]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Desenvolvendo o Multi Theft Auto&amp;lt;/h3&amp;gt;&lt;br /&gt;
[[File:Go-down.png|link=http://nightly.mtasa.com/]] [http://nightly.mtasa.com/ Nightly builds]&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]]  [[Compiling_MTASA|Compilando o MTASA no Windows]]&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]]  [[Building_MTASA_Server_on_Mac_OS_X|Compilando o MTASA no Mac OS X]]&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]]  [[Building_MTASA_Server_on_GNU_Linux|Compilando o MTASA no GNU/Linux]]&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]]  [[Coding guidelines|Guia do Desenvolvedor]]&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]]  [http://code.google.com/p/mtasa-blue Google Code SVN]&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]]  [[Roadmap|Roteiro para versões futuras]]&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]]  [http://bugs.mtasa.com/ Bugtracker Central de Bugs]&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|link=]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Wiki - Como você pode ajudar&amp;lt;/h3&amp;gt;&lt;br /&gt;
* Terminar os documentários de [[:Category:Incomplete|funções incompletas]].&lt;br /&gt;
* [[:Category:Needs_Example |Adicionar exemplos para funções e eventos]].&lt;br /&gt;
* Revisar e verificar as [[:Category:Needs Checking|páginas que necessitam de revisão]].&lt;br /&gt;
* Escrever tutoriais para ajudar novatos.&lt;br /&gt;
* Traduzir as páginas do 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|link=]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Comunidade&amp;lt;/h3&amp;gt;&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]] [http://forum.multitheftauto.com/ Forum]&lt;br /&gt;
* [[Image:iBR.png|Em Português|20px]] [http://forum.multitheftauto.com/viewforum.php?f=120&amp;amp;sid=79576f41173f69a47135647007d58d64 Fórum em Português]&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]] IRC: [irc://irc.multitheftauto.com/mta irc.multitheftauto.com #mta]&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]] [http://community.mtasa.com/ MTA Community] - Compartilhe e baixe recursos.&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]] [http://twitter.com/#!/MTAQA/ Twitter] - [http://www.youtube.com/user/MTAQA Youtube] - [http://plus.google.com/102014133442331779727/ Google+] - [http://www.moddb.com/mods/multi-theft-auto-san-andreas ModDB]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
| width=&amp;quot;50%&amp;quot; style=&amp;quot;vertical-align:top;&amp;quot; |&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px solid #D8D8D8; padding:4px 8px 8px 8px; margin:10px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;float:right; width: 32px;&amp;quot;&amp;gt;[[File:Accessories-text-editor.png|link=]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Scripting&amp;lt;/h3&amp;gt;&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]] [[Scripting Introduction|Introdução ao Scripting]]&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]] [[Introduction to Scripting the GUI|Introdução ao GUI Scripting]]&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]] [[Debugging|Depuração]] - Como achar erros em seus Scripts&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]] [[Resources|Introdução aos Recursos]]&lt;br /&gt;
** [[File:iUS.png|Em Inglês|20px]] [[Resource Web Access| Acesso Web via Recursos ]] - Como fazemos páginas de internet via recursos&lt;br /&gt;
** [[File:iUS.png|Em Inglês|20px]] [[:Category:Resource|Catálogo de Recursos]]&lt;br /&gt;
** [[File:iUS.png|Em Inglês|20px]] [[Meta.xml|O arquivo meta.xml]] - Dentro de cada recurso, há um arquivo chamado meta o indentificando&lt;br /&gt;
** [[File:iUS.png|Em Inglês|20px]] [[ACL]] - Access Control List, isto é importantíssimo para scripts complexos funcionarem&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]] [[Writing_Gamemodes|Programando um modo de Jogo]]&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]] [[Useful_Functions|Funções úteis]]&lt;br /&gt;
&amp;lt;div style=&amp;quot;float:right; width: 32px;&amp;quot;&amp;gt;[[File:start-here.png|link=]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Ajuda geral em Lua&amp;lt;/h3&amp;gt;&lt;br /&gt;
Páginas criadas para ajudar à entender o Lua&lt;br /&gt;
* [[Image:iBR.png|Em Português|20px]] [http://www.lua.org/portugues.html Introdução a linguagem Lua]&lt;br /&gt;
* [[Image:iBR.png|Em Português|20px]] [http://www.lua.org/manual/5.1/pt/ Manual &amp;quot;Programando em Lua&amp;quot;]&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]] [http://lua-users.org/wiki/TutorialDirectory Lua Wiki em inglês]&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]] [http://nixstaller.berlios.de/manual/0.2/nixstaller_9.html Um Guia geral de Nixstaller]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px solid #D8D8D8; padding:4px 8px 8px 8px; margin:10px; background:#F2F2FF;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;float:right; width: 32px;&amp;quot;&amp;gt;[[File:Preferences-system.png|link=]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;Referência&amp;lt;/h3&amp;gt;&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]] [[Client Scripting Functions|Funções do Cliente]]&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]] [[Client Scripting Events|Eventos do Cliente]]&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]] [[Server Scripting Functions|Funções do Servidor]]&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]] [[Server Scripting Events|Eventos do Servidor]]&lt;br /&gt;
&amp;lt;!-- Incomplete * [[Module functions|Server-side external module scripting functions list]] --&amp;gt;&lt;br /&gt;
* [[File:iUS.png|Em Inglês|20px]] [[MTA Classes]] - Descrições detalhadas de todos os tipos de coisas que o MTA usa&lt;br /&gt;
** [[File:iUS.png|Em Inglês|20px]] [[Element|Elementos do MTA]] / [[Element tree|Hierarquia dos Elementos]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px solid #D8D8D8; padding:4px 8px 8px 8px; margin:10px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;float:right; width: 32px;&amp;quot;&amp;gt;[[File:System-file-manager.png|link=]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;h3&amp;gt;[[Id|Lista de ID's]]&amp;lt;/h3&amp;gt;&lt;br /&gt;
*[[Animations|Animações]]&lt;br /&gt;
*[[Character Skins|Skins de Pedestres]]&lt;br /&gt;
*[[CJ_Clothes|Roupas do CJ]]&lt;br /&gt;
*[[Garage|Garagens]]&lt;br /&gt;
*[[Interior IDs|Interiores]]&lt;br /&gt;
*[[Material IDs|Materiais]]&lt;br /&gt;
*[[Projectiles|Projéteis]]&lt;br /&gt;
*[[Radar Blips|Ponteiros do Radar]]&lt;br /&gt;
*[[Sounds|Efeitos Sonoros]]&lt;br /&gt;
*[[Vehicle IDs|Veículos]]&lt;br /&gt;
*[[Vehicle Colors|Cores para Veículos]]&lt;br /&gt;
*[[Vehicle Upgrades|Asessórios para Veículos]]&lt;br /&gt;
*[[Vehicle variants|Vehicle Variants]]&lt;br /&gt;
*[[Weapons|Armas]]&lt;br /&gt;
*[[Weather|Climas]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px dotted #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:pBR.png|32px]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Sobre a Tradução&amp;lt;/h3&amp;gt;&lt;br /&gt;
* Tradutores:&lt;br /&gt;
** &amp;lt;span style=&amp;quot;color: blue&amp;quot;&amp;gt;RaceXtreme&amp;lt;/span&amp;gt;&lt;br /&gt;
** &amp;lt;span style=&amp;quot;color: blue&amp;quot;&amp;gt;StanleySathler&amp;lt;/span&amp;gt;&lt;br /&gt;
É importante que todos colaborem para que nossa página em português fique melhor a cada dia!&lt;br /&gt;
&lt;br /&gt;
[[File:Osi symbol.png|75px|link=http://opensource.org/]]&lt;br /&gt;
'''Multi Theft Auto''' é um projeto '''Open Source'''. &amp;lt;br&amp;gt;&lt;br /&gt;
Isso significa que todos nós podemos contribuir para fazer um Multi Theft Auto muito melhor!&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |&lt;br /&gt;
|}&lt;br /&gt;
{| width=&amp;quot;100%&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;0&amp;quot;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |&lt;br /&gt;
&amp;lt;div style=&amp;quot;padding-left: 15px; padding-right: 15px;&amp;quot; class=&amp;quot;plainlinks&amp;quot;&amp;gt;&lt;br /&gt;
[[File:MTALogo_8ball.png|left|85px|link=Archive]]&lt;br /&gt;
&amp;lt;ul style=&amp;quot;list-style: none; width: 200px; float: left;&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;'''Sobre Multi Theft Auto'''&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;[[Archive|Museu]]&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;[[Press Coverage|Eventos]]&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;[http://code.google.com/p/mtasa-blue/people/list Desenvolvedores]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;ul style=&amp;quot;list-style: none; width: 200px; float: left;&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;'''Multi Theft Auto 0.5'''&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;[[Archive#Multi_Theft_Auto_0.5|Download]]&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;[[MTA 0.5r2 Known Issues|Solução de Problemas]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;ul style=&amp;quot;list-style: none; width: 200px; float: left;&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;'''Status do Wiki'''&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;{{NUMBEROFARTICLES}} Artigos&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;{{NUMBEROFPAGES}} Páginas&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;{{NUMBEROFUSERS}} Usuários Registrados&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;br /&gt;
__NOEDITSECTION__&lt;br /&gt;
{{Languages list|pt-br}}&lt;/div&gt;</summary>
		<author><name>Stanley Sathler .</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=PT-BR/Manual_do_Servidor&amp;diff=31035</id>
		<title>PT-BR/Manual do Servidor</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=PT-BR/Manual_do_Servidor&amp;diff=31035"/>
		<updated>2012-05-20T20:50:03Z</updated>

		<summary type="html">&lt;p&gt;Stanley Sathler .: /* Instalando o servidor */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[PT-BR/Manual_do_Servidor]] &lt;br /&gt;
==Introdução==&lt;br /&gt;
Configurar um servidor e disponibilizá-lo para que seus amigos joguem via Internet ou LAN é mais fácil do que parece. Neste artigo estaremos abordando os passos iniciais para que você possa criar o seu próprio servidor para o MTA.&lt;br /&gt;
&lt;br /&gt;
==Instalando o servidor==&lt;br /&gt;
A primeira parte consiste na instalação do servidor. Abaixo há dois tópicos, abordando a instalação em plataformas Linux e Windows, respectivamente.&lt;br /&gt;
&lt;br /&gt;
===Instalando no Linux===&lt;br /&gt;
Há diversas maneiras de instalar, configurar e iniciar um servidor no Linux:&lt;br /&gt;
* [[Image:iUS.png|Em Inglês|20px]] [[Building MTASA Server on GNU Linux|Configurando um Servidor de MTASA no GNU Linux (Em Inglês)]]&lt;br /&gt;
* [[Image:iUS.png|Em Inglês|20px]] [http://linux.mtasa.com Baixando o servidor para Linux]&lt;br /&gt;
&lt;br /&gt;
===Instalando no Windows===&lt;br /&gt;
Instalar um servidor do MTA:SA no Windows é bem simples:&lt;br /&gt;
:*Vá para [http://mtasa.com/ página de download] do MTA:SA e baixe o instalador.&lt;br /&gt;
:*Após o término do download, execute o arquivo.&lt;br /&gt;
:*Clique em Next e depois em &amp;quot;I Agree&amp;quot;.&lt;br /&gt;
:*Nesta etapa você pode selecionar os componentes que deseja ou não instalar: &lt;br /&gt;
:**Para instalar somente o servidor, mude a opção &amp;quot;Client and Server&amp;quot; para &amp;quot;Server Only&amp;quot;&lt;br /&gt;
:**Next para continuar.&lt;br /&gt;
:*Selecione a pasta na qual deseja instalar o servidor. Em seguida, Next.&lt;br /&gt;
:*Clique em Install.&lt;br /&gt;
:*Pronto!&lt;br /&gt;
&lt;br /&gt;
''Qual a função do arquivo acl.xml (access control list)? Para saber mais, leia o artigo em: &lt;br /&gt;
* [[Image:iUS.png|Em Inglês|20px]] [[Access_Control_List|Access Control List]]''&lt;br /&gt;
&lt;br /&gt;
==Configurando o servidor==&lt;br /&gt;
O servidor dedicado do Multi Theft Auto pode ser configurado através...&lt;br /&gt;
&lt;br /&gt;
*De uma espécie de prompt de comando chamado '''console''', ou seja, um programa onde comandos não são enviados através de cliques, mas sim através de linhas digitadas pelo usuario.&lt;br /&gt;
** Esse programa está localizado em &amp;quot;MTA San Andreas 1.3\server\MTA Server.exe&amp;quot;.&lt;br /&gt;
** Ele é identico a janela ''cmd'' do windows.&lt;br /&gt;
** Enquanto este estiver execultando, o servidor vai permanecer online, caso contrário, o servidor sai do ar.&lt;br /&gt;
*'''Do prório jogo'''! &lt;br /&gt;
**Os comandos para configurar o servidor são enviados a partir do chat.&lt;br /&gt;
** Para que estes comandos sejam efetivamente enviados, é necessário o uso da &amp;quot;/&amp;quot; antes do comando em si, pois esta identifica que o que vem logo em seguida faz parte de um comando.. Exemplo &amp;quot;/addaccount&amp;quot;.&lt;br /&gt;
*'''De um navegador de internet'''. Um website pode receber informações e configurar um servidor de MTA.&lt;br /&gt;
&lt;br /&gt;
''Para que possa configurar um servidor do MTASA no jogo ou via website é necessário que pelomenos uma conta com privilégios de administrador seja adicionada no '''acl.xml'''.''&lt;br /&gt;
&lt;br /&gt;
===Configuração Geral===&lt;br /&gt;
Todas as configurações gerais podem ser encontradas no arquivo &amp;quot;[[Server_mtaserver.conf|'''mtaserver.conf''']]&amp;quot; localizado na pasta &amp;quot;mods/deathmatch/&amp;quot;. Este arquivo pode ser visualizado em qualquer editor de texto.&lt;br /&gt;
&lt;br /&gt;
Ele é bem simples e direto, toda variável tem uma [[Server_mtaserver.conf|descrição abordando o que esta faz e como usa-la]].&lt;br /&gt;
&lt;br /&gt;
===Port forwarding===&lt;br /&gt;
&lt;br /&gt;
Se você execulta um servidor em seu computador e há um roteador entre a internet e seu computador, então você tem que configurar 3 portas.&lt;br /&gt;
If you run your server on your own private computer, and you have an router between the internet and your computer. You need to forward 3 ports.&lt;br /&gt;
&lt;br /&gt;
Antes de mais nada, abra o arquivo localizado em &amp;quot;mods/deathmatch/[[Server_mtaserver.conf|'''mtaserver.conf''']]&amp;quot; e procure pelas linhas citadas a seguir:&lt;br /&gt;
First of all open the file 'mods/deathmatch/[[Server_mtaserver.conf|'''mtaserver.conf''']]' and search for the next lines:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;serverport&amp;gt;22004&amp;lt;/serverport&amp;gt; &lt;br /&gt;
&amp;lt;httpport&amp;gt;22005&amp;lt;/httpport&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Estas portas são necessárias para que o servidor inicie corretamente. Explicaremos como configura-las mais adiante. &lt;br /&gt;
!Mas se primeiro desejas que o servidor apareça no navegador de internet, então precisaremos configurar mais uma porta chamada ASE.&lt;br /&gt;
The ports are needed to setup the server correctly. We explain later how to set them, but first if you want your server to appear in the server browser there is another port we need, and that is the ASE port. &lt;br /&gt;
(um simples exemplo de como ligar e desligar a porta ASE):&lt;br /&gt;
(quick example for how to turn ASE on or off):&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;ase&amp;gt;1&amp;lt;/ase&amp;gt; &amp;lt;!-- 0 = desligada, 1 = ligada --&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Agora vamos liberar essas portas em seu roteador. Caso todas as portas estejam abertas ou você possui um roteador sem firewall, esta etapa é desnecessária.&lt;br /&gt;
Now we going to forward the ports in your router, which is not needed if you already have all ports open, or if you don't have a router with a firewall. If so, skip this part.&lt;br /&gt;
&lt;br /&gt;
Se você não sabe como port forwarding funciona em seu roteador, viste [http://portforward.com/ este site], procure pelo modelo de seu roteador e siga as instruções.&lt;br /&gt;
If you don't know how port forwarding works in your router, go to the [http://portforward.com/ Port Forward website], find your router model there, and follow the instructions there.&lt;br /&gt;
&lt;br /&gt;
Na maioria dos roteadores, há a opção de selecionar o tipo de porta: UDP ou TCP. A lista a seguir irá explicar qual porta é necessaria para o que:&lt;br /&gt;
In almost every router you can set the port type: UDP or TCP. The following list will explain which port type is needed for what:&lt;br /&gt;
&lt;br /&gt;
Porta principal do servidor: UDP&lt;br /&gt;
Main server port: UDP&lt;br /&gt;
&lt;br /&gt;
Porta HTTP: TCP&lt;br /&gt;
HTTP Port: TCP&lt;br /&gt;
&lt;br /&gt;
Porta ASE: UDP (esta é necessária caso deseje que o servidor apareça na lista de servidores do gamemonitor.com).&lt;br /&gt;
ASE Port: UDP (this is needed if you want your server to appear in the server list)&lt;br /&gt;
&lt;br /&gt;
A porta ASE é simples para se obter:&lt;br /&gt;
The ASE port is also simple to get:&lt;br /&gt;
&lt;br /&gt;
Porta ASE = Porta principal do servidor + 123&lt;br /&gt;
ASE port = Main server port + 123&lt;br /&gt;
&lt;br /&gt;
Então se a porta de seu servidor for 22003, então a porta ASE será no caso 22126.&lt;br /&gt;
So, if you have the main server port set to 22003, then the ASE port will be 22126.&lt;br /&gt;
&lt;br /&gt;
Boa Sorte!&lt;br /&gt;
&lt;br /&gt;
''Na ultima versão do servidor, ao se digitar o comando &amp;quot;/[[Server_Commands#openports|openports]]&amp;quot;, os status de todas as portas serão mostrados.''&lt;br /&gt;
''In the latest version of the server, you can check the port status by using the server command [[Server_Commands#openports|openports]].''&lt;br /&gt;
&lt;br /&gt;
===Client Checks===&lt;br /&gt;
Todo jogador que entra em um servidor passa por várias &amp;quot;avaliações&amp;quot;, também conhecido como &amp;quot;Client Checks&amp;quot; (em inglês).&lt;br /&gt;
Esse processo é necessário, principalmente, para previnir trapaças no jogo, as quais são feitas através de trainers e/ou modificações realizadas nos arquivos originais do GTA SA.&lt;br /&gt;
Toda essas &amp;quot;avaliações&amp;quot; são dividias em diversos parâmetros, os quais são configuráveis através do arquivo [[Server_mtaserver.conf|'''mtaserver.conf''']] localizado em &amp;quot;mods/deathmatch&amp;quot;.&lt;br /&gt;
Destacamos 2 delas como exemplo:&lt;br /&gt;
&lt;br /&gt;
* O parâmetro '''client-file''' ...&lt;br /&gt;
** habilita que um ou mais arquivos possam ser modificados no computador do jogador (exemplo: carmods.dat). Por padrão, o MTA não permite que nenhum arquivo da pasta &amp;quot;data&amp;quot; e &amp;quot;anim&amp;quot; do GTA SA seja modificado.&lt;br /&gt;
** pertênce a um grupo denominado Anti-Cheat, pois, por padrão, ele evita que um ou mais jogadores tenham vantagens sobre os outros. Todos os demais parâmetros que fazem parte desse grupo estão detalhados neste Guia [[Anti-cheat_guide|Anti-Cheat]].&lt;br /&gt;
* O parâmetro '''minclientversion'''...&lt;br /&gt;
** estabelece que todos os jogadores usem uma versão igual ou superior a estipulada (exemplo: 1.3.0).&lt;br /&gt;
** Aqueles que estiverem usando uma versão inferior serão automaticamente desconectados do servidor.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Cada parâmetro contido no arquivo [[Server_mtaserver.conf|'''mtaserver.conf''']] tem um valor atribuido a ele. O que faz que o servidor iginore ou aja de forma diferente ao relaziar essas avaliações em cada jogador.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--If you want to force a minimum client version, search for the following line:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;minclientversion&amp;gt;&amp;lt;/minclientversion&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Accepted values look like: 1.1.1-9.02320&lt;br /&gt;
&lt;br /&gt;
===Adding administrators===&lt;br /&gt;
It is strongly recommended to add at least one administrator to your server in order to make use of the built-in webserver to easily maintain and configure your server. This administrator will then also be able to log-in from within the game and control the server.&lt;br /&gt;
&lt;br /&gt;
To add an administrator to your server, follow these steps:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;While the server is running, add a new account by typing '''[[Server_Commands#addaccount|addaccount name password]]''' into the server window. For example, to add user BennyLava you could type:&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin: 10px 10px 10px 10px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
addaccount BennyLava 123password&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin: 10px 10px 10px 20px;&amp;quot;&amp;gt;&lt;br /&gt;
''Note: If you do not have access to the server window, and the 'admin' resource is running, you can add  the example account by issuing the chatbox command '''/register BennyLava 123password'''''&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The server should display a message confirming the account has been added.&lt;br /&gt;
&amp;lt;li&amp;gt;Next, shutdown the server by typing '''shutdown''' into the server window.&lt;br /&gt;
&amp;lt;li&amp;gt;Make sure your server is stopped; if your server is still running, the following changes you make will be overwritten&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Open the file 'mods/deathmatch/'acl.xml'''' with any text editor&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Add the account to the ''Admin'' group by using the XML-syntax below&lt;br /&gt;
&amp;lt;div style=&amp;quot;padding: 10px&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;acl&amp;gt;&lt;br /&gt;
  ...&lt;br /&gt;
  &amp;lt;group name=&amp;quot;Admin&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;acl name=&amp;quot;Admin&amp;quot;/&amp;gt;&lt;br /&gt;
    ...&lt;br /&gt;
    &amp;lt;object name=&amp;quot;user.BennyLava&amp;quot; /&amp;gt;&lt;br /&gt;
  &amp;lt;/group&amp;gt;&lt;br /&gt;
  ...&lt;br /&gt;
&amp;lt;/acl&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can actually add your user to any group you want. Each group is linked to an ACL ([[Access Control List]]). Each ACL contains a series of specific allowed or denied rights. These groups exist so different users can be assigned different rights. The ''Admin'' group points to the ''Admin'' ACL, which is empty (thus allowing all possible commands). The ''Everyone'' group points to the ''Default'' ACL that puts a series of restrictions on the available commands (to disallow regular players from using admin commands).&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
You're done! You can add as many administrators or users as you want this way, take a look at some of the other groups and ACLs for example. The ACL is also accessible through the [[Access_Control_List|Lua scripting engine]].&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is recommended to take a look at the web interface, we will explain how to do this below.&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
'''Note''': There are also ways to add accounts and edit rights for the server while it's running. &amp;quot;[[Server_Commands#addaccount|addaccount &amp;lt;user&amp;gt; &amp;lt;password&amp;gt;]]&amp;quot; is an internal command to add accounts, but you will have to use the web interface to add these accounts to specific groups/ACLs!&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Using the web interface===&lt;br /&gt;
The dedicated server comes with a few Lua [[resources]] that provide a nice little web interface to your server. This can be used to easily maintain your server, as it allows you to add users, start/stop resources, and more.&lt;br /&gt;
&lt;br /&gt;
The web interface resources are enabled by default and are served through the built-in HTTP web server. To make sure the built-in HTTP web server runs on a port you like (22005 by default), follow these steps:&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Make sure your server is stopped&lt;br /&gt;
&amp;lt;li&amp;gt;Open the file 'mods/deathmatch/[[Server_mtaserver.conf|'''mtaserver.conf''']]' with any text editor&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Verify that the HTTP server is enabled:&lt;br /&gt;
&amp;lt;div style=&amp;quot;padding: 10px&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;httpserver&amp;gt;1&amp;lt;/httpserver&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Change the HTTP server port to your liking:&lt;br /&gt;
&amp;lt;div style=&amp;quot;padding: 10px&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;httpport&amp;gt;22005&amp;lt;/httpport&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Save and close the configuration file&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Start your server&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If you happened to have changed the start-up resources in your configuration file, make sure the following resources are started:&lt;br /&gt;
&lt;br /&gt;
# resourcebrowser&lt;br /&gt;
# resourcemanager&lt;br /&gt;
# webadmin&lt;br /&gt;
# webmap&lt;br /&gt;
&lt;br /&gt;
These are automatically started in the default configuration file, in case you just installed your server.&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Open a web browser (Internet Explorer 6 or 7 are NOT supported; use [http://www.mozilla.com/firefox Mozilla Firefox], [http://www.google.com/chrome Google Chrome], [http://www.apple.com/safari/download Apple Safari], [http://www.opera.com Opera] or others) and navigate to the HTTP server URL: '''http://server:port/'''. For example, If you are running a local server on HTTP port 22005, use '''http://127.0.0.1:22005/'''.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Enter the username and password of the administrator you added in the previous section.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
You should now be able to maintain your server from the web interface.&lt;br /&gt;
&lt;br /&gt;
=== Configuring an external web server ===&lt;br /&gt;
The built-in web server is also used to serve files that are required by resources running on your server to any player that is connected to your server. For example, if you are running a game script with a scripted graphical user interface, or custom models, these need to be transferred to every connected player in order to function properly. This is done by either the built-in web server, or an external web server (that is usually a bit faster) but needs to be set up separately.&lt;br /&gt;
&lt;br /&gt;
For performance or consistency reasons during the game, you could choose to make use of such an external web server if you have one set up. The external web server needs to be accessible for the public, so any client will be able to download the necessary client-side files in order to join and play on your server.&lt;br /&gt;
&lt;br /&gt;
To enable downloading off an external web server, you should configure the [[Server_mtaserver.conf#httpdownloadurl|httpdownloadurl]] tag in your server configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;padding: 10px&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;	&lt;br /&gt;
&amp;lt;httpdownloadurl&amp;gt;http://www.myserver.tld/directory/here&amp;lt;/httpdownloadurl&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Since all the default resources provided with the dedicated server are zipped, and are normally automatically extracted by the built-in web server, you now have to provide a way for the clients to download the compressed files to their computers. To configure MTA to maintain a copy of only your unzipped client resources, set [[Server_mtaserver.conf#httpautoclientfiles|httpautoclientfiles]] in your server configuration: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;padding: 10px&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;httpautoclientfiles&amp;gt;1&amp;lt;/httpautoclientfiles&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now when you launch the server, the directory '''&amp;lt;SERVER&amp;gt;/mods/deathmatch/resource-cache/http-client-files''' will contain the correct client files for hosting on an external web server. If the web server is on the same machine, you can simply link the appropriate web server directory to '''http-client-files'''. If the web server is on a separate machine, ensure it has access to '''http-client-files''' via a network path, or maintain a remote copy using synchronization software.&lt;br /&gt;
&lt;br /&gt;
'''Note 1''': Please try to avoid any special characters (e.g. ~, !) in your download URLs.&amp;lt;br /&amp;gt;&lt;br /&gt;
'''Note 2''': Please do not use a trailing slash in your download URL (e.g. ''hxxp://www.myserver.tld/directory'' rather than ''hxxp://www.myserver.tld/directory/'')&lt;br /&gt;
&lt;br /&gt;
==Starting your server==&lt;br /&gt;
Begin by making sure that you have finished all configuration of your server, starting your server is the last stage so everything must be ready!&lt;br /&gt;
&lt;br /&gt;
To start your server double click on MTA Server.exe, make sure you allow it through any firewalls and forward ports where necessary.&lt;br /&gt;
&lt;br /&gt;
==Installing/Updating resources on your server==&lt;br /&gt;
Resources can come in two formats, either a ZIP format or just a normal folder with the script files inside it. The MTA:SA server supports both these methods.&lt;br /&gt;
&lt;br /&gt;
# Move or copy the new resource to your &amp;lt;SERVER&amp;gt;\mods\deathmatch\resources folder.&lt;br /&gt;
# In the server window type in the command [[Server_Commands#refresh|refresh]], this will re-scan the resources folder and update the live resources where necessary.&lt;br /&gt;
&lt;br /&gt;
==Uninstalling resources==&lt;br /&gt;
Resources can easily be removed from your server if you no longer want them.&lt;br /&gt;
&lt;br /&gt;
# Delete the ZIP file or the folder of the resource you wish to uninstall&lt;br /&gt;
# In the server window type in the command &amp;quot;refresh&amp;quot; (without the quotes), this will re-scan the resources folder and update the live resources where necessary.&lt;br /&gt;
&lt;br /&gt;
==Administrating your server==&lt;br /&gt;
You can start resources by typing the command &amp;quot;start resourcename&amp;quot; in the server console, or stop ones with &amp;quot;stop resourcename&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
It's also possible to execute these and other admin commands from the in-game console (which you can bring up with the ` key or F8); for this to work, you first need to log in with the command &amp;quot;[[Server_Commands#login|login username password]]&amp;quot;. Additionally, you can press the p key to bring up the admin panel: this is a graphical interface which allows you to easily kick or ban misbehaving players, among others.&lt;br /&gt;
&lt;br /&gt;
For further commands, type [[Server_Commands#help|help]] in a console.&lt;br /&gt;
&lt;br /&gt;
==Starting a map/gamemode==&lt;br /&gt;
See the commands section of the documentation for [[Resource:Map manager|mapmanager]] for more information.&lt;br /&gt;
&lt;br /&gt;
==Useful Notes==&lt;br /&gt;
&lt;br /&gt;
# You may also update the resources while in-game as long as you have the correct access levels by typing &amp;quot;refresh&amp;quot; in the clients console or &amp;quot;/refresh&amp;quot; in the chat window. This may cause a second of lag if you have many resources.&lt;br /&gt;
# In the above instructions, &amp;lt;SERVER&amp;gt; is the path to your server's main directory. In most cases this is C:\Program Files\MTA San Andreas\server&lt;br /&gt;
# You can choose a different config file for the server to use by passing it in the command line after a --config argument, e.g. mtaserver.exe --config anotherconfig.cfg.&lt;br /&gt;
# Do not be alarmed by the warning regarding the parsing of the settings.xml file. This happens because your server installation is still clean and unused.&lt;br /&gt;
&lt;br /&gt;
====Need further help?====&lt;br /&gt;
Why not pop over to our [http://forum.mtasa.com/ Forums] or join us on [irc://irc.multitheftauto.com/mta IRC] (irc.multitheftauto.com #mta - [http://www.mirc.com mIRC])&lt;br /&gt;
&lt;br /&gt;
[[es:Manual Servidor]]&lt;br /&gt;
[[de:Server Anleitung]]&lt;br /&gt;
[[it:Manuale del Server]]&lt;br /&gt;
[[nl:Server Manual]]&lt;br /&gt;
[[ru:Server Manual]]&lt;br /&gt;
[[pl:Server Manual]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Support]]&lt;/div&gt;</summary>
		<author><name>Stanley Sathler .</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=PT-BR/Manual_do_Servidor&amp;diff=31034</id>
		<title>PT-BR/Manual do Servidor</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=PT-BR/Manual_do_Servidor&amp;diff=31034"/>
		<updated>2012-05-20T20:47:09Z</updated>

		<summary type="html">&lt;p&gt;Stanley Sathler .: /* Introdução */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[PT-BR/Manual_do_Servidor]] &lt;br /&gt;
==Introdução==&lt;br /&gt;
Configurar um servidor e disponibilizá-lo para que seus amigos joguem via Internet ou LAN é mais fácil do que parece. Neste artigo estaremos abordando os passos iniciais para que você possa criar o seu próprio servidor para o MTA.&lt;br /&gt;
&lt;br /&gt;
==Instalando o servidor==&lt;br /&gt;
A parte mais simples é instalar o servidor. A seguir há dois tópicos, um ensinando a instalar no Linux e outro ensinando a instalar no Windows.&lt;br /&gt;
&lt;br /&gt;
===Instalando no Linux===&lt;br /&gt;
Há diversas maneiras de instalar, configurar e iniciar um servidor no Linux:&lt;br /&gt;
* [[Image:iUS.png|Em Inglês|20px]] [[Building MTASA Server on GNU Linux|Configurando um Servidor de MTASA no GNU Linux (Em Inglês)]]&lt;br /&gt;
* [[Image:iUS.png|Em Inglês|20px]] [http://linux.mtasa.com Baixando o servidor para Linux]&lt;br /&gt;
&lt;br /&gt;
===Instalando no Windows===&lt;br /&gt;
Instalar um servidor do MTA:SA no Windows é bem simples:&lt;br /&gt;
:*Vá para [http://mtasa.com/ página de download] do MTASA e baixe o instalador.&lt;br /&gt;
:*Quando o download estiver concluído, abra o arquivo.&lt;br /&gt;
:*Clique em Next e depois em &amp;quot;I Agree&amp;quot;.&lt;br /&gt;
:*Nesta etapa você pode selecionar componentes os quais desejas ou não instalar: &lt;br /&gt;
:**Para instalar somente o servidor, mude a opção &amp;quot;Client and Server&amp;quot; para &amp;quot;Server Only&amp;quot;&lt;br /&gt;
:**Next para continuar.&lt;br /&gt;
:*Selecione a pasta a qual deseja instalar o servidor. Em seguida, Next.&lt;br /&gt;
:*Clique em Install.&lt;br /&gt;
:*Pronto!&lt;br /&gt;
&lt;br /&gt;
''Qual a função do arquivo acl.xml (access control list)? Para saber mais, leia o artigo em: &lt;br /&gt;
* [[Image:iUS.png|Em Inglês|20px]] [[Access_Control_List|Access Control List]]''&lt;br /&gt;
&lt;br /&gt;
==Configurando o servidor==&lt;br /&gt;
O servidor dedicado do Multi Theft Auto pode ser configurado através...&lt;br /&gt;
&lt;br /&gt;
*De uma espécie de prompt de comando chamado '''console''', ou seja, um programa onde comandos não são enviados através de cliques, mas sim através de linhas digitadas pelo usuario.&lt;br /&gt;
** Esse programa está localizado em &amp;quot;MTA San Andreas 1.3\server\MTA Server.exe&amp;quot;.&lt;br /&gt;
** Ele é identico a janela ''cmd'' do windows.&lt;br /&gt;
** Enquanto este estiver execultando, o servidor vai permanecer online, caso contrário, o servidor sai do ar.&lt;br /&gt;
*'''Do prório jogo'''! &lt;br /&gt;
**Os comandos para configurar o servidor são enviados a partir do chat.&lt;br /&gt;
** Para que estes comandos sejam efetivamente enviados, é necessário o uso da &amp;quot;/&amp;quot; antes do comando em si, pois esta identifica que o que vem logo em seguida faz parte de um comando.. Exemplo &amp;quot;/addaccount&amp;quot;.&lt;br /&gt;
*'''De um navegador de internet'''. Um website pode receber informações e configurar um servidor de MTA.&lt;br /&gt;
&lt;br /&gt;
''Para que possa configurar um servidor do MTASA no jogo ou via website é necessário que pelomenos uma conta com privilégios de administrador seja adicionada no '''acl.xml'''.''&lt;br /&gt;
&lt;br /&gt;
===Configuração Geral===&lt;br /&gt;
Todas as configurações gerais podem ser encontradas no arquivo &amp;quot;[[Server_mtaserver.conf|'''mtaserver.conf''']]&amp;quot; localizado na pasta &amp;quot;mods/deathmatch/&amp;quot;. Este arquivo pode ser visualizado em qualquer editor de texto.&lt;br /&gt;
&lt;br /&gt;
Ele é bem simples e direto, toda variável tem uma [[Server_mtaserver.conf|descrição abordando o que esta faz e como usa-la]].&lt;br /&gt;
&lt;br /&gt;
===Port forwarding===&lt;br /&gt;
&lt;br /&gt;
Se você execulta um servidor em seu computador e há um roteador entre a internet e seu computador, então você tem que configurar 3 portas.&lt;br /&gt;
If you run your server on your own private computer, and you have an router between the internet and your computer. You need to forward 3 ports.&lt;br /&gt;
&lt;br /&gt;
Antes de mais nada, abra o arquivo localizado em &amp;quot;mods/deathmatch/[[Server_mtaserver.conf|'''mtaserver.conf''']]&amp;quot; e procure pelas linhas citadas a seguir:&lt;br /&gt;
First of all open the file 'mods/deathmatch/[[Server_mtaserver.conf|'''mtaserver.conf''']]' and search for the next lines:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;serverport&amp;gt;22004&amp;lt;/serverport&amp;gt; &lt;br /&gt;
&amp;lt;httpport&amp;gt;22005&amp;lt;/httpport&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Estas portas são necessárias para que o servidor inicie corretamente. Explicaremos como configura-las mais adiante. &lt;br /&gt;
!Mas se primeiro desejas que o servidor apareça no navegador de internet, então precisaremos configurar mais uma porta chamada ASE.&lt;br /&gt;
The ports are needed to setup the server correctly. We explain later how to set them, but first if you want your server to appear in the server browser there is another port we need, and that is the ASE port. &lt;br /&gt;
(um simples exemplo de como ligar e desligar a porta ASE):&lt;br /&gt;
(quick example for how to turn ASE on or off):&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;ase&amp;gt;1&amp;lt;/ase&amp;gt; &amp;lt;!-- 0 = desligada, 1 = ligada --&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Agora vamos liberar essas portas em seu roteador. Caso todas as portas estejam abertas ou você possui um roteador sem firewall, esta etapa é desnecessária.&lt;br /&gt;
Now we going to forward the ports in your router, which is not needed if you already have all ports open, or if you don't have a router with a firewall. If so, skip this part.&lt;br /&gt;
&lt;br /&gt;
Se você não sabe como port forwarding funciona em seu roteador, viste [http://portforward.com/ este site], procure pelo modelo de seu roteador e siga as instruções.&lt;br /&gt;
If you don't know how port forwarding works in your router, go to the [http://portforward.com/ Port Forward website], find your router model there, and follow the instructions there.&lt;br /&gt;
&lt;br /&gt;
Na maioria dos roteadores, há a opção de selecionar o tipo de porta: UDP ou TCP. A lista a seguir irá explicar qual porta é necessaria para o que:&lt;br /&gt;
In almost every router you can set the port type: UDP or TCP. The following list will explain which port type is needed for what:&lt;br /&gt;
&lt;br /&gt;
Porta principal do servidor: UDP&lt;br /&gt;
Main server port: UDP&lt;br /&gt;
&lt;br /&gt;
Porta HTTP: TCP&lt;br /&gt;
HTTP Port: TCP&lt;br /&gt;
&lt;br /&gt;
Porta ASE: UDP (esta é necessária caso deseje que o servidor apareça na lista de servidores do gamemonitor.com).&lt;br /&gt;
ASE Port: UDP (this is needed if you want your server to appear in the server list)&lt;br /&gt;
&lt;br /&gt;
A porta ASE é simples para se obter:&lt;br /&gt;
The ASE port is also simple to get:&lt;br /&gt;
&lt;br /&gt;
Porta ASE = Porta principal do servidor + 123&lt;br /&gt;
ASE port = Main server port + 123&lt;br /&gt;
&lt;br /&gt;
Então se a porta de seu servidor for 22003, então a porta ASE será no caso 22126.&lt;br /&gt;
So, if you have the main server port set to 22003, then the ASE port will be 22126.&lt;br /&gt;
&lt;br /&gt;
Boa Sorte!&lt;br /&gt;
&lt;br /&gt;
''Na ultima versão do servidor, ao se digitar o comando &amp;quot;/[[Server_Commands#openports|openports]]&amp;quot;, os status de todas as portas serão mostrados.''&lt;br /&gt;
''In the latest version of the server, you can check the port status by using the server command [[Server_Commands#openports|openports]].''&lt;br /&gt;
&lt;br /&gt;
===Client Checks===&lt;br /&gt;
Todo jogador que entra em um servidor passa por várias &amp;quot;avaliações&amp;quot;, também conhecido como &amp;quot;Client Checks&amp;quot; (em inglês).&lt;br /&gt;
Esse processo é necessário, principalmente, para previnir trapaças no jogo, as quais são feitas através de trainers e/ou modificações realizadas nos arquivos originais do GTA SA.&lt;br /&gt;
Toda essas &amp;quot;avaliações&amp;quot; são dividias em diversos parâmetros, os quais são configuráveis através do arquivo [[Server_mtaserver.conf|'''mtaserver.conf''']] localizado em &amp;quot;mods/deathmatch&amp;quot;.&lt;br /&gt;
Destacamos 2 delas como exemplo:&lt;br /&gt;
&lt;br /&gt;
* O parâmetro '''client-file''' ...&lt;br /&gt;
** habilita que um ou mais arquivos possam ser modificados no computador do jogador (exemplo: carmods.dat). Por padrão, o MTA não permite que nenhum arquivo da pasta &amp;quot;data&amp;quot; e &amp;quot;anim&amp;quot; do GTA SA seja modificado.&lt;br /&gt;
** pertênce a um grupo denominado Anti-Cheat, pois, por padrão, ele evita que um ou mais jogadores tenham vantagens sobre os outros. Todos os demais parâmetros que fazem parte desse grupo estão detalhados neste Guia [[Anti-cheat_guide|Anti-Cheat]].&lt;br /&gt;
* O parâmetro '''minclientversion'''...&lt;br /&gt;
** estabelece que todos os jogadores usem uma versão igual ou superior a estipulada (exemplo: 1.3.0).&lt;br /&gt;
** Aqueles que estiverem usando uma versão inferior serão automaticamente desconectados do servidor.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Cada parâmetro contido no arquivo [[Server_mtaserver.conf|'''mtaserver.conf''']] tem um valor atribuido a ele. O que faz que o servidor iginore ou aja de forma diferente ao relaziar essas avaliações em cada jogador.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--If you want to force a minimum client version, search for the following line:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;minclientversion&amp;gt;&amp;lt;/minclientversion&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Accepted values look like: 1.1.1-9.02320&lt;br /&gt;
&lt;br /&gt;
===Adding administrators===&lt;br /&gt;
It is strongly recommended to add at least one administrator to your server in order to make use of the built-in webserver to easily maintain and configure your server. This administrator will then also be able to log-in from within the game and control the server.&lt;br /&gt;
&lt;br /&gt;
To add an administrator to your server, follow these steps:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;While the server is running, add a new account by typing '''[[Server_Commands#addaccount|addaccount name password]]''' into the server window. For example, to add user BennyLava you could type:&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin: 10px 10px 10px 10px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
addaccount BennyLava 123password&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin: 10px 10px 10px 20px;&amp;quot;&amp;gt;&lt;br /&gt;
''Note: If you do not have access to the server window, and the 'admin' resource is running, you can add  the example account by issuing the chatbox command '''/register BennyLava 123password'''''&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The server should display a message confirming the account has been added.&lt;br /&gt;
&amp;lt;li&amp;gt;Next, shutdown the server by typing '''shutdown''' into the server window.&lt;br /&gt;
&amp;lt;li&amp;gt;Make sure your server is stopped; if your server is still running, the following changes you make will be overwritten&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Open the file 'mods/deathmatch/'acl.xml'''' with any text editor&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Add the account to the ''Admin'' group by using the XML-syntax below&lt;br /&gt;
&amp;lt;div style=&amp;quot;padding: 10px&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;acl&amp;gt;&lt;br /&gt;
  ...&lt;br /&gt;
  &amp;lt;group name=&amp;quot;Admin&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;acl name=&amp;quot;Admin&amp;quot;/&amp;gt;&lt;br /&gt;
    ...&lt;br /&gt;
    &amp;lt;object name=&amp;quot;user.BennyLava&amp;quot; /&amp;gt;&lt;br /&gt;
  &amp;lt;/group&amp;gt;&lt;br /&gt;
  ...&lt;br /&gt;
&amp;lt;/acl&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can actually add your user to any group you want. Each group is linked to an ACL ([[Access Control List]]). Each ACL contains a series of specific allowed or denied rights. These groups exist so different users can be assigned different rights. The ''Admin'' group points to the ''Admin'' ACL, which is empty (thus allowing all possible commands). The ''Everyone'' group points to the ''Default'' ACL that puts a series of restrictions on the available commands (to disallow regular players from using admin commands).&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
You're done! You can add as many administrators or users as you want this way, take a look at some of the other groups and ACLs for example. The ACL is also accessible through the [[Access_Control_List|Lua scripting engine]].&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is recommended to take a look at the web interface, we will explain how to do this below.&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
'''Note''': There are also ways to add accounts and edit rights for the server while it's running. &amp;quot;[[Server_Commands#addaccount|addaccount &amp;lt;user&amp;gt; &amp;lt;password&amp;gt;]]&amp;quot; is an internal command to add accounts, but you will have to use the web interface to add these accounts to specific groups/ACLs!&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Using the web interface===&lt;br /&gt;
The dedicated server comes with a few Lua [[resources]] that provide a nice little web interface to your server. This can be used to easily maintain your server, as it allows you to add users, start/stop resources, and more.&lt;br /&gt;
&lt;br /&gt;
The web interface resources are enabled by default and are served through the built-in HTTP web server. To make sure the built-in HTTP web server runs on a port you like (22005 by default), follow these steps:&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Make sure your server is stopped&lt;br /&gt;
&amp;lt;li&amp;gt;Open the file 'mods/deathmatch/[[Server_mtaserver.conf|'''mtaserver.conf''']]' with any text editor&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Verify that the HTTP server is enabled:&lt;br /&gt;
&amp;lt;div style=&amp;quot;padding: 10px&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;httpserver&amp;gt;1&amp;lt;/httpserver&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Change the HTTP server port to your liking:&lt;br /&gt;
&amp;lt;div style=&amp;quot;padding: 10px&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;httpport&amp;gt;22005&amp;lt;/httpport&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Save and close the configuration file&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Start your server&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If you happened to have changed the start-up resources in your configuration file, make sure the following resources are started:&lt;br /&gt;
&lt;br /&gt;
# resourcebrowser&lt;br /&gt;
# resourcemanager&lt;br /&gt;
# webadmin&lt;br /&gt;
# webmap&lt;br /&gt;
&lt;br /&gt;
These are automatically started in the default configuration file, in case you just installed your server.&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Open a web browser (Internet Explorer 6 or 7 are NOT supported; use [http://www.mozilla.com/firefox Mozilla Firefox], [http://www.google.com/chrome Google Chrome], [http://www.apple.com/safari/download Apple Safari], [http://www.opera.com Opera] or others) and navigate to the HTTP server URL: '''http://server:port/'''. For example, If you are running a local server on HTTP port 22005, use '''http://127.0.0.1:22005/'''.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Enter the username and password of the administrator you added in the previous section.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
You should now be able to maintain your server from the web interface.&lt;br /&gt;
&lt;br /&gt;
=== Configuring an external web server ===&lt;br /&gt;
The built-in web server is also used to serve files that are required by resources running on your server to any player that is connected to your server. For example, if you are running a game script with a scripted graphical user interface, or custom models, these need to be transferred to every connected player in order to function properly. This is done by either the built-in web server, or an external web server (that is usually a bit faster) but needs to be set up separately.&lt;br /&gt;
&lt;br /&gt;
For performance or consistency reasons during the game, you could choose to make use of such an external web server if you have one set up. The external web server needs to be accessible for the public, so any client will be able to download the necessary client-side files in order to join and play on your server.&lt;br /&gt;
&lt;br /&gt;
To enable downloading off an external web server, you should configure the [[Server_mtaserver.conf#httpdownloadurl|httpdownloadurl]] tag in your server configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;padding: 10px&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;	&lt;br /&gt;
&amp;lt;httpdownloadurl&amp;gt;http://www.myserver.tld/directory/here&amp;lt;/httpdownloadurl&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Since all the default resources provided with the dedicated server are zipped, and are normally automatically extracted by the built-in web server, you now have to provide a way for the clients to download the compressed files to their computers. To configure MTA to maintain a copy of only your unzipped client resources, set [[Server_mtaserver.conf#httpautoclientfiles|httpautoclientfiles]] in your server configuration: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;padding: 10px&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;httpautoclientfiles&amp;gt;1&amp;lt;/httpautoclientfiles&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now when you launch the server, the directory '''&amp;lt;SERVER&amp;gt;/mods/deathmatch/resource-cache/http-client-files''' will contain the correct client files for hosting on an external web server. If the web server is on the same machine, you can simply link the appropriate web server directory to '''http-client-files'''. If the web server is on a separate machine, ensure it has access to '''http-client-files''' via a network path, or maintain a remote copy using synchronization software.&lt;br /&gt;
&lt;br /&gt;
'''Note 1''': Please try to avoid any special characters (e.g. ~, !) in your download URLs.&amp;lt;br /&amp;gt;&lt;br /&gt;
'''Note 2''': Please do not use a trailing slash in your download URL (e.g. ''hxxp://www.myserver.tld/directory'' rather than ''hxxp://www.myserver.tld/directory/'')&lt;br /&gt;
&lt;br /&gt;
==Starting your server==&lt;br /&gt;
Begin by making sure that you have finished all configuration of your server, starting your server is the last stage so everything must be ready!&lt;br /&gt;
&lt;br /&gt;
To start your server double click on MTA Server.exe, make sure you allow it through any firewalls and forward ports where necessary.&lt;br /&gt;
&lt;br /&gt;
==Installing/Updating resources on your server==&lt;br /&gt;
Resources can come in two formats, either a ZIP format or just a normal folder with the script files inside it. The MTA:SA server supports both these methods.&lt;br /&gt;
&lt;br /&gt;
# Move or copy the new resource to your &amp;lt;SERVER&amp;gt;\mods\deathmatch\resources folder.&lt;br /&gt;
# In the server window type in the command [[Server_Commands#refresh|refresh]], this will re-scan the resources folder and update the live resources where necessary.&lt;br /&gt;
&lt;br /&gt;
==Uninstalling resources==&lt;br /&gt;
Resources can easily be removed from your server if you no longer want them.&lt;br /&gt;
&lt;br /&gt;
# Delete the ZIP file or the folder of the resource you wish to uninstall&lt;br /&gt;
# In the server window type in the command &amp;quot;refresh&amp;quot; (without the quotes), this will re-scan the resources folder and update the live resources where necessary.&lt;br /&gt;
&lt;br /&gt;
==Administrating your server==&lt;br /&gt;
You can start resources by typing the command &amp;quot;start resourcename&amp;quot; in the server console, or stop ones with &amp;quot;stop resourcename&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
It's also possible to execute these and other admin commands from the in-game console (which you can bring up with the ` key or F8); for this to work, you first need to log in with the command &amp;quot;[[Server_Commands#login|login username password]]&amp;quot;. Additionally, you can press the p key to bring up the admin panel: this is a graphical interface which allows you to easily kick or ban misbehaving players, among others.&lt;br /&gt;
&lt;br /&gt;
For further commands, type [[Server_Commands#help|help]] in a console.&lt;br /&gt;
&lt;br /&gt;
==Starting a map/gamemode==&lt;br /&gt;
See the commands section of the documentation for [[Resource:Map manager|mapmanager]] for more information.&lt;br /&gt;
&lt;br /&gt;
==Useful Notes==&lt;br /&gt;
&lt;br /&gt;
# You may also update the resources while in-game as long as you have the correct access levels by typing &amp;quot;refresh&amp;quot; in the clients console or &amp;quot;/refresh&amp;quot; in the chat window. This may cause a second of lag if you have many resources.&lt;br /&gt;
# In the above instructions, &amp;lt;SERVER&amp;gt; is the path to your server's main directory. In most cases this is C:\Program Files\MTA San Andreas\server&lt;br /&gt;
# You can choose a different config file for the server to use by passing it in the command line after a --config argument, e.g. mtaserver.exe --config anotherconfig.cfg.&lt;br /&gt;
# Do not be alarmed by the warning regarding the parsing of the settings.xml file. This happens because your server installation is still clean and unused.&lt;br /&gt;
&lt;br /&gt;
====Need further help?====&lt;br /&gt;
Why not pop over to our [http://forum.mtasa.com/ Forums] or join us on [irc://irc.multitheftauto.com/mta IRC] (irc.multitheftauto.com #mta - [http://www.mirc.com mIRC])&lt;br /&gt;
&lt;br /&gt;
[[es:Manual Servidor]]&lt;br /&gt;
[[de:Server Anleitung]]&lt;br /&gt;
[[it:Manuale del Server]]&lt;br /&gt;
[[nl:Server Manual]]&lt;br /&gt;
[[ru:Server Manual]]&lt;br /&gt;
[[pl:Server Manual]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Support]]&lt;/div&gt;</summary>
		<author><name>Stanley Sathler .</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Character_Skins&amp;diff=31031</id>
		<title>Character Skins</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Character_Skins&amp;diff=31031"/>
		<updated>2012-05-20T15:07:02Z</updated>

		<summary type="html">&lt;p&gt;Stanley Sathler .: /* Notes: */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Skins that the player may use (pedestrian skins).&lt;br /&gt;
&lt;br /&gt;
*[[All Skins Page]] - Not recommended for slow Internet&lt;br /&gt;
*[[Special Skins Page]] - New skins available after MTA 1.1&lt;br /&gt;
*[[Gang Skins]]&lt;br /&gt;
&lt;br /&gt;
'''Sectioned Skin Pages:'''&lt;br /&gt;
----&lt;br /&gt;
*[[Skins Page 1]]: 7, 9-29&lt;br /&gt;
*[[Skins Page 2]]: 30-41, 43-52&lt;br /&gt;
*[[Skins Page 3]]: 53-64, 66-73, 75-76&lt;br /&gt;
*[[Skins Page 4]]: 77-85, 87-99&lt;br /&gt;
*[[Skins Page 5]]: 100-118, 120-122&lt;br /&gt;
*[[Skins Page 6]]: 123-144&lt;br /&gt;
*[[Skins Page 7]]: 145-148, 150-167&lt;br /&gt;
*[[Skins Page 8]]: 168-189&lt;br /&gt;
*[[Skins Page 9]]: 190-207, 209-212&lt;br /&gt;
*[[Skins Page 10]]: 213-234&lt;br /&gt;
*[[Skins Page 11]]: 235-238, 240-257&lt;br /&gt;
*[[Skins Page 12]]: 258-264, 274-288&lt;br /&gt;
&lt;br /&gt;
==Notes:==&lt;br /&gt;
*12 pages: 266 total.&lt;br /&gt;
&lt;br /&gt;
*IDs 3-8 (except 7) are non-functional&lt;br /&gt;
&lt;br /&gt;
*The following pairs of IDs produce same character (1st ID used in lists, 2nd disabled)&lt;br /&gt;
**118:119 &lt;br /&gt;
**148:149&lt;br /&gt;
&lt;br /&gt;
*Non-working IDs&lt;br /&gt;
3-6&lt;br /&gt;
8&lt;br /&gt;
42&lt;br /&gt;
65&lt;br /&gt;
74&lt;br /&gt;
86&lt;br /&gt;
119&lt;br /&gt;
149&lt;br /&gt;
208&lt;br /&gt;
239&lt;br /&gt;
265-273&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
[[id|ID Lists]]&lt;br /&gt;
&lt;br /&gt;
[[it:Skin Personaggi]]&lt;br /&gt;
[[ru:Character Skins]]&lt;br /&gt;
[[es:Skins de Personajes]]&lt;br /&gt;
&lt;br /&gt;
[[Category:ID Lists]]&lt;/div&gt;</summary>
		<author><name>Stanley Sathler .</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=PT-BR/Manual_do_Servidor&amp;diff=31005</id>
		<title>PT-BR/Manual do Servidor</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=PT-BR/Manual_do_Servidor&amp;diff=31005"/>
		<updated>2012-05-20T04:53:00Z</updated>

		<summary type="html">&lt;p&gt;Stanley Sathler .: /* Introducao */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[PT-BR/Manual_do_Servidor]] &lt;br /&gt;
==Introdução==&lt;br /&gt;
Criar um servidor para o MTA é tão fácil quanto parece. Neste artigo estaremos abordando os passos iniciais para que você possa criar o seu próprio servidor para o MTA.&lt;/div&gt;</summary>
		<author><name>Stanley Sathler .</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=PT-BR/Manual_do_Servidor&amp;diff=31004</id>
		<title>PT-BR/Manual do Servidor</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=PT-BR/Manual_do_Servidor&amp;diff=31004"/>
		<updated>2012-05-20T04:47:09Z</updated>

		<summary type="html">&lt;p&gt;Stanley Sathler .: /* Dando os primeiros passos */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introdução==&lt;br /&gt;
Criar um servidor para o MTA é tão fácil quanto parece. Neste artigo estaremos abordando os passos iniciais para que você possa criar o seu próprio servidor para o MTA.&lt;/div&gt;</summary>
		<author><name>Stanley Sathler .</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=PT-BR/Manual_do_Servidor&amp;diff=31003</id>
		<title>PT-BR/Manual do Servidor</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=PT-BR/Manual_do_Servidor&amp;diff=31003"/>
		<updated>2012-05-20T04:43:10Z</updated>

		<summary type="html">&lt;p&gt;Stanley Sathler .: Dando os primeiros passos&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Dando os primeiros passos==&lt;br /&gt;
Criar um servidor para o MTA é tão fácil quanto parece. Neste artigo estaremos abordando os passos iniciais para que você possa criar o seu próprio servidor para o MTA.&lt;/div&gt;</summary>
		<author><name>Stanley Sathler .</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=PT-BR/Manual_do_Cliente&amp;diff=30990</id>
		<title>PT-BR/Manual do Cliente</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=PT-BR/Manual_do_Cliente&amp;diff=30990"/>
		<updated>2012-05-19T22:35:24Z</updated>

		<summary type="html">&lt;p&gt;Stanley Sathler .: /* Instalando o Multi Theft Auto */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introdução==&lt;br /&gt;
Multi Theft Auto: San Andreas é a ultima de uma série de modificações criadas por fãns que habilitam o modo multiplayer para a série Grand Theft Auto (somente a versão PC). Para as versões GTA3 e Vice City, há antigas versões do MTA disponíveis, as quais estão descritas em [[Archive|Arquivos]]. MTA:SA não tem vinculos com a Rockstar Games ou Take 2 Interactive.&lt;br /&gt;
&lt;br /&gt;
==Antes de começar==&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px solid black; background: #FFFF99; float: right; width: 200px; padding: 5px; margin: 5px; margin-right: 0px;&amp;quot;&amp;gt;&lt;br /&gt;
'''Nota:''' Windows 8 (Developer Preview) não é uma versão do windows suportada no momento! [[http://forum.mtasa.com/viewtopic.php?p=371531#p371531 por eAi]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
Antes de instalar o Multi Theft Auto: San Andreas, assegure-se de que não haja modificações instaladas em seu GTA:SA, caso contrário, estas irão entrar em conflito com o MTA. Se deseja preservar suas modificações (também conhecidos como &amp;quot;mods&amp;quot;), instale o GTA: San Andreas novamente em uma outra pasta em seu disco rígido e em seguida, instale o MTA nesta nova pasta.&lt;br /&gt;
&lt;br /&gt;
Certifique de que você esteja utilizando o '''Windows XP''', '''Windows Vista''', '''Windows Server 2003''' ou '''Windows 7''' como seu sistema operacional e que seu computador seja capaz de rodar o jogo no modo single player. Se seu jogo está rodando nos requisitos minimos, ele ficará ainda mais lento no MTA, pois este exige maor processamento de sua máquina.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px dotted black; background: #6E91FA; float: center; width: 1180px; padding: 10px; margin: 5px; margin-left: 10px;&amp;quot;&amp;gt;&lt;br /&gt;
'''Vale Lembrar:''' MTA:SA só funcionará no GTA:SA v1.0. Se você comprou o jogo recentemente, é provável que ele seja uma versão mais nova. Para mais informações, clique [[Known_Issues_-_FAQ#Does_MTASA_work_with_v1.01_or_v2.00_of_GTA_San_Andreas.3F|aqui]] (Em Inglês)&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Lembre-se de visitar a página de [[Known_Issues_-_FAQ|Solução de Problemas]] (Em Inglês) se algum problema lhe ocorrer ou junte-se à nós no IRC @ irc://irc.multitheftauto.com/mta (Em Inglês)&lt;br /&gt;
&lt;br /&gt;
===Requisitos do Sistema===&lt;br /&gt;
Os requisitos mínimos para Multi Theft Auto: San Andreas são um pouco superiores aos requisitos mínimos do Grand Theft Auto: San Andreas.&lt;br /&gt;
* '''Processador:''' Intel Pentium 4 or AMD Athlon XP&lt;br /&gt;
* '''Memória RAM:''' 512MB&lt;br /&gt;
* '''Memória de Video:''' 64 MB&lt;br /&gt;
* '''Chipset de Video:''' nVidia GeForce 4 series ou ATI Radeon 8xxx series&lt;br /&gt;
* '''Versão DirectX:''' 9.0 (Placa de Som e Placa de Video terão que ser compatíveis)&lt;br /&gt;
* '''Espaço:''' 3.7 GB livres em disco (3.6 GB para a instalação econômica do Grand Theft Auto) &lt;br /&gt;
* Grand Theft Auto: San Andreas versão 1.0 (Americana ou Européia) sem nenhuma modificação&lt;br /&gt;
* Teclado e Mouse&lt;br /&gt;
* Conexão de Banda Larga (para melhor jogabilidade online)&lt;br /&gt;
&lt;br /&gt;
*Recomendações:&lt;br /&gt;
**Para aproveitar ao máximo o que o MTA tem a lhe oferecer, sua placa de vídeo deve ser compatível com o Pixel Shader 2.0. nVidia GeForce FX Series ou superior, ATI Radeon 9xxx Series ou superior são placas de vídeo que dão conta do recado.&lt;br /&gt;
**É recomendado mais que 512MB de memória RAM para melhor performance no jogo&lt;br /&gt;
&lt;br /&gt;
==Instalando o Multi Theft Auto==&lt;br /&gt;
&lt;br /&gt;
# Se você ainda não baixou o instalador do MTA:SA, acesse a página de download [http://mtasa.com aqui].&lt;br /&gt;
# Após o término do download, execute o arquivo. Vá em Next, leia os Termos de Licença (Em Inglês) e clique em &amp;quot;I Agree&amp;quot; para continuar.&lt;br /&gt;
# Agora você terá que escolher quais componentes deseja incluir na instalação:&lt;br /&gt;
#* '''Game client:''' Programa que faz você se conectar aos servidores do MTA para participar de partidas online. (este coponente é obrigatório)&lt;br /&gt;
#* '''Dedicated Server:''' São os arquivos necessários para criar seu servidor a partir de seu computador.&lt;br /&gt;
#** Core resources: São os recursos mais importantes para que seu servidor funcione de forma adequada.&lt;br /&gt;
#** Optional resources: São os recursos mais famosos do MTA como &amp;quot;race&amp;quot; (corrida), &amp;quot;Team Deathmatch&amp;quot; (combate entre times)...&lt;br /&gt;
#** Editor: O famoso editor para criar seus próprios mapas para os gamemodes &amp;quot;race&amp;quot;, &amp;quot;assault&amp;quot; e etc.&lt;br /&gt;
#* '''Development:''' Só instale este coponente se você vai desenvolver módulos para o MTA. (Necessário conhecimento em C++)&lt;br /&gt;
# Quando terminar de escolher os componentes clique em Next. Agora, escolha a pasta onde deseja instalar o MTA (Não é necessário ser na pasta de seu SA)&lt;br /&gt;
# Next novamente para avançar. Clique no botão Browse para escolher o diretório onde seu San Andreas está instalado. O diretório padrão é: '''C:\Arquivos de Programas\Rockstar Games\GTA San Andreas\'''.&lt;br /&gt;
# E por fim vá em Install. Quando a instalação estiver concluída, aparecerá uma opção para iniciar o MTA, marque ou desmarque à vontade.&lt;br /&gt;
# Após clickar em '''Finish''', o ícone estará disponível no &amp;quot;Meu Iniciar&amp;quot; e também na sua área de trabalho quando estiver afim de jogar.&lt;br /&gt;
&lt;br /&gt;
==Rodando o Jogo==&lt;br /&gt;
# Inicie o Multi Theft Auto clicando no ícone localizado em seu Desktop ou no Meu Iniciar (Dentro da pasta '''MTA: San Andreas {{Current Version|full}}''')&lt;br /&gt;
# O GTA: San Andreas irá inicar após de ser carregado e você vai se deparar com o menu principal do MTA:SA. Aqui você encontrará algumas opções como:&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
&lt;br /&gt;
| width=&amp;quot;188&amp;quot; |&lt;br /&gt;
[[Image:Server_Browser.jpg|280px]]&lt;br /&gt;
| width=&amp;quot;380&amp;quot; |&lt;br /&gt;
&amp;lt;font size=&amp;quot;-1&amp;quot; face=&amp;quot;tahoma,helvetica,arial,sans-serif&amp;quot;&amp;gt;'''Browse servers''' – disponibiliza uma lista com os servidores disponíveis para jogar. &amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;188&amp;quot; |&lt;br /&gt;
[[Image:Host_Game.jpg|280px]]&lt;br /&gt;
| width=&amp;quot;380&amp;quot; |&lt;br /&gt;
&amp;lt;font size=&amp;quot;-1&amp;quot; face=&amp;quot;tahoma,helvetica,arial,sans-serif&amp;quot;&amp;gt;'''Host game''' – inicia um servidor local. &amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;188&amp;quot; |&lt;br /&gt;
[[Image:Menu_Settings.JPG|280px]]&lt;br /&gt;
| width=&amp;quot;380&amp;quot; |&lt;br /&gt;
&amp;lt;font size=&amp;quot;-1&amp;quot; face=&amp;quot;tahoma,helvetica,arial,sans-serif&amp;quot;&amp;gt;'''Settings '''– aqui você pode mudar seu nome no jogo, customizar os comandos do teclado e ajustar o video.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;188&amp;quot; |&lt;br /&gt;
[[Image:About_Menu.jpg|280px]]&lt;br /&gt;
| width=&amp;quot;380&amp;quot; |&lt;br /&gt;
&amp;lt;font size=&amp;quot;-1&amp;quot; face=&amp;quot;tahoma,helvetica,arial,sans-serif&amp;quot;&amp;gt;'''About '''– mostra os créditos com os contribuidores do projeto.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;188&amp;quot; |&lt;br /&gt;
[[Image:Map_Editor.jpg|280px]]&lt;br /&gt;
| width=&amp;quot;380&amp;quot; |&lt;br /&gt;
&amp;lt;font size=&amp;quot;-1&amp;quot; face=&amp;quot;tahoma,helvetica,arial,sans-serif&amp;quot;&amp;gt;'''Map editor '''– aqui você pode criar seus próprios mapas, posicionando checkpoints, rampas, pickups e outros objetos. Estes mapas podem ser enviados à um servidor para que jogadores possam jogar uns contra os outros.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;188&amp;quot; |&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
| width=&amp;quot;380&amp;quot; |&lt;br /&gt;
&amp;lt;font size=&amp;quot;-1&amp;quot; face=&amp;quot;tahoma,helvetica,arial,sans-serif&amp;quot;&amp;gt;'''Quit '''– faz você sair do jogo e retornar à sua área de trabalho.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
O caminho mais simples para se jogar é clicando em '''Browse Servers''' no menu. Se depois de um tempo nenhuma lista apareceu, clique no botão '''Refresh''' e o MTA irá procurar por servidores disponíveis, disponibilizando-os na tela. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;[[Image:BR_Client_Browser.jpg|600px]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Na coluna '''Name''' estão os nomes dos servidores.&lt;br /&gt;
* Na coluna '''Players''' é mostrado o número de jogadores que estão conectados ao servidor e sua capacidade máxima no formato [Jogadores Conectados] / [Capacidade Máxima].&lt;br /&gt;
* A coluna '''Ping''' é o intervalo de tempo para que seu computador e o servidor se comuniquem. O valor é baseado no tempo que leva para que &amp;quot;pacotes&amp;quot; de dados sejam recebidos pelo servidor após serem enviados para seu pc. Então um ping maior indica que você terá travamentos em um servidor específico. No geral, servidores mais próximos de você são os que tem os menores pings.&lt;br /&gt;
**Ping é a mesma coisa do servidor te fazer perguntas e seu computador responder. Para que todas essas mensagens sejam entregues demora um certo intervalo de tempo. Se o servidor estiver no japão, com certeza seu ping será maior.&lt;br /&gt;
* A coluna '''Host''' é o enderesso de IP do servidor. Você pode usar este endereço no futuro para se conectar ao mesmo servidor via Quick Connect no menu principal.&lt;br /&gt;
&lt;br /&gt;
Toda coluna pode ser clicada para organizar-la na ordem crescente ou decrescente. Exemplo: Clicando em cima da palavra '''Name''' obteremos os servidores começando com Z e terminando com A.&lt;br /&gt;
&lt;br /&gt;
Para melhor experiência ao jogar, encontre um bom equilibrio entre jogadores e ping. Se o servidor tem muitos jogadores conectados você terá que ter um ping baixo e virse-versa. &lt;br /&gt;
&lt;br /&gt;
Quando escolher um servidor, selecione-o e clique no botão '''Connect''' localizado no canto direito da janela. Se tudo der certo, vais se conectar ao servidor e automaticamente entrará no jogo. &lt;br /&gt;
&lt;br /&gt;
==Como Jogar==&lt;br /&gt;
&lt;br /&gt;
MTA:SA oferece um sistema que habilita os criadores de mapas manipularem vários elementos do GTA, resultando num modo de jogo totalmente inovador. O MTA utiliza vários aspectos do jogo normal (single player) mas há algumas pequenas diferenças:&lt;br /&gt;
&lt;br /&gt;
Não há pedestres ou carros andando na rua. As únicas pessoas no mapa são seus oponentes ou aliados (se o jogo for do modo cooperativo). Ao precionar '''T''' no teclado, você pode falar com os outros jogadores usando o chat localizado no canto superior esquerdo da tela. Para falar somente com os membros de seu time, precione '''Y'''. &lt;br /&gt;
&lt;br /&gt;
O Editor de mapas do MTA permite que usuários adicionem vários objetos do GTA em seus mapas incluindo ruas, barris explosíveis, rampas, prédios, colinas e muito mais. E não é só isso, objetos podem se mover, mudarem de aparência e desaparecerem por meio de scripts. Isso torna o mundo mais vivo, trás diversão garantida e infinitas formas de jogar. &lt;br /&gt;
&lt;br /&gt;
Ao pressionar a tecla Tab vais aparecer um scoreboard. O scoreboard disponibiliza os nomes dos jogadores e seus respectivos pings por padrão. Mas scripts podem adicionar mais colunas à tabela dependendo das necessidades de cada modo de jogo. Por exemplo, o modo deathmath (mata-mata) vai, com certeza, precisar de uma coluna listando quantos assasinatos um certo jogador fez. Além disso há possibilidade de customizar mais ainda ao adicionar, por exemplo, uma coluna para o número de mortes que você tem ou à quanto tempo você jogou dependendo das necessidades de cada modo de jogo. Isso também depende totalmente de que o seu servidor necessita e de seu bom gosto, é claro. &lt;br /&gt;
&lt;br /&gt;
==Comandos==&lt;br /&gt;
&lt;br /&gt;
===do Jogador===&lt;br /&gt;
&lt;br /&gt;
* F8 (ou a tecla Tilde) - Abre o Console&lt;br /&gt;
* F9 - Abre uma tela fornecendo o manual de como jogar. Isto varia de servidor para servidor.&lt;br /&gt;
* F11 - Mostra o mapa de San Andreas ''(a lista seguinte é para quando o mapa estiver visível)''&lt;br /&gt;
**numpad  +/- - Lupa (Aumenta ou Diminui)&lt;br /&gt;
**numpad  2, 4, 6, 8 - move o mapa para baixo, esquerda, direita e cima, respectivamente.&lt;br /&gt;
**numpad 0 - alterna entre seguir o jogador (o mapa segue a localização do jogador no mapa) e modo livre (o mapa fica parado) &lt;br /&gt;
* F12 - Screenshot (tira uma foto da tela)&lt;br /&gt;
* T - Chat&lt;br /&gt;
* Y - Chat do time&lt;br /&gt;
* TAB - Abre uma lista contendo todos os jogadores conectados (Somente se o recurso [[Scoreboard]] estiver rodando no servidor)&lt;br /&gt;
&lt;br /&gt;
===do Console===&lt;br /&gt;
&lt;br /&gt;
O '''Console''' é uma janela a qual te habilita a obter informações, sair do jogo e desconectar de um servidor de uma maneira fácil e mais rápida. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;[[Image:BR_Client_Console.jpg|600px]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Precione '''~ (tilde)''' ou '''F8''' para acessar o '''Console'''. Digite um comando da lista abaixo com seus respectivos parâmetros (se requisitar) e precione Enter.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
;'''maps''' :Disponibiliza uma lista com todos os mapas disponíveis no servidor.&lt;br /&gt;
&lt;br /&gt;
;'''nick [seu nome]''' :Muda seu nome (nickname) para o qual você digitou no parâmetro. &lt;br /&gt;
&amp;gt; Exemplo - nick Cebolinha&lt;br /&gt;
&lt;br /&gt;
;'''msg [nome] [mensagem]''' ou '''pm [nome] [mensagem]''' :Este manda uma mensagem somente para a pessoa a qual você especificou no parâmetro [nome]. Somente esta pessoa verá a mensagem. Ambos '''msg''' e '''pm''' podem ser utilizados.&lt;br /&gt;
&amp;gt; Exemplo - msg Cascão vamos atormentar a Mônica! &lt;br /&gt;
&lt;br /&gt;
;'''quit''' ou '''exit''' :Disconecta do servidor e retorna para área de trabalho do Windows. Ambos fazem o mesmo que o &amp;quot;Quit&amp;quot; no menu principal.&lt;br /&gt;
&lt;br /&gt;
;'''ver''' :Mostra a versão e os direitos autorais para este software(programa).&lt;br /&gt;
&lt;br /&gt;
;'''sver''' :Mostra a versão do servidor que está conectado(a) no momento.&lt;br /&gt;
&lt;br /&gt;
;'''time''' :Mostra a hora atual.&lt;br /&gt;
&lt;br /&gt;
;'''disconnect''' :Disconecta do servidor e volta para o menu principal.&lt;br /&gt;
&lt;br /&gt;
;'''say [texo]''' :Fale com os jogadores do chat enquanto o console está aberto.&lt;br /&gt;
&lt;br /&gt;
;'''ignore [nome]''' :Simplesmente vais ignorar o jogador que desejas, ou seja, ele não vai mais te incomodar. Para voltar à receber mensagens deste jogador, digite '''ignore [nickname]''' novamente.&lt;br /&gt;
&amp;gt; Exemplo - como a Mônica não quer ser incomodada digitará: ignore Cebolinha&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px dotted black; background: #6E91FA; float: center; width: 750px; padding: 5px; margin: 5px; margin-left: 10px;&amp;quot;&amp;gt;&lt;br /&gt;
'''Dica:''' ''Podes usar estes comandos listados acima enquanto estiver no chat, botando uma &amp;quot;/&amp;quot; na frente. Exemplo: /time''&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*A aba '''Binds''', no menu &amp;quot;settings&amp;quot;, muda todos os controles do GTA e do MTA já pré-programados, como a tecla W para andar pra frente/acelerar ou a tecla T para falar no chat respectivamente.&lt;br /&gt;
*Ao digitar '''help''' no console, uma lista com todos os comandos pode ser visualizada. &lt;br /&gt;
*Os recursos que estão sendo execultado no momento podem também conter comandos novos. Ao digitar '''commands''' no console eles serão mostrados, se existirem.&lt;br /&gt;
&lt;br /&gt;
==Códigos de Erros e seus significados==&lt;br /&gt;
'''Erros de Download'''&amp;lt;br&amp;gt;&lt;br /&gt;
0: UNKNOWN_ERROR&amp;lt;br&amp;gt;&lt;br /&gt;
1: INVALID_FILE_DESCRIPTORS&amp;lt;br&amp;gt;&lt;br /&gt;
2: INVALID_MAX_FILE_DESCRIPTOR&amp;lt;br&amp;gt;&lt;br /&gt;
3: INVALID_SELECT_RETURN&amp;lt;br&amp;gt;&lt;br /&gt;
4: INVALID_INITIAL_MULTI_PERFORM&amp;lt;br&amp;gt;&lt;br /&gt;
5: INVALID_MULTI_PERFORM_CODE&amp;lt;br&amp;gt;&lt;br /&gt;
6: INVALID_MULTI_PERFORM_CODE_NEW_DOWNLOADS&amp;lt;br&amp;gt;&lt;br /&gt;
7: UNEXPECTED_CURL_MESSAGE&amp;lt;br&amp;gt;&lt;br /&gt;
8: UNABLE_TO_CONNECT&amp;lt;br&amp;gt;&lt;br /&gt;
9: UNABLE_TO_DOWNLOAD_FILE&amp;lt;br&amp;gt;&lt;br /&gt;
10: FAILED_TO_INITIALIZE_DOWNLOAD&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Erros Fatais'''&amp;lt;br&amp;gt;&lt;br /&gt;
1: no local player model on ingame event&amp;lt;br&amp;gt;&lt;br /&gt;
2: no local player on ingame event&amp;lt;br&amp;gt;&lt;br /&gt;
3: server downloads disabled&amp;lt;br&amp;gt;&lt;br /&gt;
4: no local player model on player-list packet&amp;lt;br&amp;gt;&lt;br /&gt;
5: no local player on player-list packet&amp;lt;br&amp;gt;&lt;br /&gt;
6: invalid custom data length on entity-add packet&amp;lt;br&amp;gt;&lt;br /&gt;
7: invalid bitstream data on entity-add packet&amp;lt;br&amp;gt;&lt;br /&gt;
8: system entity on entity-add packet&amp;lt;br&amp;gt;&lt;br /&gt;
9: failed to create object on entity-add packet&amp;lt;br&amp;gt;&lt;br /&gt;
10: failed to create pickup on entity-add packet&amp;lt;br&amp;gt;&lt;br /&gt;
11: failed to create vehicle on entity-add packet&amp;lt;br&amp;gt;&lt;br /&gt;
12: invalid team-name length on entity-add packet&amp;lt;br&amp;gt;&lt;br /&gt;
13: invalid lua-event name length in lua-event packet&amp;lt;br&amp;gt;&lt;br /&gt;
14: invalid resource name length in resource-start packet&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Erros ao entrar no veículo'''&amp;lt;br&amp;gt;&lt;br /&gt;
1: script cancelled&amp;lt;br&amp;gt;&lt;br /&gt;
2: script cancelled (jack)&amp;lt;br&amp;gt;&lt;br /&gt;
3: current occupier is entering/exiting&amp;lt;br&amp;gt;&lt;br /&gt;
4: invalid seat&amp;lt;br&amp;gt;&lt;br /&gt;
5: not close enough&amp;lt;br&amp;gt;&lt;br /&gt;
6: already in a vehicle&amp;lt;br&amp;gt;&lt;br /&gt;
7: already entering/exiting&amp;lt;br&amp;gt;&lt;br /&gt;
8: invalid vehicle (trailer)&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Jogando MTA no Linux==&lt;br /&gt;
Se o sistema operacional que você está usando for o Linux, siga o [[Client_on_Linux_Manual|Manual do Cliente - Linux]] para jogar MTA: San Andreas em seu computador!&lt;br /&gt;
&lt;br /&gt;
[[es:Manual Cliente Deathmatch]]&lt;br /&gt;
[[de:MTA DM Client Anleitung]]&lt;br /&gt;
[[it:Manuale del Client]]&lt;br /&gt;
[[nl:Deathmatch Client Manual]]&lt;br /&gt;
[[ru:Deathmatch Client Manual]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Support]]&lt;/div&gt;</summary>
		<author><name>Stanley Sathler .</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=PT-BR/Manual_do_Cliente&amp;diff=30989</id>
		<title>PT-BR/Manual do Cliente</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=PT-BR/Manual_do_Cliente&amp;diff=30989"/>
		<updated>2012-05-19T22:32:52Z</updated>

		<summary type="html">&lt;p&gt;Stanley Sathler .: /* Antes de começar */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introdução==&lt;br /&gt;
Multi Theft Auto: San Andreas é a ultima de uma série de modificações criadas por fãns que habilitam o modo multiplayer para a série Grand Theft Auto (somente a versão PC). Para as versões GTA3 e Vice City, há antigas versões do MTA disponíveis, as quais estão descritas em [[Archive|Arquivos]]. MTA:SA não tem vinculos com a Rockstar Games ou Take 2 Interactive.&lt;br /&gt;
&lt;br /&gt;
==Antes de começar==&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px solid black; background: #FFFF99; float: right; width: 200px; padding: 5px; margin: 5px; margin-right: 0px;&amp;quot;&amp;gt;&lt;br /&gt;
'''Nota:''' Windows 8 (Developer Preview) não é uma versão do windows suportada no momento! [[http://forum.mtasa.com/viewtopic.php?p=371531#p371531 por eAi]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
Antes de instalar o Multi Theft Auto: San Andreas, assegure-se de que não haja modificações instaladas em seu GTA:SA, caso contrário, estas irão entrar em conflito com o MTA. Se deseja preservar suas modificações (também conhecidos como &amp;quot;mods&amp;quot;), instale o GTA: San Andreas novamente em uma outra pasta em seu disco rígido e em seguida, instale o MTA nesta nova pasta.&lt;br /&gt;
&lt;br /&gt;
Certifique de que você esteja utilizando o '''Windows XP''', '''Windows Vista''', '''Windows Server 2003''' ou '''Windows 7''' como seu sistema operacional e que seu computador seja capaz de rodar o jogo no modo single player. Se seu jogo está rodando nos requisitos minimos, ele ficará ainda mais lento no MTA, pois este exige maor processamento de sua máquina.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px dotted black; background: #6E91FA; float: center; width: 1180px; padding: 10px; margin: 5px; margin-left: 10px;&amp;quot;&amp;gt;&lt;br /&gt;
'''Vale Lembrar:''' MTA:SA só funcionará no GTA:SA v1.0. Se você comprou o jogo recentemente, é provável que ele seja uma versão mais nova. Para mais informações, clique [[Known_Issues_-_FAQ#Does_MTASA_work_with_v1.01_or_v2.00_of_GTA_San_Andreas.3F|aqui]] (Em Inglês)&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Lembre-se de visitar a página de [[Known_Issues_-_FAQ|Solução de Problemas]] (Em Inglês) se algum problema lhe ocorrer ou junte-se à nós no IRC @ irc://irc.multitheftauto.com/mta (Em Inglês)&lt;br /&gt;
&lt;br /&gt;
===Requisitos do Sistema===&lt;br /&gt;
Os requisitos mínimos para Multi Theft Auto: San Andreas são um pouco superiores aos requisitos mínimos do Grand Theft Auto: San Andreas.&lt;br /&gt;
* '''Processador:''' Intel Pentium 4 or AMD Athlon XP&lt;br /&gt;
* '''Memória RAM:''' 512MB&lt;br /&gt;
* '''Memória de Video:''' 64 MB&lt;br /&gt;
* '''Chipset de Video:''' nVidia GeForce 4 series ou ATI Radeon 8xxx series&lt;br /&gt;
* '''Versão DirectX:''' 9.0 (Placa de Som e Placa de Video terão que ser compatíveis)&lt;br /&gt;
* '''Espaço:''' 3.7 GB livres em disco (3.6 GB para a instalação econômica do Grand Theft Auto) &lt;br /&gt;
* Grand Theft Auto: San Andreas versão 1.0 (Americana ou Européia) sem nenhuma modificação&lt;br /&gt;
* Teclado e Mouse&lt;br /&gt;
* Conexão de Banda Larga (para melhor jogabilidade online)&lt;br /&gt;
&lt;br /&gt;
*Recomendações:&lt;br /&gt;
**Para aproveitar ao máximo o que o MTA tem a lhe oferecer, sua placa de vídeo deve ser compatível com o Pixel Shader 2.0. nVidia GeForce FX Series ou superior, ATI Radeon 9xxx Series ou superior são placas de vídeo que dão conta do recado.&lt;br /&gt;
**É recomendado mais que 512MB de memória RAM para melhor performance no jogo&lt;br /&gt;
&lt;br /&gt;
==Instalando o Multi Theft Auto==&lt;br /&gt;
&lt;br /&gt;
# Se você ainda não baixou o instalador do MTA:SA, acesse a página de download [http://mtasa.com aqui].&lt;br /&gt;
# Após de baixar, abra o arquivo. Vá em Next, leia os Termos de Licença (Em Inglês) e clique em &amp;quot;I Agree&amp;quot; para continuar.&lt;br /&gt;
# Agora você terá que escolher quais componentes desejas incluir na instalação:&lt;br /&gt;
#* '''Game client:''' Programa que faz você se conectar a servidores do MTA para participar de partidas online. (este coponente é obrigatório)&lt;br /&gt;
#* '''Dedicated Server:''' São os arquivos necessários para criar seu servidor a partir de seu computador.&lt;br /&gt;
#** Core resources: São os recursos mais importantes para que seu server funcione de forma adequada.&lt;br /&gt;
#** Optional resources: São os recursos mais famosos do MTA como &amp;quot;race&amp;quot; (corrida), &amp;quot;Team Deathmatch&amp;quot; (combate entre times)...&lt;br /&gt;
#** Editor: O famoso editor para criar seus próprios mapas para os gamemodes &amp;quot;race&amp;quot;, &amp;quot;assault&amp;quot; e etc.&lt;br /&gt;
#* '''Development:''' Só instale este coponente se você vai desenvolver módulos para o MTA. (Necessário conhecimento em C++)&lt;br /&gt;
# Quando terminar de escolher os componentes clique em Next. Agora, escolha a pasta onde deseja instalar o MTA (Não é necessário ser na pasta de seu SA)&lt;br /&gt;
# Next novamente para avançar. Clique no botão Browse para escolher o diretório onde seu San Andreas está instalado. O diretório padrão é: '''C:\Arquivos de Programas\Rockstar Games\GTA San Andreas\'''.&lt;br /&gt;
# E por fim vá em Install. Quando a instalação estiver concluída, aparecerá uma opção para iniciar o MTA, marque ou desmarque à vontade.&lt;br /&gt;
# Após clickar em '''Finish''', o ícone estará disponível no &amp;quot;Meu Iniciar&amp;quot; e também na sua área de trabalho quando estiver afim de jogar.&lt;br /&gt;
&lt;br /&gt;
==Rodando o Jogo==&lt;br /&gt;
# Inicie o Multi Theft Auto clicando no ícone localizado em seu Desktop ou no Meu Iniciar (Dentro da pasta '''MTA: San Andreas {{Current Version|full}}''')&lt;br /&gt;
# O GTA: San Andreas irá inicar após de ser carregado e você vai se deparar com o menu principal do MTA:SA. Aqui você encontrará algumas opções como:&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
&lt;br /&gt;
| width=&amp;quot;188&amp;quot; |&lt;br /&gt;
[[Image:Server_Browser.jpg|280px]]&lt;br /&gt;
| width=&amp;quot;380&amp;quot; |&lt;br /&gt;
&amp;lt;font size=&amp;quot;-1&amp;quot; face=&amp;quot;tahoma,helvetica,arial,sans-serif&amp;quot;&amp;gt;'''Browse servers''' – disponibiliza uma lista com os servidores disponíveis para jogar. &amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;188&amp;quot; |&lt;br /&gt;
[[Image:Host_Game.jpg|280px]]&lt;br /&gt;
| width=&amp;quot;380&amp;quot; |&lt;br /&gt;
&amp;lt;font size=&amp;quot;-1&amp;quot; face=&amp;quot;tahoma,helvetica,arial,sans-serif&amp;quot;&amp;gt;'''Host game''' – inicia um servidor local. &amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;188&amp;quot; |&lt;br /&gt;
[[Image:Menu_Settings.JPG|280px]]&lt;br /&gt;
| width=&amp;quot;380&amp;quot; |&lt;br /&gt;
&amp;lt;font size=&amp;quot;-1&amp;quot; face=&amp;quot;tahoma,helvetica,arial,sans-serif&amp;quot;&amp;gt;'''Settings '''– aqui você pode mudar seu nome no jogo, customizar os comandos do teclado e ajustar o video.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;188&amp;quot; |&lt;br /&gt;
[[Image:About_Menu.jpg|280px]]&lt;br /&gt;
| width=&amp;quot;380&amp;quot; |&lt;br /&gt;
&amp;lt;font size=&amp;quot;-1&amp;quot; face=&amp;quot;tahoma,helvetica,arial,sans-serif&amp;quot;&amp;gt;'''About '''– mostra os créditos com os contribuidores do projeto.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;188&amp;quot; |&lt;br /&gt;
[[Image:Map_Editor.jpg|280px]]&lt;br /&gt;
| width=&amp;quot;380&amp;quot; |&lt;br /&gt;
&amp;lt;font size=&amp;quot;-1&amp;quot; face=&amp;quot;tahoma,helvetica,arial,sans-serif&amp;quot;&amp;gt;'''Map editor '''– aqui você pode criar seus próprios mapas, posicionando checkpoints, rampas, pickups e outros objetos. Estes mapas podem ser enviados à um servidor para que jogadores possam jogar uns contra os outros.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;188&amp;quot; |&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
| width=&amp;quot;380&amp;quot; |&lt;br /&gt;
&amp;lt;font size=&amp;quot;-1&amp;quot; face=&amp;quot;tahoma,helvetica,arial,sans-serif&amp;quot;&amp;gt;'''Quit '''– faz você sair do jogo e retornar à sua área de trabalho.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
O caminho mais simples para se jogar é clicando em '''Browse Servers''' no menu. Se depois de um tempo nenhuma lista apareceu, clique no botão '''Refresh''' e o MTA irá procurar por servidores disponíveis, disponibilizando-os na tela. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;[[Image:BR_Client_Browser.jpg|600px]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Na coluna '''Name''' estão os nomes dos servidores.&lt;br /&gt;
* Na coluna '''Players''' é mostrado o número de jogadores que estão conectados ao servidor e sua capacidade máxima no formato [Jogadores Conectados] / [Capacidade Máxima].&lt;br /&gt;
* A coluna '''Ping''' é o intervalo de tempo para que seu computador e o servidor se comuniquem. O valor é baseado no tempo que leva para que &amp;quot;pacotes&amp;quot; de dados sejam recebidos pelo servidor após serem enviados para seu pc. Então um ping maior indica que você terá travamentos em um servidor específico. No geral, servidores mais próximos de você são os que tem os menores pings.&lt;br /&gt;
**Ping é a mesma coisa do servidor te fazer perguntas e seu computador responder. Para que todas essas mensagens sejam entregues demora um certo intervalo de tempo. Se o servidor estiver no japão, com certeza seu ping será maior.&lt;br /&gt;
* A coluna '''Host''' é o enderesso de IP do servidor. Você pode usar este endereço no futuro para se conectar ao mesmo servidor via Quick Connect no menu principal.&lt;br /&gt;
&lt;br /&gt;
Toda coluna pode ser clicada para organizar-la na ordem crescente ou decrescente. Exemplo: Clicando em cima da palavra '''Name''' obteremos os servidores começando com Z e terminando com A.&lt;br /&gt;
&lt;br /&gt;
Para melhor experiência ao jogar, encontre um bom equilibrio entre jogadores e ping. Se o servidor tem muitos jogadores conectados você terá que ter um ping baixo e virse-versa. &lt;br /&gt;
&lt;br /&gt;
Quando escolher um servidor, selecione-o e clique no botão '''Connect''' localizado no canto direito da janela. Se tudo der certo, vais se conectar ao servidor e automaticamente entrará no jogo. &lt;br /&gt;
&lt;br /&gt;
==Como Jogar==&lt;br /&gt;
&lt;br /&gt;
MTA:SA oferece um sistema que habilita os criadores de mapas manipularem vários elementos do GTA, resultando num modo de jogo totalmente inovador. O MTA utiliza vários aspectos do jogo normal (single player) mas há algumas pequenas diferenças:&lt;br /&gt;
&lt;br /&gt;
Não há pedestres ou carros andando na rua. As únicas pessoas no mapa são seus oponentes ou aliados (se o jogo for do modo cooperativo). Ao precionar '''T''' no teclado, você pode falar com os outros jogadores usando o chat localizado no canto superior esquerdo da tela. Para falar somente com os membros de seu time, precione '''Y'''. &lt;br /&gt;
&lt;br /&gt;
O Editor de mapas do MTA permite que usuários adicionem vários objetos do GTA em seus mapas incluindo ruas, barris explosíveis, rampas, prédios, colinas e muito mais. E não é só isso, objetos podem se mover, mudarem de aparência e desaparecerem por meio de scripts. Isso torna o mundo mais vivo, trás diversão garantida e infinitas formas de jogar. &lt;br /&gt;
&lt;br /&gt;
Ao pressionar a tecla Tab vais aparecer um scoreboard. O scoreboard disponibiliza os nomes dos jogadores e seus respectivos pings por padrão. Mas scripts podem adicionar mais colunas à tabela dependendo das necessidades de cada modo de jogo. Por exemplo, o modo deathmath (mata-mata) vai, com certeza, precisar de uma coluna listando quantos assasinatos um certo jogador fez. Além disso há possibilidade de customizar mais ainda ao adicionar, por exemplo, uma coluna para o número de mortes que você tem ou à quanto tempo você jogou dependendo das necessidades de cada modo de jogo. Isso também depende totalmente de que o seu servidor necessita e de seu bom gosto, é claro. &lt;br /&gt;
&lt;br /&gt;
==Comandos==&lt;br /&gt;
&lt;br /&gt;
===do Jogador===&lt;br /&gt;
&lt;br /&gt;
* F8 (ou a tecla Tilde) - Abre o Console&lt;br /&gt;
* F9 - Abre uma tela fornecendo o manual de como jogar. Isto varia de servidor para servidor.&lt;br /&gt;
* F11 - Mostra o mapa de San Andreas ''(a lista seguinte é para quando o mapa estiver visível)''&lt;br /&gt;
**numpad  +/- - Lupa (Aumenta ou Diminui)&lt;br /&gt;
**numpad  2, 4, 6, 8 - move o mapa para baixo, esquerda, direita e cima, respectivamente.&lt;br /&gt;
**numpad 0 - alterna entre seguir o jogador (o mapa segue a localização do jogador no mapa) e modo livre (o mapa fica parado) &lt;br /&gt;
* F12 - Screenshot (tira uma foto da tela)&lt;br /&gt;
* T - Chat&lt;br /&gt;
* Y - Chat do time&lt;br /&gt;
* TAB - Abre uma lista contendo todos os jogadores conectados (Somente se o recurso [[Scoreboard]] estiver rodando no servidor)&lt;br /&gt;
&lt;br /&gt;
===do Console===&lt;br /&gt;
&lt;br /&gt;
O '''Console''' é uma janela a qual te habilita a obter informações, sair do jogo e desconectar de um servidor de uma maneira fácil e mais rápida. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;[[Image:BR_Client_Console.jpg|600px]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Precione '''~ (tilde)''' ou '''F8''' para acessar o '''Console'''. Digite um comando da lista abaixo com seus respectivos parâmetros (se requisitar) e precione Enter.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
;'''maps''' :Disponibiliza uma lista com todos os mapas disponíveis no servidor.&lt;br /&gt;
&lt;br /&gt;
;'''nick [seu nome]''' :Muda seu nome (nickname) para o qual você digitou no parâmetro. &lt;br /&gt;
&amp;gt; Exemplo - nick Cebolinha&lt;br /&gt;
&lt;br /&gt;
;'''msg [nome] [mensagem]''' ou '''pm [nome] [mensagem]''' :Este manda uma mensagem somente para a pessoa a qual você especificou no parâmetro [nome]. Somente esta pessoa verá a mensagem. Ambos '''msg''' e '''pm''' podem ser utilizados.&lt;br /&gt;
&amp;gt; Exemplo - msg Cascão vamos atormentar a Mônica! &lt;br /&gt;
&lt;br /&gt;
;'''quit''' ou '''exit''' :Disconecta do servidor e retorna para área de trabalho do Windows. Ambos fazem o mesmo que o &amp;quot;Quit&amp;quot; no menu principal.&lt;br /&gt;
&lt;br /&gt;
;'''ver''' :Mostra a versão e os direitos autorais para este software(programa).&lt;br /&gt;
&lt;br /&gt;
;'''sver''' :Mostra a versão do servidor que está conectado(a) no momento.&lt;br /&gt;
&lt;br /&gt;
;'''time''' :Mostra a hora atual.&lt;br /&gt;
&lt;br /&gt;
;'''disconnect''' :Disconecta do servidor e volta para o menu principal.&lt;br /&gt;
&lt;br /&gt;
;'''say [texo]''' :Fale com os jogadores do chat enquanto o console está aberto.&lt;br /&gt;
&lt;br /&gt;
;'''ignore [nome]''' :Simplesmente vais ignorar o jogador que desejas, ou seja, ele não vai mais te incomodar. Para voltar à receber mensagens deste jogador, digite '''ignore [nickname]''' novamente.&lt;br /&gt;
&amp;gt; Exemplo - como a Mônica não quer ser incomodada digitará: ignore Cebolinha&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px dotted black; background: #6E91FA; float: center; width: 750px; padding: 5px; margin: 5px; margin-left: 10px;&amp;quot;&amp;gt;&lt;br /&gt;
'''Dica:''' ''Podes usar estes comandos listados acima enquanto estiver no chat, botando uma &amp;quot;/&amp;quot; na frente. Exemplo: /time''&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*A aba '''Binds''', no menu &amp;quot;settings&amp;quot;, muda todos os controles do GTA e do MTA já pré-programados, como a tecla W para andar pra frente/acelerar ou a tecla T para falar no chat respectivamente.&lt;br /&gt;
*Ao digitar '''help''' no console, uma lista com todos os comandos pode ser visualizada. &lt;br /&gt;
*Os recursos que estão sendo execultado no momento podem também conter comandos novos. Ao digitar '''commands''' no console eles serão mostrados, se existirem.&lt;br /&gt;
&lt;br /&gt;
==Códigos de Erros e seus significados==&lt;br /&gt;
'''Erros de Download'''&amp;lt;br&amp;gt;&lt;br /&gt;
0: UNKNOWN_ERROR&amp;lt;br&amp;gt;&lt;br /&gt;
1: INVALID_FILE_DESCRIPTORS&amp;lt;br&amp;gt;&lt;br /&gt;
2: INVALID_MAX_FILE_DESCRIPTOR&amp;lt;br&amp;gt;&lt;br /&gt;
3: INVALID_SELECT_RETURN&amp;lt;br&amp;gt;&lt;br /&gt;
4: INVALID_INITIAL_MULTI_PERFORM&amp;lt;br&amp;gt;&lt;br /&gt;
5: INVALID_MULTI_PERFORM_CODE&amp;lt;br&amp;gt;&lt;br /&gt;
6: INVALID_MULTI_PERFORM_CODE_NEW_DOWNLOADS&amp;lt;br&amp;gt;&lt;br /&gt;
7: UNEXPECTED_CURL_MESSAGE&amp;lt;br&amp;gt;&lt;br /&gt;
8: UNABLE_TO_CONNECT&amp;lt;br&amp;gt;&lt;br /&gt;
9: UNABLE_TO_DOWNLOAD_FILE&amp;lt;br&amp;gt;&lt;br /&gt;
10: FAILED_TO_INITIALIZE_DOWNLOAD&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Erros Fatais'''&amp;lt;br&amp;gt;&lt;br /&gt;
1: no local player model on ingame event&amp;lt;br&amp;gt;&lt;br /&gt;
2: no local player on ingame event&amp;lt;br&amp;gt;&lt;br /&gt;
3: server downloads disabled&amp;lt;br&amp;gt;&lt;br /&gt;
4: no local player model on player-list packet&amp;lt;br&amp;gt;&lt;br /&gt;
5: no local player on player-list packet&amp;lt;br&amp;gt;&lt;br /&gt;
6: invalid custom data length on entity-add packet&amp;lt;br&amp;gt;&lt;br /&gt;
7: invalid bitstream data on entity-add packet&amp;lt;br&amp;gt;&lt;br /&gt;
8: system entity on entity-add packet&amp;lt;br&amp;gt;&lt;br /&gt;
9: failed to create object on entity-add packet&amp;lt;br&amp;gt;&lt;br /&gt;
10: failed to create pickup on entity-add packet&amp;lt;br&amp;gt;&lt;br /&gt;
11: failed to create vehicle on entity-add packet&amp;lt;br&amp;gt;&lt;br /&gt;
12: invalid team-name length on entity-add packet&amp;lt;br&amp;gt;&lt;br /&gt;
13: invalid lua-event name length in lua-event packet&amp;lt;br&amp;gt;&lt;br /&gt;
14: invalid resource name length in resource-start packet&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Erros ao entrar no veículo'''&amp;lt;br&amp;gt;&lt;br /&gt;
1: script cancelled&amp;lt;br&amp;gt;&lt;br /&gt;
2: script cancelled (jack)&amp;lt;br&amp;gt;&lt;br /&gt;
3: current occupier is entering/exiting&amp;lt;br&amp;gt;&lt;br /&gt;
4: invalid seat&amp;lt;br&amp;gt;&lt;br /&gt;
5: not close enough&amp;lt;br&amp;gt;&lt;br /&gt;
6: already in a vehicle&amp;lt;br&amp;gt;&lt;br /&gt;
7: already entering/exiting&amp;lt;br&amp;gt;&lt;br /&gt;
8: invalid vehicle (trailer)&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Jogando MTA no Linux==&lt;br /&gt;
Se o sistema operacional que você está usando for o Linux, siga o [[Client_on_Linux_Manual|Manual do Cliente - Linux]] para jogar MTA: San Andreas em seu computador!&lt;br /&gt;
&lt;br /&gt;
[[es:Manual Cliente Deathmatch]]&lt;br /&gt;
[[de:MTA DM Client Anleitung]]&lt;br /&gt;
[[it:Manuale del Client]]&lt;br /&gt;
[[nl:Deathmatch Client Manual]]&lt;br /&gt;
[[ru:Deathmatch Client Manual]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Support]]&lt;/div&gt;</summary>
		<author><name>Stanley Sathler .</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Client_Manual&amp;diff=30979</id>
		<title>Client Manual</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Client_Manual&amp;diff=30979"/>
		<updated>2012-05-19T21:18:34Z</updated>

		<summary type="html">&lt;p&gt;Stanley Sathler .: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
Multi Theft Auto: San Andreas is the latest multiplayer modifications created by fans for Grand Theft Auto games (only for PC). If you are searching by GTA3 and Vice City versions, go to [[Archive]]. The Multi Theft Auto is not endorsed by Rockstar Games or Take 2 Interactive.&lt;br /&gt;
&lt;br /&gt;
==Before you start==&lt;br /&gt;
{{Note_box|Windows 8 (Developer/Consumer Preview) is not supported at this time! [[http://forum.mtasa.com/viewtopic.php?p=371531#p371531 Note 1]][[http://forum.mtasa.com/viewtopic.php?f=104&amp;amp;t=37037 Note 2]]}}&lt;br /&gt;
Before you install Multi Theft Auto: San Andreas, first make sure that there are no modifications to GTA:SA installed. These will conflict with MTA. If you would like to keep your single player mods, you can create two installations by reinstalling San Andreas to a second folder on your hard drive.&lt;br /&gt;
&lt;br /&gt;
Also make sure that you are running '''Windows XP''', '''Windows Vista''', '''Windows Server 2003''' or '''Windows 7''' and that your machine is capable of running the game in single player. Note that if you are running single player on the absolute minimum requirements, you will experience slowdowns in MTA as it takes up extra processing power.&lt;br /&gt;
{{Note|MTA:SA will only work on GTA:SA v1.0. If you bought the game recently, it is likely that you have a later version.''' [[Known_Issues_-_FAQ#Does_MTASA_work_with_v1.01_or_v2.00_of_GTA_San_Andreas.3F| More info]]}}&lt;br /&gt;
&lt;br /&gt;
Make sure you head over to the [[Known_Issues_-_FAQ|Known Issues]] page if you have issues, or join us on IRC @ irc://irc.multitheftauto.com/mta&lt;br /&gt;
&lt;br /&gt;
===System requirements===&lt;br /&gt;
The minimum system requirements for Multi Theft Auto: San Andreas are slightly higher than the original minimum requirements for Grand Theft Auto: San Andreas.&lt;br /&gt;
* Intel Pentium 4 or AMD Athlon XP&lt;br /&gt;
* 512MB DDR RAM&lt;br /&gt;
* Clean installation of Grand Theft Auto: San Andreas, version 1.0 (American or European)&lt;br /&gt;
* 3.7GB of free hard disk space (3.6GB for a minimum Grand Theft Auto installation)&lt;br /&gt;
* nVidia GeForce 4 series or ATI Radeon 8xxx series (64MB RAM and DirectX 9.0 compatible)&lt;br /&gt;
* DirectX 9.0 compatible sound card&lt;br /&gt;
* Keyboard and mouse&lt;br /&gt;
* Broadband internet access (for smooth online play)&lt;br /&gt;
&lt;br /&gt;
For extra features, a pixel shader 2.0 compatible videocard (nVidia GeForce FX series or higher, ATI Radeon 9xxx series or higher) is recommended.&lt;br /&gt;
&lt;br /&gt;
For extra loading performance, more RAM is recommended.&lt;br /&gt;
&lt;br /&gt;
==Installing the game==&lt;br /&gt;
&lt;br /&gt;
'''This section will need to be updated when we get an installer'''&lt;br /&gt;
&lt;br /&gt;
# If you haven't already, download the MTA:SA client from the download page at mtasa.com.&lt;br /&gt;
# Run the installer. You will be asked which components to install:&lt;br /&gt;
#* '''Client''' interfaces with the game and is a required component.&lt;br /&gt;
#* '''MTA Server''' enables you to host your own home-brew server&lt;br /&gt;
#* '''MTA Server &amp;gt; Editor''' is used to create new maps, this is an optional component&lt;br /&gt;
# You are then asked for a folder in which to install the mod. This can by anywhere and doesn't have to be in you San Andreas directory.&lt;br /&gt;
# Next, you will be asked for the directory where you have San Andreas installed. The default location is: '''C:\Program Files\Rockstar Games\GTA San Andreas\'''.&lt;br /&gt;
# When the installation completes, you will be given the option to start MTA: San Andreas straight away. Choose your option and then press '''Finish'''.&lt;br /&gt;
# You will be able to launch MTA:DM from your Start Menu if you wish to play.&lt;br /&gt;
&lt;br /&gt;
==Running the game==&lt;br /&gt;
# Start Multi Theft Auto by clicking the icon located in your Start Menu under '''MTA:San Andreas'''.&lt;br /&gt;
# GTA: San Andreas will start and once it is loaded, you will be presented with the MTA:SA main menu. Here you will find several options:&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
&lt;br /&gt;
| width=&amp;quot;188&amp;quot; |&lt;br /&gt;
[[Image:Server_Browser.jpg|280px]]&lt;br /&gt;
| width=&amp;quot;380&amp;quot; |&lt;br /&gt;
&amp;lt;font size=&amp;quot;-1&amp;quot; face=&amp;quot;tahoma,helvetica,arial,sans-serif&amp;quot;&amp;gt;'''Browse servers''' – this allows you to receive a list of available servers to play on. &amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;188&amp;quot; |&lt;br /&gt;
[[Image:Host_Game.jpg|280px]]&lt;br /&gt;
| width=&amp;quot;380&amp;quot; |&lt;br /&gt;
&amp;lt;font size=&amp;quot;-1&amp;quot; face=&amp;quot;tahoma,helvetica,arial,sans-serif&amp;quot;&amp;gt;'''Host game''' – this allows you to start a local server. &amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;188&amp;quot; |&lt;br /&gt;
[[Image:Menu_Settings.JPG|280px]]&lt;br /&gt;
| width=&amp;quot;380&amp;quot; |&lt;br /&gt;
&amp;lt;font size=&amp;quot;-1&amp;quot; face=&amp;quot;tahoma,helvetica,arial,sans-serif&amp;quot;&amp;gt;'''Settings '''– this allows you to change your in-game nickname, customize controls and adjust display settings.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;188&amp;quot; |&lt;br /&gt;
[[Image:About_Menu.jpg|280px]]&lt;br /&gt;
| width=&amp;quot;380&amp;quot; |&lt;br /&gt;
&amp;lt;font size=&amp;quot;-1&amp;quot; face=&amp;quot;tahoma,helvetica,arial,sans-serif&amp;quot;&amp;gt;'''About '''– this gives you a list of contributors to the project.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;188&amp;quot; |&lt;br /&gt;
[[Image:Map_Editor.jpg|280px]]&lt;br /&gt;
| width=&amp;quot;380&amp;quot; |&lt;br /&gt;
&amp;lt;font size=&amp;quot;-1&amp;quot; face=&amp;quot;tahoma,helvetica,arial,sans-serif&amp;quot;&amp;gt;'''Map editor '''– this allows you to create your own maps, complete with checkpoints, ramps, pickups and other objects. These can then be uploaded onto a server so that you can play them with other people.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;188&amp;quot; |&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
| width=&amp;quot;380&amp;quot; |&lt;br /&gt;
&amp;lt;font size=&amp;quot;-1&amp;quot; face=&amp;quot;tahoma,helvetica,arial,sans-serif&amp;quot;&amp;gt;'''Quit '''– this returns you back to your Windows desktop.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The easiest way to play the game is to click '''Browse Servers''' on the menu. If servers have not appeared already, press the '''Refresh''' button and MTA will scan for servers, displaying them as a list.&lt;br /&gt;
&lt;br /&gt;
* Under the '''Name''' tab, each server's name is displayed.&lt;br /&gt;
* Under the '''Players''' tab, the number of players and the maximum capacity of the server is displayed, in the format of [Used Slots] / [Maximum Slots].&lt;br /&gt;
* The '''Ping''' tab displays the ping, or latency, between your machine and the server. Ping is a measure of the time it takes for &amp;quot;packets&amp;quot; of data to be received back from the server after sending them, so a higher ping means that you will experience more lag on that particular server. Generally, servers closest to your location should have the lowest pings.&lt;br /&gt;
* The '''Host''' is the IP address of the server. You can use this address in future to connect to the same server via the Quick Connect option on the main menu.&lt;br /&gt;
&lt;br /&gt;
Each tab can be clicked to arrange the respective column in ascending or descending order.&lt;br /&gt;
&lt;br /&gt;
For optimal performance and gameplay, look for the best balance between players and ping.&lt;br /&gt;
&lt;br /&gt;
Once you have picked a server, select it and click the '''Connect''' button in the top right-hand corner of the dialog. If all goes well, you should connect to the server and automatically join the game.&lt;br /&gt;
&lt;br /&gt;
==How to Play==&lt;br /&gt;
&lt;br /&gt;
MTA:SA offers a comprehensive scripting system that allows map creators to customize many elements of the game in order to create their own innovative game modes. The game incorporates as many single player elements as possible but some aspects are different.&lt;br /&gt;
&lt;br /&gt;
There are no pedestrians and no AI traffic on the road. The only other people on the map are your opponents, or allies if it is a team game. You can talk with them using the chatbox located in the left-hand corner of the screen by pressing '''T'''. To chat only to your team members, press '''Y'''.&lt;br /&gt;
&lt;br /&gt;
MTA's map editor allows map creators to add various GTA objects to their maps including roads, exploding barrels, ramps, buildings, hills and more. Not only this, but the objects can be scripted to move, change model and disappear. This offers a great deal of fun and variation to the gameplay. &lt;br /&gt;
&lt;br /&gt;
Holding Tab will display the scoreboard. By default, only names and pings are displayed, but scripts can add extra columns that are specific to the particular gamemode being played. For example, a deathmatch game mode would definitely have a column listing total kills, but the map creator may choose to add extra columns for the number of deaths you have and how long you have been playing for, in order to put your score into perspective.&lt;br /&gt;
&lt;br /&gt;
==Controls==&lt;br /&gt;
&lt;br /&gt;
===In-Game Keys===&lt;br /&gt;
&lt;br /&gt;
* F8 (or Tilde Key) - Console&lt;br /&gt;
* F9 - In-game help&lt;br /&gt;
* F11 - Show SA map ''(the following list is for use when the map is up)''&lt;br /&gt;
**numpad  /- - Zoom in and out&lt;br /&gt;
**numpad 4, 8, 6, 2 - move map left, up, right, down&lt;br /&gt;
**numpad 0 - toggle between attach to local player (map follows player blip) and free move (map stays stationary)  &lt;br /&gt;
* F12 - Take a screenshot&lt;br /&gt;
* T - Chat&lt;br /&gt;
* Y - Team Chat&lt;br /&gt;
* TAB - Player List (if [[Scoreboard]] resource is running on the server)&lt;br /&gt;
&lt;br /&gt;
==Console Commands==&lt;br /&gt;
&lt;br /&gt;
'''bind defaults''' Binds control defaults in the settings menu&lt;br /&gt;
&lt;br /&gt;
Press '''~ (tilde)''' or '''F8''' to access the console, then type a command followed by any neccessary parameters (if applicable) then press Enter.&lt;br /&gt;
&lt;br /&gt;
;'''maps''' :This displays a list of all maps available on the server. &lt;br /&gt;
&lt;br /&gt;
;'''nick [nickname]''' :This changes your nickname whilst in-game to whatever you specify in the parameters.&lt;br /&gt;
&lt;br /&gt;
;'''msg [nickname] [message]''' or '''pm [nickname] [message]''' :This sends a private message to the person you specify in the [nickname] parameter. Only the person you specify can see the message. Both '''msg''' and '''pm''' perform the same function.&lt;br /&gt;
&lt;br /&gt;
;'''quit''' or '''exit''' :This disconnects you from the server and returns you to the Windows desktop. Performs the same function as the Quit button on the main menu.&lt;br /&gt;
&lt;br /&gt;
;'''ver''' :This displays the version number and copyright information for the software.&lt;br /&gt;
&lt;br /&gt;
;'''sver''' :This displays the version number of the server you are connected to.&lt;br /&gt;
&lt;br /&gt;
;'''time''' :This displays the current time.&lt;br /&gt;
&lt;br /&gt;
;'''disconnect''' :This disconnects you from the server and returns you to the main menu.&lt;br /&gt;
&lt;br /&gt;
;'''say [text]''' :This enables you to continue talking to people in the chat box whilst the console is open.&lt;br /&gt;
&lt;br /&gt;
;'''ignore [nickname]''' :This will not display any text typed by the player you wish to ignore. To stop ignoring a player, type '''ignore [nickname]''' again.&lt;br /&gt;
{{Tip|You can use these commands in the chatbox by putting a / (forward slash) in front of them.}}&lt;br /&gt;
&lt;br /&gt;
A list of console commands can be seen by typing '''help''' into the console and pressing Enter. The current map may also have extra commands which can be accessed by typing '''commands''' into the console.&lt;br /&gt;
&lt;br /&gt;
For information on more commands see: [[Client Commands]]&lt;br /&gt;
&lt;br /&gt;
==Error codes and their meanings==&lt;br /&gt;
'''Download errors'''&amp;lt;br&amp;gt;&lt;br /&gt;
0: UNKNOWN_ERROR&amp;lt;br&amp;gt;&lt;br /&gt;
1: INVALID_FILE_DESCRIPTORS&amp;lt;br&amp;gt;&lt;br /&gt;
2: INVALID_MAX_FILE_DESCRIPTOR&amp;lt;br&amp;gt;&lt;br /&gt;
3: INVALID_SELECT_RETURN&amp;lt;br&amp;gt;&lt;br /&gt;
4: INVALID_INITIAL_MULTI_PERFORM&amp;lt;br&amp;gt;&lt;br /&gt;
5: INVALID_MULTI_PERFORM_CODE&amp;lt;br&amp;gt;&lt;br /&gt;
6: INVALID_MULTI_PERFORM_CODE_NEW_DOWNLOADS&amp;lt;br&amp;gt;&lt;br /&gt;
7: UNEXPECTED_CURL_MESSAGE&amp;lt;br&amp;gt;&lt;br /&gt;
8: UNABLE_TO_CONNECT&amp;lt;br&amp;gt;&lt;br /&gt;
9: UNABLE_TO_DOWNLOAD_FILE&amp;lt;br&amp;gt;&lt;br /&gt;
10: FAILED_TO_INITIALIZE_DOWNLOAD&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Fatal errors'''&amp;lt;br&amp;gt;&lt;br /&gt;
1: no local player model on ingame event&amp;lt;br&amp;gt;&lt;br /&gt;
2: no local player on ingame event&amp;lt;br&amp;gt;&lt;br /&gt;
3: server downloads disabled&amp;lt;br&amp;gt;&lt;br /&gt;
4: no local player model on player-list packet&amp;lt;br&amp;gt;&lt;br /&gt;
5: no local player on player-list packet&amp;lt;br&amp;gt;&lt;br /&gt;
6: invalid custom data length on entity-add packet&amp;lt;br&amp;gt;&lt;br /&gt;
7: invalid bitstream data on entity-add packet&amp;lt;br&amp;gt;&lt;br /&gt;
8: system entity on entity-add packet&amp;lt;br&amp;gt;&lt;br /&gt;
9: failed to create object on entity-add packet&amp;lt;br&amp;gt;&lt;br /&gt;
10: failed to create pickup on entity-add packet&amp;lt;br&amp;gt;&lt;br /&gt;
11: failed to create vehicle on entity-add packet&amp;lt;br&amp;gt;&lt;br /&gt;
12: invalid team-name length on entity-add packet&amp;lt;br&amp;gt;&lt;br /&gt;
13: invalid lua-event name length in lua-event packet&amp;lt;br&amp;gt;&lt;br /&gt;
14: invalid resource name length in resource-start packet&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''''Unable to enter vehicle' errors'''&amp;lt;br&amp;gt;&lt;br /&gt;
1: script cancelled&amp;lt;br&amp;gt;&lt;br /&gt;
2: script cancelled (jack)&amp;lt;br&amp;gt;&lt;br /&gt;
3: current occupier is entering/exiting&amp;lt;br&amp;gt;&lt;br /&gt;
4: invalid seat&amp;lt;br&amp;gt;&lt;br /&gt;
5: not close enough&amp;lt;br&amp;gt;&lt;br /&gt;
6: already in a vehicle&amp;lt;br&amp;gt;&lt;br /&gt;
7: already entering/exiting&amp;lt;br&amp;gt;&lt;br /&gt;
8: invalid vehicle (trailer)&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Special: Playing MTA on Linux?==&lt;br /&gt;
If you're one of those who have Linux as OS, and want to have the client working on Linux,&lt;br /&gt;
please read the [[Client_on_Linux_Manual|Client on Linux Manual]]&lt;br /&gt;
&lt;br /&gt;
[[es:Manual Cliente Deathmatch]]&lt;br /&gt;
[[de:MTA DM Client Anleitung]]&lt;br /&gt;
[[it:Manuale del Client]]&lt;br /&gt;
[[nl:Deathmatch Client Manual]]&lt;br /&gt;
[[ru:Deathmatch Client Manual]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Support]]&lt;/div&gt;</summary>
		<author><name>Stanley Sathler .</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Client_Manual&amp;diff=30978</id>
		<title>Client Manual</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Client_Manual&amp;diff=30978"/>
		<updated>2012-05-19T21:14:28Z</updated>

		<summary type="html">&lt;p&gt;Stanley Sathler .: /* Introdução */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introdução==&lt;br /&gt;
Multi Theft Auto: San Andreas é o último de uma série de modificações multiplayer criadas por fãs para os jogos da série Grand Theft Auto (disponível somente para PC). Se deseja as versões para GTA3 e Vice City, vá em [[Archive]]. O Multi Theft Auto não é patrocinado pela Rockstar Games ou Take 2 Interactive.&lt;br /&gt;
&lt;br /&gt;
==Before you start==&lt;br /&gt;
{{Note_box|Windows 8 (Developer/Consumer Preview) is not supported at this time! [[http://forum.mtasa.com/viewtopic.php?p=371531#p371531 Note 1]][[http://forum.mtasa.com/viewtopic.php?f=104&amp;amp;t=37037 Note 2]]}}&lt;br /&gt;
Before you install Multi Theft Auto: San Andreas, first make sure that there are no modifications to GTA:SA installed. These will conflict with MTA. If you would like to keep your single player mods, you can create two installations by reinstalling San Andreas to a second folder on your hard drive.&lt;br /&gt;
&lt;br /&gt;
Also make sure that you are running '''Windows XP''', '''Windows Vista''', '''Windows Server 2003''' or '''Windows 7''' and that your machine is capable of running the game in single player. Note that if you are running single player on the absolute minimum requirements, you will experience slowdowns in MTA as it takes up extra processing power.&lt;br /&gt;
{{Note|MTA:SA will only work on GTA:SA v1.0. If you bought the game recently, it is likely that you have a later version.''' [[Known_Issues_-_FAQ#Does_MTASA_work_with_v1.01_or_v2.00_of_GTA_San_Andreas.3F| More info]]}}&lt;br /&gt;
&lt;br /&gt;
Make sure you head over to the [[Known_Issues_-_FAQ|Known Issues]] page if you have issues, or join us on IRC @ irc://irc.multitheftauto.com/mta&lt;br /&gt;
&lt;br /&gt;
===System requirements===&lt;br /&gt;
The minimum system requirements for Multi Theft Auto: San Andreas are slightly higher than the original minimum requirements for Grand Theft Auto: San Andreas.&lt;br /&gt;
* Intel Pentium 4 or AMD Athlon XP&lt;br /&gt;
* 512MB DDR RAM&lt;br /&gt;
* Clean installation of Grand Theft Auto: San Andreas, version 1.0 (American or European)&lt;br /&gt;
* 3.7GB of free hard disk space (3.6GB for a minimum Grand Theft Auto installation)&lt;br /&gt;
* nVidia GeForce 4 series or ATI Radeon 8xxx series (64MB RAM and DirectX 9.0 compatible)&lt;br /&gt;
* DirectX 9.0 compatible sound card&lt;br /&gt;
* Keyboard and mouse&lt;br /&gt;
* Broadband internet access (for smooth online play)&lt;br /&gt;
&lt;br /&gt;
For extra features, a pixel shader 2.0 compatible videocard (nVidia GeForce FX series or higher, ATI Radeon 9xxx series or higher) is recommended.&lt;br /&gt;
&lt;br /&gt;
For extra loading performance, more RAM is recommended.&lt;br /&gt;
&lt;br /&gt;
==Installing the game==&lt;br /&gt;
&lt;br /&gt;
'''This section will need to be updated when we get an installer'''&lt;br /&gt;
&lt;br /&gt;
# If you haven't already, download the MTA:SA client from the download page at mtasa.com.&lt;br /&gt;
# Run the installer. You will be asked which components to install:&lt;br /&gt;
#* '''Client''' interfaces with the game and is a required component.&lt;br /&gt;
#* '''MTA Server''' enables you to host your own home-brew server&lt;br /&gt;
#* '''MTA Server &amp;gt; Editor''' is used to create new maps, this is an optional component&lt;br /&gt;
# You are then asked for a folder in which to install the mod. This can by anywhere and doesn't have to be in you San Andreas directory.&lt;br /&gt;
# Next, you will be asked for the directory where you have San Andreas installed. The default location is: '''C:\Program Files\Rockstar Games\GTA San Andreas\'''.&lt;br /&gt;
# When the installation completes, you will be given the option to start MTA: San Andreas straight away. Choose your option and then press '''Finish'''.&lt;br /&gt;
# You will be able to launch MTA:DM from your Start Menu if you wish to play.&lt;br /&gt;
&lt;br /&gt;
==Running the game==&lt;br /&gt;
# Start Multi Theft Auto by clicking the icon located in your Start Menu under '''MTA:San Andreas'''.&lt;br /&gt;
# GTA: San Andreas will start and once it is loaded, you will be presented with the MTA:SA main menu. Here you will find several options:&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
&lt;br /&gt;
| width=&amp;quot;188&amp;quot; |&lt;br /&gt;
[[Image:Server_Browser.jpg|280px]]&lt;br /&gt;
| width=&amp;quot;380&amp;quot; |&lt;br /&gt;
&amp;lt;font size=&amp;quot;-1&amp;quot; face=&amp;quot;tahoma,helvetica,arial,sans-serif&amp;quot;&amp;gt;'''Browse servers''' – this allows you to receive a list of available servers to play on. &amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;188&amp;quot; |&lt;br /&gt;
[[Image:Host_Game.jpg|280px]]&lt;br /&gt;
| width=&amp;quot;380&amp;quot; |&lt;br /&gt;
&amp;lt;font size=&amp;quot;-1&amp;quot; face=&amp;quot;tahoma,helvetica,arial,sans-serif&amp;quot;&amp;gt;'''Host game''' – this allows you to start a local server. &amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;188&amp;quot; |&lt;br /&gt;
[[Image:Menu_Settings.JPG|280px]]&lt;br /&gt;
| width=&amp;quot;380&amp;quot; |&lt;br /&gt;
&amp;lt;font size=&amp;quot;-1&amp;quot; face=&amp;quot;tahoma,helvetica,arial,sans-serif&amp;quot;&amp;gt;'''Settings '''– this allows you to change your in-game nickname, customize controls and adjust display settings.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;188&amp;quot; |&lt;br /&gt;
[[Image:About_Menu.jpg|280px]]&lt;br /&gt;
| width=&amp;quot;380&amp;quot; |&lt;br /&gt;
&amp;lt;font size=&amp;quot;-1&amp;quot; face=&amp;quot;tahoma,helvetica,arial,sans-serif&amp;quot;&amp;gt;'''About '''– this gives you a list of contributors to the project.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;188&amp;quot; |&lt;br /&gt;
[[Image:Map_Editor.jpg|280px]]&lt;br /&gt;
| width=&amp;quot;380&amp;quot; |&lt;br /&gt;
&amp;lt;font size=&amp;quot;-1&amp;quot; face=&amp;quot;tahoma,helvetica,arial,sans-serif&amp;quot;&amp;gt;'''Map editor '''– this allows you to create your own maps, complete with checkpoints, ramps, pickups and other objects. These can then be uploaded onto a server so that you can play them with other people.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;188&amp;quot; |&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
| width=&amp;quot;380&amp;quot; |&lt;br /&gt;
&amp;lt;font size=&amp;quot;-1&amp;quot; face=&amp;quot;tahoma,helvetica,arial,sans-serif&amp;quot;&amp;gt;'''Quit '''– this returns you back to your Windows desktop.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The easiest way to play the game is to click '''Browse Servers''' on the menu. If servers have not appeared already, press the '''Refresh''' button and MTA will scan for servers, displaying them as a list.&lt;br /&gt;
&lt;br /&gt;
* Under the '''Name''' tab, each server's name is displayed.&lt;br /&gt;
* Under the '''Players''' tab, the number of players and the maximum capacity of the server is displayed, in the format of [Used Slots] / [Maximum Slots].&lt;br /&gt;
* The '''Ping''' tab displays the ping, or latency, between your machine and the server. Ping is a measure of the time it takes for &amp;quot;packets&amp;quot; of data to be received back from the server after sending them, so a higher ping means that you will experience more lag on that particular server. Generally, servers closest to your location should have the lowest pings.&lt;br /&gt;
* The '''Host''' is the IP address of the server. You can use this address in future to connect to the same server via the Quick Connect option on the main menu.&lt;br /&gt;
&lt;br /&gt;
Each tab can be clicked to arrange the respective column in ascending or descending order.&lt;br /&gt;
&lt;br /&gt;
For optimal performance and gameplay, look for the best balance between players and ping.&lt;br /&gt;
&lt;br /&gt;
Once you have picked a server, select it and click the '''Connect''' button in the top right-hand corner of the dialog. If all goes well, you should connect to the server and automatically join the game.&lt;br /&gt;
&lt;br /&gt;
==How to Play==&lt;br /&gt;
&lt;br /&gt;
MTA:SA offers a comprehensive scripting system that allows map creators to customize many elements of the game in order to create their own innovative game modes. The game incorporates as many single player elements as possible but some aspects are different.&lt;br /&gt;
&lt;br /&gt;
There are no pedestrians and no AI traffic on the road. The only other people on the map are your opponents, or allies if it is a team game. You can talk with them using the chatbox located in the left-hand corner of the screen by pressing '''T'''. To chat only to your team members, press '''Y'''.&lt;br /&gt;
&lt;br /&gt;
MTA's map editor allows map creators to add various GTA objects to their maps including roads, exploding barrels, ramps, buildings, hills and more. Not only this, but the objects can be scripted to move, change model and disappear. This offers a great deal of fun and variation to the gameplay. &lt;br /&gt;
&lt;br /&gt;
Holding Tab will display the scoreboard. By default, only names and pings are displayed, but scripts can add extra columns that are specific to the particular gamemode being played. For example, a deathmatch game mode would definitely have a column listing total kills, but the map creator may choose to add extra columns for the number of deaths you have and how long you have been playing for, in order to put your score into perspective.&lt;br /&gt;
&lt;br /&gt;
==Controls==&lt;br /&gt;
&lt;br /&gt;
===In-Game Keys===&lt;br /&gt;
&lt;br /&gt;
* F8 (or Tilde Key) - Console&lt;br /&gt;
* F9 - In-game help&lt;br /&gt;
* F11 - Show SA map ''(the following list is for use when the map is up)''&lt;br /&gt;
**numpad  /- - Zoom in and out&lt;br /&gt;
**numpad 4, 8, 6, 2 - move map left, up, right, down&lt;br /&gt;
**numpad 0 - toggle between attach to local player (map follows player blip) and free move (map stays stationary)  &lt;br /&gt;
* F12 - Take a screenshot&lt;br /&gt;
* T - Chat&lt;br /&gt;
* Y - Team Chat&lt;br /&gt;
* TAB - Player List (if [[Scoreboard]] resource is running on the server)&lt;br /&gt;
&lt;br /&gt;
==Console Commands==&lt;br /&gt;
&lt;br /&gt;
'''bind defaults''' Binds control defaults in the settings menu&lt;br /&gt;
&lt;br /&gt;
Press '''~ (tilde)''' or '''F8''' to access the console, then type a command followed by any neccessary parameters (if applicable) then press Enter.&lt;br /&gt;
&lt;br /&gt;
;'''maps''' :This displays a list of all maps available on the server. &lt;br /&gt;
&lt;br /&gt;
;'''nick [nickname]''' :This changes your nickname whilst in-game to whatever you specify in the parameters.&lt;br /&gt;
&lt;br /&gt;
;'''msg [nickname] [message]''' or '''pm [nickname] [message]''' :This sends a private message to the person you specify in the [nickname] parameter. Only the person you specify can see the message. Both '''msg''' and '''pm''' perform the same function.&lt;br /&gt;
&lt;br /&gt;
;'''quit''' or '''exit''' :This disconnects you from the server and returns you to the Windows desktop. Performs the same function as the Quit button on the main menu.&lt;br /&gt;
&lt;br /&gt;
;'''ver''' :This displays the version number and copyright information for the software.&lt;br /&gt;
&lt;br /&gt;
;'''sver''' :This displays the version number of the server you are connected to.&lt;br /&gt;
&lt;br /&gt;
;'''time''' :This displays the current time.&lt;br /&gt;
&lt;br /&gt;
;'''disconnect''' :This disconnects you from the server and returns you to the main menu.&lt;br /&gt;
&lt;br /&gt;
;'''say [text]''' :This enables you to continue talking to people in the chat box whilst the console is open.&lt;br /&gt;
&lt;br /&gt;
;'''ignore [nickname]''' :This will not display any text typed by the player you wish to ignore. To stop ignoring a player, type '''ignore [nickname]''' again.&lt;br /&gt;
{{Tip|You can use these commands in the chatbox by putting a / (forward slash) in front of them.}}&lt;br /&gt;
&lt;br /&gt;
A list of console commands can be seen by typing '''help''' into the console and pressing Enter. The current map may also have extra commands which can be accessed by typing '''commands''' into the console.&lt;br /&gt;
&lt;br /&gt;
For information on more commands see: [[Client Commands]]&lt;br /&gt;
&lt;br /&gt;
==Error codes and their meanings==&lt;br /&gt;
'''Download errors'''&amp;lt;br&amp;gt;&lt;br /&gt;
0: UNKNOWN_ERROR&amp;lt;br&amp;gt;&lt;br /&gt;
1: INVALID_FILE_DESCRIPTORS&amp;lt;br&amp;gt;&lt;br /&gt;
2: INVALID_MAX_FILE_DESCRIPTOR&amp;lt;br&amp;gt;&lt;br /&gt;
3: INVALID_SELECT_RETURN&amp;lt;br&amp;gt;&lt;br /&gt;
4: INVALID_INITIAL_MULTI_PERFORM&amp;lt;br&amp;gt;&lt;br /&gt;
5: INVALID_MULTI_PERFORM_CODE&amp;lt;br&amp;gt;&lt;br /&gt;
6: INVALID_MULTI_PERFORM_CODE_NEW_DOWNLOADS&amp;lt;br&amp;gt;&lt;br /&gt;
7: UNEXPECTED_CURL_MESSAGE&amp;lt;br&amp;gt;&lt;br /&gt;
8: UNABLE_TO_CONNECT&amp;lt;br&amp;gt;&lt;br /&gt;
9: UNABLE_TO_DOWNLOAD_FILE&amp;lt;br&amp;gt;&lt;br /&gt;
10: FAILED_TO_INITIALIZE_DOWNLOAD&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Fatal errors'''&amp;lt;br&amp;gt;&lt;br /&gt;
1: no local player model on ingame event&amp;lt;br&amp;gt;&lt;br /&gt;
2: no local player on ingame event&amp;lt;br&amp;gt;&lt;br /&gt;
3: server downloads disabled&amp;lt;br&amp;gt;&lt;br /&gt;
4: no local player model on player-list packet&amp;lt;br&amp;gt;&lt;br /&gt;
5: no local player on player-list packet&amp;lt;br&amp;gt;&lt;br /&gt;
6: invalid custom data length on entity-add packet&amp;lt;br&amp;gt;&lt;br /&gt;
7: invalid bitstream data on entity-add packet&amp;lt;br&amp;gt;&lt;br /&gt;
8: system entity on entity-add packet&amp;lt;br&amp;gt;&lt;br /&gt;
9: failed to create object on entity-add packet&amp;lt;br&amp;gt;&lt;br /&gt;
10: failed to create pickup on entity-add packet&amp;lt;br&amp;gt;&lt;br /&gt;
11: failed to create vehicle on entity-add packet&amp;lt;br&amp;gt;&lt;br /&gt;
12: invalid team-name length on entity-add packet&amp;lt;br&amp;gt;&lt;br /&gt;
13: invalid lua-event name length in lua-event packet&amp;lt;br&amp;gt;&lt;br /&gt;
14: invalid resource name length in resource-start packet&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''''Unable to enter vehicle' errors'''&amp;lt;br&amp;gt;&lt;br /&gt;
1: script cancelled&amp;lt;br&amp;gt;&lt;br /&gt;
2: script cancelled (jack)&amp;lt;br&amp;gt;&lt;br /&gt;
3: current occupier is entering/exiting&amp;lt;br&amp;gt;&lt;br /&gt;
4: invalid seat&amp;lt;br&amp;gt;&lt;br /&gt;
5: not close enough&amp;lt;br&amp;gt;&lt;br /&gt;
6: already in a vehicle&amp;lt;br&amp;gt;&lt;br /&gt;
7: already entering/exiting&amp;lt;br&amp;gt;&lt;br /&gt;
8: invalid vehicle (trailer)&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Special: Playing MTA on Linux?==&lt;br /&gt;
If you're one of those who have Linux as OS, and want to have the client working on Linux,&lt;br /&gt;
please read the [[Client_on_Linux_Manual|Client on Linux Manual]]&lt;br /&gt;
&lt;br /&gt;
[[es:Manual Cliente Deathmatch]]&lt;br /&gt;
[[de:MTA DM Client Anleitung]]&lt;br /&gt;
[[it:Manuale del Client]]&lt;br /&gt;
[[nl:Deathmatch Client Manual]]&lt;br /&gt;
[[ru:Deathmatch Client Manual]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Support]]&lt;/div&gt;</summary>
		<author><name>Stanley Sathler .</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Client_Manual&amp;diff=30977</id>
		<title>Client Manual</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Client_Manual&amp;diff=30977"/>
		<updated>2012-05-19T21:14:06Z</updated>

		<summary type="html">&lt;p&gt;Stanley Sathler .: /* Introdução */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introdução==&lt;br /&gt;
Multi Theft Auto: San Andreas é o último de uma série de modificações multiplayer criados por fãs para os jogos da série Grand Theft Auto (disponível somente para PC). Se deseja as versões para GTA3 e Vice City, vá em [[Archive]]. O Multi Theft Auto não é patrocinado pela Rockstar Games ou Take 2 Interactive.&lt;br /&gt;
&lt;br /&gt;
==Before you start==&lt;br /&gt;
{{Note_box|Windows 8 (Developer/Consumer Preview) is not supported at this time! [[http://forum.mtasa.com/viewtopic.php?p=371531#p371531 Note 1]][[http://forum.mtasa.com/viewtopic.php?f=104&amp;amp;t=37037 Note 2]]}}&lt;br /&gt;
Before you install Multi Theft Auto: San Andreas, first make sure that there are no modifications to GTA:SA installed. These will conflict with MTA. If you would like to keep your single player mods, you can create two installations by reinstalling San Andreas to a second folder on your hard drive.&lt;br /&gt;
&lt;br /&gt;
Also make sure that you are running '''Windows XP''', '''Windows Vista''', '''Windows Server 2003''' or '''Windows 7''' and that your machine is capable of running the game in single player. Note that if you are running single player on the absolute minimum requirements, you will experience slowdowns in MTA as it takes up extra processing power.&lt;br /&gt;
{{Note|MTA:SA will only work on GTA:SA v1.0. If you bought the game recently, it is likely that you have a later version.''' [[Known_Issues_-_FAQ#Does_MTASA_work_with_v1.01_or_v2.00_of_GTA_San_Andreas.3F| More info]]}}&lt;br /&gt;
&lt;br /&gt;
Make sure you head over to the [[Known_Issues_-_FAQ|Known Issues]] page if you have issues, or join us on IRC @ irc://irc.multitheftauto.com/mta&lt;br /&gt;
&lt;br /&gt;
===System requirements===&lt;br /&gt;
The minimum system requirements for Multi Theft Auto: San Andreas are slightly higher than the original minimum requirements for Grand Theft Auto: San Andreas.&lt;br /&gt;
* Intel Pentium 4 or AMD Athlon XP&lt;br /&gt;
* 512MB DDR RAM&lt;br /&gt;
* Clean installation of Grand Theft Auto: San Andreas, version 1.0 (American or European)&lt;br /&gt;
* 3.7GB of free hard disk space (3.6GB for a minimum Grand Theft Auto installation)&lt;br /&gt;
* nVidia GeForce 4 series or ATI Radeon 8xxx series (64MB RAM and DirectX 9.0 compatible)&lt;br /&gt;
* DirectX 9.0 compatible sound card&lt;br /&gt;
* Keyboard and mouse&lt;br /&gt;
* Broadband internet access (for smooth online play)&lt;br /&gt;
&lt;br /&gt;
For extra features, a pixel shader 2.0 compatible videocard (nVidia GeForce FX series or higher, ATI Radeon 9xxx series or higher) is recommended.&lt;br /&gt;
&lt;br /&gt;
For extra loading performance, more RAM is recommended.&lt;br /&gt;
&lt;br /&gt;
==Installing the game==&lt;br /&gt;
&lt;br /&gt;
'''This section will need to be updated when we get an installer'''&lt;br /&gt;
&lt;br /&gt;
# If you haven't already, download the MTA:SA client from the download page at mtasa.com.&lt;br /&gt;
# Run the installer. You will be asked which components to install:&lt;br /&gt;
#* '''Client''' interfaces with the game and is a required component.&lt;br /&gt;
#* '''MTA Server''' enables you to host your own home-brew server&lt;br /&gt;
#* '''MTA Server &amp;gt; Editor''' is used to create new maps, this is an optional component&lt;br /&gt;
# You are then asked for a folder in which to install the mod. This can by anywhere and doesn't have to be in you San Andreas directory.&lt;br /&gt;
# Next, you will be asked for the directory where you have San Andreas installed. The default location is: '''C:\Program Files\Rockstar Games\GTA San Andreas\'''.&lt;br /&gt;
# When the installation completes, you will be given the option to start MTA: San Andreas straight away. Choose your option and then press '''Finish'''.&lt;br /&gt;
# You will be able to launch MTA:DM from your Start Menu if you wish to play.&lt;br /&gt;
&lt;br /&gt;
==Running the game==&lt;br /&gt;
# Start Multi Theft Auto by clicking the icon located in your Start Menu under '''MTA:San Andreas'''.&lt;br /&gt;
# GTA: San Andreas will start and once it is loaded, you will be presented with the MTA:SA main menu. Here you will find several options:&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
&lt;br /&gt;
| width=&amp;quot;188&amp;quot; |&lt;br /&gt;
[[Image:Server_Browser.jpg|280px]]&lt;br /&gt;
| width=&amp;quot;380&amp;quot; |&lt;br /&gt;
&amp;lt;font size=&amp;quot;-1&amp;quot; face=&amp;quot;tahoma,helvetica,arial,sans-serif&amp;quot;&amp;gt;'''Browse servers''' – this allows you to receive a list of available servers to play on. &amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;188&amp;quot; |&lt;br /&gt;
[[Image:Host_Game.jpg|280px]]&lt;br /&gt;
| width=&amp;quot;380&amp;quot; |&lt;br /&gt;
&amp;lt;font size=&amp;quot;-1&amp;quot; face=&amp;quot;tahoma,helvetica,arial,sans-serif&amp;quot;&amp;gt;'''Host game''' – this allows you to start a local server. &amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;188&amp;quot; |&lt;br /&gt;
[[Image:Menu_Settings.JPG|280px]]&lt;br /&gt;
| width=&amp;quot;380&amp;quot; |&lt;br /&gt;
&amp;lt;font size=&amp;quot;-1&amp;quot; face=&amp;quot;tahoma,helvetica,arial,sans-serif&amp;quot;&amp;gt;'''Settings '''– this allows you to change your in-game nickname, customize controls and adjust display settings.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;188&amp;quot; |&lt;br /&gt;
[[Image:About_Menu.jpg|280px]]&lt;br /&gt;
| width=&amp;quot;380&amp;quot; |&lt;br /&gt;
&amp;lt;font size=&amp;quot;-1&amp;quot; face=&amp;quot;tahoma,helvetica,arial,sans-serif&amp;quot;&amp;gt;'''About '''– this gives you a list of contributors to the project.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;188&amp;quot; |&lt;br /&gt;
[[Image:Map_Editor.jpg|280px]]&lt;br /&gt;
| width=&amp;quot;380&amp;quot; |&lt;br /&gt;
&amp;lt;font size=&amp;quot;-1&amp;quot; face=&amp;quot;tahoma,helvetica,arial,sans-serif&amp;quot;&amp;gt;'''Map editor '''– this allows you to create your own maps, complete with checkpoints, ramps, pickups and other objects. These can then be uploaded onto a server so that you can play them with other people.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;188&amp;quot; |&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
| width=&amp;quot;380&amp;quot; |&lt;br /&gt;
&amp;lt;font size=&amp;quot;-1&amp;quot; face=&amp;quot;tahoma,helvetica,arial,sans-serif&amp;quot;&amp;gt;'''Quit '''– this returns you back to your Windows desktop.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The easiest way to play the game is to click '''Browse Servers''' on the menu. If servers have not appeared already, press the '''Refresh''' button and MTA will scan for servers, displaying them as a list.&lt;br /&gt;
&lt;br /&gt;
* Under the '''Name''' tab, each server's name is displayed.&lt;br /&gt;
* Under the '''Players''' tab, the number of players and the maximum capacity of the server is displayed, in the format of [Used Slots] / [Maximum Slots].&lt;br /&gt;
* The '''Ping''' tab displays the ping, or latency, between your machine and the server. Ping is a measure of the time it takes for &amp;quot;packets&amp;quot; of data to be received back from the server after sending them, so a higher ping means that you will experience more lag on that particular server. Generally, servers closest to your location should have the lowest pings.&lt;br /&gt;
* The '''Host''' is the IP address of the server. You can use this address in future to connect to the same server via the Quick Connect option on the main menu.&lt;br /&gt;
&lt;br /&gt;
Each tab can be clicked to arrange the respective column in ascending or descending order.&lt;br /&gt;
&lt;br /&gt;
For optimal performance and gameplay, look for the best balance between players and ping.&lt;br /&gt;
&lt;br /&gt;
Once you have picked a server, select it and click the '''Connect''' button in the top right-hand corner of the dialog. If all goes well, you should connect to the server and automatically join the game.&lt;br /&gt;
&lt;br /&gt;
==How to Play==&lt;br /&gt;
&lt;br /&gt;
MTA:SA offers a comprehensive scripting system that allows map creators to customize many elements of the game in order to create their own innovative game modes. The game incorporates as many single player elements as possible but some aspects are different.&lt;br /&gt;
&lt;br /&gt;
There are no pedestrians and no AI traffic on the road. The only other people on the map are your opponents, or allies if it is a team game. You can talk with them using the chatbox located in the left-hand corner of the screen by pressing '''T'''. To chat only to your team members, press '''Y'''.&lt;br /&gt;
&lt;br /&gt;
MTA's map editor allows map creators to add various GTA objects to their maps including roads, exploding barrels, ramps, buildings, hills and more. Not only this, but the objects can be scripted to move, change model and disappear. This offers a great deal of fun and variation to the gameplay. &lt;br /&gt;
&lt;br /&gt;
Holding Tab will display the scoreboard. By default, only names and pings are displayed, but scripts can add extra columns that are specific to the particular gamemode being played. For example, a deathmatch game mode would definitely have a column listing total kills, but the map creator may choose to add extra columns for the number of deaths you have and how long you have been playing for, in order to put your score into perspective.&lt;br /&gt;
&lt;br /&gt;
==Controls==&lt;br /&gt;
&lt;br /&gt;
===In-Game Keys===&lt;br /&gt;
&lt;br /&gt;
* F8 (or Tilde Key) - Console&lt;br /&gt;
* F9 - In-game help&lt;br /&gt;
* F11 - Show SA map ''(the following list is for use when the map is up)''&lt;br /&gt;
**numpad  /- - Zoom in and out&lt;br /&gt;
**numpad 4, 8, 6, 2 - move map left, up, right, down&lt;br /&gt;
**numpad 0 - toggle between attach to local player (map follows player blip) and free move (map stays stationary)  &lt;br /&gt;
* F12 - Take a screenshot&lt;br /&gt;
* T - Chat&lt;br /&gt;
* Y - Team Chat&lt;br /&gt;
* TAB - Player List (if [[Scoreboard]] resource is running on the server)&lt;br /&gt;
&lt;br /&gt;
==Console Commands==&lt;br /&gt;
&lt;br /&gt;
'''bind defaults''' Binds control defaults in the settings menu&lt;br /&gt;
&lt;br /&gt;
Press '''~ (tilde)''' or '''F8''' to access the console, then type a command followed by any neccessary parameters (if applicable) then press Enter.&lt;br /&gt;
&lt;br /&gt;
;'''maps''' :This displays a list of all maps available on the server. &lt;br /&gt;
&lt;br /&gt;
;'''nick [nickname]''' :This changes your nickname whilst in-game to whatever you specify in the parameters.&lt;br /&gt;
&lt;br /&gt;
;'''msg [nickname] [message]''' or '''pm [nickname] [message]''' :This sends a private message to the person you specify in the [nickname] parameter. Only the person you specify can see the message. Both '''msg''' and '''pm''' perform the same function.&lt;br /&gt;
&lt;br /&gt;
;'''quit''' or '''exit''' :This disconnects you from the server and returns you to the Windows desktop. Performs the same function as the Quit button on the main menu.&lt;br /&gt;
&lt;br /&gt;
;'''ver''' :This displays the version number and copyright information for the software.&lt;br /&gt;
&lt;br /&gt;
;'''sver''' :This displays the version number of the server you are connected to.&lt;br /&gt;
&lt;br /&gt;
;'''time''' :This displays the current time.&lt;br /&gt;
&lt;br /&gt;
;'''disconnect''' :This disconnects you from the server and returns you to the main menu.&lt;br /&gt;
&lt;br /&gt;
;'''say [text]''' :This enables you to continue talking to people in the chat box whilst the console is open.&lt;br /&gt;
&lt;br /&gt;
;'''ignore [nickname]''' :This will not display any text typed by the player you wish to ignore. To stop ignoring a player, type '''ignore [nickname]''' again.&lt;br /&gt;
{{Tip|You can use these commands in the chatbox by putting a / (forward slash) in front of them.}}&lt;br /&gt;
&lt;br /&gt;
A list of console commands can be seen by typing '''help''' into the console and pressing Enter. The current map may also have extra commands which can be accessed by typing '''commands''' into the console.&lt;br /&gt;
&lt;br /&gt;
For information on more commands see: [[Client Commands]]&lt;br /&gt;
&lt;br /&gt;
==Error codes and their meanings==&lt;br /&gt;
'''Download errors'''&amp;lt;br&amp;gt;&lt;br /&gt;
0: UNKNOWN_ERROR&amp;lt;br&amp;gt;&lt;br /&gt;
1: INVALID_FILE_DESCRIPTORS&amp;lt;br&amp;gt;&lt;br /&gt;
2: INVALID_MAX_FILE_DESCRIPTOR&amp;lt;br&amp;gt;&lt;br /&gt;
3: INVALID_SELECT_RETURN&amp;lt;br&amp;gt;&lt;br /&gt;
4: INVALID_INITIAL_MULTI_PERFORM&amp;lt;br&amp;gt;&lt;br /&gt;
5: INVALID_MULTI_PERFORM_CODE&amp;lt;br&amp;gt;&lt;br /&gt;
6: INVALID_MULTI_PERFORM_CODE_NEW_DOWNLOADS&amp;lt;br&amp;gt;&lt;br /&gt;
7: UNEXPECTED_CURL_MESSAGE&amp;lt;br&amp;gt;&lt;br /&gt;
8: UNABLE_TO_CONNECT&amp;lt;br&amp;gt;&lt;br /&gt;
9: UNABLE_TO_DOWNLOAD_FILE&amp;lt;br&amp;gt;&lt;br /&gt;
10: FAILED_TO_INITIALIZE_DOWNLOAD&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Fatal errors'''&amp;lt;br&amp;gt;&lt;br /&gt;
1: no local player model on ingame event&amp;lt;br&amp;gt;&lt;br /&gt;
2: no local player on ingame event&amp;lt;br&amp;gt;&lt;br /&gt;
3: server downloads disabled&amp;lt;br&amp;gt;&lt;br /&gt;
4: no local player model on player-list packet&amp;lt;br&amp;gt;&lt;br /&gt;
5: no local player on player-list packet&amp;lt;br&amp;gt;&lt;br /&gt;
6: invalid custom data length on entity-add packet&amp;lt;br&amp;gt;&lt;br /&gt;
7: invalid bitstream data on entity-add packet&amp;lt;br&amp;gt;&lt;br /&gt;
8: system entity on entity-add packet&amp;lt;br&amp;gt;&lt;br /&gt;
9: failed to create object on entity-add packet&amp;lt;br&amp;gt;&lt;br /&gt;
10: failed to create pickup on entity-add packet&amp;lt;br&amp;gt;&lt;br /&gt;
11: failed to create vehicle on entity-add packet&amp;lt;br&amp;gt;&lt;br /&gt;
12: invalid team-name length on entity-add packet&amp;lt;br&amp;gt;&lt;br /&gt;
13: invalid lua-event name length in lua-event packet&amp;lt;br&amp;gt;&lt;br /&gt;
14: invalid resource name length in resource-start packet&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''''Unable to enter vehicle' errors'''&amp;lt;br&amp;gt;&lt;br /&gt;
1: script cancelled&amp;lt;br&amp;gt;&lt;br /&gt;
2: script cancelled (jack)&amp;lt;br&amp;gt;&lt;br /&gt;
3: current occupier is entering/exiting&amp;lt;br&amp;gt;&lt;br /&gt;
4: invalid seat&amp;lt;br&amp;gt;&lt;br /&gt;
5: not close enough&amp;lt;br&amp;gt;&lt;br /&gt;
6: already in a vehicle&amp;lt;br&amp;gt;&lt;br /&gt;
7: already entering/exiting&amp;lt;br&amp;gt;&lt;br /&gt;
8: invalid vehicle (trailer)&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Special: Playing MTA on Linux?==&lt;br /&gt;
If you're one of those who have Linux as OS, and want to have the client working on Linux,&lt;br /&gt;
please read the [[Client_on_Linux_Manual|Client on Linux Manual]]&lt;br /&gt;
&lt;br /&gt;
[[es:Manual Cliente Deathmatch]]&lt;br /&gt;
[[de:MTA DM Client Anleitung]]&lt;br /&gt;
[[it:Manuale del Client]]&lt;br /&gt;
[[nl:Deathmatch Client Manual]]&lt;br /&gt;
[[ru:Deathmatch Client Manual]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Support]]&lt;/div&gt;</summary>
		<author><name>Stanley Sathler .</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Client_Manual&amp;diff=30976</id>
		<title>Client Manual</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Client_Manual&amp;diff=30976"/>
		<updated>2012-05-19T21:13:15Z</updated>

		<summary type="html">&lt;p&gt;Stanley Sathler .: /* Introdução */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introdução==&lt;br /&gt;
Multi Theft Auto: San Andreas is the latest in a series of fan-created multiplayer modifications for the Grand Theft Auto games (PC versions only). For the GTA3 and Vice City versions that run on the old core, go to the [[Archive]]. This mod is not endorsed by Rockstar Games or Take 2 Interactive.&lt;br /&gt;
&lt;br /&gt;
Multi Theft Auto: San Andreas é o último de uma série de modificações multiplayer criados por fãs para os jogos da série Grand Theft Auto (disponível somente para PC). Se deseja as versões para GTA3 e Vice City, vá em [[Archive]]. O Multi Theft Auto não é patrocinado pela Rockstar Games ou Take 2 Interactive.&lt;br /&gt;
&lt;br /&gt;
==Before you start==&lt;br /&gt;
{{Note_box|Windows 8 (Developer/Consumer Preview) is not supported at this time! [[http://forum.mtasa.com/viewtopic.php?p=371531#p371531 Note 1]][[http://forum.mtasa.com/viewtopic.php?f=104&amp;amp;t=37037 Note 2]]}}&lt;br /&gt;
Before you install Multi Theft Auto: San Andreas, first make sure that there are no modifications to GTA:SA installed. These will conflict with MTA. If you would like to keep your single player mods, you can create two installations by reinstalling San Andreas to a second folder on your hard drive.&lt;br /&gt;
&lt;br /&gt;
Also make sure that you are running '''Windows XP''', '''Windows Vista''', '''Windows Server 2003''' or '''Windows 7''' and that your machine is capable of running the game in single player. Note that if you are running single player on the absolute minimum requirements, you will experience slowdowns in MTA as it takes up extra processing power.&lt;br /&gt;
{{Note|MTA:SA will only work on GTA:SA v1.0. If you bought the game recently, it is likely that you have a later version.''' [[Known_Issues_-_FAQ#Does_MTASA_work_with_v1.01_or_v2.00_of_GTA_San_Andreas.3F| More info]]}}&lt;br /&gt;
&lt;br /&gt;
Make sure you head over to the [[Known_Issues_-_FAQ|Known Issues]] page if you have issues, or join us on IRC @ irc://irc.multitheftauto.com/mta&lt;br /&gt;
&lt;br /&gt;
===System requirements===&lt;br /&gt;
The minimum system requirements for Multi Theft Auto: San Andreas are slightly higher than the original minimum requirements for Grand Theft Auto: San Andreas.&lt;br /&gt;
* Intel Pentium 4 or AMD Athlon XP&lt;br /&gt;
* 512MB DDR RAM&lt;br /&gt;
* Clean installation of Grand Theft Auto: San Andreas, version 1.0 (American or European)&lt;br /&gt;
* 3.7GB of free hard disk space (3.6GB for a minimum Grand Theft Auto installation)&lt;br /&gt;
* nVidia GeForce 4 series or ATI Radeon 8xxx series (64MB RAM and DirectX 9.0 compatible)&lt;br /&gt;
* DirectX 9.0 compatible sound card&lt;br /&gt;
* Keyboard and mouse&lt;br /&gt;
* Broadband internet access (for smooth online play)&lt;br /&gt;
&lt;br /&gt;
For extra features, a pixel shader 2.0 compatible videocard (nVidia GeForce FX series or higher, ATI Radeon 9xxx series or higher) is recommended.&lt;br /&gt;
&lt;br /&gt;
For extra loading performance, more RAM is recommended.&lt;br /&gt;
&lt;br /&gt;
==Installing the game==&lt;br /&gt;
&lt;br /&gt;
'''This section will need to be updated when we get an installer'''&lt;br /&gt;
&lt;br /&gt;
# If you haven't already, download the MTA:SA client from the download page at mtasa.com.&lt;br /&gt;
# Run the installer. You will be asked which components to install:&lt;br /&gt;
#* '''Client''' interfaces with the game and is a required component.&lt;br /&gt;
#* '''MTA Server''' enables you to host your own home-brew server&lt;br /&gt;
#* '''MTA Server &amp;gt; Editor''' is used to create new maps, this is an optional component&lt;br /&gt;
# You are then asked for a folder in which to install the mod. This can by anywhere and doesn't have to be in you San Andreas directory.&lt;br /&gt;
# Next, you will be asked for the directory where you have San Andreas installed. The default location is: '''C:\Program Files\Rockstar Games\GTA San Andreas\'''.&lt;br /&gt;
# When the installation completes, you will be given the option to start MTA: San Andreas straight away. Choose your option and then press '''Finish'''.&lt;br /&gt;
# You will be able to launch MTA:DM from your Start Menu if you wish to play.&lt;br /&gt;
&lt;br /&gt;
==Running the game==&lt;br /&gt;
# Start Multi Theft Auto by clicking the icon located in your Start Menu under '''MTA:San Andreas'''.&lt;br /&gt;
# GTA: San Andreas will start and once it is loaded, you will be presented with the MTA:SA main menu. Here you will find several options:&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
&lt;br /&gt;
| width=&amp;quot;188&amp;quot; |&lt;br /&gt;
[[Image:Server_Browser.jpg|280px]]&lt;br /&gt;
| width=&amp;quot;380&amp;quot; |&lt;br /&gt;
&amp;lt;font size=&amp;quot;-1&amp;quot; face=&amp;quot;tahoma,helvetica,arial,sans-serif&amp;quot;&amp;gt;'''Browse servers''' – this allows you to receive a list of available servers to play on. &amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;188&amp;quot; |&lt;br /&gt;
[[Image:Host_Game.jpg|280px]]&lt;br /&gt;
| width=&amp;quot;380&amp;quot; |&lt;br /&gt;
&amp;lt;font size=&amp;quot;-1&amp;quot; face=&amp;quot;tahoma,helvetica,arial,sans-serif&amp;quot;&amp;gt;'''Host game''' – this allows you to start a local server. &amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;188&amp;quot; |&lt;br /&gt;
[[Image:Menu_Settings.JPG|280px]]&lt;br /&gt;
| width=&amp;quot;380&amp;quot; |&lt;br /&gt;
&amp;lt;font size=&amp;quot;-1&amp;quot; face=&amp;quot;tahoma,helvetica,arial,sans-serif&amp;quot;&amp;gt;'''Settings '''– this allows you to change your in-game nickname, customize controls and adjust display settings.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;188&amp;quot; |&lt;br /&gt;
[[Image:About_Menu.jpg|280px]]&lt;br /&gt;
| width=&amp;quot;380&amp;quot; |&lt;br /&gt;
&amp;lt;font size=&amp;quot;-1&amp;quot; face=&amp;quot;tahoma,helvetica,arial,sans-serif&amp;quot;&amp;gt;'''About '''– this gives you a list of contributors to the project.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;188&amp;quot; |&lt;br /&gt;
[[Image:Map_Editor.jpg|280px]]&lt;br /&gt;
| width=&amp;quot;380&amp;quot; |&lt;br /&gt;
&amp;lt;font size=&amp;quot;-1&amp;quot; face=&amp;quot;tahoma,helvetica,arial,sans-serif&amp;quot;&amp;gt;'''Map editor '''– this allows you to create your own maps, complete with checkpoints, ramps, pickups and other objects. These can then be uploaded onto a server so that you can play them with other people.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;188&amp;quot; |&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
| width=&amp;quot;380&amp;quot; |&lt;br /&gt;
&amp;lt;font size=&amp;quot;-1&amp;quot; face=&amp;quot;tahoma,helvetica,arial,sans-serif&amp;quot;&amp;gt;'''Quit '''– this returns you back to your Windows desktop.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The easiest way to play the game is to click '''Browse Servers''' on the menu. If servers have not appeared already, press the '''Refresh''' button and MTA will scan for servers, displaying them as a list.&lt;br /&gt;
&lt;br /&gt;
* Under the '''Name''' tab, each server's name is displayed.&lt;br /&gt;
* Under the '''Players''' tab, the number of players and the maximum capacity of the server is displayed, in the format of [Used Slots] / [Maximum Slots].&lt;br /&gt;
* The '''Ping''' tab displays the ping, or latency, between your machine and the server. Ping is a measure of the time it takes for &amp;quot;packets&amp;quot; of data to be received back from the server after sending them, so a higher ping means that you will experience more lag on that particular server. Generally, servers closest to your location should have the lowest pings.&lt;br /&gt;
* The '''Host''' is the IP address of the server. You can use this address in future to connect to the same server via the Quick Connect option on the main menu.&lt;br /&gt;
&lt;br /&gt;
Each tab can be clicked to arrange the respective column in ascending or descending order.&lt;br /&gt;
&lt;br /&gt;
For optimal performance and gameplay, look for the best balance between players and ping.&lt;br /&gt;
&lt;br /&gt;
Once you have picked a server, select it and click the '''Connect''' button in the top right-hand corner of the dialog. If all goes well, you should connect to the server and automatically join the game.&lt;br /&gt;
&lt;br /&gt;
==How to Play==&lt;br /&gt;
&lt;br /&gt;
MTA:SA offers a comprehensive scripting system that allows map creators to customize many elements of the game in order to create their own innovative game modes. The game incorporates as many single player elements as possible but some aspects are different.&lt;br /&gt;
&lt;br /&gt;
There are no pedestrians and no AI traffic on the road. The only other people on the map are your opponents, or allies if it is a team game. You can talk with them using the chatbox located in the left-hand corner of the screen by pressing '''T'''. To chat only to your team members, press '''Y'''.&lt;br /&gt;
&lt;br /&gt;
MTA's map editor allows map creators to add various GTA objects to their maps including roads, exploding barrels, ramps, buildings, hills and more. Not only this, but the objects can be scripted to move, change model and disappear. This offers a great deal of fun and variation to the gameplay. &lt;br /&gt;
&lt;br /&gt;
Holding Tab will display the scoreboard. By default, only names and pings are displayed, but scripts can add extra columns that are specific to the particular gamemode being played. For example, a deathmatch game mode would definitely have a column listing total kills, but the map creator may choose to add extra columns for the number of deaths you have and how long you have been playing for, in order to put your score into perspective.&lt;br /&gt;
&lt;br /&gt;
==Controls==&lt;br /&gt;
&lt;br /&gt;
===In-Game Keys===&lt;br /&gt;
&lt;br /&gt;
* F8 (or Tilde Key) - Console&lt;br /&gt;
* F9 - In-game help&lt;br /&gt;
* F11 - Show SA map ''(the following list is for use when the map is up)''&lt;br /&gt;
**numpad  /- - Zoom in and out&lt;br /&gt;
**numpad 4, 8, 6, 2 - move map left, up, right, down&lt;br /&gt;
**numpad 0 - toggle between attach to local player (map follows player blip) and free move (map stays stationary)  &lt;br /&gt;
* F12 - Take a screenshot&lt;br /&gt;
* T - Chat&lt;br /&gt;
* Y - Team Chat&lt;br /&gt;
* TAB - Player List (if [[Scoreboard]] resource is running on the server)&lt;br /&gt;
&lt;br /&gt;
==Console Commands==&lt;br /&gt;
&lt;br /&gt;
'''bind defaults''' Binds control defaults in the settings menu&lt;br /&gt;
&lt;br /&gt;
Press '''~ (tilde)''' or '''F8''' to access the console, then type a command followed by any neccessary parameters (if applicable) then press Enter.&lt;br /&gt;
&lt;br /&gt;
;'''maps''' :This displays a list of all maps available on the server. &lt;br /&gt;
&lt;br /&gt;
;'''nick [nickname]''' :This changes your nickname whilst in-game to whatever you specify in the parameters.&lt;br /&gt;
&lt;br /&gt;
;'''msg [nickname] [message]''' or '''pm [nickname] [message]''' :This sends a private message to the person you specify in the [nickname] parameter. Only the person you specify can see the message. Both '''msg''' and '''pm''' perform the same function.&lt;br /&gt;
&lt;br /&gt;
;'''quit''' or '''exit''' :This disconnects you from the server and returns you to the Windows desktop. Performs the same function as the Quit button on the main menu.&lt;br /&gt;
&lt;br /&gt;
;'''ver''' :This displays the version number and copyright information for the software.&lt;br /&gt;
&lt;br /&gt;
;'''sver''' :This displays the version number of the server you are connected to.&lt;br /&gt;
&lt;br /&gt;
;'''time''' :This displays the current time.&lt;br /&gt;
&lt;br /&gt;
;'''disconnect''' :This disconnects you from the server and returns you to the main menu.&lt;br /&gt;
&lt;br /&gt;
;'''say [text]''' :This enables you to continue talking to people in the chat box whilst the console is open.&lt;br /&gt;
&lt;br /&gt;
;'''ignore [nickname]''' :This will not display any text typed by the player you wish to ignore. To stop ignoring a player, type '''ignore [nickname]''' again.&lt;br /&gt;
{{Tip|You can use these commands in the chatbox by putting a / (forward slash) in front of them.}}&lt;br /&gt;
&lt;br /&gt;
A list of console commands can be seen by typing '''help''' into the console and pressing Enter. The current map may also have extra commands which can be accessed by typing '''commands''' into the console.&lt;br /&gt;
&lt;br /&gt;
For information on more commands see: [[Client Commands]]&lt;br /&gt;
&lt;br /&gt;
==Error codes and their meanings==&lt;br /&gt;
'''Download errors'''&amp;lt;br&amp;gt;&lt;br /&gt;
0: UNKNOWN_ERROR&amp;lt;br&amp;gt;&lt;br /&gt;
1: INVALID_FILE_DESCRIPTORS&amp;lt;br&amp;gt;&lt;br /&gt;
2: INVALID_MAX_FILE_DESCRIPTOR&amp;lt;br&amp;gt;&lt;br /&gt;
3: INVALID_SELECT_RETURN&amp;lt;br&amp;gt;&lt;br /&gt;
4: INVALID_INITIAL_MULTI_PERFORM&amp;lt;br&amp;gt;&lt;br /&gt;
5: INVALID_MULTI_PERFORM_CODE&amp;lt;br&amp;gt;&lt;br /&gt;
6: INVALID_MULTI_PERFORM_CODE_NEW_DOWNLOADS&amp;lt;br&amp;gt;&lt;br /&gt;
7: UNEXPECTED_CURL_MESSAGE&amp;lt;br&amp;gt;&lt;br /&gt;
8: UNABLE_TO_CONNECT&amp;lt;br&amp;gt;&lt;br /&gt;
9: UNABLE_TO_DOWNLOAD_FILE&amp;lt;br&amp;gt;&lt;br /&gt;
10: FAILED_TO_INITIALIZE_DOWNLOAD&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Fatal errors'''&amp;lt;br&amp;gt;&lt;br /&gt;
1: no local player model on ingame event&amp;lt;br&amp;gt;&lt;br /&gt;
2: no local player on ingame event&amp;lt;br&amp;gt;&lt;br /&gt;
3: server downloads disabled&amp;lt;br&amp;gt;&lt;br /&gt;
4: no local player model on player-list packet&amp;lt;br&amp;gt;&lt;br /&gt;
5: no local player on player-list packet&amp;lt;br&amp;gt;&lt;br /&gt;
6: invalid custom data length on entity-add packet&amp;lt;br&amp;gt;&lt;br /&gt;
7: invalid bitstream data on entity-add packet&amp;lt;br&amp;gt;&lt;br /&gt;
8: system entity on entity-add packet&amp;lt;br&amp;gt;&lt;br /&gt;
9: failed to create object on entity-add packet&amp;lt;br&amp;gt;&lt;br /&gt;
10: failed to create pickup on entity-add packet&amp;lt;br&amp;gt;&lt;br /&gt;
11: failed to create vehicle on entity-add packet&amp;lt;br&amp;gt;&lt;br /&gt;
12: invalid team-name length on entity-add packet&amp;lt;br&amp;gt;&lt;br /&gt;
13: invalid lua-event name length in lua-event packet&amp;lt;br&amp;gt;&lt;br /&gt;
14: invalid resource name length in resource-start packet&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''''Unable to enter vehicle' errors'''&amp;lt;br&amp;gt;&lt;br /&gt;
1: script cancelled&amp;lt;br&amp;gt;&lt;br /&gt;
2: script cancelled (jack)&amp;lt;br&amp;gt;&lt;br /&gt;
3: current occupier is entering/exiting&amp;lt;br&amp;gt;&lt;br /&gt;
4: invalid seat&amp;lt;br&amp;gt;&lt;br /&gt;
5: not close enough&amp;lt;br&amp;gt;&lt;br /&gt;
6: already in a vehicle&amp;lt;br&amp;gt;&lt;br /&gt;
7: already entering/exiting&amp;lt;br&amp;gt;&lt;br /&gt;
8: invalid vehicle (trailer)&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Special: Playing MTA on Linux?==&lt;br /&gt;
If you're one of those who have Linux as OS, and want to have the client working on Linux,&lt;br /&gt;
please read the [[Client_on_Linux_Manual|Client on Linux Manual]]&lt;br /&gt;
&lt;br /&gt;
[[es:Manual Cliente Deathmatch]]&lt;br /&gt;
[[de:MTA DM Client Anleitung]]&lt;br /&gt;
[[it:Manuale del Client]]&lt;br /&gt;
[[nl:Deathmatch Client Manual]]&lt;br /&gt;
[[ru:Deathmatch Client Manual]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Support]]&lt;/div&gt;</summary>
		<author><name>Stanley Sathler .</name></author>
	</entry>
</feed>