<?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=SkyBon</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=SkyBon"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/wiki/Special:Contributions/SkyBon"/>
	<updated>2026-05-16T12:00:17Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=%D0%92%D0%B2%D0%B5%D0%B4%D0%B5%D0%BD%D0%B8%D0%B5_%D0%B2_%D1%81%D0%BA%D1%80%D0%B8%D0%BF%D1%82%D0%B8%D0%BD%D0%B3&amp;diff=19194</id>
		<title>Введение в скриптинг</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=%D0%92%D0%B2%D0%B5%D0%B4%D0%B5%D0%BD%D0%B8%D0%B5_%D0%B2_%D1%81%D0%BA%D1%80%D0%B8%D0%BF%D1%82%D0%B8%D0%BD%D0%B3&amp;diff=19194"/>
		<updated>2009-04-19T14:30:02Z</updated>

		<summary type="html">&lt;p&gt;SkyBon: будет более удобочитабельно&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Ресурсы являются ключевой частью MTA. Ресурс - это папка или zip архив, содержащий набор файлов, а также мета файл, описывающий серверу, как нужно загружать ресурс и из каких файлов он состоит. Ресурс играет практически ту же роль, что и программа в операционной системе - он может быть запущен и остановлен, а также могут быть запущены несколько ресурсов одновременно. Всё, что выполняется с помощью сценариев находится в ресурсах, что реализовано в сценариях: игровые режимы, игровые карты или что-либо ещё - все это ресурсы.&lt;br /&gt;
&lt;br /&gt;
'''Вам будет проще начать писать сценарии на языке Lua, если вы будете использовать специализированный Lua-редактор такой как[http://notepad-plus.sourceforge.net/uk/site.htm Notepad++] или [http://luaedit.luaforge.net/ LuaEdit].'''&lt;br /&gt;
&lt;br /&gt;
==Создание простого сценария==&lt;br /&gt;
Для начала давайте сделаем так, чтобы по команде игрока &amp;quot;createvehicle&amp;quot; рядом с игроком создавалась машина.&lt;br /&gt;
&lt;br /&gt;
===Подготовка===&lt;br /&gt;
Как описывалось выше, ресурс является папкой или zip архивом, поэтому для начала мы должны создать папку. Название папки является названием ресурса. Это название используется для запуска или прекращения выполнения ресурса и для обращения к ресурсу в сценариях. В нашем примере, папку необходимо назвать ''commands''. &lt;br /&gt;
&lt;br /&gt;
Каждому ресурсу необходим файл ''meta.xml''. В нашем случае, мы хотим создать сценарий, который обеспечит пользователю выполнение нескольких простых команд, поэтому нам необходимо сообщить серверу о необходимости загрузки файла сценария, в нашем случае таким файлом сценария пусть будет ''script.lua''.&lt;br /&gt;
Содержимое файла ''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;YourName&amp;quot; description=&amp;quot;A few simple commands&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;
Теперь нам необходимо создать файл ''script.lua'', о котором упоминалось выше, в той же самой директории, где расположен файл ''meta.xml''. В результате содержимое папки ''commands'' должно быть таким:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
/commands/meta.xml&lt;br /&gt;
/commands/script.lua&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Написание сценария===&lt;br /&gt;
Начнем с содержимого файла ''script.lua''. Как описывалось выше, нам необходимо обеспечить команду, которая будет создавать машину рядом с игроком. Для начала нам необходимо создать функцию, которую мы будем вызывать, и обработчик команды, который позволит игроку вводить и выполнять команду в окне консоли.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- создание функции, вызываемой обработчиком команды, с аргументами: thePlayer, command, vehicleModel&lt;br /&gt;
function createVehicleForPlayer(thePlayer, command, vehicleModel)&lt;br /&gt;
   -- код сценария для создания машины&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- создание обработчика команды&lt;br /&gt;
addCommandHandler(&amp;quot;createvehicle&amp;quot;, createVehicleForPlayer)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
''Обратите внимание: Имена функций в коде примеров являются ссылками на wiki-статьи, описывающие функции в документации.''&lt;br /&gt;
&lt;br /&gt;
====О обработчиках команд====&lt;br /&gt;
Первым аргументом [[addCommandHandler]] название команды, введенной игроком, второй аргумент - функция, которая будет вызвана, в нашем случае это ''createVehicleForPlayer''.&lt;br /&gt;
&lt;br /&gt;
Если вы уже знакомы с написанием сценариев, то вам наверняка приходилось вызывать функции следующего вида:&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;
&lt;br /&gt;
Таким способом мы вызываем функцию [[addCommandHandler]], а затем функцию ''createVehicleForPlayer''. Она, конечно же, может быть вызвана этим же способом отдельно. Но для нее мы используем обработчик команды, который вызывает ее в пожожей манере, но только внутри.&lt;br /&gt;
&lt;br /&gt;
Например: Какой-нибудь игрок в процессе игры введет в окно консоли команду &amp;quot;createvehicle 468&amp;quot; для создания машины Sanchez, обработчик команды вызовет функцию createVehicleForPlayer , так же, как '''если бы''' у нас в коде сценария была строка:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
createVehiceForPlayer(thePlayer,&amp;quot;createvehicle&amp;quot;,&amp;quot;468&amp;quot;) -- thePlayer это игрок, который ввел команду&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Эта функция имеет несколько параметров: параметр, отвечающий за игрока, который ввел команду, параметр, имеющий в качестве значения введенную команду и параметр, содержащий текст, который следовал после команды, в нашем случае это &amp;quot;468&amp;quot; - идентификатор машины Sanchez. Первые два параметра такие же, как и у остальных обработчиков команд, о которых вы можете прочитать информацию на странице [[addEventHandler]]. Поэтому, вы всегда должны определить, по крайней мере, эти два параметра для использования чего-либо после них (например, для обработки текста, введенного после команды, как в нашем примере - идентификатора модели машины).&lt;br /&gt;
&lt;br /&gt;
''Обратите внимание: Вы можете добавить обработчик команды только ПОСЛЕ того, как вы определили функцию обработчика, иначе она не будет найдена. Порядок размещения функций имеет значение.''&lt;br /&gt;
&lt;br /&gt;
====Написание функции====&lt;br /&gt;
Для того, чтобы написать код созданной функции, нам необходимо продумать детали того, что мы хотим сделать:&lt;br /&gt;
* Получить позицию игроков для того, чтобы знать куда поместить новую машину (допустим, что мы хотим, чтобы она появилась справа от игрока)&lt;br /&gt;
* Вычислить позицию того места, куда необходимо поместить машину (это необходимо для того, чтобы она не появилась на месте игрока)&lt;br /&gt;
* Создать машину&lt;br /&gt;
* Проверить успешность создания машины или вывести сообщение&lt;br /&gt;
&lt;br /&gt;
Для того, чтобы выполнить поставленные задачи, мы должны использовать несколько функций. Чтобы найти подходящую для решения задачи функцию, мы должны посмотреть страницу [[Scripting Functions|Список функций серверного приложения]]. Сначала нам необходима функция для получения позиции игроков. Так как игроки относятся к [[RU/Element|'''элементам''']] (основным классам, описывающим игровые сущности или, проще говоря, игровые объекты), то мы сначала переходим к странице [[Server_Scripting_Functions#Element_functions|'''Element functions''']], где и находим функцию [[getElementPosition]]. Щелкнув по названию функции в списке, мы получаем описание функции. Тут же мы можем посмотреть синтаксис, возвращаемое значение и даже пример ее использования. Синтаксис показывает нам, какие аргументы необходимо передать функции.&lt;br /&gt;
&lt;br /&gt;
функция [[getElementPosition]], имеет следующий синтаксис:&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;
Три ''float'' перед названием функции - это тип возвращаемого значения. В этом случае, подобное означает, что функция возвращает три числа с плавающей точкой. В круглых скобках, вы можете увидеть аргументы, которые необходимо передать функции. В нашем случае имеется только аргумент типа ''element'', содержащий объект, чью позицию мы хотим получить (в нашем примере это игрок).&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;
    -- получить позицию и поместить ее в переменные x,y,z&lt;br /&gt;
    -- (local обозначает локальный контекст: переменные существуют только в текущей области действия. В данном случае - в пределах текущей функции)&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;
Далее мы хотим гарантировать то, что машина не создастся прямо на игроке, поэтому мы добавляем небольшое значение переменной ''x'', что дает на возможность создать машину правее от игрока.&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) -- получить позицию игрока&lt;br /&gt;
    x = x + 5 -- добавить 5 единиц к позиции по оси x&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Теперь нам необходима другая функция, а именно функция для создания машины. Мы снова начинаем ее поиск в [[Scripting Functions|списке функций серверного приложения]], в этот раз - так как речь идет о машинах - то ищем функцию в разделе [[Scripting_Functions#Vehicle_functions|'''Vehicle functions''']], в котором мы выбираем  [[createVehicle]]. В синтаксисе этой функции, нам необходимо только возвращаемое значение (которое является единственным), типа ''vehicle'', относящееся к ''element''. Это возвращаемое значение указывает на машину, которая только что создана. Также, вы вероятно обратили внимание на то, что некоторые аргументы заключены в квадратные скобки [ ], которые означают, что этот аргумент функции необязателен.&lt;br /&gt;
&lt;br /&gt;
Теперь у нас имеются все аргументы, необходимые для выполнения команды [[createVehicle]] внутри нашей функции: мы вычислили позицию по переменным ''x,y,z'' и знаем идентификатор модели, которую мы хотим создать с помощью команды (&amp;quot;createvehicle 468&amp;quot;) и мы имеем доступ к функции через переменную ''vehicleModel''.&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) -- получить позицию игрока&lt;br /&gt;
    x = x + 5 -- добавить 5 единиц измерения к координате x позиции игрока&lt;br /&gt;
    -- создать машину и сохранить возвращенный элемент vehicle в переменной ''createdVehicle''&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;
Конечно, этот код может быть улучшен многими способами. По крайней мере, нам необходимо добавить проверку на успешное создание машины. На странице [[createVehicle]] мы можем прочитать в разделе '''Returns''' о том, что функция возвращает ''false'' в том случае, если неполучилось создать машину. Поэтому, нам достаточно проверить значение переменной ''createVehicle''.&lt;br /&gt;
&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) -- получить позицию игрока&lt;br /&gt;
    x = x + 5 -- добавить 5 единиц измерения к координате x позиции игрока&lt;br /&gt;
    local createdVehicle = createVehicle(tonumber(vehicleModel),x,y,z)&lt;br /&gt;
    -- проверка на возврат значения ''false''&lt;br /&gt;
    if (createdVehicle == false) then&lt;br /&gt;
        -- если возвращено ''false'', то необходимо вывести сообщение пользователю в окно чата, но только тому игроку, который создавал машину.&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;
Как вы можете увидеть, в последнем примере кода появилась еще одна функция [[outputChatBox]]. О ней вы можете самостоятельно узнать, посмотрев соответствующую страницу с документацией по этой функции.&lt;br /&gt;
&lt;br /&gt;
==Что вы узнали==&lt;br /&gt;
Теперь вам уже немного известны файлы ресурсов, обработчики команд и принципы поиска функций в документации, но необходимо знать больше. Следующий раздел проведет краткий обзор по некоторым ресурсам, сопровождая при необходимости изложение материала ссылками на соответствующие страницы.&lt;br /&gt;
&lt;br /&gt;
===Сценарии клиентской и серверной стороны===&lt;br /&gt;
Вы возможно уже видели эти или похожие термины (сервер/клиент) на этом wiki-сайте. MTA поддерживает не только сценарии, выполняющиеся на сервере и обеспечивающие выполнение команд(похожих на ту, что была описаны выше) и другие возможности, но и также сценарии, выполняющиеся клиентским приложением MTA, которое игроки используют для соединения с игровым сервером. Причиной этому является тот факт, что некоторые возможности MTA обеспечиваются приложением клиентской стороны (например, графический пользовательский интерфейс). Другие возможности MTA работают лучше на стороне сервера или принципиально не могут быть реализованы на клиентской стороне и поэтому выполняются на стороне сервера.&lt;br /&gt;
&lt;br /&gt;
Многие сценарии, которые вы будете писать (игровые режимы, карты) вероятно будут выполняться на стороне сервера, подобно тому, который был написан выше. Если вам необходимо выполнить что-либо, что нельзя выполнить на стороне сервера, вы вероятно сможете это выполнить на стороне клиента. Например, для сценария клиентской стороны, вы должны создать обычный файл сценария (например, с названием ''client.lua'') и определить его в файле meta.xml, следующим образом:&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;
Атрибут ''type'' по умолчанию имеет значение 'server', поэтому вам необходимо определять его значение для сценариев клиентской стороны. После того, как вы выполнили это, сценарий клиентской стороны будет скачиваться на компьютер игрока при его соединении с сервером. Об этом вы можете также прочитать в статье [[Client side scripts|Сценарии клиентской стороны]].&lt;br /&gt;
&lt;br /&gt;
===Более сложные ресурсы===&lt;br /&gt;
Предыдущий раздел кратко показал, как надо добавлять сценарии клиентской стороны в ресурсы, но на самом деле все обстоит немного сложнее. Как упоминалось в самом начале этой страницы, ресурсы могут быть чем угодно. Их цель - определить то, для чего они нужны. Далее приведены наиболее часто используемые ресурсы. Рассмотрим их содержимое, содержимое файла ''meta.xml'' и то, для чего они предназначены:&lt;br /&gt;
&lt;br /&gt;
====Пример 1: Вспомогательный сценарий====&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;
* Файл ''commands.lua'' обеспечивает выполнение некоторых команд администратора, например, назначение наказаний провинившимся игрокам, или что-либо другое, что может быть полезным для администрирования сервера&lt;br /&gt;
* Файл ''client.lua'' обеспечивает графический пользовательский интерфейс для легкого выполнения описанных действий&lt;br /&gt;
&lt;br /&gt;
Этот пример ресурса может быть в состоянии выполнения всё время (даже может запускаться автоматически при начале работы сервера), так как он может использоваться в течении всего игрового процесса и изменять игровой процесс, в случае если администратор решит выполнить какое-либо действие.&lt;br /&gt;
&lt;br /&gt;
====Пример 2: Игровой режим ====&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;
* Файл ''counterstrike.lua'' содержит следующие возможности:&lt;br /&gt;
** Позволяет игрокам выбирать команду, за которую они хотят играть и присоединяться к команде&lt;br /&gt;
** Обеспечивает игрокам возможность выбора оружия, цели игры и команды (информация подобного характера может также содержаться в файле игровой карты - об этом будет сказано ниже)&lt;br /&gt;
** Определяет правила игры,например, момент наступления конца раунда, какие действия должны произойти после гибели персонажа игрока.&lt;br /&gt;
** .. и возможно что-либо ещё&lt;br /&gt;
* Файл ''buymenu.lua'' - сценарий клиентской стороны для создания меню покупки оружия.&lt;br /&gt;
&lt;br /&gt;
Этот пример может быть отнесен к игровому режиму потому как он не только связан с процессом игры, но и фактически определяет правила игры. Атрибут ''type'' показывает, что этот пример работает в [[Map manager]], хотя и существует другой ресурс, написанный QA Team для управления игровыми режимами и загрузки игровых карт. Его рекомендуется использовать, потому как ваш игровой решим будет основан на принципах, поддерживаемых им.&lt;br /&gt;
&lt;br /&gt;
Это также означает, что игровой режим вероятно не сможет быть запущен без игровой карты. Игровые режимы должны всегда стремиться настолько использовать общие принципы, насколько это возможно. Далее приведен пример игровой карты.&lt;br /&gt;
&lt;br /&gt;
====Пример 3: Игровая карта====&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;
* Файл ''airport.map'' в XML файле, обеспечивает информацию о игровой карте игровому режиму, которая может включать:&lt;br /&gt;
** Места, где на карте должны появляться игроки, с каким оружием, какие команды имеются&lt;br /&gt;
** Какие цели имеются&lt;br /&gt;
** Погода, время, ограничение времени&lt;br /&gt;
** Возможные машины&lt;br /&gt;
* файл ''airport.lua'' может содержать возможности характерные для конкретной игровой карты, которые в свою очередь могуть включать:&lt;br /&gt;
** Реализацию действий, которые могут произойти после открытия двери, ворот и т.п., взрыва чего-либо.&lt;br /&gt;
** Создание и перемещение некоторых игровых объектов, или управление объектами, создаваемыми в файле .map&lt;br /&gt;
** .. что-либо ещё, что может относиться к конкретной карте&lt;br /&gt;
&lt;br /&gt;
Как вы можете увидеть, значение атрибута ''type'' изменено на 'map', это говорит [[Map manager]] о том, что этот ресурс является игровой картой, а атрибут ''gamemodes'' говорит о том, к каким игровым режимам относится эта игровая карта. В примере игровая карта относится к игровому режиму, описанному в примере выше.&lt;br /&gt;
Для ресурса &amp;quot;игровая карта&amp;quot; может быть написан отдельный сценарий. Конечно, это не является необходимым для всех игровых карт, но в то же время открывает создателям игровых карт широкие возможности для создания своих собственных правил игры в игровом режиме, для которого они создают карту.&lt;br /&gt;
&lt;br /&gt;
Файл ''airport.map'' может иметь следующий вид:&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;
Когда игровой режим запущен с игровой картой, mapmanager автоматически запускает ресурсы игровой карты и информация, которую они содержат может быть считана ресурсом игрового режима. При изменении игровой карты, выполнение ресурса текущей игровой карты останавливается и запускается выполнение ресурса следующей игровой карты.&lt;br /&gt;
&lt;br /&gt;
===События===&lt;br /&gt;
События являются механизмом MTA сообщать сценариям о том, что произошло. Например, при смерти персонажа игрока, срабатывает событие [[onPlayerWasted]]. В нем выполняются какие-либо действия, которые необходимо выполнить при смерти персонажа игрока, вы можете подготовить что-то подобное для добавления обработчика команды, как показано в [[#Написание_сценария|разделе &amp;quot;Написание сценария&amp;quot;]].&lt;br /&gt;
&lt;br /&gt;
В этом примере выводится сообщение, содержащее имя игрока, персонаж которого погиб:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function playerDied(totalAmmo, killer, killerWeapon, bodypart)&lt;br /&gt;
    outputChatBox(getClientName(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;
Вместо отображения необходимых параметров, на страницах документации, посвященных событиям, показано какие параметры передаются в функцию-обработчик, подобно тому как сделано в [[#О_обработчиках_команд|обработчике команды]], только с тем отличием, что используется не команда, а событие. Другим немаловажным аспектом является переменная ''source'', которая имеется в обработчике функций. Она не добавляется в список параметров функции, но тем не менее используется. Она принимает различные значения в зависимости от события. Для событий, относящихся к игроку (как в в примере выше) она принимает значение типа ''player'', которое относится к ''элементам'' (''element'').&lt;br /&gt;
&lt;br /&gt;
==Заключение==&lt;br /&gt;
Теперь вы знаете основные аспекты, использующиеся при написании сценариев в MTA, а также ознакомились с частью документации. [[RU/Main Page|Главная страница]] содержит ссылки на более подробную информацию, учебники и справочники, которые при желании позволят вам более глубже узнать многие вещи о MTA.&lt;br /&gt;
&lt;br /&gt;
[[en:Scripting Introduction]]&lt;br /&gt;
[[it:Introduzione allo scripting]]&lt;/div&gt;</summary>
		<author><name>SkyBon</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=File:Failed.png&amp;diff=19193</id>
		<title>File:Failed.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=File:Failed.png&amp;diff=19193"/>
		<updated>2009-04-19T12:10:43Z</updated>

		<summary type="html">&lt;p&gt;SkyBon: uploaded a new version of &amp;quot;Image:Failed.png&amp;quot;: optimized&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>SkyBon</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=RU/Client_Manual&amp;diff=15615</id>
		<title>RU/Client Manual</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=RU/Client_Manual&amp;diff=15615"/>
		<updated>2008-01-29T09:03:32Z</updated>

		<summary type="html">&lt;p&gt;SkyBon: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
==Введение==&lt;br /&gt;
Multi Theft Auto: San Andreas является самым последним мультиплеером из всех мультиплееров, созданных поклонниками игр Grand Theft Auto (только PC версий). Для получения информации о мультиплеерах для игр GTA3 и Vice City, посетите [http://www.multitheftauto.com/ http://www.multitheftauto.com]. Эта модификация не является официально поддерживаемой Rockstar Games и Take 2 Interactive.&lt;br /&gt;
&lt;br /&gt;
Обратите внимание на то, что клиентское приложение MTA:SA Deathmatch находится на стадии бета-тестирования, что означает приложение может аварийно завершать работу или являться причиной возникновения неожиданных результатов.&lt;br /&gt;
&lt;br /&gt;
==Перед началом установки==&lt;br /&gt;
&lt;br /&gt;
Перед тем, как установить Multi Theft Auto: San Andreas, сначала убедитесь в том, что для игры GTA:SA не установлены какие-либо модификации. Они могут явиться причиной неправильной работе MTA. Если вы желаете оставить в игре режим одного игрока, вы можете повторно установить San Andreas в другую директорию на жестком диске.&lt;br /&gt;
&lt;br /&gt;
Также убедитесь, в том что у вас установлена одна из следующих операционных систем '''Windows XP''', '''Windows 2000''', '''Windows Vista''' или '''Windows Server 2003''' и что системные требования вашего компьютера соответствуют требованиям работы игры в одиночном режиме. обратите внимание на то, что если запускаете одиночный режим игры на компьютере обладающем минимальными системными требованиями, вы будете испытывать некоторые замедления в работе MTA, вызванные высокой загрузкой процессора.&lt;br /&gt;
&lt;br /&gt;
'''Обратите внимание: MTA:SA работает только с GTA:SA EXE v1.0.''' Если вы приобрели игру недавно, то возможно у вас более поздняя версия игры.&lt;br /&gt;
&lt;br /&gt;
Если у вас возникли ошибки в работе мультиплеера, убедитесь в том, что они описаны на странице [[Known_Issues_-_FAQ|Известные ошибки]], или свяжитесь с нами по IRC каналу по адресу irc://irc.multitheftauto.com/mta&lt;br /&gt;
&lt;br /&gt;
===Системные требования===&lt;br /&gt;
Минимальные системные требования компьютера для Multi Theft Auto: San Andreas незначительно отличаются от системных требований игры Grand Theft Auto: San Andreas.&lt;br /&gt;
* процессор класса Intel Pentium 4 или AMD Athlon XP&lt;br /&gt;
* 512МБ ОЗУ&lt;br /&gt;
* Установленная без модификаций игра Grand Theft Auto: San Andreas версии 1.0 или 1.1 (американская или европейская)&lt;br /&gt;
* 3.7ГБ свободного места на жестком диске (3.6ГБ для установки Grand Theft Auto)&lt;br /&gt;
* видеокарта семейства nVidia GeForce 4 или ATI Radeon 8xxx с 64MB ОЗУ и поддержкой DirectX 9.0&lt;br /&gt;
* звуковая карта или кодек с поддержкой DirectX 9.0&lt;br /&gt;
* клавиатура и мышь&lt;br /&gt;
* широкополосный доступ в интернет для стабильной игры через сеть&lt;br /&gt;
&lt;br /&gt;
Для дополнительных возможностей игры рекомендуется использовать видеокарту, имеющую поддержку пиксельных шейдеров версии 2.0 (видеокарта семейства nVidia GeForce FX или выше, ATI Radeon 9xxx или выше).&lt;br /&gt;
&lt;br /&gt;
Для быстрой загрузки игры рекомендуется использовать больший объем оперативной памяти.&lt;br /&gt;
&lt;br /&gt;
==Установка игры==&lt;br /&gt;
&lt;br /&gt;
'''Этот раздел имеет смысл читать после того, как у вас будет установочный файл мультиплеера'''&lt;br /&gt;
&lt;br /&gt;
# Если у вас его нет, то перейдите на сайт http://www.mtabeta.com, зарегистрируйтесь и скачайте установщик клиентского приложения MTA:SA.&lt;br /&gt;
# Запустите установочный файл. Вы увидите диалоговое окно приветствия, затем прочитайте Лицензионное соглашение с конечным пользователем (EULA). Вы должны быть согласны с условиями лицензионного соглашения для продолжения установки.&lt;br /&gt;
# Далее вам будет необходимо выбрать один из трех вариантов: создать учетную запись, использовать уже имеющуюся учетную запись или не использовать учетную запись. После этого возможны два варианта продолжения установки.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Выбран первый вариант: создать учетную запись'''&amp;lt;br&amp;gt;&lt;br /&gt;
Выполните создание новой учетной записи на MTABeta.com, после чего введите ваш логин и пароль в окно программы установки&amp;lt;br&amp;gt;&lt;br /&gt;
'''Выбран второй вариант: использовать уже имеющуюся учетную запись'''&amp;lt;br&amp;gt;&lt;br /&gt;
Введите данные учетной записи в программу установки&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
# Затем вам будет необходимо выбрать компоненты для установки.&lt;br /&gt;
#* '''Client''' интерфейсы игры, является обязательным компонентом.&lt;br /&gt;
#* '''MTA Server''' позволяет вам использовать ваш собственный компьютер в качестве сервера.&lt;br /&gt;
#* '''MTA Server &amp;gt; Editor''' используется для создания новых карт, является необязательным компонентом.&lt;br /&gt;
# Затем вам необходимо выбрать директорию, в которую будет произведена установка. Вы качестве этой директории вы должны указать директорию, в которой установлена San Andreas. По умолчанию это: '''C:\Program Files\Rockstar Games\GTA San Andreas\'''. Нажмите кнопку '''Install''' для выполнения установки.&lt;br /&gt;
# После завершения установки, вам будет предложено запустить MTA: San Andreas. Выберите эту опцию по своему усмотрению и нажмите кнопку '''Finish'''.&lt;br /&gt;
# Вы можете также запускать MTA:DM из меню Пуск, когда пожелаете.&lt;br /&gt;
&lt;br /&gt;
==Запуск игры==&lt;br /&gt;
# Запустите Multi Theft Auto щелкнув левой кнопкой мыши по иконке расположенной на вашем рабочем столе или выбрав в меню Пуск пункт '''MTA:San Andreas'''.&lt;br /&gt;
# Запуститься GTA: San Andreas и после загрузки игры вы увидите главное меню MTA:SA. Ниже показаны варианты меню:&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
| width=&amp;quot;188&amp;quot; |&lt;br /&gt;
[[Image:MENU_QuickConnect.jpg]]&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;'''Quick connect''' – этот пункт позволяет вам соединиться с сервером, IP или URL адрес и порт которого вам уже известен. Этот вариант полезен, когда вы точно знаете, на каком сервере вы хотите играть и поэтому вам не нужно искать его в списке всех серверов.&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_ServerBrowser.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''' – при выборе этого пункта отображается список доступных для игры серверов. &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: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 '''– это пункт позволяет вам сменить ваш nickname в игре, настроить управление и свойства дисплея.&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:MENU_About.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 '''– этот пункт позволяет вам посмотреть список участников проекта.&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;
&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;'''Map editor '''– этот пункт позволяет вам создавать собственные карты, контрольные точки, рампы, препятствия и другие объекты. Эти карты вы можете затем загрузить на сервер, чтобы вы могли играть на них с другими игроками.&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 '''– этот пункт позволяет вам выйти из игры на рабочий стол Windows.&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;
Простейшим способом начать игру - выбрать в меню пункт '''Browse Servers'''. Появится новое окно:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;[[Image:manual_image006a.jpg]]&amp;lt;/center&amp;gt; '''Will need to be updated'''&lt;br /&gt;
&lt;br /&gt;
Если сервера не отображаются, нажмите кнопку '''Refresh''' и MTA просканирует сервера и отобразит их список.&lt;br /&gt;
&lt;br /&gt;
* В столбце '''Name''' отображается название каждого сервера.&lt;br /&gt;
* В столбце '''Players''' отображается число игроков и максимально возможное число игроков на сервере, в формате [Имеющееся число игроков] / [Максимальное число игроков].&lt;br /&gt;
* В столбце '''Ping''' отображается время задержки в миллисекундах между вашим компьютером и сервером. Время задержки - это время между моментом отправки вашим компьютером пакетов данных серверу и моментом получения ответного сообщения от сервера, поэтому чем больше время задержки, тем больше вы будете испытывать задержек в работе клиентского приложения с конкретным сервером. Обычно, сервера расположенные недалеко от вас по географическому местоположению должны иметь более низкое время задержки.&lt;br /&gt;
* В столбце '''Host''' отображается IP адрес сервера. Вы можете использовать этот адрес для будущих соединений с этим же сервером посредством выбора пункта меню Quick Connect в главном меню.&lt;br /&gt;
&lt;br /&gt;
По каждому столбцу можно щелкать указателем мыши для упорядочивания значений столбца по возрастанию или убыванию.&lt;br /&gt;
&lt;br /&gt;
Для оптимальной работы приложения и процесса игры, выбирайте сервера с наилучшим балансом между числом игроков и временем задержки.&lt;br /&gt;
&lt;br /&gt;
После того как вы выбрали нужный вам сервер, выберите его строку списка и щелкните левой кнопкой мыши кнопку '''Connect''' в верхнем правом углу диалогового окна. Если процесс соединения будет выполнен успешно, вы соединиться с сервером и автоматически включиться в процесс игры.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--===Запуск игры из ASE (The All-Seeing Eye)===&lt;br /&gt;
&lt;br /&gt;
Если вам не нравится встроенный в игру просмотр серверов MTA:San Andreas, вы можете захотеть использовать '''The All-Seeing Eye''', который позволит вам просмотреть список игровых серверов, и применить настраиваемые фильтры поиска. Этот учебник поможет вам установить ASE, и покажет как легко с ним работать.&lt;br /&gt;
# Скачайте ASE по адресу http://videogames.yahoo.com/multiplayer и установите.&lt;br /&gt;
# '''Следующее применимо к MTA:SA вплоть до версии 1.0 dp2, и будет скорее всего зафиксировано в дальнейшей версии''' &amp;lt;br /&amp;gt; Скачайте [http://www.xup.in/dl,19686489/ASELauncher.zip/ ASELauncher] и извлеките ASELauncher.exe в директорию, где установлен MTA (по умолчанию, это  C:\Program Files\MTA San Andreas). Эта небольшая программа конвертирует командную строку ASE в формат понятный MTA. &lt;br /&gt;
# Теперь добавьте MTA:SA в ваш список игр в ASE:&lt;br /&gt;
#* В ASE щелкните левой кнопкой мыши ''Tools'' -&amp;gt; ''Options'', и выберите вкладку ''Games''&lt;br /&gt;
#* Откройте категорию ''Not installed'' и выберите в списке ''Multi Theft Auto'' &lt;br /&gt;
#* Выберите ''Visible in filter list'', щелкните ''Browse'' и выберите в '''ASELauncher.exe''' вашу директорию MTA San Andreas&lt;br /&gt;
#* Оставьте поле ''Player name'' пустым, и нажмите кнопку ''OK''&lt;br /&gt;
# Запуститься '''Multi Theft Auto'''. После того, как вы нажмете кнопку ''Refresh'' на панели инструментов, вы увидите список сервером для всех версий MTA. Теперь добавьте модификатор для того, чтобы отображалась текущая версия '''1.0 dp2'''&lt;br /&gt;
#* Щелкните правой кнопкой мыши по ''Multi Theft Auto'' и выберите пункт ''New...''&lt;br /&gt;
#* В нижнем левом углу выберите ''Modifier'' и замените MYMOD на '''MTADP2'''&lt;br /&gt;
#* Введите название модификатора в поле ''Name'', например '''MTA:SA 1.0 dp2'''&lt;br /&gt;
#* Вставьте следующий код фильтра (со строкой номера):&amp;lt;br /&amp;gt;&amp;lt;tt&amp;gt;1    if version != &amp;quot;1.0dp2&amp;quot; remove&amp;lt;/tt&amp;gt;&lt;br /&gt;
#* Щелкните ''OK''&lt;br /&gt;
#* Ваш новый модификатор отображается в ''My filters''&lt;br /&gt;
# Все готово! Теперь активируйте ваш модификатор для того, чтобы отображать только вашу версию игры, выберите игру ''Multi Theft Auto'', и дважды щелкните по строке, содержащей сервер, чтобы начать игру.&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
==Как играть==&lt;br /&gt;
&lt;br /&gt;
MTA:SA предоставляет полную систему написания сценариев, которая позволяет создателем игровых карт настраивать многие элементы игры различным образом, вплоть до создания своих собственных новых игровых режимов. Игра объединяет множество игроков, с некоторыми исключениями, отличающими многопользовательский режим от однопользовательского.&lt;br /&gt;
&lt;br /&gt;
В многопользовательской игре нет пешеходов и на дорогах нет машин, &amp;quot;искусственно&amp;quot; управляемых алгоритмами самой игры. Вашими оппонентами на игровой карте являются только другие игроки, или союзники если это карта командной игры. Вы можете общаться с ними используя окно чата, расположенное в левом верхнем углу экрана, нажав клавишу '''T'''. Чтобы переписываться только с игроками вашей команды, нажмите клавишу '''Y'''.&lt;br /&gt;
&lt;br /&gt;
Редактор карт MTA позволяет создателям карт добавлять различные объекты GTA в свои карты включая дороги, взрывающиеся баки, рампы, строения, возвышенности и так далее. Не только для этих, но и для других объектов могут быть написаны сценарии движения, модели изменения и исчезновения. Это позволит сделать игровой процесс более интересным и разнообразным. &lt;br /&gt;
&lt;br /&gt;
Окно просмотра игроков будет отображать очки, заработанные игроком. По умолчанию, отображаются только имена и время задержки, но сценарии могут добавить дополнительные столбцы, которые являются специфичными определенному режиму игры. Например, режим игры &amp;quot;deathmatch&amp;quot; может иметь столбец перечисляющий общее число убийств, но создатель карт может выбирать сам и добавить дополнительные колонки для числа смертей вашего персонажа, длительности вашей игры, а также поместить очки, заработанные вами.&lt;br /&gt;
&lt;br /&gt;
==Управление==&lt;br /&gt;
&lt;br /&gt;
===Клавиши управления в игре===&lt;br /&gt;
&lt;br /&gt;
* F8 (или клавиша &amp;quot;тильда&amp;quot;) - Консоль&lt;br /&gt;
* F9 - Помощь игрового сервера&lt;br /&gt;
* F11 - Показать карту SA ''(следующий список клавиш используется при отображении карты)''&lt;br /&gt;
**numpad +/- - Увеличить/уменьшить масштаб карты&lt;br /&gt;
**numpad 4, 8, 6, 2 - переместиться влево, вверх, вправо, вниз по карте&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 - Сделать снимок изображения экрана&lt;br /&gt;
* T - Чат&lt;br /&gt;
* Y - Командный чат&lt;br /&gt;
* TAB - Список игроков (если ресурс [[Scoreboard]] запущен на сервере)&lt;br /&gt;
&lt;br /&gt;
==Команды консоли==&lt;br /&gt;
&lt;br /&gt;
'''bind defaults''' Сбросить настроийки управления на настройки по умолчанию&lt;br /&gt;
&lt;br /&gt;
Нажатие '''~ (тильда)''' или '''F8''' доступ к консоли, затем вводится команда, за которой при необходимости следуют параметры (если нужно) затем нажимается Enter.&lt;br /&gt;
&lt;br /&gt;
;'''maps''' :Отобразить список всех карт доступных на сервере. &lt;br /&gt;
&lt;br /&gt;
;'''nick [nickname]''' :Изменить nickname, отображаемый в игре на тот, который служит параметром в данной команде.&lt;br /&gt;
&lt;br /&gt;
;'''msg [nickname] [message]''' или '''pm [nickname] [message]''' :Отправить личное сообщение игроку, который определяется параметром [nickname]. Только игрок, определенный вами может увидеть это сообщение. И '''msg''' и '''pm''' выполняют одну и ту же функцию.&lt;br /&gt;
&lt;br /&gt;
;'''quit''' или '''exit''' :Выполнить разрыв связи с сервером и выйти из игры на рабочий стол Windows. Выполняет ту же функцию, что и кнопка Quit в главном меню.&lt;br /&gt;
&lt;br /&gt;
;'''ver''' :Отобразить номер версии и информацию об авторских правах программного обеспечения.&lt;br /&gt;
&lt;br /&gt;
;'''time''' :Отобразить текущее время.&lt;br /&gt;
&lt;br /&gt;
;'''disconnect''' :Разорвать соединение с игровым сервером и вернуться в главное меню.&lt;br /&gt;
&lt;br /&gt;
;'''say [text]''' :Позволяет вам продолжить общение с игроками через окно чата из консоли.&lt;br /&gt;
&lt;br /&gt;
;'''ignore [nickname]''' :Не отображать любой текст, введенный игроком, которого вы игнорируете. Чтобы отменить игнорирование сообщений игрока введите команду '''ignore [nickname]''' снова.&lt;br /&gt;
&lt;br /&gt;
'''Совет:''' Вы можете использовать эти команды непосредственно в окне чата, поместив перед ними / (слеш).&lt;br /&gt;
&lt;br /&gt;
Список команд консоли можно увидеть, введя в консоли команду '''help''' и нажав клавишу Enter. Любая карта может также иметь дополнительные команды, к которым вы можете получить доступ введя в консоли команду '''commands'''.&lt;br /&gt;
&lt;br /&gt;
==Коды ошибок и их описание==&lt;br /&gt;
'''Ошибки загрузки'''&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;
'''Неустранимые ошибки'''&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''''&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;
[[it:Manuale del Client]]&lt;/div&gt;</summary>
		<author><name>SkyBon</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=%D0%93%D0%BB%D0%B0%D0%B2%D0%BD%D0%B0%D1%8F_%D1%81%D1%82%D1%80%D0%B0%D0%BD%D0%B8%D1%86%D0%B0&amp;diff=15037</id>
		<title>Главная страница</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=%D0%93%D0%BB%D0%B0%D0%B2%D0%BD%D0%B0%D1%8F_%D1%81%D1%82%D1%80%D0%B0%D0%BD%D0%B8%D1%86%D0%B0&amp;diff=15037"/>
		<updated>2008-01-16T16:49:14Z</updated>

		<summary type="html">&lt;p&gt;SkyBon: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
&amp;lt;div style=&amp;quot;float:left;&amp;quot;&amp;gt;&amp;lt;div style=&amp;quot;float:right;&amp;quot;&amp;gt;[[Image:Scripting.jpg]]&amp;lt;/div&amp;gt;Добро пожаловать в Multi Theft Auto: San Andreas Deathmatch developer wiki. В этом wiki вы найдёте множество полезной информации по разработке режимов и карт для Multi Theft Auto.&lt;br /&gt;
&lt;br /&gt;
Мы выпускаем предрелизные превью потому что нам нужна ваша помощь! Существует множество [[How you can help|способов помочь нам]] доработать и выпустить полностью законченную и отполированную версию MTA:SA DM. Создавайте режимы и карты, помогайте зафиксировать скриптинговые функци, пишите примеры, учебники или просто-напросто играйте и сообщайте обо всех ошибках MTA на форумах.&lt;br /&gt;
&lt;br /&gt;
Если у вас возникли вопросы на тему скриптинга, свяжитесь с нами на нашем [[IRC Channel|IRC канале]].&lt;br /&gt;
&lt;br /&gt;
'''Чтобы редактировать этот wiki вам нужна учётная запись mtabeta.com.''' Зарегистрируйтесь на http://www.mtabeta.com и затем войдите в учётную запись wiki с тем же именем и паролем.&lt;br /&gt;
&lt;br /&gt;
Этот wiki теперь поддерживает '''[http://gears.google.com/ Google Gears]''', который позволяет просматривать wiki вне сети (и быстро). Всего лишь установите Google Gears и нажмите ссылку &amp;quot;Уйти в оффлайн&amp;quot; внизу любой страницы. Подождите пока приложение загрузит содержание wiki на ваш компьютер и после этого текущая на момент загрузки версия wiki будет доступна без подключения к серверу.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 2px dotted navy; padding: 4px; margin: 10px&amp;quot;&amp;gt;Новейшая версия '''Multi Theft Auto: San Andreas Deathmatch''' - '''{{Current Version|full}}'''. Посетите [http://www.mtasa.com/dp.html страницу загрузки], чтобы скачать её.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear:both;&amp;quot;&amp;gt;&amp;lt;/div&amp;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;
|-&lt;br /&gt;
| width=&amp;quot;50%&amp;quot; style=&amp;quot;vertical-align:top;&amp;quot; |&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px;&amp;quot;&amp;gt;&lt;br /&gt;
====Начало====&lt;br /&gt;
&lt;br /&gt;
* [[Deathmatch_Client_Manual|Помощь по клиенту]]&lt;br /&gt;
* [[RU/Deathmatch_Server_Manual|Помощь по серверу]]&lt;br /&gt;
* [[Known_Issues_-_FAQ|Известные ошибки MTA:SA DM]]&lt;br /&gt;
* [[RU/Scripting Introduction|Вступление в скриптинг]]&lt;br /&gt;
* [[Debugging|Debugging Tutorial]] - Как найти ошибки в вашем скрипте&lt;br /&gt;
* [[MTA Classes]] - Detailed descriptions of all MTA custom types&lt;br /&gt;
** [[Element|MTA Elements]] / [[Element tree]]&lt;br /&gt;
* [[Resources|Introduction to Resources]]&lt;br /&gt;
** [[Resource Web Access]]&lt;br /&gt;
* [[Writing_Gamemodes|Написание модов]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Базы данных====&lt;br /&gt;
В этой части описаны все возможности LUA, которые предоставляют MTA или resources.&lt;br /&gt;
* [[Map manager|Менеджер карт]] - Используйте это для своих режимов&lt;br /&gt;
* [[Client side scripts|Скрипты для клиента]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Помощь по Lua вообще====&lt;br /&gt;
Страницы-учебники, цель которых - повысить ваш уровень понимания языка LUA &lt;br /&gt;
*[http://www.lua.org/pil/index.html Учебник &amp;quot;Программирование на LUA&amp;quot;]&lt;br /&gt;
*[http://lua-users.org/wiki/TutorialDirectory LUA Wiki]&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;
&amp;lt;div style=&amp;quot;border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px; background:#CCCCFF;&amp;quot;&amp;gt;&lt;br /&gt;
====Reference====&lt;br /&gt;
* [[Client Scripting Functions|Client-side Functions]]&lt;br /&gt;
* [[Client Scripting Events|Client-side Events]]&lt;br /&gt;
* [[Server Scripting Functions|Server-side Functions]]&lt;br /&gt;
* [[Server Scripting Events|Server-side Events]]&lt;br /&gt;
&amp;lt;!-- Incomplete * [[Module functions|Server-side external module scripting functions list]] --&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Списки идентификаторов====&lt;br /&gt;
* [[Character Skins]] ([[All Skins Page]])&lt;br /&gt;
* [[CJ Clothes]]&lt;br /&gt;
* [[Template:Projectiles|Projectiles]]&lt;br /&gt;
* [[Template:Blip_Icons|Иконки]]&lt;br /&gt;
* [[Template:Sounds|Звуки]]&lt;br /&gt;
* [[Vehicle IDs|Машины]]&lt;br /&gt;
* [[Vehicle_default_colors|Vehicle Default Coloring Index]]&lt;br /&gt;
* [[Template:Vehicle_colors|Цветов]]&lt;br /&gt;
* Vehicle Upgrades&lt;br /&gt;
* [[Weapons|Оружие]]&lt;br /&gt;
* [[Weather|Погода]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>SkyBon</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Known_Issues_-_FAQ&amp;diff=14689</id>
		<title>Known Issues - FAQ</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Known_Issues_-_FAQ&amp;diff=14689"/>
		<updated>2008-01-10T11:00:51Z</updated>

		<summary type="html">&lt;p&gt;SkyBon: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Post here your proposed Q&amp;amp;A, regarding the known problems with MTA:SA DM and their solutions, especially problems we're encountering now, that might be also encountered by users in the final release. You're also welcome to edit them grammar/style wise.&lt;br /&gt;
&lt;br /&gt;
== Client ==&lt;br /&gt;
&lt;br /&gt;
=== General ===&lt;br /&gt;
==== Initial black screen/hanging GTA splash screens ====&lt;br /&gt;
* '''MTA shows a permanent black screen or hanging GTA splash screens.'''&lt;br /&gt;
&lt;br /&gt;
It may be necessary that during/after the logo splash screens in Grand Theft Auto you have to give some input in order to skip the videos correctly. Try to click your left-mouse button a few times, or tapping a few keys.&lt;br /&gt;
&lt;br /&gt;
* '''MTA shows a permanent black screen after the GTA splash screens (possibly with text in the bottom right corner).'''&lt;br /&gt;
&lt;br /&gt;
This can be related to a lack of support for DirectX or video card features, on your system, which are needed to run the dynamically rendered menu. This dynamic menu is enabled by default. Try disabling the dynamic menu by downloading the adjusted [http://www.mtasa.com/files/coreconfig.xml coreconfig.xml] file and placing it in our ''GTA San Andreas\MTA'' directory (overwriting any existing files).&lt;br /&gt;
&lt;br /&gt;
==== Halt after MTA splash screen ====&lt;br /&gt;
* '''Nothing happens after the 'Stop playing with yourself' splash screen'''&lt;br /&gt;
&lt;br /&gt;
If you use nVidia GeForce, try turning off nView Desktop Manager before starting MTA.&lt;br /&gt;
&lt;br /&gt;
Also try deleting GTA San Andreas settings file (&amp;quot;gta_sa.set&amp;quot;) in &amp;quot;Documents\GTA San Andreas User Files&amp;quot; folder&lt;br /&gt;
&lt;br /&gt;
==== Crash after MTA splash screen ====&lt;br /&gt;
* '''MTA crashes after the 'Stop playing with yourself' logo. Both single player and the MTA: Race ran fine before.'''&lt;br /&gt;
&lt;br /&gt;
Try downloading the latest DirectX Runtime files from [http://www.microsoft.com/downloads/details.aspx?FamilyID=2da43d38-db71-4c1b-bc6a-9b6652cd92a3&amp;amp;DisplayLang=en Microsoft]. Also check in Task Manager, if gta_sa.exe process isn't already running.&lt;br /&gt;
&lt;br /&gt;
If you run at any substandard resolutions (e.g. 960x720), try to change your resolution to a commonly supported one (e.g. 640×480, 800×600, 1024×768, 1152×864, 1280×1024) by launching Grand Theft Auto: San Andreas in normal mode, setting the new resolution and exiting.&lt;br /&gt;
&lt;br /&gt;
==== Assertion in CMainMenu.cpp line 106 upon launching MTASA  ====&lt;br /&gt;
* '''I'm getting an assertion in CMainMenu.cpp (line 106) after I have launched MTASA. I'm able to ignore it, but then game crashes after I try to connect to a server.'''&lt;br /&gt;
&lt;br /&gt;
This is likely caused by GTASA or MTASA being installed in a path that contains non-ASCII characters (eg. Cyrillic, Polish, Japanese) in it.  &lt;br /&gt;
&lt;br /&gt;
To resolve this, you need to uninstall MTASA and GTASA, then install them in such paths that don't contain such characters.&lt;br /&gt;
&lt;br /&gt;
==== Controls not working ====&lt;br /&gt;
* '''My controls don't seem to work as they should.'''&lt;br /&gt;
&lt;br /&gt;
Try using the 'copygtacontrols' command in the console.&lt;br /&gt;
&lt;br /&gt;
==== Incorrect models ====&lt;br /&gt;
* '''Woman model's breasts look awkward ingame / I'm seeing odd, spider-like shaped player models.'''&lt;br /&gt;
&lt;br /&gt;
This is caused by the way GTA handles player stats. To fix this, be sure to set both fat and muscles player stats to 0, when you're changing player skin.&lt;br /&gt;
&lt;br /&gt;
==== Incorrect drive-by functionality ====&lt;br /&gt;
* '''Drivebys arent working as they should'''&lt;br /&gt;
&lt;br /&gt;
Drivebys are handled by script, and will change depending on the loaded gamemode.&lt;br /&gt;
&lt;br /&gt;
==== Unsaved settings ====&lt;br /&gt;
* '''My MTA setting(s) didn't get saved (...) I crashed.'''&lt;br /&gt;
&lt;br /&gt;
First, configure the MTA the way you want to, then exit the game and launch it again. Settings should get saved. Alternatively, try removing the coreconfig.xml file, then configure it and quit the game.&lt;br /&gt;
&lt;br /&gt;
==== Gamepad support ====&lt;br /&gt;
* '''MTA doesnt recognise my gamepad'''&lt;br /&gt;
&lt;br /&gt;
This is a known issue - MTA's keybinds system does not support direct input.  As an alternative, [http://xpadder.com/ XPadder] can be used.  This emulates joypad buttons as keyboard/mouse so that it can be used in MTA.  Please refer to [http://forum.mtasa.com/viewtopic.php?f=87&amp;amp;t=21167 this forum topic] for a brief guide on how to use XPadder.&lt;br /&gt;
&lt;br /&gt;
==== Sky flickering ====&lt;br /&gt;
* '''My screen/sky flickers when weather or sky effects are enabled.&lt;br /&gt;
&lt;br /&gt;
MTA:SA DM uses a new text rendering system from race, which is much more efficient in terms of FPS.  However, this can cause conflicts within the game, particularly with ATI based cards.  To fix this, bring up the console with ¬(tilde), and type the command '''ceguitext 1'''.  This reverts the rendering method to that of Race.  All glitches should no longer happen, at the cost of lower FPS.&lt;br /&gt;
&lt;br /&gt;
====Invalid serial number====&lt;br /&gt;
This seems to happen randomly to a few people. The best way to fix this is to install without a serial number at all (choose the bottom option on the MTA accounts page of the installer). We'll be looking into fixing this as soon as possible.&lt;br /&gt;
&lt;br /&gt;
You can also try to login into your account on [http://mtabeta.com/ www.mtabeta.com], there you can read your serial number. Then open &amp;quot;&lt;br /&gt;
HKEY_LOCAL_MACHINE/SOFTWARE/Multi Theft Auto: San Andreas/&amp;quot; in your registry. There you have to create the string &amp;quot;Username&amp;quot; with your username as value, and the string &amp;quot;Serial&amp;quot; with your serial number as value.&lt;br /&gt;
&lt;br /&gt;
==== 'Network module could not be located' ====&lt;br /&gt;
*'''I am getting 'Network module could not be located' error message upon launching MTA:SA DM&lt;br /&gt;
&lt;br /&gt;
Copy the file 'net.dll' from your GTA:SA/mta directory into your GTA:SA directory, overwriting existing files.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Windows Vista®-related ===&lt;br /&gt;
&lt;br /&gt;
==== Crash on launch ====&lt;br /&gt;
* '''I've successfully upgraded from MTA Race to MTASA DM on Vista, but it seems to crash on launch.&lt;br /&gt;
&lt;br /&gt;
Go to your Program Files\MTA San Andreas\mods\race directory, and rename client.dll to something else.  &lt;br /&gt;
&lt;br /&gt;
==== Crash on connect ====&lt;br /&gt;
* '''I seem to crash whenever I connect to a server just before I go in-game on Vista'''&lt;br /&gt;
&lt;br /&gt;
This seems to be an issue with the Microsoft DirectX April 2006 SDK Redistributable DLL file (d3dx9_30.dll) when running in compatibility mode. Please make sure that compatibility mode is competely turned off for  '''both''' your GTA_SA.exe and Multi Theft Auto.exe executables.&lt;br /&gt;
&lt;br /&gt;
==== Invalid serial error ====&lt;br /&gt;
* '''MTASA DM installer complains about wrong serial provided. I'm running it for the first time.&lt;br /&gt;
&lt;br /&gt;
You need to run the installer with Administrator privileges. To do so, right click on the installer executable, choose 'Properties', go into 'Compatibility' tab and tick the check box on the last field.&lt;br /&gt;
&lt;br /&gt;
Some have found that setting compatibility to Windows XP/2000 have fixed the problem.&lt;br /&gt;
&lt;br /&gt;
If User Account Control is disabled, you might need to enable it and run the installer with admin privileges (like said above) in order to install MTA:SA DM.&lt;br /&gt;
&lt;br /&gt;
==== Clock manipulation error ====&lt;br /&gt;
* '''I am getting 'Clock manipulation detected!' error message upon launching MTA:SA DM&lt;br /&gt;
&lt;br /&gt;
Further info coming soon.&lt;br /&gt;
&lt;br /&gt;
==== Halt on launch ====&lt;br /&gt;
* '''When I launch MTA:SA DM, nothing happens (GTA_SA.exe is running but not loading up)&lt;br /&gt;
&lt;br /&gt;
Run MTA:SA DM with Administrator privileges. To do this, right click on the installer executable, choose 'Properties', go into 'Compatibility' tab and tick the check box on the last field and try again.&lt;br /&gt;
&lt;br /&gt;
==== General GTA problems ====&lt;br /&gt;
* '''I have unexplainable GTA problems or crashes'''&lt;br /&gt;
&lt;br /&gt;
Make sure your computer as well as your GTA install meet the [[Deathmatch_Client_Manual#System_requirements|minimum requirements]] and that you are not running in any 98/2000/XP/2003 compatibility modes.&lt;br /&gt;
&lt;br /&gt;
Also try the solutions from these pages:&lt;br /&gt;
* http://www.gtaforums.com/index.php?showtopic=273549&amp;amp;view=findpost&amp;amp;p=4537502&lt;br /&gt;
* http://pullmonkey.com/2007/4/30/how-i-got-gta-san-andreas-to-work-with-a-crappy-os-vista&lt;br /&gt;
&lt;br /&gt;
== Server ==&lt;br /&gt;
&lt;br /&gt;
=== General ===&lt;br /&gt;
==== Fatal error 3 ====&lt;br /&gt;
* '''I'm getting ''Fatal Error 3'' whenever I connect to my server'''&lt;br /&gt;
&lt;br /&gt;
This error happens when the server you are trying to connect to is unable to provide you the required downloads, because it does not have http downloading enabled. Be sure to set the '''httpdownload''' configuration tag in your configuration to '''1'''.&lt;br /&gt;
==== Download error 9: Error downloading requested files ====&lt;br /&gt;
* '''I'm getting ''Download Error 9: Error downloading requested files'' whenever I connect to my server'''&lt;br /&gt;
&lt;br /&gt;
This error happens when the server you are trying to connect to is unable to provide you with a valid link. This results in a 404 (Not found) HTTP error and an error at your end.&lt;br /&gt;
&lt;br /&gt;
* If you are running the built-in server ('''httpserver''' is set to '''1''' and '''httpdownloadurl''' is empty), make sure that your HTTP server is accessible (you can try to access it by using a browser) for everyone.&lt;br /&gt;
&lt;br /&gt;
* If you have configured an external web server ('''httpdownloadurl''' is set to your custom URL), make sure that your HTTP is accessible and make sure you have read the [[Deathmatch_Server_Manual#Configuring_an_external_web_server | Configuring an external web server]] guide.&lt;br /&gt;
&lt;br /&gt;
=== Windows-related ===&lt;br /&gt;
No known reported issues in the version {{Current Version|full}}.&lt;br /&gt;
&lt;br /&gt;
=== Linux-related ===&lt;br /&gt;
No known reported issues in the version {{Current Version|full}}.&lt;/div&gt;</summary>
		<author><name>SkyBon</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Known_Issues_-_FAQ&amp;diff=14688</id>
		<title>Known Issues - FAQ</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Known_Issues_-_FAQ&amp;diff=14688"/>
		<updated>2008-01-10T10:58:15Z</updated>

		<summary type="html">&lt;p&gt;SkyBon: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Post here your proposed Q&amp;amp;A, regarding the known problems with MTA:SA DM and their solutions, especially problems we're encountering now, that might be also encountered by users in the final release. You're also welcome to edit them grammar/style wise.&lt;br /&gt;
&lt;br /&gt;
== Client ==&lt;br /&gt;
&lt;br /&gt;
=== General ===&lt;br /&gt;
==== Initial black screen/hanging GTA splash screens ====&lt;br /&gt;
* '''MTA shows a permanent black screen or hanging GTA splash screens.'''&lt;br /&gt;
&lt;br /&gt;
It may be necessary that during/after the logo splash screens in Grand Theft Auto you have to give some input in order to skip the videos correctly. Try to click your left-mouse button a few times, or tapping a few keys.&lt;br /&gt;
&lt;br /&gt;
* '''MTA shows a permanent black screen after the GTA splash screens (possibly with text in the bottom right corner).'''&lt;br /&gt;
&lt;br /&gt;
This can be related to a lack of support for DirectX or video card features, on your system, which are needed to run the dynamically rendered menu. This dynamic menu is enabled by default. Try disabling the dynamic menu by downloading the adjusted [http://www.mtasa.com/files/coreconfig.xml coreconfig.xml] file and placing it in our ''GTA San Andreas\MTA'' directory (overwriting any existing files).&lt;br /&gt;
&lt;br /&gt;
==== Halt after MTA splash screen ====&lt;br /&gt;
* '''Nothing happens after the 'Stop playing with yourself' splash screen'''&lt;br /&gt;
&lt;br /&gt;
If you use nVidia GeForce, try turning off nView Desktop Manager before starting MTA.&lt;br /&gt;
&lt;br /&gt;
Also try deleting GTA San Andreas settings file (&amp;quot;gta_sa.set&amp;quot;) in &amp;quot;Documents\GTA San Andreas User Files&amp;quot; folder&lt;br /&gt;
&lt;br /&gt;
==== Crash after MTA splash screen ====&lt;br /&gt;
* '''MTA crashes after the 'Stop playing with yourself' logo. Both single player and the MTA: Race ran fine before.'''&lt;br /&gt;
&lt;br /&gt;
Try downloading the latest DirectX Runtime files from [http://www.microsoft.com/downloads/details.aspx?FamilyID=2da43d38-db71-4c1b-bc6a-9b6652cd92a3&amp;amp;DisplayLang=en Microsoft]. Also check in Task Manager, if gta_sa.exe process isn't already running.&lt;br /&gt;
&lt;br /&gt;
If you run at any substandard resolutions (e.g. 960x720), try to change your resolution to a commonly supported one (e.g. 640×480, 800×600, 1024×768, 1152×864, 1280×1024) by launching Grand Theft Auto: San Andreas in normal mode, setting the new resolution and exiting.&lt;br /&gt;
&lt;br /&gt;
==== Assertion in CMainMenu.cpp line 106 upon launching MTASA  ====&lt;br /&gt;
* '''I'm getting an assertion in CMainMenu.cpp (line 106) after I have launched MTASA. I'm able to ignore it, but then game crashes after I try to connect to a server.'''&lt;br /&gt;
&lt;br /&gt;
This is likely caused by GTASA or MTASA being installed in a path that contains non-ASCII characters (eg. Cyrillic, Polish, Japanese) in it.  &lt;br /&gt;
&lt;br /&gt;
To resolve this, you need to uninstall MTASA and GTASA, then install them in such paths that don't contain such characters.&lt;br /&gt;
&lt;br /&gt;
==== Controls not working ====&lt;br /&gt;
* '''My controls don't seem to work as they should.'''&lt;br /&gt;
&lt;br /&gt;
Try using the 'copygtacontrols' command in the console.&lt;br /&gt;
&lt;br /&gt;
==== Incorrect models ====&lt;br /&gt;
* '''Woman model's breasts look awkward ingame / I'm seeing odd, spider-like shaped player models.'''&lt;br /&gt;
&lt;br /&gt;
This is caused by the way GTA handles player stats. To fix this, be sure to set both fat and muscles player stats to 0, when you're changing player skin.&lt;br /&gt;
&lt;br /&gt;
==== Incorrect drive-by functionality ====&lt;br /&gt;
* '''Drivebys arent working as they should'''&lt;br /&gt;
&lt;br /&gt;
Drivebys are handled by script, and will change depending on the loaded gamemode.&lt;br /&gt;
&lt;br /&gt;
==== Unsaved settings ====&lt;br /&gt;
* '''My MTA setting(s) didn't get saved (...) I crashed.'''&lt;br /&gt;
&lt;br /&gt;
First, configure the MTA the way you want to, then exit the game and launch it again. Settings should get saved. Alternatively, try removing the coreconfig.xml file, then configure it and quit the game.&lt;br /&gt;
&lt;br /&gt;
==== Gamepad support ====&lt;br /&gt;
* '''MTA doesnt recognise my gamepad'''&lt;br /&gt;
&lt;br /&gt;
This is a known issue - MTA's keybinds system does not support direct input.  As an alternative, [http://xpadder.com/ XPadder] can be used.  This emulates joypad buttons as keyboard/mouse so that it can be used in MTA.  Please refer to [http://forum.mtasa.com/viewtopic.php?f=87&amp;amp;t=21167 this forum topic] for a brief guide on how to use XPadder.&lt;br /&gt;
&lt;br /&gt;
==== Sky flickering ====&lt;br /&gt;
* '''My screen/sky flickers when weather or sky effects are enabled.&lt;br /&gt;
&lt;br /&gt;
MTA:SA DM uses a new text rendering system from race, which is much more efficient in terms of FPS.  However, this can cause conflicts within the game, particularly with ATI based cards.  To fix this, bring up the console with ¬(tilde), and type the command '''ceguitext 1'''.  This reverts the rendering method to that of Race.  All glitches should no longer happen, at the cost of lower FPS.&lt;br /&gt;
&lt;br /&gt;
====Invalid serial number====&lt;br /&gt;
This seems to happen randomly to a few people. The best way to fix this is to install without a serial number at all (choose the bottom option on the MTA accounts page of the installer). We'll be looking into fixing this as soon as possible.&lt;br /&gt;
&lt;br /&gt;
You can also try to login into your account on [http://mtabeta.com/ www.mtabeta.com], there you can read your serial number. Then open &amp;quot;&lt;br /&gt;
HKEY_LOCAL_MACHINE/SOFTWARE/Multi Theft Auto: San Andreas/&amp;quot; in your registry. There you have to create the string &amp;quot;Username&amp;quot; with your username as value, and the string &amp;quot;Serial&amp;quot; with your serial number as value.&lt;br /&gt;
&lt;br /&gt;
==== 'Network module could not be located' ====&lt;br /&gt;
*'''I am getting 'Network module could not be located' error message upon launching MTA:SA DM&lt;br /&gt;
&lt;br /&gt;
Copy the file 'net.dll' from your GTA:SA/mta directory into your GTA:SA directory, overwriting existing files.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Windows Vista®-related ===&lt;br /&gt;
&lt;br /&gt;
==== Crash on launch ====&lt;br /&gt;
* '''I've successfully upgraded from MTA Race to MTASA DM on Vista, but it seems to crash on launch.&lt;br /&gt;
&lt;br /&gt;
Go to your Program Files\MTA San Andreas\mods\race directory, and rename client.dll to something else.  &lt;br /&gt;
&lt;br /&gt;
==== Crash on connect ====&lt;br /&gt;
* '''I seem to crash whenever I connect to a server just before I go in-game on Vista'''&lt;br /&gt;
&lt;br /&gt;
This seems to be an issue with the Microsoft DirectX April 2006 SDK Redistributable DLL file (d3dx9_30.dll) when running in compatibility mode. Please make sure that compatibility mode is competely turned off for  '''both''' your GTA_SA.exe and Multi Theft Auto.exe executables.&lt;br /&gt;
&lt;br /&gt;
==== Invalid serial error ====&lt;br /&gt;
* '''MTASA DM installer complains about wrong serial provided. I'm running it for the first time.&lt;br /&gt;
&lt;br /&gt;
You need to run the installer with Administrator privileges. To do so, right click on the installer executable, choose 'Properties', go into 'Compatibility' tab and tick the check box on the last field.&lt;br /&gt;
&lt;br /&gt;
Some have found that setting compatibility to Windows XP/2000 have fixed the problem.&lt;br /&gt;
&lt;br /&gt;
If User Account Control is disabled, you might need to enable it and run the installer with admin privileges (like said above) in order to install MTA:SA DM.&lt;br /&gt;
&lt;br /&gt;
==== Clock manipulation error ====&lt;br /&gt;
* '''I am getting 'Clock manipulation detected!' error message upon launching MTA:SA DM&lt;br /&gt;
&lt;br /&gt;
Further info coming soon.&lt;br /&gt;
&lt;br /&gt;
==== Halt on launch ====&lt;br /&gt;
* '''When I launch MTA:SA DM, nothing happens (GTA_SA.exe is running but not loading up)&lt;br /&gt;
&lt;br /&gt;
Run MTA:SA DM with Administrator privileges. To do this, right click on the installer executable, choose 'Properties', go into 'Compatibility' tab and tick the check box on the last field and try again.&lt;br /&gt;
&lt;br /&gt;
==== General GTA problems ====&lt;br /&gt;
* '''I have unexplainable GTA problems or crashes'''&lt;br /&gt;
&lt;br /&gt;
Make sure your computer as well as your GTA install meet the [[Deathmatch_Client_Manual#System_requirements|minimum requirements]] and that you are not running in any 98/2000/XP/2003 compatibility modes.&lt;br /&gt;
&lt;br /&gt;
Also try the solutions from these pages:&lt;br /&gt;
* http://www.gtaforums.com/index.php?showtopic=273549&amp;amp;view=findpost&amp;amp;p=4537502&lt;br /&gt;
* http://pullmonkey.com/2007/4/30/how-i-got-gta-san-andreas-to-work-with-a-crappy-os-vista&lt;br /&gt;
&lt;br /&gt;
== Server ==&lt;br /&gt;
&lt;br /&gt;
=== General ===&lt;br /&gt;
==== Fatal error 3 ====&lt;br /&gt;
* '''I'm getting ''Fatal Error 3'' whenever I connect to my server'''&lt;br /&gt;
&lt;br /&gt;
This error happens when the server you are trying to connect to is unable to provide you the required downloads, because it does not have http downloading enabled. Be sure to set the '''httpdownload''' configuration tag in your configuration to '''1'''.&lt;br /&gt;
==== Download error 9: Error downloading requested files ====&lt;br /&gt;
* '''I'm getting ''Download Error 9: Error downloading requested files'' whenever I connect to my server'''&lt;br /&gt;
&lt;br /&gt;
This error happens when the server you are trying to connect to is unable to provide you with a valid link. This results in a 404 (Not found) HTTP error and an error at your end.&lt;br /&gt;
&lt;br /&gt;
* If you are running the built-in server ('''httpserver''' is set to '''1''' and '''httpdownloadurl''' is empty), make sure that your HTTP server is accessible (you can try to access it by using a browser) for everyone.&lt;br /&gt;
&lt;br /&gt;
* If you have configured an external web server ('''httpdownloadurl''' is set to your custom URL), make sure that your HTTP is accessible and make sure you have read the [[Deathmatch_Server_Manual#Configuring_an_external_web_server | Configuring an external web server]] guide.&lt;br /&gt;
&lt;br /&gt;
=== Windows-related ===&lt;br /&gt;
No known reported issues.&lt;br /&gt;
&lt;br /&gt;
=== Linux-related ===&lt;br /&gt;
==== libcurl.so.&amp;lt;version&amp;gt;: cannot open shared object file ====&lt;br /&gt;
* '''My dedicated server gives a ''libcurl.so.&amp;lt;version&amp;gt;: cannot open shared object file'' error on startup''' (where &amp;lt;version&amp;gt; is to be replaced with 3 or 4)&lt;br /&gt;
&lt;br /&gt;
This means one of the dynamic dependencies (libcurl, CURL) needed in order to run the server cannot be found on your server.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If your server reports that it cannot find '''libcurl.so.4''', it's most likely due to an old version of libcurl that is installed on your system. You can either choose to upgrade libcurl to the latest version (check out your distribution package manager, or download/compile/install from the [http://curl.haxx.se/ CURL website]), or you can choose to pick another Linux build (e.g. the Generic Linux build, which contains a statically linked version of the library).&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;If your server reports that it cannot find '''libcurl.so.3''', libcurl is either not installed on your system, you are running an outdated version or you are running a newer version of libcurl (and downloaded a build that relied on the old version).&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If '''libcurl.so.4''' is present on your system (e.g. in /usr/lib), it means you have a newer version than the one required and you can most likely solve the problem by creating a symbolic to libcurl.so.3:&lt;br /&gt;
&amp;lt;pre&amp;gt;$ ln -s /usr/lib/libcurl.so.4 /usr/lib/libcurl.so.3&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If '''libcurl.so.2''' is present on your system (e.g. in /usr/lib), it means you have an older version and you can solve the problem by installing the most recent version of libcurl. This should be done through your package manager (check your distribution's documentation), or no such manager is present, by manually compiling and installing the latest CURL source from the [http://curl.haxx.se/ CURL website]).&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If libcurl is not present on your system, see how to install libcurl by reading the instructions above.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Fixed|v1.0-dp2}}&lt;/div&gt;</summary>
		<author><name>SkyBon</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Known_Issues_-_FAQ&amp;diff=14687</id>
		<title>Known Issues - FAQ</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Known_Issues_-_FAQ&amp;diff=14687"/>
		<updated>2008-01-10T10:56:26Z</updated>

		<summary type="html">&lt;p&gt;SkyBon: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Post here your proposed Q&amp;amp;A, regarding the known problems with MTA:SA DM and their solutions, especially problems we're encountering now, that might be also encountered by users in the final release. You're also welcome to edit them grammar/style wise.&lt;br /&gt;
&lt;br /&gt;
== Client ==&lt;br /&gt;
&lt;br /&gt;
=== General ===&lt;br /&gt;
==== Initial black screen/hanging GTA splash screens ====&lt;br /&gt;
* '''MTA shows a permanent black screen or hanging GTA splash screens.'''&lt;br /&gt;
&lt;br /&gt;
It may be necessary that during/after the logo splash screens in Grand Theft Auto you have to give some input in order to skip the videos correctly. Try to click your left-mouse button a few times, or tapping a few keys.&lt;br /&gt;
&lt;br /&gt;
* '''MTA shows a permanent black screen after the GTA splash screens (possibly with text in the bottom right corner).'''&lt;br /&gt;
&lt;br /&gt;
This can be related to a lack of support for DirectX or video card features, on your system, which are needed to run the dynamically rendered menu. This dynamic menu is enabled by default. Try disabling the dynamic menu by downloading the adjusted [http://www.mtasa.com/files/coreconfig.xml coreconfig.xml] file and placing it in our ''GTA San Andreas\MTA'' directory (overwriting any existing files).&lt;br /&gt;
&lt;br /&gt;
==== Halt after MTA splash screen ====&lt;br /&gt;
* '''Nothing happens after the 'Stop playing with yourself' splash screen'''&lt;br /&gt;
&lt;br /&gt;
If you use nVidia GeForce, try turning off nView Desktop Manager before starting MTA.&lt;br /&gt;
&lt;br /&gt;
Also try deleting GTA San Andreas settings file (&amp;quot;gta_sa.set&amp;quot;) in &amp;quot;Documents\GTA San Andreas User Files&amp;quot; folder&lt;br /&gt;
&lt;br /&gt;
==== Crash after MTA splash screen ====&lt;br /&gt;
* '''MTA crashes after the 'Stop playing with yourself' logo. Both single player and the MTA: Race ran fine before.'''&lt;br /&gt;
&lt;br /&gt;
Try downloading the latest DirectX Runtime files from [http://www.microsoft.com/downloads/details.aspx?FamilyID=2da43d38-db71-4c1b-bc6a-9b6652cd92a3&amp;amp;DisplayLang=en Microsoft]. Also check in Task Manager, if gta_sa.exe process isn't already running.&lt;br /&gt;
&lt;br /&gt;
If you run at any substandard resolutions (e.g. 960x720), try to change your resolution to a commonly supported one (e.g. 640×480, 800×600, 1024×768, 1152×864, 1280×1024) by launching Grand Theft Auto: San Andreas in normal mode, setting the new resolution and exiting.&lt;br /&gt;
&lt;br /&gt;
==== Assertion in CMainMenu.cpp line 106 upon launching MTASA  ====&lt;br /&gt;
* '''I'm getting an assertion in CMainMenu.cpp (line 106) after I have launched MTASA. I'm able to ignore it, but then game crashes after I try to connect to a server.'''&lt;br /&gt;
&lt;br /&gt;
This is likely caused by GTASA or MTASA being installed in a path that contains non-ASCII characters (eg. Cyrillic, Polish, Japanese) in it.  &lt;br /&gt;
&lt;br /&gt;
To resolve this, you need to uninstall MTASA and GTASA, then install them in such paths that don't contain such characters.&lt;br /&gt;
&lt;br /&gt;
==== Controls not working ====&lt;br /&gt;
* '''My controls don't seem to work as they should.'''&lt;br /&gt;
&lt;br /&gt;
Try using the 'copygtacontrols' command in the console.&lt;br /&gt;
&lt;br /&gt;
==== Incorrect models ====&lt;br /&gt;
* '''Woman model's breasts look awkward ingame / I'm seeing odd, spider-like shaped player models.'''&lt;br /&gt;
&lt;br /&gt;
This is caused by the way GTA handles player stats. To fix this, be sure to set both fat and muscles player stats to 0, when you're changing player skin.&lt;br /&gt;
&lt;br /&gt;
==== Incorrect drive-by functionality ====&lt;br /&gt;
* '''Drivebys arent working as they should'''&lt;br /&gt;
&lt;br /&gt;
Drivebys are handled by script, and will change depending on the loaded gamemode.&lt;br /&gt;
&lt;br /&gt;
==== Unsaved settings ====&lt;br /&gt;
* '''My MTA setting(s) didn't get saved (...) I crashed.'''&lt;br /&gt;
&lt;br /&gt;
First, configure the MTA the way you want to, then exit the game and launch it again. Settings should get saved. Alternatively, try removing the coreconfig.xml file, then configure it and quit the game.&lt;br /&gt;
&lt;br /&gt;
==== Gamepad support ====&lt;br /&gt;
* '''MTA doesnt recognise my gamepad'''&lt;br /&gt;
&lt;br /&gt;
This is a known issue - MTA's keybinds system does not support direct input.  As an alternative, [http://xpadder.com/ XPadder] can be used.  This emulates joypad buttons as keyboard/mouse so that it can be used in MTA.  Please refer to [http://forum.mtasa.com/viewtopic.php?f=87&amp;amp;t=21167 this forum topic] for a brief guide on how to use XPadder.&lt;br /&gt;
&lt;br /&gt;
==== Sky flickering ====&lt;br /&gt;
* '''My screen/sky flickers when weather or sky effects are enabled.&lt;br /&gt;
&lt;br /&gt;
MTA:SA DM uses a new text rendering system from race, which is much more efficient in terms of FPS.  However, this can cause conflicts within the game, particularly with ATI based cards.  To fix this, bring up the console with ¬(tilde), and type the command '''ceguitext 1'''.  This reverts the rendering method to that of Race.  All glitches should no longer happen, at the cost of lower FPS.&lt;br /&gt;
&lt;br /&gt;
====Invalid serial number====&lt;br /&gt;
This seems to happen randomly to a few people. The best way to fix this is to install without a serial number at all (choose the bottom option on the MTA accounts page of the installer). We'll be looking into fixing this as soon as possible.&lt;br /&gt;
&lt;br /&gt;
You can also try to login into your account on [http://mtabeta.com/ www.mtabeta.com], there you can read your serial number. Then open &amp;quot;&lt;br /&gt;
HKEY_LOCAL_MACHINE/SOFTWARE/Multi Theft Auto: San Andreas/&amp;quot; in your registry. There you have to create the string &amp;quot;Username&amp;quot; with your username as value, and the string &amp;quot;Serial&amp;quot; with your serial number as value.&lt;br /&gt;
&lt;br /&gt;
==== 'Network module could not be located' ====&lt;br /&gt;
*'''I am getting 'Network module could not be located' error message upon launching MTA:SA DM&lt;br /&gt;
&lt;br /&gt;
Copy the file 'net.dll' from your GTA:SA/mta directory into your GTA:SA directory, overwriting existing files.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Windows Vista®-related ===&lt;br /&gt;
&lt;br /&gt;
==== Crash on launch ====&lt;br /&gt;
* '''I've successfully upgraded from MTA Race to MTASA DM on Vista, but it seems to crash on launch.&lt;br /&gt;
&lt;br /&gt;
Go to your Program Files\MTA San Andreas\mods\race directory, and rename client.dll to something else.  &lt;br /&gt;
&lt;br /&gt;
==== Crash on connect ====&lt;br /&gt;
* '''I seem to crash whenever I connect to a server just before I go in-game on Vista'''&lt;br /&gt;
&lt;br /&gt;
This seems to be an issue with the Microsoft DirectX April 2006 SDK Redistributable DLL file (d3dx9_30.dll) when running in compatibility mode. Please make sure that compatibility mode is competely turned off for  '''both''' your GTA_SA.exe and Multi Theft Auto.exe executables.&lt;br /&gt;
&lt;br /&gt;
==== Invalid serial error ====&lt;br /&gt;
* '''MTASA DM installer complains about wrong serial provided. I'm running it for the first time.&lt;br /&gt;
&lt;br /&gt;
You need to run the installer with Administrator privileges. To do so, right click on the installer executable, choose 'Properties', go into 'Compatibility' tab and tick the check box on the last field.&lt;br /&gt;
&lt;br /&gt;
Some have found that setting compatibility to Windows XP/2000 have fixed the problem.&lt;br /&gt;
&lt;br /&gt;
If User Account Control is disabled, you might need to enable it and run the installer with admin privileges (like said above) in order to install MTA:SA DM.&lt;br /&gt;
&lt;br /&gt;
==== Clock manipulation error ====&lt;br /&gt;
* '''I am getting 'Clock manipulation detected!' error message upon launching MTA:SA DM&lt;br /&gt;
&lt;br /&gt;
Further info coming soon.&lt;br /&gt;
&lt;br /&gt;
==== Halt on launch ====&lt;br /&gt;
* '''When I launch MTA:SA DM, nothing happens (GTA_SA.exe is running but not loading up)&lt;br /&gt;
&lt;br /&gt;
Run MTA:SA DM with Administrator privileges. To do this, right click on the installer executable, choose 'Properties', go into 'Compatibility' tab and tick the check box on the last field and try again.&lt;br /&gt;
&lt;br /&gt;
==== General GTA problems ====&lt;br /&gt;
* '''I have unexplainable GTA problems or crashes'''&lt;br /&gt;
&lt;br /&gt;
Make sure your computer as well as your GTA install meet the [[Deathmatch_Client_Manual#System_requirements|minimum requirements]] and that you are not running in any 98/2000/XP/2003 compatibility modes.&lt;br /&gt;
&lt;br /&gt;
Also try the solutions from these pages:&lt;br /&gt;
* http://www.gtaforums.com/index.php?showtopic=273549&amp;amp;view=findpost&amp;amp;p=4537502&lt;br /&gt;
* http://pullmonkey.com/2007/4/30/how-i-got-gta-san-andreas-to-work-with-a-crappy-os-vista&lt;br /&gt;
&lt;br /&gt;
== Server ==&lt;br /&gt;
&lt;br /&gt;
=== General ===&lt;br /&gt;
==== Fatal error 3 ====&lt;br /&gt;
* '''I'm getting ''Fatal Error 3'' whenever I connect to my server'''&lt;br /&gt;
&lt;br /&gt;
This error happens when the server you are trying to connect to is unable to provide you the required downloads, because it does not have http downloading enabled. Be sure to set the '''httpdownload''' configuration tag in your configuration to '''1'''.&lt;br /&gt;
==== Download error 9: Error downloading requested files ====&lt;br /&gt;
* '''I'm getting ''Download Error 9: Error downloading requested files'' whenever I connect to my server'''&lt;br /&gt;
&lt;br /&gt;
This error happens when the server you are trying to connect to is unable to provide you with a valid link. This results in a 404 (Not found) HTTP error and an error at your end.&lt;br /&gt;
&lt;br /&gt;
* If you are running the built-in server ('''httpserver''' is set to '''1''' and '''httpdownloadurl''' is empty), make sure that your HTTP server is accessible (you can try to access it by using a browser) for everyone.&lt;br /&gt;
&lt;br /&gt;
* If you have configured an external web server ('''httpdownloadurl''' is set to your custom URL), make sure that your HTTP is accessible and make sure you have read the [[Deathmatch_Server_Manual#Configuring_an_external_web_server | Configuring an external web server]] guide.&lt;br /&gt;
&lt;br /&gt;
=== Windows-related ===&lt;br /&gt;
No known reported issues.&lt;br /&gt;
&lt;br /&gt;
=== Linux-related ===&lt;br /&gt;
==== libcurl.so.&amp;lt;version&amp;gt;: cannot open shared object file ====&lt;br /&gt;
* '''My dedicated server gives a ''libcurl.so.&amp;lt;version&amp;gt;: cannot open shared object file'' error on startup''' (where &amp;lt;version&amp;gt; is to be replaced with 3 or 4)&lt;br /&gt;
&lt;br /&gt;
This means one of the dynamic dependencies (libcurl, CURL) needed in order to run the server cannot be found on your server.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If your server reports that it cannot find '''libcurl.so.4''', it's most likely due to an old version of libcurl that is installed on your system. You can either choose to upgrade libcurl to the latest version (check out your distribution package manager, or download/compile/install from the [http://curl.haxx.se/ CURL website]), or you can choose to pick another Linux build (e.g. the Generic Linux build, which contains a statically linked version of the library).&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;If your server reports that it cannot find '''libcurl.so.3''', libcurl is either not installed on your system, you are running an outdated version or you are running a newer version of libcurl (and downloaded a build that relied on the old version).&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If '''libcurl.so.4''' is present on your system (e.g. in /usr/lib), it means you have a newer version than the one required and you can most likely solve the problem by creating a symbolic to libcurl.so.3:&lt;br /&gt;
&amp;lt;pre&amp;gt;$ ln -s /usr/lib/libcurl.so.4 /usr/lib/libcurl.so.3&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If '''libcurl.so.2''' is present on your system (e.g. in /usr/lib), it means you have an older version and you can solve the problem by installing the most recent version of libcurl. This should be done through your package manager (check your distribution's documentation), or no such manager is present, by manually compiling and installing the latest CURL source from the [http://curl.haxx.se/ CURL website]).&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If libcurl is not present on your system, see how to install libcurl by reading the instructions above.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Fixed|v1.0-dp2}}&lt;br /&gt;
&lt;br /&gt;
==== ERROR: Couldn't find meta.xml ====&lt;br /&gt;
* '''My dedicated server console reports one of the following errors''':&lt;br /&gt;
* ERROR: Couldn't find meta.xml file for resource '.'&lt;br /&gt;
* ERROR: Couldn't find meta.xml file for resource '..'&lt;br /&gt;
&lt;br /&gt;
This is a minor (visual) issue with the directory handling code in the Linux server. The server tries to read the . and .. operators that are available in every directory, resulting in an error. You can safely ignore this issue.&lt;br /&gt;
&lt;br /&gt;
{{Fixed|v1.0-dp2}}&lt;br /&gt;
&lt;br /&gt;
==== ERROR: Could not parse 'settings.xml' file ====&lt;br /&gt;
* ''''My dedicated server reports the ''ERROR: Could not parse 'settings.xml' file (Invalid file). Starting with an empty settings registry.'' error.&lt;br /&gt;
&lt;br /&gt;
This is because a default settings.xml file isn't shipped with the server. After this error is encountered, the server should be automatically created by the server. To be sure that the creation was successful, and that you have appropriate rights to the file, you can execute the following commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;/mtasa_server_directory/mods/deathmatch $ touch settings.xml&lt;br /&gt;
/mtasa_server_directory/mods/deathmatch $ chmod 755 settings.xml&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Please note that the word '''settings''' here doesn't reflect your server configuration, but rather the scriptable [[Settings system]].&lt;br /&gt;
&lt;br /&gt;
{{Fixed|v1.0-dp2}}&lt;/div&gt;</summary>
		<author><name>SkyBon</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=%D0%92%D0%B2%D0%B5%D0%B4%D0%B5%D0%BD%D0%B8%D0%B5_%D0%B2_%D1%81%D0%BA%D1%80%D0%B8%D0%BF%D1%82%D0%B8%D0%BD%D0%B3&amp;diff=14650</id>
		<title>Введение в скриптинг</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=%D0%92%D0%B2%D0%B5%D0%B4%D0%B5%D0%BD%D0%B8%D0%B5_%D0%B2_%D1%81%D0%BA%D1%80%D0%B8%D0%BF%D1%82%D0%B8%D0%BD%D0%B3&amp;diff=14650"/>
		<updated>2008-01-08T16:32:23Z</updated>

		<summary type="html">&lt;p&gt;SkyBon: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Ресурсы - ключевая часть MTA. Ресурс - папка или zip архив, который содержит набор файлов, также мета файл, который рассказывает серверу как нужно загружать ресурс и из каких файлов он состоит. Это как программа в операционной системе - может быть запущен и остановлен, а также могут работать несколько ресурсов одновременно. Всё содержымое скрипта находится в ресурсе&lt;br /&gt;
&lt;br /&gt;
==Создаём простейший скрипт==&lt;br /&gt;
Firstly, we want to write something that adds a 'createvehicle' command players can use to spawn a vehicle beside their position.&lt;br /&gt;
===Preparations===&lt;br /&gt;
As decribed above, a resource is a folder or zip file, so first you should create a folder. The folder name is the name of the resource, that is used to start or stop it or reference in scripts. In our example, we shall call it ''commands''.&lt;br /&gt;
&lt;br /&gt;
What every resource has and needs is the ''meta.xml'' file. In our case, we want to create a script that provides some simple commands to the user, thus we need to tell the server to load a script file, we name ''script.lua'' in our case.&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; description=&amp;quot;A few simple commands&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;
Now we have to create the ''script.lua'' file we defined above in the same directory as the meta.xml. Now we have the both files:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
/commands/meta.xml&lt;br /&gt;
/commands/script.lua&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Writing the script===&lt;br /&gt;
Let's start with the contents 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, vehicle&lt;br /&gt;
function createVehicleForPlayer(thePlayer, command, vehicle)&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;
&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;
createVehiceForPlayer(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. 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 functions' 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.&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) somwhere 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 theoratical 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.&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(getClientName(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.&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;/div&gt;</summary>
		<author><name>SkyBon</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=%D0%93%D0%BB%D0%B0%D0%B2%D0%BD%D0%B0%D1%8F_%D1%81%D1%82%D1%80%D0%B0%D0%BD%D0%B8%D1%86%D0%B0&amp;diff=14649</id>
		<title>Главная страница</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=%D0%93%D0%BB%D0%B0%D0%B2%D0%BD%D0%B0%D1%8F_%D1%81%D1%82%D1%80%D0%B0%D0%BD%D0%B8%D1%86%D0%B0&amp;diff=14649"/>
		<updated>2008-01-08T16:30:07Z</updated>

		<summary type="html">&lt;p&gt;SkyBon: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
&amp;lt;div style=&amp;quot;float:left;&amp;quot;&amp;gt;&amp;lt;div style=&amp;quot;float:right;&amp;quot;&amp;gt;[[Image:Scripting.jpg]]&amp;lt;/div&amp;gt;Добро пожаловать в Multi Theft Auto: San Andreas Deathmatch developer wiki. В этом wiki вы найдёте множество полезной информации по разработке режимов и карт для Multi Theft Auto.&lt;br /&gt;
&lt;br /&gt;
Мы выпускаем предрелизные превью потому что нам нужна ваша помощь! Существует множество [[How you can help|способов помочь нам]] доработать и выпустить полностью законченную и отполированную версию MTA:SA DM. Создавайте режимы и карты, помогайте зафиксировать скриптинговые функци, пишите примеры, учебники или просто-напросто играйте и сообщайте обо всех ошибках MTA на форумах.&lt;br /&gt;
&lt;br /&gt;
Если у вас возникли вопросы на тему скриптинга, свяжитесь с нами на нашем [[IRC Channel|IRC канале]].&lt;br /&gt;
&lt;br /&gt;
'''Чтобы редактировать этот wiki вам нужна учётная запись mtabeta.com.''' Зарегистрируйтесь на http://www.mtabeta.com и затем войдите в учётную запись wiki с тем же именем и паролем.&lt;br /&gt;
&lt;br /&gt;
Этот wiki теперь поддерживает '''[http://gears.google.com/ Google Gears]''', который позволяет просматривать wiki вне сети (и быстро). Всего лишь установите Google Gears и нажмите ссылку &amp;quot;Уйти в оффлайн&amp;quot; внизу любой страницы. Подождите пока приложение загрузит содержание wiki на ваш компьютер и после этого текущая на момент загрузки версия wiki будет доступна без подключения к серверу.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 2px dotted navy; padding: 4px; margin: 10px&amp;quot;&amp;gt;Новейшая версия '''Multi Theft Auto: San Andreas Deathmatch''' - '''{{Current Version|full}}'''. Посетите [http://www.mtasa.com/dp.html страницу загрузки], чтобы скачать её.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear:both;&amp;quot;&amp;gt;&amp;lt;/div&amp;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;
|-&lt;br /&gt;
| width=&amp;quot;50%&amp;quot; style=&amp;quot;vertical-align:top;&amp;quot; |&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px;&amp;quot;&amp;gt;&lt;br /&gt;
====Начало====&lt;br /&gt;
&lt;br /&gt;
* [[Deathmatch_Client_Manual|Deathmatch Client Manual]]&lt;br /&gt;
* [[Deathmatch_Server_Manual|Deathmatch Server Manual]]&lt;br /&gt;
* [[Known_Issues_-_FAQ|Known issues in MTA:SA DM]]&lt;br /&gt;
* [[RU/Scripting Introduction|Вступление в скриптинг]]&lt;br /&gt;
* [[Debugging|Debugging Tutorial]] - How to find errors in your scripts&lt;br /&gt;
* [[MTA Classes]] - Detailed descriptions of all MTA custom types&lt;br /&gt;
** [[Element|MTA Elements]] / [[Element tree]]&lt;br /&gt;
* [[Resources|Introduction to Resources]]&lt;br /&gt;
** [[Resource Web Access]]&lt;br /&gt;
* [[Writing_Gamemodes|Writing Gamemodes]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Базы данных====&lt;br /&gt;
В этой части описаны все возможности LUA, которые предоставляют MTA или resources.&lt;br /&gt;
* [[Map manager|Менеджер карт]] - Используйте это для своих режимов&lt;br /&gt;
* [[Client side scripts|Скрипты для клиента]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Помощь по Lua вообще====&lt;br /&gt;
Страницы-учебники, цель которых - повысить ваш уровень понимания языка LUA &lt;br /&gt;
*[http://www.lua.org/pil/index.html Учебник &amp;quot;Программирование на LUA&amp;quot;]&lt;br /&gt;
*[http://lua-users.org/wiki/TutorialDirectory LUA Wiki]&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;
&amp;lt;div style=&amp;quot;border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px; background:#CCCCFF;&amp;quot;&amp;gt;&lt;br /&gt;
====Reference====&lt;br /&gt;
* [[Client Scripting Functions|Client-side Functions]]&lt;br /&gt;
* [[Client Scripting Events|Client-side Events]]&lt;br /&gt;
* [[Server Scripting Functions|Server-side Functions]]&lt;br /&gt;
* [[Server Scripting Events|Server-side Events]]&lt;br /&gt;
&amp;lt;!-- Incomplete * [[Module functions|Server-side external module scripting functions list]] --&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====ID Lists====&lt;br /&gt;
* [[Character Skins]] ([[All Skins Page]])&lt;br /&gt;
* [[CJ Clothes]]&lt;br /&gt;
* [[Template:Projectiles|Projectiles]]&lt;br /&gt;
* [[Template:Blip_Icons|Radar Blips]]&lt;br /&gt;
* [[Template:Sounds|Sounds]]&lt;br /&gt;
* [[Vehicle IDs|Vehicles]]&lt;br /&gt;
* [[Vehicle_default_colors|Vehicle Default Coloring Index]]&lt;br /&gt;
* [[Template:Vehicle_colors|Vehicle Color Palette]]&lt;br /&gt;
* Vehicle Upgrades&lt;br /&gt;
* [[Weapons|Weapons]]&lt;br /&gt;
* [[Weather|Weather]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>SkyBon</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=%C3%82%C3%B1%C3%B2%C3%B3%C3%AF%C3%AB%C3%A5%C3%AD%C3%A8%C3%A5_%C3%A2_%C3%B1%C3%AA%C3%B0%C3%A8%C3%AF%C3%B2%C3%A8%C3%AD%C3%A3&amp;diff=14648</id>
		<title>Âñòóïëåíèå â ñêðèïòèíã</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=%C3%82%C3%B1%C3%B2%C3%B3%C3%AF%C3%AB%C3%A5%C3%AD%C3%A8%C3%A5_%C3%A2_%C3%B1%C3%AA%C3%B0%C3%A8%C3%AF%C3%B2%C3%A8%C3%AD%C3%A3&amp;diff=14648"/>
		<updated>2008-01-08T16:29:32Z</updated>

		<summary type="html">&lt;p&gt;SkyBon: Âñòóïëåíèå â ñêðèïòèíã moved to RU/Scripting Introduction&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[RU/Scripting Introduction]]&lt;/div&gt;</summary>
		<author><name>SkyBon</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=%D0%92%D0%B2%D0%B5%D0%B4%D0%B5%D0%BD%D0%B8%D0%B5_%D0%B2_%D1%81%D0%BA%D1%80%D0%B8%D0%BF%D1%82%D0%B8%D0%BD%D0%B3&amp;diff=14647</id>
		<title>Введение в скриптинг</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=%D0%92%D0%B2%D0%B5%D0%B4%D0%B5%D0%BD%D0%B8%D0%B5_%D0%B2_%D1%81%D0%BA%D1%80%D0%B8%D0%BF%D1%82%D0%B8%D0%BD%D0%B3&amp;diff=14647"/>
		<updated>2008-01-08T16:29:32Z</updated>

		<summary type="html">&lt;p&gt;SkyBon: Âñòóïëåíèå â ñêðèïòèíã moved to RU/Scripting Introduction&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Ресурсы - ключевая часть MTA. Ресурс - папка или zip архив, который содержит набор файлов, также мета файл, который рассказывает серверу как нужно загружать ресурс и из каких файлов он состоит. Это как программа в операционной системе - может быть запущен и остановлен, а также могут работать несколько ресурсов одновременно.&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.&lt;br /&gt;
&lt;br /&gt;
==Creating a simple script==&lt;br /&gt;
Firstly, we want to write something that adds a 'createvehicle' command players can use to spawn a vehicle beside their position.&lt;br /&gt;
===Preparations===&lt;br /&gt;
As decribed above, a resource is a folder or zip file, so first you should create a folder. The folder name is the name of the resource, that is used to start or stop it or reference in scripts. In our example, we shall call it ''commands''.&lt;br /&gt;
&lt;br /&gt;
What every resource has and needs is the ''meta.xml'' file. In our case, we want to create a script that provides some simple commands to the user, thus we need to tell the server to load a script file, we name ''script.lua'' in our case.&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; description=&amp;quot;A few simple commands&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;
Now we have to create the ''script.lua'' file we defined above in the same directory as the meta.xml. Now we have the both files:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
/commands/meta.xml&lt;br /&gt;
/commands/script.lua&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Writing the script===&lt;br /&gt;
Let's start with the contents 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, vehicle&lt;br /&gt;
function createVehicleForPlayer(thePlayer, command, vehicle)&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;
&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;
createVehiceForPlayer(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. 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 functions' 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.&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) somwhere 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 theoratical 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.&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(getClientName(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.&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;/div&gt;</summary>
		<author><name>SkyBon</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=%D0%93%D0%BB%D0%B0%D0%B2%D0%BD%D0%B0%D1%8F_%D1%81%D1%82%D1%80%D0%B0%D0%BD%D0%B8%D1%86%D0%B0&amp;diff=14635</id>
		<title>Главная страница</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=%D0%93%D0%BB%D0%B0%D0%B2%D0%BD%D0%B0%D1%8F_%D1%81%D1%82%D1%80%D0%B0%D0%BD%D0%B8%D1%86%D0%B0&amp;diff=14635"/>
		<updated>2008-01-07T21:26:57Z</updated>

		<summary type="html">&lt;p&gt;SkyBon: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
&amp;lt;div style=&amp;quot;float:left;&amp;quot;&amp;gt;&amp;lt;div style=&amp;quot;float:right;&amp;quot;&amp;gt;[[Image:Scripting.jpg]]&amp;lt;/div&amp;gt;Добро пожаловать в Multi Theft Auto: San Andreas Deathmatch developer wiki. В этом wiki вы найдёте множество полезной информации по разработке режимов и карт для Multi Theft Auto.&lt;br /&gt;
&lt;br /&gt;
Мы выпускаем предрелизные превью потому что нам нужна ваша помощь! Существует множество [[How you can help|способов помочь нам]] доработать и выпустить полностью законченную и отполированную версию MTA:SA DM. Создавайте режимы и карты, помогайте зафиксировать скриптинговые функци, пишите примеры, учебники или просто-напросто играйте и сообщайте обо всех ошибках MTA на форумах.&lt;br /&gt;
&lt;br /&gt;
Если у вас возникли вопросы на тему скриптинга, свяжитесь с нами на нашем [[IRC Channel|IRC канале]].&lt;br /&gt;
&lt;br /&gt;
'''Чтобы редактировать этот wiki вам нужна учётная запись mtabeta.com.''' Зарегистрируйтесь на http://www.mtabeta.com и затем войдите в учётную запись wiki с тем же именем и паролем.&lt;br /&gt;
&lt;br /&gt;
Этот wiki теперь поддерживает '''[http://gears.google.com/ Google Gears]''', который позволяет просматривать wiki вне сети (и быстро). Всего лишь установите Google Gears и нажмите ссылку &amp;quot;Уйти в оффлайн&amp;quot; внизу любой страницы. Подождите пока приложение загрузит содержание wiki на ваш компьютер и после этого текущая на момент загрузки версия wiki будет доступна без подключения к серверу.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 2px dotted navy; padding: 4px; margin: 10px&amp;quot;&amp;gt;Новейшая версия '''Multi Theft Auto: San Andreas Deathmatch''' - '''{{Current Version|full}}'''. Посетите [http://www.mtasa.com/dp.html страницу загрузки], чтобы скачать её.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear:both;&amp;quot;&amp;gt;&amp;lt;/div&amp;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;
|-&lt;br /&gt;
| width=&amp;quot;50%&amp;quot; style=&amp;quot;vertical-align:top;&amp;quot; |&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px;&amp;quot;&amp;gt;&lt;br /&gt;
====Начало====&lt;br /&gt;
&lt;br /&gt;
* [[Deathmatch_Client_Manual|Deathmatch Client Manual]]&lt;br /&gt;
* [[Deathmatch_Server_Manual|Deathmatch Server Manual]]&lt;br /&gt;
* [[Known_Issues_-_FAQ|Known issues in MTA:SA DM]]&lt;br /&gt;
* [[Scripting Introduction|Introduction to Scripting]]&lt;br /&gt;
* [[Debugging|Debugging Tutorial]] - How to find errors in your scripts&lt;br /&gt;
* [[MTA Classes]] - Detailed descriptions of all MTA custom types&lt;br /&gt;
** [[Element|MTA Elements]] / [[Element tree]]&lt;br /&gt;
* [[Resources|Introduction to Resources]]&lt;br /&gt;
** [[Resource Web Access]]&lt;br /&gt;
* [[Writing_Gamemodes|Writing Gamemodes]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Базы данных====&lt;br /&gt;
В этой части описаны все возможности LUA, которые предоставляют MTA или resources.&lt;br /&gt;
* [[Map manager|Менеджер карт]] - Используйте это для своих режимов&lt;br /&gt;
* [[Client side scripts|Скрипты для клиента]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Помощь по Lua вообще====&lt;br /&gt;
Страницы-учебники, цель которых - повысить ваш уровень понимания языка LUA &lt;br /&gt;
*[http://www.lua.org/pil/index.html Учебник &amp;quot;Программирование на LUA&amp;quot;]&lt;br /&gt;
*[http://lua-users.org/wiki/TutorialDirectory LUA Wiki]&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;
&amp;lt;div style=&amp;quot;border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px; background:#CCCCFF;&amp;quot;&amp;gt;&lt;br /&gt;
====Reference====&lt;br /&gt;
* [[Client Scripting Functions|Client-side Functions]]&lt;br /&gt;
* [[Client Scripting Events|Client-side Events]]&lt;br /&gt;
* [[Server Scripting Functions|Server-side Functions]]&lt;br /&gt;
* [[Server Scripting Events|Server-side Events]]&lt;br /&gt;
&amp;lt;!-- Incomplete * [[Module functions|Server-side external module scripting functions list]] --&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====ID Lists====&lt;br /&gt;
* [[Character Skins]] ([[All Skins Page]])&lt;br /&gt;
* [[CJ Clothes]]&lt;br /&gt;
* [[Template:Projectiles|Projectiles]]&lt;br /&gt;
* [[Template:Blip_Icons|Radar Blips]]&lt;br /&gt;
* [[Template:Sounds|Sounds]]&lt;br /&gt;
* [[Vehicle IDs|Vehicles]]&lt;br /&gt;
* [[Vehicle_default_colors|Vehicle Default Coloring Index]]&lt;br /&gt;
* [[Template:Vehicle_colors|Vehicle Color Palette]]&lt;br /&gt;
* Vehicle Upgrades&lt;br /&gt;
* [[Weapons|Weapons]]&lt;br /&gt;
* [[Weather|Weather]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>SkyBon</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=%D0%93%D0%BB%D0%B0%D0%B2%D0%BD%D0%B0%D1%8F_%D1%81%D1%82%D1%80%D0%B0%D0%BD%D0%B8%D1%86%D0%B0&amp;diff=14634</id>
		<title>Главная страница</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=%D0%93%D0%BB%D0%B0%D0%B2%D0%BD%D0%B0%D1%8F_%D1%81%D1%82%D1%80%D0%B0%D0%BD%D0%B8%D1%86%D0%B0&amp;diff=14634"/>
		<updated>2008-01-07T21:20:18Z</updated>

		<summary type="html">&lt;p&gt;SkyBon: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
&amp;lt;div style=&amp;quot;float:left;&amp;quot;&amp;gt;&amp;lt;div style=&amp;quot;float:right;&amp;quot;&amp;gt;[[Image:Scripting.jpg]]&amp;lt;/div&amp;gt;Добро пожаловать в Multi Theft Auto: San Andreas Deathmatch developer wiki. В этом wiki вы найдёте множество полезной информации по разработке режимов и карт для Multi Theft Auto.&lt;br /&gt;
&lt;br /&gt;
Мы выпускаем предрелизные превью потому что нам нужна ваша помощь! Существует множество [[How you can help|способов помочь нам]] доработать и выпустить полностью законченную и отполированную версию MTA:SA DM. Создавайте режимы и карты, помогайте зафиксировать скриптинговые функци, пишите примеры, учебники или просто-напросто играйте и сообщайте обо всех ошибках MTA на форумах.&lt;br /&gt;
&lt;br /&gt;
Если у вас возникли вопросы на тему скриптинга, свяжитесь с нами на нашем [[IRC Channel|IRC канале]].&lt;br /&gt;
&lt;br /&gt;
'''Чтобы редактировать этот wiki вам нужна учётная запись mtabeta.com.''' Зарегистрируйтесь на http://www.mtabeta.com, затем войдите в учётную запись wiki с тем же именем и паролем.&lt;br /&gt;
&lt;br /&gt;
Этот wiki теперь поддерживает '''[http://gears.google.com/ Google Gears]''', который позволяет просматривать wiki вне сети (и быстро). Всего лишь установите Google Gears и нажмите ссылку &amp;quot;Уйти в оффлайн&amp;quot; внизу любой страницы. Подождите пока приложение загрузит содержание wiki на ваш компьютер и после этого текущая на момент загрузки версия wiki будет доступна без подключения к серверу.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 2px dotted navy; padding: 4px; margin: 10px&amp;quot;&amp;gt;Новейшая версия '''Multi Theft Auto: San Andreas Deathmatch''' - '''{{Current Version|full}}'''. Посетите [http://www.mtasa.com/dp.html страницу загрузки], чтобы скачать её.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear:both;&amp;quot;&amp;gt;&amp;lt;/div&amp;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;
|-&lt;br /&gt;
| width=&amp;quot;50%&amp;quot; style=&amp;quot;vertical-align:top;&amp;quot; |&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px;&amp;quot;&amp;gt;&lt;br /&gt;
====Getting started====&lt;br /&gt;
&lt;br /&gt;
* [[Deathmatch_Client_Manual|Deathmatch Client Manual]]&lt;br /&gt;
* [[Deathmatch_Server_Manual|Deathmatch Server Manual]]&lt;br /&gt;
* [[Known_Issues_-_FAQ|Known issues in MTA:SA DM]]&lt;br /&gt;
* [[Scripting Introduction|Introduction to Scripting]]&lt;br /&gt;
* [[Debugging|Debugging Tutorial]] - How to find errors in your scripts&lt;br /&gt;
* [[MTA Classes]] - Detailed descriptions of all MTA custom types&lt;br /&gt;
** [[Element|MTA Elements]] / [[Element tree]]&lt;br /&gt;
* [[Resources|Introduction to Resources]]&lt;br /&gt;
** [[Resource Web Access]]&lt;br /&gt;
* [[Writing_Gamemodes|Writing Gamemodes]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Databases====&lt;br /&gt;
This section outlines all the LUA capabilites MTA or resources provide.&lt;br /&gt;
* [[Map manager]] - Use this for your gamemodes&lt;br /&gt;
* [[Client side scripts]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====General Lua Help====&lt;br /&gt;
Pages designed to aid your understanding of LUA &lt;br /&gt;
*[http://www.lua.org/pil/index.html &amp;quot;Programming in LUA&amp;quot; Manual]&lt;br /&gt;
*[http://lua-users.org/wiki/TutorialDirectory LUA Wiki]&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;
&amp;lt;div style=&amp;quot;border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px; background:#CCCCFF;&amp;quot;&amp;gt;&lt;br /&gt;
====Reference====&lt;br /&gt;
* [[Client Scripting Functions|Client-side Functions]]&lt;br /&gt;
* [[Client Scripting Events|Client-side Events]]&lt;br /&gt;
* [[Server Scripting Functions|Server-side Functions]]&lt;br /&gt;
* [[Server Scripting Events|Server-side Events]]&lt;br /&gt;
&amp;lt;!-- Incomplete * [[Module functions|Server-side external module scripting functions list]] --&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====ID Lists====&lt;br /&gt;
* [[Character Skins]] ([[All Skins Page]])&lt;br /&gt;
* [[CJ Clothes]]&lt;br /&gt;
* [[Template:Projectiles|Projectiles]]&lt;br /&gt;
* [[Template:Blip_Icons|Radar Blips]]&lt;br /&gt;
* [[Template:Sounds|Sounds]]&lt;br /&gt;
* [[Vehicle IDs|Vehicles]]&lt;br /&gt;
* [[Vehicle_default_colors|Vehicle Default Coloring Index]]&lt;br /&gt;
* [[Template:Vehicle_colors|Vehicle Color Palette]]&lt;br /&gt;
* Vehicle Upgrades&lt;br /&gt;
* [[Weapons|Weapons]]&lt;br /&gt;
* [[Weather|Weather]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>SkyBon</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=%D0%93%D0%BB%D0%B0%D0%B2%D0%BD%D0%B0%D1%8F_%D1%81%D1%82%D1%80%D0%B0%D0%BD%D0%B8%D1%86%D0%B0&amp;diff=14633</id>
		<title>Главная страница</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=%D0%93%D0%BB%D0%B0%D0%B2%D0%BD%D0%B0%D1%8F_%D1%81%D1%82%D1%80%D0%B0%D0%BD%D0%B8%D1%86%D0%B0&amp;diff=14633"/>
		<updated>2008-01-07T21:19:07Z</updated>

		<summary type="html">&lt;p&gt;SkyBon: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
&amp;lt;div style=&amp;quot;float:left;&amp;quot;&amp;gt;&amp;lt;div style=&amp;quot;float:right;&amp;quot;&amp;gt;[[Image:Scripting.jpg]]&amp;lt;/div&amp;gt;Добро пожаловать в Multi Theft Auto: San Andreas Deathmatch developer wiki. В этом wiki вы найдёте множество полезной информации по разработке режимов и карт для Multi Theft Auto.&lt;br /&gt;
&lt;br /&gt;
Мы выпускаем предрелизные превью потому что нам нужна ваша помощь! Существует множество [[How you can help|способов помочь нам]] доработать и выпустить полностью законченную и отполированную версию MTA:SA DM. Создавайте режимы и карты, помогайте зафиксировать скриптинговые функци, пишите примеры, учебники или просто-напросто играйте и сообщайте обо всех ошибках MTA на форумах.&lt;br /&gt;
&lt;br /&gt;
Если у вас возникли вопросы на тему скриптинга, свяжитесь с нами на нашем [[IRC Channel|IRC канале]].&lt;br /&gt;
&lt;br /&gt;
'''Чтобы редактировать этот wiki вам нужна учётная запись mtabeta.com.''' Зарегистрируйтесь на [http://www.mtabeta.com], затем войдите в учётную запись wiki с тем же именем и паролем.&lt;br /&gt;
&lt;br /&gt;
Этот wiki теперь поддерживает '''[http://gears.google.com/ Google Gears]''', который позволяет просматривать wiki вне сети (и быстро). Всего лишь установите Google Gears и нажмите ссылку &amp;quot;Уйти в оффлайн&amp;quot; внизу любой страницы. Подождите пока приложение загрузит содержание wiki на ваш компьютер и после этого текущая на момент загрузки версия wiki будет доступна без подключения к серверу.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 2px dotted navy; padding: 4px; margin: 10px&amp;quot;&amp;gt;Новейшая версия '''Multi Theft Auto: San Andreas Deathmatch''' - '''{{Current Version|full}}'''. Посетите [http://www.mtasa.com/dp.html страницу загрузки], чтобы скачать её.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear:both;&amp;quot;&amp;gt;&amp;lt;/div&amp;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;
|-&lt;br /&gt;
| width=&amp;quot;50%&amp;quot; style=&amp;quot;vertical-align:top;&amp;quot; |&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px;&amp;quot;&amp;gt;&lt;br /&gt;
====Getting started====&lt;br /&gt;
&lt;br /&gt;
* [[Deathmatch_Client_Manual|Deathmatch Client Manual]]&lt;br /&gt;
* [[Deathmatch_Server_Manual|Deathmatch Server Manual]]&lt;br /&gt;
* [[Known_Issues_-_FAQ|Known issues in MTA:SA DM]]&lt;br /&gt;
* [[Scripting Introduction|Introduction to Scripting]]&lt;br /&gt;
* [[Debugging|Debugging Tutorial]] - How to find errors in your scripts&lt;br /&gt;
* [[MTA Classes]] - Detailed descriptions of all MTA custom types&lt;br /&gt;
** [[Element|MTA Elements]] / [[Element tree]]&lt;br /&gt;
* [[Resources|Introduction to Resources]]&lt;br /&gt;
** [[Resource Web Access]]&lt;br /&gt;
* [[Writing_Gamemodes|Writing Gamemodes]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Databases====&lt;br /&gt;
This section outlines all the LUA capabilites MTA or resources provide.&lt;br /&gt;
* [[Map manager]] - Use this for your gamemodes&lt;br /&gt;
* [[Client side scripts]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====General Lua Help====&lt;br /&gt;
Pages designed to aid your understanding of LUA &lt;br /&gt;
*[http://www.lua.org/pil/index.html &amp;quot;Programming in LUA&amp;quot; Manual]&lt;br /&gt;
*[http://lua-users.org/wiki/TutorialDirectory LUA Wiki]&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;
&amp;lt;div style=&amp;quot;border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px; background:#CCCCFF;&amp;quot;&amp;gt;&lt;br /&gt;
====Reference====&lt;br /&gt;
* [[Client Scripting Functions|Client-side Functions]]&lt;br /&gt;
* [[Client Scripting Events|Client-side Events]]&lt;br /&gt;
* [[Server Scripting Functions|Server-side Functions]]&lt;br /&gt;
* [[Server Scripting Events|Server-side Events]]&lt;br /&gt;
&amp;lt;!-- Incomplete * [[Module functions|Server-side external module scripting functions list]] --&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====ID Lists====&lt;br /&gt;
* [[Character Skins]] ([[All Skins Page]])&lt;br /&gt;
* [[CJ Clothes]]&lt;br /&gt;
* [[Template:Projectiles|Projectiles]]&lt;br /&gt;
* [[Template:Blip_Icons|Radar Blips]]&lt;br /&gt;
* [[Template:Sounds|Sounds]]&lt;br /&gt;
* [[Vehicle IDs|Vehicles]]&lt;br /&gt;
* [[Vehicle_default_colors|Vehicle Default Coloring Index]]&lt;br /&gt;
* [[Template:Vehicle_colors|Vehicle Color Palette]]&lt;br /&gt;
* Vehicle Upgrades&lt;br /&gt;
* [[Weapons|Weapons]]&lt;br /&gt;
* [[Weather|Weather]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>SkyBon</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=%D0%93%D0%BB%D0%B0%D0%B2%D0%BD%D0%B0%D1%8F_%D1%81%D1%82%D1%80%D0%B0%D0%BD%D0%B8%D1%86%D0%B0&amp;diff=14616</id>
		<title>Главная страница</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=%D0%93%D0%BB%D0%B0%D0%B2%D0%BD%D0%B0%D1%8F_%D1%81%D1%82%D1%80%D0%B0%D0%BD%D0%B8%D1%86%D0%B0&amp;diff=14616"/>
		<updated>2008-01-07T16:50:56Z</updated>

		<summary type="html">&lt;p&gt;SkyBon: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
&amp;lt;div style=&amp;quot;float:left;&amp;quot;&amp;gt;&amp;lt;div style=&amp;quot;float:right;&amp;quot;&amp;gt;[[Image:Scripting.jpg]]&amp;lt;/div&amp;gt;Добро пожаловать в Multi Theft Auto: San Andreas Deathmatch developer wiki. В этом wiki вы найдёте множество полезной информации по разработке режимов и карт для Multi Theft Auto.&lt;br /&gt;
&lt;br /&gt;
Мы выпускаем предрелизные превью потому что нам нужна ваша помощь! Существует множество [[How you can help|способов помочь нам]] доработать и выпустить полностью законченную и отполированную версию MTA:SA DM. Создавайте режимы и карты, помогайте зафиксировать скриптинговые функци, пишите примеры, учебники или просто-напросто играйте и сообщайте обо всех ошибках MTA на форумах.&lt;br /&gt;
&lt;br /&gt;
This release is a Big Thing for us - it's the first release of almost two years of our work and we can't wait to see see what you do with it. Please bear with us as the inevitable issues occur and remember that things aren't quite finished yet!&lt;br /&gt;
&lt;br /&gt;
If you have any questions or problems related to scripting, feel free to get in touch with us on our [[IRC Channel]].&lt;br /&gt;
&lt;br /&gt;
'''You need to have an mtabeta.com account to edit this wiki.''' Please register at [http://www.mtabeta.com mtabeta.com] and then use the same username and password to login here.&lt;br /&gt;
&lt;br /&gt;
The wiki now supports '''[http://gears.google.com/ Google Gears]''', which allows you to view the wiki offline (and fast). Just install Google Gears and click the Go Offline link at the bottom of any page. Be prepared to wait up to an hour(!) as it downloads, it will notify you at the bottom (next to the Go offline link) when it's done. Once you've done that, use your browser's 'Work offline' option (file menu usually), or just disconnect your internet and browse the wiki as normal.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 2px dotted navy; padding: 4px; margin: 10px&amp;quot;&amp;gt;Новейшая версия '''Multi Theft Auto: San Andreas Deathmatch''' - '''{{Current Version|full}}'''. Посетите [http://www.mtasa.com/dp.html страницу загрузки], чтобы скачать её.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear:both;&amp;quot;&amp;gt;&amp;lt;/div&amp;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;
|-&lt;br /&gt;
| width=&amp;quot;50%&amp;quot; style=&amp;quot;vertical-align:top;&amp;quot; |&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px;&amp;quot;&amp;gt;&lt;br /&gt;
====Getting started====&lt;br /&gt;
&lt;br /&gt;
* [[Deathmatch_Client_Manual|Deathmatch Client Manual]]&lt;br /&gt;
* [[Deathmatch_Server_Manual|Deathmatch Server Manual]]&lt;br /&gt;
* [[Known_Issues_-_FAQ|Known issues in MTA:SA DM]]&lt;br /&gt;
* [[Scripting Introduction|Introduction to Scripting]]&lt;br /&gt;
* [[Debugging|Debugging Tutorial]] - How to find errors in your scripts&lt;br /&gt;
* [[MTA Classes]] - Detailed descriptions of all MTA custom types&lt;br /&gt;
** [[Element|MTA Elements]] / [[Element tree]]&lt;br /&gt;
* [[Resources|Introduction to Resources]]&lt;br /&gt;
** [[Resource Web Access]]&lt;br /&gt;
* [[Writing_Gamemodes|Writing Gamemodes]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Databases====&lt;br /&gt;
This section outlines all the LUA capabilites MTA or resources provide.&lt;br /&gt;
* [[Map manager]] - Use this for your gamemodes&lt;br /&gt;
* [[Client side scripts]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====General Lua Help====&lt;br /&gt;
Pages designed to aid your understanding of LUA &lt;br /&gt;
*[http://www.lua.org/pil/index.html &amp;quot;Programming in LUA&amp;quot; Manual]&lt;br /&gt;
*[http://lua-users.org/wiki/TutorialDirectory LUA Wiki]&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;
&amp;lt;div style=&amp;quot;border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px; background:#CCCCFF;&amp;quot;&amp;gt;&lt;br /&gt;
====Reference====&lt;br /&gt;
* [[Client Scripting Functions|Client-side Functions]]&lt;br /&gt;
* [[Client Scripting Events|Client-side Events]]&lt;br /&gt;
* [[Server Scripting Functions|Server-side Functions]]&lt;br /&gt;
* [[Server Scripting Events|Server-side Events]]&lt;br /&gt;
&amp;lt;!-- Incomplete * [[Module functions|Server-side external module scripting functions list]] --&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====ID Lists====&lt;br /&gt;
* [[Character Skins]] ([[All Skins Page]])&lt;br /&gt;
* [[CJ Clothes]]&lt;br /&gt;
* [[Template:Projectiles|Projectiles]]&lt;br /&gt;
* [[Template:Blip_Icons|Radar Blips]]&lt;br /&gt;
* [[Template:Sounds|Sounds]]&lt;br /&gt;
* [[Vehicle IDs|Vehicles]]&lt;br /&gt;
* [[Vehicle_default_colors|Vehicle Default Coloring Index]]&lt;br /&gt;
* [[Template:Vehicle_colors|Vehicle Color Palette]]&lt;br /&gt;
* Vehicle Upgrades&lt;br /&gt;
* [[Weapons|Weapons]]&lt;br /&gt;
* [[Weather|Weather]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>SkyBon</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=%D0%93%D0%BB%D0%B0%D0%B2%D0%BD%D0%B0%D1%8F_%D1%81%D1%82%D1%80%D0%B0%D0%BD%D0%B8%D1%86%D0%B0&amp;diff=14615</id>
		<title>Главная страница</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=%D0%93%D0%BB%D0%B0%D0%B2%D0%BD%D0%B0%D1%8F_%D1%81%D1%82%D1%80%D0%B0%D0%BD%D0%B8%D1%86%D0%B0&amp;diff=14615"/>
		<updated>2008-01-07T16:50:38Z</updated>

		<summary type="html">&lt;p&gt;SkyBon: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
&amp;lt;div style=&amp;quot;float:left;&amp;quot;&amp;gt;&amp;lt;div style=&amp;quot;float:right;&amp;quot;&amp;gt;[[Image:Scripting.jpg]]&amp;lt;/div&amp;gt;Добро пожаловать в Multi Theft Auto: San Andreas Deathmatch developer wiki. В этом wiki вы найдёте множество полезной информации по разработке режимов и карт для Multi Theft Auto.&lt;br /&gt;
&lt;br /&gt;
Мы выпускаем предрелизные превью потому что нам нужна ваша помощь! Существует множество [[How you can help|способов помочь нам]] доработать и выпустить полностью законченную и отполированную версию MTA:SA DM. Создавайте режимы и карты, помогайте зафиксировать скриптинговые функци, пишите примеры, учебники или просто-напросто играйте и сообщайте обо всех ошибках MTA на форумах.&lt;br /&gt;
&lt;br /&gt;
This release is a Big Thing for us - it's the first release of almost two years of our work and we can't wait to see see what you do with it. Please bear with us as the inevitable issues occur and remember that things aren't quite finished yet!&lt;br /&gt;
&lt;br /&gt;
If you have any questions or problems related to scripting, feel free to get in touch with us on our [[IRC Channel]].&lt;br /&gt;
&lt;br /&gt;
'''You need to have an mtabeta.com account to edit this wiki.''' Please register at [http://www.mtabeta.com mtabeta.com] and then use the same username and password to login here.&lt;br /&gt;
&lt;br /&gt;
The wiki now supports '''[http://gears.google.com/ Google Gears]''', which allows you to view the wiki offline (and fast). Just install Google Gears and click the Go Offline link at the bottom of any page. Be prepared to wait up to an hour(!) as it downloads, it will notify you at the bottom (next to the Go offline link) when it's done. Once you've done that, use your browser's 'Work offline' option (file menu usually), or just disconnect your internet and browse the wiki as normal.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 2px dotted navy; padding: 4px; margin: 10px&amp;quot;&amp;gt;Новейшая версия '''Multi Theft Auto: San Andreas Deathmatch''' - '''{{Current Version|full}}'''. Посетите [http://www.mtasa.com/dp.html страница загрузки], чтобы скачать её.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear:both;&amp;quot;&amp;gt;&amp;lt;/div&amp;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;
|-&lt;br /&gt;
| width=&amp;quot;50%&amp;quot; style=&amp;quot;vertical-align:top;&amp;quot; |&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px;&amp;quot;&amp;gt;&lt;br /&gt;
====Getting started====&lt;br /&gt;
&lt;br /&gt;
* [[Deathmatch_Client_Manual|Deathmatch Client Manual]]&lt;br /&gt;
* [[Deathmatch_Server_Manual|Deathmatch Server Manual]]&lt;br /&gt;
* [[Known_Issues_-_FAQ|Known issues in MTA:SA DM]]&lt;br /&gt;
* [[Scripting Introduction|Introduction to Scripting]]&lt;br /&gt;
* [[Debugging|Debugging Tutorial]] - How to find errors in your scripts&lt;br /&gt;
* [[MTA Classes]] - Detailed descriptions of all MTA custom types&lt;br /&gt;
** [[Element|MTA Elements]] / [[Element tree]]&lt;br /&gt;
* [[Resources|Introduction to Resources]]&lt;br /&gt;
** [[Resource Web Access]]&lt;br /&gt;
* [[Writing_Gamemodes|Writing Gamemodes]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Databases====&lt;br /&gt;
This section outlines all the LUA capabilites MTA or resources provide.&lt;br /&gt;
* [[Map manager]] - Use this for your gamemodes&lt;br /&gt;
* [[Client side scripts]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====General Lua Help====&lt;br /&gt;
Pages designed to aid your understanding of LUA &lt;br /&gt;
*[http://www.lua.org/pil/index.html &amp;quot;Programming in LUA&amp;quot; Manual]&lt;br /&gt;
*[http://lua-users.org/wiki/TutorialDirectory LUA Wiki]&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;
&amp;lt;div style=&amp;quot;border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px; background:#CCCCFF;&amp;quot;&amp;gt;&lt;br /&gt;
====Reference====&lt;br /&gt;
* [[Client Scripting Functions|Client-side Functions]]&lt;br /&gt;
* [[Client Scripting Events|Client-side Events]]&lt;br /&gt;
* [[Server Scripting Functions|Server-side Functions]]&lt;br /&gt;
* [[Server Scripting Events|Server-side Events]]&lt;br /&gt;
&amp;lt;!-- Incomplete * [[Module functions|Server-side external module scripting functions list]] --&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====ID Lists====&lt;br /&gt;
* [[Character Skins]] ([[All Skins Page]])&lt;br /&gt;
* [[CJ Clothes]]&lt;br /&gt;
* [[Template:Projectiles|Projectiles]]&lt;br /&gt;
* [[Template:Blip_Icons|Radar Blips]]&lt;br /&gt;
* [[Template:Sounds|Sounds]]&lt;br /&gt;
* [[Vehicle IDs|Vehicles]]&lt;br /&gt;
* [[Vehicle_default_colors|Vehicle Default Coloring Index]]&lt;br /&gt;
* [[Template:Vehicle_colors|Vehicle Color Palette]]&lt;br /&gt;
* Vehicle Upgrades&lt;br /&gt;
* [[Weapons|Weapons]]&lt;br /&gt;
* [[Weather|Weather]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>SkyBon</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=%D0%93%D0%BB%D0%B0%D0%B2%D0%BD%D0%B0%D1%8F_%D1%81%D1%82%D1%80%D0%B0%D0%BD%D0%B8%D1%86%D0%B0&amp;diff=14614</id>
		<title>Главная страница</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=%D0%93%D0%BB%D0%B0%D0%B2%D0%BD%D0%B0%D1%8F_%D1%81%D1%82%D1%80%D0%B0%D0%BD%D0%B8%D1%86%D0%B0&amp;diff=14614"/>
		<updated>2008-01-07T16:48:42Z</updated>

		<summary type="html">&lt;p&gt;SkyBon: New page: __NOTOC__ &amp;lt;div style=&amp;quot;float:left;&amp;quot;&amp;gt;&amp;lt;div style=&amp;quot;float:right;&amp;quot;&amp;gt;Image:Scripting.jpg&amp;lt;/div&amp;gt;Добро пожаловать в Multi Theft Auto: San Andreas Deathmatch developer wiki. В э...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
&amp;lt;div style=&amp;quot;float:left;&amp;quot;&amp;gt;&amp;lt;div style=&amp;quot;float:right;&amp;quot;&amp;gt;[[Image:Scripting.jpg]]&amp;lt;/div&amp;gt;Добро пожаловать в Multi Theft Auto: San Andreas Deathmatch developer wiki. В этом wiki вы найдёте множество полезной информации по разработке режимов и карт для Multi Theft Auto.&lt;br /&gt;
&lt;br /&gt;
Мы выпускаем предрелизные превью потому что нам нужна ваша помощь! Существует множество [[How you can help|способов помочь нам]] доработать и выпустить полностью законченную и отполированную версию MTA:SA DM. Создавайте режимы и карты, помогайте зафиксировать скриптинговые функци, пишите примеры, учебники или просто-напросто играйте и сообщайте обо всех ошибках MTA на форумах.&lt;br /&gt;
&lt;br /&gt;
This release is a Big Thing for us - it's the first release of almost two years of our work and we can't wait to see see what you do with it. Please bear with us as the inevitable issues occur and remember that things aren't quite finished yet!&lt;br /&gt;
&lt;br /&gt;
If you have any questions or problems related to scripting, feel free to get in touch with us on our [[IRC Channel]].&lt;br /&gt;
&lt;br /&gt;
'''You need to have an mtabeta.com account to edit this wiki.''' Please register at [http://www.mtabeta.com mtabeta.com] and then use the same username and password to login here.&lt;br /&gt;
&lt;br /&gt;
The wiki now supports '''[http://gears.google.com/ Google Gears]''', which allows you to view the wiki offline (and fast). Just install Google Gears and click the Go Offline link at the bottom of any page. Be prepared to wait up to an hour(!) as it downloads, it will notify you at the bottom (next to the Go offline link) when it's done. Once you've done that, use your browser's 'Work offline' option (file menu usually), or just disconnect your internet and browse the wiki as normal.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 2px dotted navy; padding: 4px; margin: 10px&amp;quot;&amp;gt;Latest available version of '''Multi Theft Auto: San Andreas Deathmatch''' is '''{{Current Version|full}}'''. Visit the [http://www.mtasa.com/dp.html download page] and grab it.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear:both;&amp;quot;&amp;gt;&amp;lt;/div&amp;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;
|-&lt;br /&gt;
| width=&amp;quot;50%&amp;quot; style=&amp;quot;vertical-align:top;&amp;quot; |&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px;&amp;quot;&amp;gt;&lt;br /&gt;
====Getting started====&lt;br /&gt;
&lt;br /&gt;
* [[Deathmatch_Client_Manual|Deathmatch Client Manual]]&lt;br /&gt;
* [[Deathmatch_Server_Manual|Deathmatch Server Manual]]&lt;br /&gt;
* [[Known_Issues_-_FAQ|Known issues in MTA:SA DM]]&lt;br /&gt;
* [[Scripting Introduction|Introduction to Scripting]]&lt;br /&gt;
* [[Debugging|Debugging Tutorial]] - How to find errors in your scripts&lt;br /&gt;
* [[MTA Classes]] - Detailed descriptions of all MTA custom types&lt;br /&gt;
** [[Element|MTA Elements]] / [[Element tree]]&lt;br /&gt;
* [[Resources|Introduction to Resources]]&lt;br /&gt;
** [[Resource Web Access]]&lt;br /&gt;
* [[Writing_Gamemodes|Writing Gamemodes]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Databases====&lt;br /&gt;
This section outlines all the LUA capabilites MTA or resources provide.&lt;br /&gt;
* [[Map manager]] - Use this for your gamemodes&lt;br /&gt;
* [[Client side scripts]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====General Lua Help====&lt;br /&gt;
Pages designed to aid your understanding of LUA &lt;br /&gt;
*[http://www.lua.org/pil/index.html &amp;quot;Programming in LUA&amp;quot; Manual]&lt;br /&gt;
*[http://lua-users.org/wiki/TutorialDirectory LUA Wiki]&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;
&amp;lt;div style=&amp;quot;border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px; background:#CCCCFF;&amp;quot;&amp;gt;&lt;br /&gt;
====Reference====&lt;br /&gt;
* [[Client Scripting Functions|Client-side Functions]]&lt;br /&gt;
* [[Client Scripting Events|Client-side Events]]&lt;br /&gt;
* [[Server Scripting Functions|Server-side Functions]]&lt;br /&gt;
* [[Server Scripting Events|Server-side Events]]&lt;br /&gt;
&amp;lt;!-- Incomplete * [[Module functions|Server-side external module scripting functions list]] --&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====ID Lists====&lt;br /&gt;
* [[Character Skins]] ([[All Skins Page]])&lt;br /&gt;
* [[CJ Clothes]]&lt;br /&gt;
* [[Template:Projectiles|Projectiles]]&lt;br /&gt;
* [[Template:Blip_Icons|Radar Blips]]&lt;br /&gt;
* [[Template:Sounds|Sounds]]&lt;br /&gt;
* [[Vehicle IDs|Vehicles]]&lt;br /&gt;
* [[Vehicle_default_colors|Vehicle Default Coloring Index]]&lt;br /&gt;
* [[Template:Vehicle_colors|Vehicle Color Palette]]&lt;br /&gt;
* Vehicle Upgrades&lt;br /&gt;
* [[Weapons|Weapons]]&lt;br /&gt;
* [[Weather|Weather]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>SkyBon</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=User_talk:IJs&amp;diff=14607</id>
		<title>User talk:IJs</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=User_talk:IJs&amp;diff=14607"/>
		<updated>2008-01-07T16:32:44Z</updated>

		<summary type="html">&lt;p&gt;SkyBon: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Could you please enable the support of other languages, especially of Russian in MTA Development wiki?&lt;br /&gt;
[[User:SkyBon|SkyBon]] 10:31, 7 January 2008 (CST)&lt;/div&gt;</summary>
		<author><name>SkyBon</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=User_talk:IJs&amp;diff=14606</id>
		<title>User talk:IJs</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=User_talk:IJs&amp;diff=14606"/>
		<updated>2008-01-07T16:31:04Z</updated>

		<summary type="html">&lt;p&gt;SkyBon: New page: Could you please enable the support of other languages in MTA Development wiki? ~~~~&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Could you please enable the support of other languages in MTA Development wiki?&lt;br /&gt;
[[User:SkyBon|SkyBon]] 10:31, 7 January 2008 (CST)&lt;/div&gt;</summary>
		<author><name>SkyBon</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Known_Issues_-_FAQ&amp;diff=14534</id>
		<title>Known Issues - FAQ</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Known_Issues_-_FAQ&amp;diff=14534"/>
		<updated>2008-01-05T15:01:33Z</updated>

		<summary type="html">&lt;p&gt;SkyBon: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Post here your proposed Q&amp;amp;A, regarding the known problems with MTA:SA DM and their solutions, especially problems we're encountering now, that might be also encountered by users in the final release. You're also welcome to edit them grammar/style wise.&lt;br /&gt;
&lt;br /&gt;
== Client ==&lt;br /&gt;
&lt;br /&gt;
=== General ===&lt;br /&gt;
==== No chat response and black screen when in-game ====&lt;br /&gt;
* '''After connecting to a server, my chat doesn't seem to work and nothing seems to happen. I can only see a black screen, I'm not getting spawned but I can see other people.'''&lt;br /&gt;
&lt;br /&gt;
This problem occurs due to the server-side packet size being set too high (close to the Ethernet maximum of 1500 bytes), resulting in the loss of all packets with this size somewhere on their way from the server to client (e.g. they are dropped by a switch, your local router, or your NIC), the above problems and possibly a ''Connection Lost'' message after a while.&lt;br /&gt;
&lt;br /&gt;
This issue has been addressed and will most likely be fixed in the following developer preview. &lt;br /&gt;
&lt;br /&gt;
==== Initial black screen/hanging GTA splash screens ====&lt;br /&gt;
* '''MTA shows a permanent black screen or hanging GTA splash screens.'''&lt;br /&gt;
&lt;br /&gt;
It may be necessary that during/after the logo splash screens in Grand Theft Auto you have to give some input in order to skip the videos correctly. Try to click your left-mouse button a few times, or tapping a few keys.&lt;br /&gt;
&lt;br /&gt;
* '''MTA shows a permanent black screen after the GTA splash screens (possibly with text in the bottom right corner).'''&lt;br /&gt;
&lt;br /&gt;
This can be related to a lack of support for DirectX or video card features, on your system, which are needed to run the dynamically rendered menu. This dynamic menu is enabled by default. Try disabling the dynamic menu by downloading the adjusted [http://www.mtasa.com/files/coreconfig.xml coreconfig.xml] file and placing it in our ''GTA San Andreas\MTA'' directory (overwriting any existing files).&lt;br /&gt;
&lt;br /&gt;
==== Halt after MTA splash screen ====&lt;br /&gt;
* '''Nothing happens after the 'Stop playing with yourself' splash screen'''&lt;br /&gt;
&lt;br /&gt;
If you use nVidia GeForce, try turning off nView Desktop Manager before starting MTA.&lt;br /&gt;
&lt;br /&gt;
Also try deleting GTA San Andreas settings file (&amp;quot;gta_sa.set&amp;quot;) in &amp;quot;Documents\GTA San Andreas User Files&amp;quot; folder&lt;br /&gt;
&lt;br /&gt;
==== Crash after MTA splash screen ====&lt;br /&gt;
* '''MTA crashes after the 'Stop playing with yourself' logo. Both single player and the MTA: Race ran fine before.'''&lt;br /&gt;
&lt;br /&gt;
Try downloading the latest DirectX Runtime files from [http://www.microsoft.com/downloads/details.aspx?FamilyID=2da43d38-db71-4c1b-bc6a-9b6652cd92a3&amp;amp;DisplayLang=en Microsoft]. Also check in Task Manager, if gta_sa.exe process isn't already running.&lt;br /&gt;
&lt;br /&gt;
If you run at any substandard resolutions (e.g. 960x720), try to change your resolution to a commonly supported one (e.g. 640×480, 800×600, 1024×768, 1152×864, 1280×1024) by launching Grand Theft Auto: San Andreas in normal mode, setting the new resolution and exiting.&lt;br /&gt;
&lt;br /&gt;
==== Controls not working ====&lt;br /&gt;
* '''My controls don't seem to work as they should.'''&lt;br /&gt;
&lt;br /&gt;
Try using the 'copygtacontrols' command in the console.&lt;br /&gt;
&lt;br /&gt;
==== Incorrect models ====&lt;br /&gt;
* '''Woman model's breasts look awkward ingame / I'm seeing odd, spider-like shaped player models.'''&lt;br /&gt;
&lt;br /&gt;
This is caused by the way GTA handles player stats. To fix this, be sure to set both fat and muscles player stats to 0, when you're changing player skin.&lt;br /&gt;
&lt;br /&gt;
==== Incorrect drive-by functionality ====&lt;br /&gt;
* '''Drivebys arent working as they should'''&lt;br /&gt;
&lt;br /&gt;
Drivebys are handled by script, and will change depending on the loaded gamemode.&lt;br /&gt;
&lt;br /&gt;
==== Unsaved settings ====&lt;br /&gt;
* '''My MTA setting(s) didn't get saved (...) I crashed.'''&lt;br /&gt;
&lt;br /&gt;
First, configure the MTA the way you want to, then exit the game and launch it again. Settings should get saved. Alternatively, try removing the coreconfig.xml file, then configure it and quit the game.&lt;br /&gt;
&lt;br /&gt;
==== Gamepad support ====&lt;br /&gt;
* '''MTA doesnt recognise my gamepad'''&lt;br /&gt;
&lt;br /&gt;
This is a known issue - MTA's keybinds system does not support direct input.  As an alternative, [http://xpadder.com/ XPadder] can be used.  This emulates joypad buttons as keyboard/mouse so that it can be used in MTA.&lt;br /&gt;
&lt;br /&gt;
==== Sky flickering ====&lt;br /&gt;
* '''My screen/sky flickers when weather or sky effects are enabled.&lt;br /&gt;
&lt;br /&gt;
MTA:SA DM uses a new text rendering system from race, which is much more efficient in terms of FPS.  However, this can cause conflicts within the game, particularly with ATI based cards.  To fix this, bring up the console with ¬(tilde), and type the command '''ceguitext 1'''.  This reverts the rendering method to that of Race.  All glitches should no longer happen, at the cost of lower FPS.&lt;br /&gt;
&lt;br /&gt;
====Invalid serial number====&lt;br /&gt;
This seems to happen randomly to a few people. The best way to fix this is to install without a serial number at all (choose the bottom option on the MTA accounts page of the installer). We'll be looking into fixing this as soon as possible.&lt;br /&gt;
&lt;br /&gt;
=== Windows Vista®-related ===&lt;br /&gt;
&lt;br /&gt;
==== Crash on launch ====&lt;br /&gt;
* '''I've successfully upgraded from MTA Race to MTASA DM on Vista, but it seems to crash on launch.&lt;br /&gt;
&lt;br /&gt;
Go to your Program Files\MTA San Andreas\mods\race directory, and rename client.dll to something else.  &lt;br /&gt;
&lt;br /&gt;
==== Crash on connect ====&lt;br /&gt;
* '''I seem to crash whenever I connect to a server just before I go in-game on Vista'''&lt;br /&gt;
&lt;br /&gt;
This seems to be an issue with the Microsoft DirectX April 2006 SDK Redistributable DLL file (d3dx9_30.dll) when running in compatibility mode. Please make sure that compatibility mode is competely turned off for  '''both''' your GTA_SA.exe and Multi Theft Auto.exe executables.&lt;br /&gt;
&lt;br /&gt;
==== Invalid serial error ====&lt;br /&gt;
* '''MTASA DM installer complains about wrong serial provided. I'm running it for the first time.&lt;br /&gt;
&lt;br /&gt;
You need to run the installer with Administrator privileges. To do so, right click on the installer executable, choose 'Properties', go into 'Compatibility' tab and tick the check box on the last field.&lt;br /&gt;
&lt;br /&gt;
Some have found that setting compatibility to Windows XP/2000 have fixed the problem.&lt;br /&gt;
&lt;br /&gt;
If User Account Control is disabled, you might need to enable it and run the installer with admin privileges (like said above) in order to install MTA:SA DM.&lt;br /&gt;
&lt;br /&gt;
==== Clock manipulation error ====&lt;br /&gt;
* '''I am getting 'Clock manipulation detected!' error message upon launching MTA:SA DM&lt;br /&gt;
&lt;br /&gt;
Further info coming soon.&lt;br /&gt;
&lt;br /&gt;
==== Halt on launch ====&lt;br /&gt;
* '''When I launch MTA:SA DM, nothing happens (GTA_SA.exe is running but not loading up)&lt;br /&gt;
&lt;br /&gt;
Run MTA:SA DM with Administrator privileges. To do this, right click on the installer executable, choose 'Properties', go into 'Compatibility' tab and tick the check box on the last field and try again.&lt;br /&gt;
&lt;br /&gt;
==== General GTA problems ====&lt;br /&gt;
* '''I have unexplainable GTA problems or crashes'''&lt;br /&gt;
&lt;br /&gt;
Make sure your computer as well as your GTA install meet the [[Deathmatch_Client_Manual#System_requirements|minimum requirements]] and that you are not running in any 98/2000/XP/2003 compatibility modes.&lt;br /&gt;
&lt;br /&gt;
Also try the solutions from these pages:&lt;br /&gt;
* http://www.gtaforums.com/index.php?showtopic=273549&amp;amp;view=findpost&amp;amp;p=4537502&lt;br /&gt;
* http://pullmonkey.com/2007/4/30/how-i-got-gta-san-andreas-to-work-with-a-crappy-os-vista&lt;br /&gt;
&lt;br /&gt;
== Server ==&lt;br /&gt;
&lt;br /&gt;
=== General ===&lt;br /&gt;
==== Fatal error 3 ====&lt;br /&gt;
* '''I'm getting ''Fatal Error 3'' whenever I connect to my server'''&lt;br /&gt;
&lt;br /&gt;
This error happens when the server you are trying to connect to is unable to provide you the required downloads, because it does not have http downloading enabled. Be sure to set the '''httpdownload''' configuration tag in your configuration to '''1'''.&lt;br /&gt;
==== Download error 9: Error downloading requested files ====&lt;br /&gt;
* '''I'm getting ''Download Error 9: Error downloading requested files'' whenever I connect to my server'''&lt;br /&gt;
&lt;br /&gt;
This error happens when the server you are trying to connect to is unable to provide you with a valid link. This results in a 404 (Not found) HTTP error and an error at your end.&lt;br /&gt;
&lt;br /&gt;
* If you are running the built-in server ('''httpserver''' is set to '''1''' and '''httpdownloadurl''' is empty), make sure that your HTTP server is accessible (you can try to access it by using a browser) for everyone.&lt;br /&gt;
&lt;br /&gt;
* If you have configured an external web server ('''httpdownloadurl''' is set to your custom URL), make sure that your HTTP is accessible and make sure you have read the [[Deathmatch_Server_Manual#Configuring_an_external_web_server | Configuring an external web server]] guide.&lt;br /&gt;
&lt;br /&gt;
==== Crashing when banning a player ====&lt;br /&gt;
The banPlayer script function will crash. Avoid using it. You can modify the xml file manually instead. This will be fixed in the next release.&lt;br /&gt;
&lt;br /&gt;
=== Windows-related ===&lt;br /&gt;
No known reported issues.&lt;br /&gt;
&lt;br /&gt;
=== Linux-related ===&lt;br /&gt;
==== libcurl.so.&amp;lt;version&amp;gt;: cannot open shared object file ====&lt;br /&gt;
* '''My dedicated server gives a ''libcurl.so.&amp;lt;version&amp;gt;: cannot open shared object file'' error on startup''' (where &amp;lt;version&amp;gt; is to be replaced with 3 or 4)&lt;br /&gt;
&lt;br /&gt;
This means one of the dynamic dependencies (libcurl, CURL) needed in order to run the server cannot be found on your server.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If your server reports that it cannot find '''libcurl.so.4''', it's most likely due to an old version of libcurl that is installed on your system. You can either choose to upgrade libcurl to the latest version (check out your distribution package manager, or download/compile/install from the [http://curl.haxx.se/ CURL website]), or you can choose to pick another Linux build (e.g. the Generic Linux build, which contains a statically linked version of the library).&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;If your server reports that it cannot find '''libcurl.so.3''', libcurl is either not installed on your system, you are running an outdated version or you are running a newer version of libcurl (and downloaded a build that relied on the old version).&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If '''libcurl.so.4''' is present on your system (e.g. in /usr/lib), it means you have a newer version than the one required and you can most likely solve the problem by creating a symbolic to libcurl.so.3:&lt;br /&gt;
&amp;lt;pre&amp;gt;$ ln -s /usr/lib/libcurl.so.4 /usr/lib/libcurl.so.3&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If '''libcurl.so.2''' is present on your system (e.g. in /usr/lib), it means you have an older version and you can solve the problem by installing the most recent version of libcurl. This should be done through your package manager (check your distribution's documentation), or no such manager is present, by manually compiling and installing the latest CURL source from the [http://curl.haxx.se/ CURL website]).&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If libcurl is not present on your system, see how to install libcurl by reading the instructions above.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== ERROR: Couldn't find meta.xml ====&lt;br /&gt;
* '''My dedicated server console reports one of the following errors''':&lt;br /&gt;
* ERROR: Couldn't find meta.xml file for resource '.'&lt;br /&gt;
* ERROR: Couldn't find meta.xml file for resource '..'&lt;br /&gt;
&lt;br /&gt;
This is a minor (visual) issue with the directory handling code in the Linux server. The server tries to read the . and .. operators that are available in every directory, resulting in an error. You can safely ignore this issue.&lt;br /&gt;
&lt;br /&gt;
==== ERROR: Could not parse 'settings.xml' file ====&lt;br /&gt;
* ''''My dedicated server reports the ''ERROR: Could not parse 'settings.xml' file (Invalid file). Starting with an empty settings registry.'' error.&lt;br /&gt;
&lt;br /&gt;
This is because a default settings.xml file isn't shipped with the server. After this error is encountered, the server should be automatically created by the server. To be sure that the creation was successful, and that you have appropriate rights to the file, you can execute the following commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;/mtasa_server_directory/mods/deathmatch $ touch settings.xml&lt;br /&gt;
/mtasa_server_directory/mods/deathmatch $ chmod 777 settings.xml&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Please note that the word '''settings''' here doesn't reflect your server configuration, but rather the scriptable [[Settings system]].&lt;/div&gt;</summary>
		<author><name>SkyBon</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Known_Issues_-_FAQ&amp;diff=14533</id>
		<title>Known Issues - FAQ</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Known_Issues_-_FAQ&amp;diff=14533"/>
		<updated>2008-01-05T15:00:12Z</updated>

		<summary type="html">&lt;p&gt;SkyBon: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Post here your proposed Q&amp;amp;A, regarding the known problems with MTA:SA DM and their solutions, especially problems we're encountering now, that might be also encountered by users in the final release. You're also welcome to edit them grammar/style wise.&lt;br /&gt;
&lt;br /&gt;
== Client ==&lt;br /&gt;
&lt;br /&gt;
=== General ===&lt;br /&gt;
==== No chat response and black screen when in-game ====&lt;br /&gt;
* '''After connecting to a server, my chat doesn't seem to work and nothing seems to happen. I can only see a black screen, I'm not getting spawned but I can see other people.'''&lt;br /&gt;
&lt;br /&gt;
This problem occurs due to the server-side packet size being set too high (close to the Ethernet maximum of 1500 bytes), resulting in the loss of all packets with this size somewhere on their way from the server to client (e.g. they are dropped by a switch, your local router, or your NIC), the above problems and possibly a ''Connection Lost'' message after a while.&lt;br /&gt;
&lt;br /&gt;
This issue has been addressed and will most likely be fixed in the following developer preview. &lt;br /&gt;
&lt;br /&gt;
==== Initial black screen/hanging GTA splash screens ====&lt;br /&gt;
* '''MTA shows a permanent black screen or hanging GTA splash screens.'''&lt;br /&gt;
&lt;br /&gt;
It may be necessary that during/after the logo splash screens in Grand Theft Auto you have to give some input in order to skip the videos correctly. Try to click your left-mouse button a few times, or tapping a few keys.&lt;br /&gt;
&lt;br /&gt;
* '''MTA shows a permanent black screen after the GTA splash screens (possibly with text in the bottom right corner).'''&lt;br /&gt;
&lt;br /&gt;
This can be related to a lack of support for DirectX or video card features, on your system, which are needed to run the dynamically rendered menu. This dynamic menu is enabled by default. Try disabling the dynamic menu by downloading the adjusted [http://www.mtasa.com/files/coreconfig.xml coreconfig.xml] file and placing it in our ''GTA San Andreas\MTA'' directory (overwriting any existing files).&lt;br /&gt;
&lt;br /&gt;
==== Halt after MTA splash screen ====&lt;br /&gt;
* '''Nothing happens after the 'Stop playing with yourself' splash screen'''&lt;br /&gt;
&lt;br /&gt;
If you use nVidia GeForce, try turning off nView Desktop Manager before starting MTA.&lt;br /&gt;
Also try deleting GTA San Andreas settings file (&amp;quot;gta_sa.set&amp;quot;) in &amp;quot;Documents\GTA San Andreas User Files&amp;quot; folder&lt;br /&gt;
&lt;br /&gt;
==== Crash after MTA splash screen ====&lt;br /&gt;
* '''MTA crashes after the 'Stop playing with yourself' logo. Both single player and the MTA: Race ran fine before.'''&lt;br /&gt;
&lt;br /&gt;
Try downloading the latest DirectX Runtime files from [http://www.microsoft.com/downloads/details.aspx?FamilyID=2da43d38-db71-4c1b-bc6a-9b6652cd92a3&amp;amp;DisplayLang=en Microsoft]. Also check in Task Manager, if gta_sa.exe process isn't already running.&lt;br /&gt;
&lt;br /&gt;
If you run at any substandard resolutions (e.g. 960x720), try to change your resolution to a commonly supported one (e.g. 640×480, 800×600, 1024×768, 1152×864, 1280×1024) by launching Grand Theft Auto: San Andreas in normal mode, setting the new resolution and exiting.&lt;br /&gt;
&lt;br /&gt;
==== Controls not working ====&lt;br /&gt;
* '''My controls don't seem to work as they should.'''&lt;br /&gt;
&lt;br /&gt;
Try using the 'copygtacontrols' command in the console.&lt;br /&gt;
&lt;br /&gt;
==== Incorrect models ====&lt;br /&gt;
* '''Woman model's breasts look awkward ingame / I'm seeing odd, spider-like shaped player models.'''&lt;br /&gt;
&lt;br /&gt;
This is caused by the way GTA handles player stats. To fix this, be sure to set both fat and muscles player stats to 0, when you're changing player skin.&lt;br /&gt;
&lt;br /&gt;
==== Incorrect drive-by functionality ====&lt;br /&gt;
* '''Drivebys arent working as they should'''&lt;br /&gt;
&lt;br /&gt;
Drivebys are handled by script, and will change depending on the loaded gamemode.&lt;br /&gt;
&lt;br /&gt;
==== Unsaved settings ====&lt;br /&gt;
* '''My MTA setting(s) didn't get saved (...) I crashed.'''&lt;br /&gt;
&lt;br /&gt;
First, configure the MTA the way you want to, then exit the game and launch it again. Settings should get saved. Alternatively, try removing the coreconfig.xml file, then configure it and quit the game.&lt;br /&gt;
&lt;br /&gt;
==== Gamepad support ====&lt;br /&gt;
* '''MTA doesnt recognise my gamepad'''&lt;br /&gt;
&lt;br /&gt;
This is a known issue - MTA's keybinds system does not support direct input.  As an alternative, [http://xpadder.com/ XPadder] can be used.  This emulates joypad buttons as keyboard/mouse so that it can be used in MTA.&lt;br /&gt;
&lt;br /&gt;
==== Sky flickering ====&lt;br /&gt;
* '''My screen/sky flickers when weather or sky effects are enabled.&lt;br /&gt;
&lt;br /&gt;
MTA:SA DM uses a new text rendering system from race, which is much more efficient in terms of FPS.  However, this can cause conflicts within the game, particularly with ATI based cards.  To fix this, bring up the console with ¬(tilde), and type the command '''ceguitext 1'''.  This reverts the rendering method to that of Race.  All glitches should no longer happen, at the cost of lower FPS.&lt;br /&gt;
&lt;br /&gt;
====Invalid serial number====&lt;br /&gt;
This seems to happen randomly to a few people. The best way to fix this is to install without a serial number at all (choose the bottom option on the MTA accounts page of the installer). We'll be looking into fixing this as soon as possible.&lt;br /&gt;
&lt;br /&gt;
=== Windows Vista®-related ===&lt;br /&gt;
&lt;br /&gt;
==== Crash on launch ====&lt;br /&gt;
* '''I've successfully upgraded from MTA Race to MTASA DM on Vista, but it seems to crash on launch.&lt;br /&gt;
&lt;br /&gt;
Go to your Program Files\MTA San Andreas\mods\race directory, and rename client.dll to something else.  &lt;br /&gt;
&lt;br /&gt;
==== Crash on connect ====&lt;br /&gt;
* '''I seem to crash whenever I connect to a server just before I go in-game on Vista'''&lt;br /&gt;
&lt;br /&gt;
This seems to be an issue with the Microsoft DirectX April 2006 SDK Redistributable DLL file (d3dx9_30.dll) when running in compatibility mode. Please make sure that compatibility mode is competely turned off for  '''both''' your GTA_SA.exe and Multi Theft Auto.exe executables.&lt;br /&gt;
&lt;br /&gt;
==== Invalid serial error ====&lt;br /&gt;
* '''MTASA DM installer complains about wrong serial provided. I'm running it for the first time.&lt;br /&gt;
&lt;br /&gt;
You need to run the installer with Administrator privileges. To do so, right click on the installer executable, choose 'Properties', go into 'Compatibility' tab and tick the check box on the last field.&lt;br /&gt;
&lt;br /&gt;
Some have found that setting compatibility to Windows XP/2000 have fixed the problem.&lt;br /&gt;
&lt;br /&gt;
If User Account Control is disabled, you might need to enable it and run the installer with admin privileges (like said above) in order to install MTA:SA DM.&lt;br /&gt;
&lt;br /&gt;
==== Clock manipulation error ====&lt;br /&gt;
* '''I am getting 'Clock manipulation detected!' error message upon launching MTA:SA DM&lt;br /&gt;
&lt;br /&gt;
Further info coming soon.&lt;br /&gt;
&lt;br /&gt;
==== Halt on launch ====&lt;br /&gt;
* '''When I launch MTA:SA DM, nothing happens (GTA_SA.exe is running but not loading up)&lt;br /&gt;
&lt;br /&gt;
Run MTA:SA DM with Administrator privileges. To do this, right click on the installer executable, choose 'Properties', go into 'Compatibility' tab and tick the check box on the last field and try again.&lt;br /&gt;
&lt;br /&gt;
==== General GTA problems ====&lt;br /&gt;
* '''I have unexplainable GTA problems or crashes'''&lt;br /&gt;
&lt;br /&gt;
Make sure your computer as well as your GTA install meet the [[Deathmatch_Client_Manual#System_requirements|minimum requirements]] and that you are not running in any 98/2000/XP/2003 compatibility modes.&lt;br /&gt;
&lt;br /&gt;
Also try the solutions from these pages:&lt;br /&gt;
* http://www.gtaforums.com/index.php?showtopic=273549&amp;amp;view=findpost&amp;amp;p=4537502&lt;br /&gt;
* http://pullmonkey.com/2007/4/30/how-i-got-gta-san-andreas-to-work-with-a-crappy-os-vista&lt;br /&gt;
&lt;br /&gt;
== Server ==&lt;br /&gt;
&lt;br /&gt;
=== General ===&lt;br /&gt;
==== Fatal error 3 ====&lt;br /&gt;
* '''I'm getting ''Fatal Error 3'' whenever I connect to my server'''&lt;br /&gt;
&lt;br /&gt;
This error happens when the server you are trying to connect to is unable to provide you the required downloads, because it does not have http downloading enabled. Be sure to set the '''httpdownload''' configuration tag in your configuration to '''1'''.&lt;br /&gt;
==== Download error 9: Error downloading requested files ====&lt;br /&gt;
* '''I'm getting ''Download Error 9: Error downloading requested files'' whenever I connect to my server'''&lt;br /&gt;
&lt;br /&gt;
This error happens when the server you are trying to connect to is unable to provide you with a valid link. This results in a 404 (Not found) HTTP error and an error at your end.&lt;br /&gt;
&lt;br /&gt;
* If you are running the built-in server ('''httpserver''' is set to '''1''' and '''httpdownloadurl''' is empty), make sure that your HTTP server is accessible (you can try to access it by using a browser) for everyone.&lt;br /&gt;
&lt;br /&gt;
* If you have configured an external web server ('''httpdownloadurl''' is set to your custom URL), make sure that your HTTP is accessible and make sure you have read the [[Deathmatch_Server_Manual#Configuring_an_external_web_server | Configuring an external web server]] guide.&lt;br /&gt;
&lt;br /&gt;
==== Crashing when banning a player ====&lt;br /&gt;
The banPlayer script function will crash. Avoid using it. You can modify the xml file manually instead. This will be fixed in the next release.&lt;br /&gt;
&lt;br /&gt;
=== Windows-related ===&lt;br /&gt;
No known reported issues.&lt;br /&gt;
&lt;br /&gt;
=== Linux-related ===&lt;br /&gt;
==== libcurl.so.&amp;lt;version&amp;gt;: cannot open shared object file ====&lt;br /&gt;
* '''My dedicated server gives a ''libcurl.so.&amp;lt;version&amp;gt;: cannot open shared object file'' error on startup''' (where &amp;lt;version&amp;gt; is to be replaced with 3 or 4)&lt;br /&gt;
&lt;br /&gt;
This means one of the dynamic dependencies (libcurl, CURL) needed in order to run the server cannot be found on your server.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If your server reports that it cannot find '''libcurl.so.4''', it's most likely due to an old version of libcurl that is installed on your system. You can either choose to upgrade libcurl to the latest version (check out your distribution package manager, or download/compile/install from the [http://curl.haxx.se/ CURL website]), or you can choose to pick another Linux build (e.g. the Generic Linux build, which contains a statically linked version of the library).&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;If your server reports that it cannot find '''libcurl.so.3''', libcurl is either not installed on your system, you are running an outdated version or you are running a newer version of libcurl (and downloaded a build that relied on the old version).&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If '''libcurl.so.4''' is present on your system (e.g. in /usr/lib), it means you have a newer version than the one required and you can most likely solve the problem by creating a symbolic to libcurl.so.3:&lt;br /&gt;
&amp;lt;pre&amp;gt;$ ln -s /usr/lib/libcurl.so.4 /usr/lib/libcurl.so.3&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If '''libcurl.so.2''' is present on your system (e.g. in /usr/lib), it means you have an older version and you can solve the problem by installing the most recent version of libcurl. This should be done through your package manager (check your distribution's documentation), or no such manager is present, by manually compiling and installing the latest CURL source from the [http://curl.haxx.se/ CURL website]).&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If libcurl is not present on your system, see how to install libcurl by reading the instructions above.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== ERROR: Couldn't find meta.xml ====&lt;br /&gt;
* '''My dedicated server console reports one of the following errors''':&lt;br /&gt;
* ERROR: Couldn't find meta.xml file for resource '.'&lt;br /&gt;
* ERROR: Couldn't find meta.xml file for resource '..'&lt;br /&gt;
&lt;br /&gt;
This is a minor (visual) issue with the directory handling code in the Linux server. The server tries to read the . and .. operators that are available in every directory, resulting in an error. You can safely ignore this issue.&lt;br /&gt;
&lt;br /&gt;
==== ERROR: Could not parse 'settings.xml' file ====&lt;br /&gt;
* ''''My dedicated server reports the ''ERROR: Could not parse 'settings.xml' file (Invalid file). Starting with an empty settings registry.'' error.&lt;br /&gt;
&lt;br /&gt;
This is because a default settings.xml file isn't shipped with the server. After this error is encountered, the server should be automatically created by the server. To be sure that the creation was successful, and that you have appropriate rights to the file, you can execute the following commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;/mtasa_server_directory/mods/deathmatch $ touch settings.xml&lt;br /&gt;
/mtasa_server_directory/mods/deathmatch $ chmod 777 settings.xml&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Please note that the word '''settings''' here doesn't reflect your server configuration, but rather the scriptable [[Settings system]].&lt;/div&gt;</summary>
		<author><name>SkyBon</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Known_Issues_-_FAQ&amp;diff=14532</id>
		<title>Known Issues - FAQ</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Known_Issues_-_FAQ&amp;diff=14532"/>
		<updated>2008-01-05T14:55:59Z</updated>

		<summary type="html">&lt;p&gt;SkyBon: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Post here your proposed Q&amp;amp;A, regarding the known problems with MTA:SA DM and their solutions, especially problems we're encountering now, that might be also encountered by users in the final release. You're also welcome to edit them grammar/style wise.&lt;br /&gt;
&lt;br /&gt;
== Client ==&lt;br /&gt;
&lt;br /&gt;
=== General ===&lt;br /&gt;
==== No chat response and black screen when in-game ====&lt;br /&gt;
* '''After connecting to a server, my chat doesn't seem to work and nothing seems to happen. I can only see a black screen, I'm not getting spawned but I can see other people.'''&lt;br /&gt;
&lt;br /&gt;
This problem occurs due to the server-side packet size being set too high (close to the Ethernet maximum of 1500 bytes), resulting in the loss of all packets with this size somewhere on their way from the server to client (e.g. they are dropped by a switch, your local router, or your NIC), the above problems and possibly a ''Connection Lost'' message after a while.&lt;br /&gt;
&lt;br /&gt;
This issue has been addressed and will most likely be fixed in the following developer preview. &lt;br /&gt;
&lt;br /&gt;
==== Initial black screen/hanging GTA splash screens ====&lt;br /&gt;
* '''MTA shows a permanent black screen or hanging GTA splash screens.'''&lt;br /&gt;
&lt;br /&gt;
It may be necessary that during/after the logo splash screens in Grand Theft Auto you have to give some input in order to skip the videos correctly. Try to click your left-mouse button a few times, or tapping a few keys.&lt;br /&gt;
&lt;br /&gt;
* '''MTA shows a permanent black screen after the GTA splash screens (possibly with text in the bottom right corner).'''&lt;br /&gt;
&lt;br /&gt;
This can be related to a lack of support for DirectX or video card features, on your system, which are needed to run the dynamically rendered menu. This dynamic menu is enabled by default. Try disabling the dynamic menu by downloading the adjusted [http://www.mtasa.com/files/coreconfig.xml coreconfig.xml] file and placing it in our ''GTA San Andreas\MTA'' directory (overwriting any existing files).&lt;br /&gt;
&lt;br /&gt;
==== Halt after MTA splash screen ====&lt;br /&gt;
* '''Nothing happens after the 'Stop playing with yourself' splash screen'''&lt;br /&gt;
&lt;br /&gt;
If you use nVidia GeForce, try turning off nView Desktop Manager before starting MTA.&lt;br /&gt;
Also try deleting &amp;quot;gta.set&amp;quot; file in &amp;quot;Documents\GTA San Andreas User Files&amp;quot; folder&lt;br /&gt;
&lt;br /&gt;
==== Crash after MTA splash screen ====&lt;br /&gt;
* '''MTA crashes after the 'Stop playing with yourself' logo. Both single player and the MTA: Race ran fine before.'''&lt;br /&gt;
&lt;br /&gt;
Try downloading the latest DirectX Runtime files from [http://www.microsoft.com/downloads/details.aspx?FamilyID=2da43d38-db71-4c1b-bc6a-9b6652cd92a3&amp;amp;DisplayLang=en Microsoft]. Also check in Task Manager, if gta_sa.exe process isn't already running.&lt;br /&gt;
&lt;br /&gt;
If you run at any substandard resolutions (e.g. 960x720), try to change your resolution to a commonly supported one (e.g. 640×480, 800×600, 1024×768, 1152×864, 1280×1024) by launching Grand Theft Auto: San Andreas in normal mode, setting the new resolution and exiting.&lt;br /&gt;
&lt;br /&gt;
==== Controls not working ====&lt;br /&gt;
* '''My controls don't seem to work as they should.'''&lt;br /&gt;
&lt;br /&gt;
Try using the 'copygtacontrols' command in the console.&lt;br /&gt;
&lt;br /&gt;
==== Incorrect models ====&lt;br /&gt;
* '''Woman model's breasts look awkward ingame / I'm seeing odd, spider-like shaped player models.'''&lt;br /&gt;
&lt;br /&gt;
This is caused by the way GTA handles player stats. To fix this, be sure to set both fat and muscles player stats to 0, when you're changing player skin.&lt;br /&gt;
&lt;br /&gt;
==== Incorrect drive-by functionality ====&lt;br /&gt;
* '''Drivebys arent working as they should'''&lt;br /&gt;
&lt;br /&gt;
Drivebys are handled by script, and will change depending on the loaded gamemode.&lt;br /&gt;
&lt;br /&gt;
==== Unsaved settings ====&lt;br /&gt;
* '''My MTA setting(s) didn't get saved (...) I crashed.'''&lt;br /&gt;
&lt;br /&gt;
First, configure the MTA the way you want to, then exit the game and launch it again. Settings should get saved. Alternatively, try removing the coreconfig.xml file, then configure it and quit the game.&lt;br /&gt;
&lt;br /&gt;
==== Gamepad support ====&lt;br /&gt;
* '''MTA doesnt recognise my gamepad'''&lt;br /&gt;
&lt;br /&gt;
This is a known issue - MTA's keybinds system does not support direct input.  As an alternative, [http://xpadder.com/ XPadder] can be used.  This emulates joypad buttons as keyboard/mouse so that it can be used in MTA.&lt;br /&gt;
&lt;br /&gt;
==== Sky flickering ====&lt;br /&gt;
* '''My screen/sky flickers when weather or sky effects are enabled.&lt;br /&gt;
&lt;br /&gt;
MTA:SA DM uses a new text rendering system from race, which is much more efficient in terms of FPS.  However, this can cause conflicts within the game, particularly with ATI based cards.  To fix this, bring up the console with ¬(tilde), and type the command '''ceguitext 1'''.  This reverts the rendering method to that of Race.  All glitches should no longer happen, at the cost of lower FPS.&lt;br /&gt;
&lt;br /&gt;
====Invalid serial number====&lt;br /&gt;
This seems to happen randomly to a few people. The best way to fix this is to install without a serial number at all (choose the bottom option on the MTA accounts page of the installer). We'll be looking into fixing this as soon as possible.&lt;br /&gt;
&lt;br /&gt;
=== Windows Vista®-related ===&lt;br /&gt;
&lt;br /&gt;
==== Crash on launch ====&lt;br /&gt;
* '''I've successfully upgraded from MTA Race to MTASA DM on Vista, but it seems to crash on launch.&lt;br /&gt;
&lt;br /&gt;
Go to your Program Files\MTA San Andreas\mods\race directory, and rename client.dll to something else.  &lt;br /&gt;
&lt;br /&gt;
==== Crash on connect ====&lt;br /&gt;
* '''I seem to crash whenever I connect to a server just before I go in-game on Vista'''&lt;br /&gt;
&lt;br /&gt;
This seems to be an issue with the Microsoft DirectX April 2006 SDK Redistributable DLL file (d3dx9_30.dll) when running in compatibility mode. Please make sure that compatibility mode is competely turned off for  '''both''' your GTA_SA.exe and Multi Theft Auto.exe executables.&lt;br /&gt;
&lt;br /&gt;
==== Invalid serial error ====&lt;br /&gt;
* '''MTASA DM installer complains about wrong serial provided. I'm running it for the first time.&lt;br /&gt;
&lt;br /&gt;
You need to run the installer with Administrator privileges. To do so, right click on the installer executable, choose 'Properties', go into 'Compatibility' tab and tick the check box on the last field.&lt;br /&gt;
&lt;br /&gt;
Some have found that setting compatibility to Windows XP/2000 have fixed the problem.&lt;br /&gt;
&lt;br /&gt;
If User Account Control is disabled, you might need to enable it and run the installer with admin privileges (like said above) in order to install MTA:SA DM.&lt;br /&gt;
&lt;br /&gt;
==== Clock manipulation error ====&lt;br /&gt;
* '''I am getting 'Clock manipulation detected!' error message upon launching MTA:SA DM&lt;br /&gt;
&lt;br /&gt;
Further info coming soon.&lt;br /&gt;
&lt;br /&gt;
==== Halt on launch ====&lt;br /&gt;
* '''When I launch MTA:SA DM, nothing happens (GTA_SA.exe is running but not loading up)&lt;br /&gt;
&lt;br /&gt;
Run MTA:SA DM with Administrator privileges. To do this, right click on the installer executable, choose 'Properties', go into 'Compatibility' tab and tick the check box on the last field and try again.&lt;br /&gt;
&lt;br /&gt;
==== General GTA problems ====&lt;br /&gt;
* '''I have unexplainable GTA problems or crashes'''&lt;br /&gt;
&lt;br /&gt;
Make sure your computer as well as your GTA install meet the [[Deathmatch_Client_Manual#System_requirements|minimum requirements]] and that you are not running in any 98/2000/XP/2003 compatibility modes.&lt;br /&gt;
&lt;br /&gt;
Also try the solutions from these pages:&lt;br /&gt;
* http://www.gtaforums.com/index.php?showtopic=273549&amp;amp;view=findpost&amp;amp;p=4537502&lt;br /&gt;
* http://pullmonkey.com/2007/4/30/how-i-got-gta-san-andreas-to-work-with-a-crappy-os-vista&lt;br /&gt;
&lt;br /&gt;
== Server ==&lt;br /&gt;
&lt;br /&gt;
=== General ===&lt;br /&gt;
==== Fatal error 3 ====&lt;br /&gt;
* '''I'm getting ''Fatal Error 3'' whenever I connect to my server'''&lt;br /&gt;
&lt;br /&gt;
This error happens when the server you are trying to connect to is unable to provide you the required downloads, because it does not have http downloading enabled. Be sure to set the '''httpdownload''' configuration tag in your configuration to '''1'''.&lt;br /&gt;
==== Download error 9: Error downloading requested files ====&lt;br /&gt;
* '''I'm getting ''Download Error 9: Error downloading requested files'' whenever I connect to my server'''&lt;br /&gt;
&lt;br /&gt;
This error happens when the server you are trying to connect to is unable to provide you with a valid link. This results in a 404 (Not found) HTTP error and an error at your end.&lt;br /&gt;
&lt;br /&gt;
* If you are running the built-in server ('''httpserver''' is set to '''1''' and '''httpdownloadurl''' is empty), make sure that your HTTP server is accessible (you can try to access it by using a browser) for everyone.&lt;br /&gt;
&lt;br /&gt;
* If you have configured an external web server ('''httpdownloadurl''' is set to your custom URL), make sure that your HTTP is accessible and make sure you have read the [[Deathmatch_Server_Manual#Configuring_an_external_web_server | Configuring an external web server]] guide.&lt;br /&gt;
&lt;br /&gt;
==== Crashing when banning a player ====&lt;br /&gt;
The banPlayer script function will crash. Avoid using it. You can modify the xml file manually instead. This will be fixed in the next release.&lt;br /&gt;
&lt;br /&gt;
=== Windows-related ===&lt;br /&gt;
No known reported issues.&lt;br /&gt;
&lt;br /&gt;
=== Linux-related ===&lt;br /&gt;
==== libcurl.so.&amp;lt;version&amp;gt;: cannot open shared object file ====&lt;br /&gt;
* '''My dedicated server gives a ''libcurl.so.&amp;lt;version&amp;gt;: cannot open shared object file'' error on startup''' (where &amp;lt;version&amp;gt; is to be replaced with 3 or 4)&lt;br /&gt;
&lt;br /&gt;
This means one of the dynamic dependencies (libcurl, CURL) needed in order to run the server cannot be found on your server.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If your server reports that it cannot find '''libcurl.so.4''', it's most likely due to an old version of libcurl that is installed on your system. You can either choose to upgrade libcurl to the latest version (check out your distribution package manager, or download/compile/install from the [http://curl.haxx.se/ CURL website]), or you can choose to pick another Linux build (e.g. the Generic Linux build, which contains a statically linked version of the library).&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;If your server reports that it cannot find '''libcurl.so.3''', libcurl is either not installed on your system, you are running an outdated version or you are running a newer version of libcurl (and downloaded a build that relied on the old version).&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If '''libcurl.so.4''' is present on your system (e.g. in /usr/lib), it means you have a newer version than the one required and you can most likely solve the problem by creating a symbolic to libcurl.so.3:&lt;br /&gt;
&amp;lt;pre&amp;gt;$ ln -s /usr/lib/libcurl.so.4 /usr/lib/libcurl.so.3&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If '''libcurl.so.2''' is present on your system (e.g. in /usr/lib), it means you have an older version and you can solve the problem by installing the most recent version of libcurl. This should be done through your package manager (check your distribution's documentation), or no such manager is present, by manually compiling and installing the latest CURL source from the [http://curl.haxx.se/ CURL website]).&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If libcurl is not present on your system, see how to install libcurl by reading the instructions above.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== ERROR: Couldn't find meta.xml ====&lt;br /&gt;
* '''My dedicated server console reports one of the following errors''':&lt;br /&gt;
* ERROR: Couldn't find meta.xml file for resource '.'&lt;br /&gt;
* ERROR: Couldn't find meta.xml file for resource '..'&lt;br /&gt;
&lt;br /&gt;
This is a minor (visual) issue with the directory handling code in the Linux server. The server tries to read the . and .. operators that are available in every directory, resulting in an error. You can safely ignore this issue.&lt;br /&gt;
&lt;br /&gt;
==== ERROR: Could not parse 'settings.xml' file ====&lt;br /&gt;
* ''''My dedicated server reports the ''ERROR: Could not parse 'settings.xml' file (Invalid file). Starting with an empty settings registry.'' error.&lt;br /&gt;
&lt;br /&gt;
This is because a default settings.xml file isn't shipped with the server. After this error is encountered, the server should be automatically created by the server. To be sure that the creation was successful, and that you have appropriate rights to the file, you can execute the following commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;/mtasa_server_directory/mods/deathmatch $ touch settings.xml&lt;br /&gt;
/mtasa_server_directory/mods/deathmatch $ chmod 777 settings.xml&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Please note that the word '''settings''' here doesn't reflect your server configuration, but rather the scriptable [[Settings system]].&lt;/div&gt;</summary>
		<author><name>SkyBon</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=%D0%92%D0%B2%D0%B5%D0%B4%D0%B5%D0%BD%D0%B8%D0%B5_%D0%B2_%D1%81%D0%BA%D1%80%D0%B8%D0%BF%D1%82%D0%B8%D0%BD%D0%B3&amp;diff=14516</id>
		<title>Введение в скриптинг</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=%D0%92%D0%B2%D0%B5%D0%B4%D0%B5%D0%BD%D0%B8%D0%B5_%D0%B2_%D1%81%D0%BA%D1%80%D0%B8%D0%BF%D1%82%D0%B8%D0%BD%D0%B3&amp;diff=14516"/>
		<updated>2008-01-05T08:26:21Z</updated>

		<summary type="html">&lt;p&gt;SkyBon: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Ресурсы - ключевая часть MTA. Ресурс - папка или zip архив, который содержит набор файлов, также мета файл, который рассказывает серверу как нужно загружать ресурс и из каких файлов он состоит. Это как программа в операционной системе - может быть запущен и остановлен, а также могут работать несколько ресурсов одновременно.&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.&lt;br /&gt;
&lt;br /&gt;
==Creating a simple script==&lt;br /&gt;
Firstly, we want to write something that adds a 'createvehicle' command players can use to spawn a vehicle beside their position.&lt;br /&gt;
===Preparations===&lt;br /&gt;
As decribed above, a resource is a folder or zip file, so first you should create a folder. The folder name is the name of the resource, that is used to start or stop it or reference in scripts. In our example, we shall call it ''commands''.&lt;br /&gt;
&lt;br /&gt;
What every resource has and needs is the ''meta.xml'' file. In our case, we want to create a script that provides some simple commands to the user, thus we need to tell the server to load a script file, we name ''script.lua'' in our case.&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; description=&amp;quot;A few simple commands&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;
Now we have to create the ''script.lua'' file we defined above in the same directory as the meta.xml. Now we have the both files:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
/commands/meta.xml&lt;br /&gt;
/commands/script.lua&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Writing the script===&lt;br /&gt;
Let's start with the contents 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, vehicle&lt;br /&gt;
function createVehicleForPlayer(thePlayer, command, vehicle)&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;
&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;
createVehiceForPlayer(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. 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 functions' 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.&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) somwhere 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 theoratical 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.&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(getClientName(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.&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;/div&gt;</summary>
		<author><name>SkyBon</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=%D0%92%D0%B2%D0%B5%D0%B4%D0%B5%D0%BD%D0%B8%D0%B5_%D0%B2_%D1%81%D0%BA%D1%80%D0%B8%D0%BF%D1%82%D0%B8%D0%BD%D0%B3&amp;diff=14515</id>
		<title>Введение в скриптинг</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=%D0%92%D0%B2%D0%B5%D0%B4%D0%B5%D0%BD%D0%B8%D0%B5_%D0%B2_%D1%81%D0%BA%D1%80%D0%B8%D0%BF%D1%82%D0%B8%D0%BD%D0%B3&amp;diff=14515"/>
		<updated>2008-01-05T08:18:53Z</updated>

		<summary type="html">&lt;p&gt;SkyBon: New page: 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 b...&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.&lt;br /&gt;
&lt;br /&gt;
==Creating a simple script==&lt;br /&gt;
Firstly, we want to write something that adds a 'createvehicle' command players can use to spawn a vehicle beside their position.&lt;br /&gt;
===Preparations===&lt;br /&gt;
As decribed above, a resource is a folder or zip file, so first you should create a folder. The folder name is the name of the resource, that is used to start or stop it or reference in scripts. In our example, we shall call it ''commands''.&lt;br /&gt;
&lt;br /&gt;
What every resource has and needs is the ''meta.xml'' file. In our case, we want to create a script that provides some simple commands to the user, thus we need to tell the server to load a script file, we name ''script.lua'' in our case.&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; description=&amp;quot;A few simple commands&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;
Now we have to create the ''script.lua'' file we defined above in the same directory as the meta.xml. Now we have the both files:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
/commands/meta.xml&lt;br /&gt;
/commands/script.lua&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Writing the script===&lt;br /&gt;
Let's start with the contents 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, vehicle&lt;br /&gt;
function createVehicleForPlayer(thePlayer, command, vehicle)&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;
&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;
createVehiceForPlayer(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. 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 functions' 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.&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) somwhere 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 theoratical 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.&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(getClientName(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.&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;/div&gt;</summary>
		<author><name>SkyBon</name></author>
	</entry>
</feed>