https://wiki.multitheftauto.com/api.php?action=feedcontributions&user=D0lph1n&feedformat=atomMulti Theft Auto: Wiki - User contributions [en]2024-03-29T02:29:21ZUser contributionsMediaWiki 1.39.3https://wiki.multitheftauto.com/index.php?title=RU/Resource:Race&diff=23859RU/Resource:Race2010-07-05T10:20:26Z<p>D0lph1n: updated to last version</p>
<hr />
<div>{{RU/Resource page}}<br />
__NOTOC__<br />
The "race" gamemode organizes sprint or freeroam races for one or more players. It supports both maps from MTA:Race and maps in the MTA:SA DM map syntax that were created in the map editor.<br />
<br />
==Ingame==<br />
Playing race is quite straightforward. If there are checkpoints, drive from checkpoint to checkpoint and be the first to reach the finish line within the time. If there are no checkpoints, just drive around and have fun.<br />
<br />
In races you may encounter three types of pickups which will have an effect on your vehicle:<br />
*'''Repair pickups:''' this pickup looks like a wrench. If you drive over it, your vehicle will be restored to full health.<br />
*'''Nitrous oxide pickups:''' a red NOS bottle. After you drive over one you can press the fire button (by default the left mouse button) to get a temporary speed boost.<br />
*'''Vehicle change pickups:''' these display the name of a vehicle above them. As soon as you drive over a pickup your vehicle will be changed.<br />
<br />
Lastly, if you get stuck during a race, you can enter the /kill command in the chatbox to kill yourself and respawn at the previous checkpoint.<br />
<br />
==Converting MTA:Race maps==<br />
Use the [http://files.mtasa.com/apps/1.0/raceconv.zip batch converter] to convert all your MTA:Race maps into MTA:SA maps in one go.<br />
<br />
==Map syntax==<br />
You can create race maps using the new MTA:SA [[Resource:editor|map editor]]. The map syntax is given here for reference.<br />
<br />
===.map file===<br />
<syntaxhighlight lang="xml"><br />
<map mod="deathmatch"><br />
<!-- One or more --><br />
<spawnpoint posX="X" posY="Y" posZ="Z" rotation="Rotation in degrees" vehicle="Vehicle ID" id="spawnpointID" [ paintjob="paintjob ID" upgrades="comma-separated list of upgrades" ] /><br />
<br />
<!-- Zero or more --><br />
<checkpoint posX="X" posY="Y" posZ="Z" color="#FF0000" id="textual or numeric checkpoint ID" nextid="ID of checkpoint after this one" [ size="checkpoint size" vehicle="vehicle ID to change into" paintjob="paintjob ID" upgrades="comma-separated list of upgrades" ] /><br />
<br />
<!-- Zero or more --><br />
<object posX="X" posY="Y" posZ="Z" rotX="in degrees" rotY="in degrees" rotZ="in degrees" model="model ID" id="objectID" /><br />
<br />
<!-- Zero or more --><br />
<pickup posX="X" posY="Y" posZ="Z" type="repair|nitro|vehiclechange" id="pickupID" [ vehicle="vehicle ID" paintjob="paintjob ID" upgrades="comma-separated list of upgrades" ] /><br />
</map><br />
</syntaxhighlight><br />
<br />
===meta.xml===<br />
<syntaxhighlight lang="xml"><br />
<meta><br />
<info type="map" gamemodes="race" name="Map name" author="Author name" description="Map description" version="Map version number"/><br />
<race src="Map file.map"/><br />
<settings><br />
<setting name="#optionName" value="optionValue"/><br />
...<br />
</settings><br />
</meta><br />
</syntaxhighlight><br />
The <setting>s correspond to options in MTA:Race syntax. For example, <time>4:0</time> in MTA:Race syntax would correspond to <setting name="#time" value="4:0"/> in DM syntax.<br />
<br />
==Addons==<br />
A Race 'addon' is no different from any other script resource, except that is has addon="race" in the <info> section of it's meta.xml file. This is simply to allow Race to identify it and put it in the /config menu for you. Addons communicate with Race via events. The current list of Race events and what they do are here:<br />
<br />
==Events for version 0.8.3==<br />
'''Note:''' You may have to add the events in your script using addEvent() if you want to use them.<br />
===Server===<br />
<br />
{| class="wikitable" border="0"<br />
|-<br />
|width="200pt"|'''Name'''<br />
|width="60pt"|'''Source'''<br />
|'''Parameters''' <br />
|}<br />
<br />
{| class="wikitable" border="0"<br />
|-<br />
|width="200pt"|'''onPlayerReachCheckpoint'''<br />
|width="60pt"|player <br />
|<syntaxhighlight lang="lua">int checkpoint, int time_</syntaxhighlight> <br />
|}<br />
<br />
{| class="wikitable" border="0"<br />
|-<br />
|width="200pt"|'''onPlayerPickUpRacePickup'''<br />
|width="60pt"|player <br />
|<syntaxhighlight lang="lua">int/string pickupID, string pickupType, int vehicleModel</syntaxhighlight><br />
|}<br />
<br />
{| class="wikitable" border="0"<br />
|- <br />
|width="200pt"|'''onMapStarting'''<br />
|width="60pt"|<br />
|<syntaxhighlight lang="lua">table mapInfo, table mapOptions, table gameOptions</syntaxhighlight> <br />
|}<br />
<br />
{| class="wikitable" border="0"<br />
|- <br />
|width="200pt"|'''onPlayerFinish'''<br />
|width="60pt"|player <br />
|height="20pt"|<syntaxhighlight lang="lua">int rank, int time</syntaxhighlight> <br />
|}<br />
<br />
{| class="wikitable" border="0"<br />
|- <br />
|width="200pt"|'''onPostFinish''' <br />
|width="60pt"|<br />
|height="38pt"| <br />
|}<br />
<br />
{| class="wikitable" border="0"<br />
|- <br />
|width="200pt"|'''onPollStarting'''<br />
|width="60pt"|<br />
|<syntaxhighlight lang="lua">table poll</syntaxhighlight> <br />
|}<br />
<br />
{| class="wikitable" border="0"<br />
|- <br />
|width="200pt"|'''onRaceStateChanging'''<br />
|width="60pt"|<br />
|<syntaxhighlight lang="lua">string newStateName, string oldStateName</syntaxhighlight> <br />
|- <br />
|}<br />
<br />
{| class="wikitable" border="0"<br />
|- <br />
|width="200pt"|'''onPlayerRaceWasted'''<br />
|width="60pt"|player<br />
|<syntaxhighlight lang="lua">vehicle playersVehicle</syntaxhighlight> <br />
|- <br />
|}<br />
<br />
===Client===<br />
<br />
{| class="wikitable" border="0"<br />
|- <br />
|width="200pt"|'''onClientMapStarting'''<br />
|width="60pt"|<br />
|<syntaxhighlight lang="lua">table mapinfo</syntaxhighlight> <br />
|- <br />
|}<br />
<br />
{| class="wikitable" border="0"<br />
|- <br />
|width="200pt"|'''onClientPlayerFinish'''<br />
|width="60pt"|player <br />
|height="38pt"|<br />
|- <br />
|}<br />
<br />
{| class="wikitable" border="0"<br />
|- <br />
|width="200pt"|'''onClientPlayerOutOfTime'''<br />
|width="60pt"|player <br />
|height="38pt"|<br />
|- <br />
|}<br />
<br />
{| class="wikitable" border="0"<br />
|- <br />
|width="200pt"|'''onClientMapStopping'''<br />
|width="60pt"|<br />
|height="38pt"|<br />
|- <br />
|}<br />
<br />
{| class="wikitable" border="0"<br />
|- <br />
|width="200pt"|'''onClientScreenFadedOut'''<br />
|width="60pt"|<br />
|height="38pt"|<br />
|- <br />
|}<br />
<br />
{| class="wikitable" border="0"<br />
|- <br />
|width="200pt"|'''onClientScreenFadedIn'''<br />
|width="60pt"|<br />
|height="38pt"|<br />
|- <br />
|}<br />
<br />
==Events for version 0.8.3 in detail==<br />
'''Note:''' You may have to add the events in your script using addEvent() if you want to use them.<br />
===onPlayerReachCheckpoint===<br />
Triggered when a player reaches any checkpoint but the last one.<br />
====Parameters====<br />
<syntaxhighlight lang="lua">int checkpoint, int time</syntaxhighlight><br />
*'''checkpoint:''' the number of the checkpoint the player went through. The first checkpoint has number 1.<br />
*'''time:''' time since the race started, in milliseconds.<br />
<br />
====Source====<br />
The source is the player that reached the checkpoint.<br />
<br />
===onPlayerFinish===<br />
Triggered when a player reaches the last checkpoint (i.e. has finished the race)<br />
====Parameters====<br />
<syntaxhighlight lang="lua">int rank, int time</syntaxhighlight><br />
*'''rank:''' the player's rank. 1 means he won the race, 2 that he came in second place, etc.<br />
*'''time:''' time since the race started, in milliseconds.<br />
<br />
====Source====<br />
The source is the player that finished the race.<br />
<br />
===onPlayerPickUpRacePickup===<br />
====Parameters====<br />
<syntaxhighlight lang="lua">int/string pickupID, string pickupType, int vehicleModel</syntaxhighlight><br />
*'''pickupID:''' the number of the pickup in case of MTA:Race syntax (starting at 1), or the "id" attribute of the pickup in case of DM syntax.<br />
*'''pickupType:''' the pickup type. Can be "nitro", "repair" or "vehiclechange".<br />
*'''vehicleModel:''' if the pickup is of type vehiclechange, this is the vehicle model that it sets.<br />
<br />
====Source====<br />
The source is the player that picked up the pickup.<br />
<br />
==Element data==<br />
These element data are set on each player:<br />
*'''Race rank:''' the current position of the player in the race. 1 = first, 2 = second etc. Updated on a 1 second interval.<br />
*'''race.checkpoint:''' the number of the checkpoint the player is ''heading for''. When the player spawns this number is 1, after he passed the first checkpoint it's 2, etc.<br />
*'''race.finished:''' ''true'' if the player has finished, ''false'' if he's still racing.<br />
<br />
This server only element data is set for the resource root element:<br />
*'''info:''' which contains a table with these sub-tables: '''mapInfo''', '''mapOptions''' and '''gameOptions'''.<br />
<br />
==Super Advanced Element data==<br />
You can also set player element data to change the player collision status and render transparency:<br />
<syntaxhighlight lang="lua"><br />
e.g. setElementData( thePlayer, "overrideCollide.uniqueblah", 0, false ) -- Collide 'off' for this player<br />
setElementData( thePlayer, "overrideCollide.uniqueblah", nil, false ) -- Collide 'default' for this player<br />
setElementData( thePlayer, "overrideAlpha.uniqueblah", 120, false ) -- Alpha '120 maximum' for this player<br />
setElementData( thePlayer, "overrideAlpha.uniqueblah", nil, false ) -- Alpha 'default' for this player<br />
</syntaxhighlight><br />
Set 'uniqueblah' to whatever you like (up to 15 characters long)<br />
<br />
==Exported Server functions==<br />
<br />
{| class="wikitable" border="0"<br />
|- <br />
|width="80pt"|<syntaxhighlight lang="lua">int</syntaxhighlight><br />
|width="110pt"|'''getTimePassed'''<br />
|height="38pt"|<br />
|- <br />
|}<br />
<br />
{| class="wikitable" border="0"<br />
|- <br />
|width="80pt"|<syntaxhighlight lang="lua">int</syntaxhighlight><br />
|width="110pt"|'''getPlayerRank'''<br />
|<syntaxhighlight lang="lua">player thePlayer</syntaxhighlight><br />
|- <br />
|}<br />
<br />
{| class="wikitable" border="0"<br />
|- <br />
|width="80pt"|<syntaxhighlight lang="lua">boolean</syntaxhighlight><br />
|width="110pt"|'''isPlayerFinished'''<br />
|<syntaxhighlight lang="lua">player thePlayer</syntaxhighlight><br />
|- <br />
|}<br />
<br />
{| class="wikitable" border="0"<br />
|- <br />
|width="80pt"|<syntaxhighlight lang="lua">vehicle</syntaxhighlight><br />
|width="110pt"|'''getPlayerVehicle'''<br />
|<syntaxhighlight lang="lua">player thePlayer</syntaxhighlight><br />
|- <br />
|}</div>D0lph1nhttps://wiki.multitheftauto.com/index.php?title=RU/Upgrading_from_MTA:Race&diff=23231RU/Upgrading from MTA:Race2010-04-30T06:31:06Z<p>D0lph1n: Created page with '{{translate}} __NOTOC__ MTA:Race was the first Multi Theft Auto release for Grand Theft Auto San Andreas. Since its release, we've seen thousands of maps and a vast, active comm…'</p>
<hr />
<div>{{translate}}<br />
__NOTOC__<br />
MTA:Race was the first Multi Theft Auto release for Grand Theft Auto San Andreas. Since its release, we've seen thousands of maps and a vast, active community develop and mature. Despite this, for everything there is a time to move on. Multi Theft Auto: San Andreas 1.0, in conjunction with the latest version of the [[Resource:Race]] gamemode provides a stable platform for server admins and gamers alike to upgrade to the most powerful GTA Race experience yet.<br />
<br />
== Why upgrade? ==<br />
Although it may seem that its safer to stick what works, the release of 1.0 will provide a significant step-up in the multiplayer experience.<br />
<br />
=== Scripting ===<br />
With the arrival of MTA:SA 1.0, comes a powerful and flexible Lua scripting interface. This surpasses previous scripting abilities of Race servers in every single way. By utilising the Lua script interface, server admins and players alike can take advantage of features such as:<br />
* '''Fully fledged built-in scripting.''' No more external mIRC clients to run your Admin interface<br />
* '''Take full advantage of the Plugins system of Race.''' By developing Lua plugins, the bounds to extend Race are limitless. Examples that are included in the release package are the Traffic Sensor, which uses HUD to display when cars are behind you, and a Top Times plugin, which displays the person with the best record in a certain race.<br />
* '''Extend the possibilities of any map.''' By attaching a Lua script to your map, you can have virtually anything happen during gameplay. Custom models, moving objects, timed explosives and upside down gravity tracks are all possibilities by taking advantage of scripting.<br />
* '''Full customisability.''' Customisable UI, along with a possibility to add custom pictures, objects, sounds, and vehicle models, specific to your server. Imagine being able to display your server's logo during gameplay on the screen.<br />
<br />
=== Gameplay ===<br />
The MTA:SA 1.0 platform is much more versatile and therefore makes the gameplay experience superior to MTA:Race. On top of this, the Race gamemode has had hundreds of improvements to make the racing experience much more fun.<br />
* Have up to '''128 players''' in your Race server. That's a lot more than ''32''. You may wonder "How on earth do 128 people fit on the track?". No problem, the latest Race offers <br />
a '''ghostmode''' feature so that high player counts are feasable.<br />
* Support for newest Microsoft Windows operating systems like Windows Vista, Windows 2008 and Windows 7 in both x86 and x64 flavours. Due to the open-source nature of MTA:SA 1.0, compatiblity is mantained constantly.<br />
* Much more accurate vehicle synchronisation. When switching to 1.0, the first thing racers will notice is the amazing vehicle synchronisation. It now is incredibly smooth, and synced much more precisely - an essential to any racing game.<br />
* The Traffic Sensor addon means nearby opponents are displayed on the screen. At last, you can be aware of which way those tailgating opponents are challenging you!<br />
* The all new open-sourced [[Resource:Editor|Map Editor]] means you can create your race maps with ease.<br />
* MTA:SA 1.0 provides a single mod for '''all''' your online GTA needs.<br />
<br />
=== Server owner's paradise ===<br />
With the latest Race, server owner's are in control: you are able to customise the Race experience. Become a truly unique server.<br />
* '''Improved ingame Admin.''' MTA:SA 1.0 offers an ingame Admin interface where you can easily point and click to effortlessly moderate a server.<br />
* '''Improved stability, performance and bandwidth usage'''. The 1.0 and Race platform have been tested extremely thoroughly, and this has meant the bar has been raised much higher than the original MTA:Race. Bandwidth has been paid special attention to, and upgrading server owners will reap the benefits of optimized bandwidth usage for their servers.<br />
* '''Framelimiter'''. We've all seen it - that frustrating FPS limit in MTA:Race. The arrival of 1.0 means server owners can set the FPS limit of their particular server.<br />
* '''Customisability'''. As mentioned several times - everything is in your control. Using Lua you can modify and improve the open-source Race experience. The new Plugins system means you can easily add or remove components that extend MTA:Race<br />
<br />
=== Community ===<br />
If you ever have any issues, we'll be happy to assist you in our forums. The growing amount of scripters for MTA:SA 1.0 has also meant we have a much more alive and vibrant community than previously with MTA:Race.<br />
<br />
== How do I upgrade ==<br />
=== Race players ===<br />
Upgrading your client to MTA:SA 1.0 is simple. And better yet, you have nothing to lose. MTA:SA 1.0 can be installed alongside your original MTA:Race installation without conflict.<br />
<br />
<br />
All you have to do is head to the download page (link pending) and install MTA:SA 1.0.<br />
<br />
=== Server Owners ===<br />
Server owners can easily upgrade to MTA:SA 1.0. Races are fully compatible after a short upgrade process. Simply install the latest server package, and use our [http://files.mtasa.com/apps/1.0/raceconv.zip batch converter] to convert your maps into MTA:SA 1.0 resource format. From then on, your converted maps work with the [[Resource:race|race gamemode]] and can be managed through the [[Resource:mapmanager|map manager]] and the [[Resource:votemanager|vote manager]].</div>D0lph1nhttps://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&diff=23230Главная страница2010-04-30T06:29:19Z<p>D0lph1n: /* Введение */</p>
<hr />
<div><div style="background: #FFEEAA; padding: 5px; float:right; width: 30%;">Последняя стабильная версия '''Multi Theft Auto: San Andreas''' - '''{{Current Version|full}}'''. Посетите [http://mtasa.com/dp.html эту страницу] для скачивания.<br />
<p><br />
Также вы можете получить актуальную [http://code.google.com/p/multitheftauto/wiki/NightlyBuilds?tm=2 версию для разработчиков], чтобы воспользоваться последними разработками.<br />
</p><br />
</div><br />
__NOTOC__<br />
Добро пожаловать в Wiki разработчиков Multi Theft Auto: San Andreas. <br />
Здесь вы найдёте информацию по разработке игровых модов и карт для Multi Theft Auto.<br />
<br />
Есть много [[RU/How you can help|способов помочь нам]] сделать MTA лучше: создать карту, игровой режим, добавить описание функции скриптинга, написать пример кода, руководство, или просто играть в MTA и сообщать о найденых багах на форум.<br />
<br />
Пожалуйста, отнеситесь с пониманием к неизбежному появлению ошибок и помните, что многие вещи еще не сделаны до конца!<br />
<br />
Если у вас есть какие-либо вопросы по скриптингу, вы можете задать их в нашем [[IRC Channel |IRC-канале]].<br />
<br />
'''Для редактирования статей вам понадобится учетная запись в [http://community.mtasa.com/ MTA Community].'''<br />
Акты вандализма будут караться баном вашего аккаунта.<br />
<br />
<div style="clear:both;"></div><br />
{| width="100%" cellspacing="0" cellpadding="0"<br />
| colspan="2" |<br />
<br />
|-<br />
| width="50%" style="vertical-align:top;" |<br />
<div style="border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px;"><br />
<br />
====Введение====<br />
* [[RU/Deathmatch_Client_Manual|Руководство по клиенской части]]<br />
* [[RU/Deathmatch_Server_Manual|Руководство по серверной части]]<br />
* [[RU/Known_Issues_-_FAQ|Известные проблемы]]<br />
* [[RU/Upgrading_from_MTA:Race|Миграция с MTA:Race на MTA:SA 1.0.x]]<br />
* [[RU/Resource:Mapmanager|Менеджер карт]]<br />
<br />
</div><br />
<br />
<div style="border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px;"><br />
<br />
====Скриптинг====<br />
* [[RU/Scripting Introduction|Введение в скриптинг]]<br />
* [[RU/Introduction to Scripting the GUI | Введение в скриптинг пользовательского интерфейса]]<br />
* [http://robhol.net/guide/basics Основы скриптинга]<br />
* [[RU/Debugging| Руководство по отладке]]<br />
* [[RU/Resources| Введение в ресурсы]]<br />
** [[RU/Resource Web Access | Ресурс веб-доступа]]<br />
** [[:Category:RU/Resource|Каталог ресурсов]]<br />
** [[RU/Meta.xml | Meta.xml]]<br />
* [[:Category:Modules|Модули]]<br />
* [[RU/Writing_Gamemodes| Создание игровых режимов]]<br />
* [[Useful Functions|Полезные функции]]<br />
<br />
</div><br />
<br />
<div style="border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px;"><br />
<br />
====Базы данных====<br />
В этой секции описаны все возможности Lua, предоставляемые MTA и ресурсами.<br />
* [[:Category:RU/Resource|Каталог ресурсов]] - Изучите это, чтобы писать хорошие скрипты<br />
* [[RU/Client side scripts | Клиентские скрипты]]<br />
</div><br />
<div style="border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px;"><br />
<br />
====Основная помощь по Lua====<br />
Страницы, которые могут вам помочь в изучении Lua<br />
*[http://www.lua.ru/doc/ Руководство по программированию на Lua (русск.)] <br />
*[http://www.lua.org/pil/index.html Руководство по программированию на Lua (англ.)]<br />
*[http://lua-users.org/wiki/TutorialDirectory Lua Wiki (англ.)]<br />
*[http://nixstaller.berlios.de/manual/0.2/nixstaller_9.html Базовое руководство по Lua от Nixstaller (англ.)]<br />
*[http://gtascript.ru Портал по скриптингу. Строгая модерация.]<br />
</div><br />
<br />
<br />
| width="50%" style="vertical-align:top;" |<br />
<div style="border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px;"><br />
<br />
====Редактор карт====<br />
*[[RU/Resource:Editor|Руководство]]<br />
*[[RU/Resource:Editor/EDF|Формат объявлений редактора]]<br />
*[[RU/Resource:Editor/Plugins|Плагины]]<br />
*[[RU/Resource:Editor#FAQ|Часто задаваемые вопросы]]<br />
<br />
</div><br />
<div style="border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px;"><br />
<br />
====Разработка MTA====<br />
*[[Roadmap|План разработки]]<br />
*[[Git Coding Guidelines|Инструкция по использованию Git]]<br />
</div><br />
<div style="border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px; background:#CCCCFF;"><br />
<br />
====Описание====<br />
* [[RU/Client Scripting Functions|Функции, выполняемые на стороне клиента]]<br />
* [[RU/Client Scripting Events|События, генерируемые на стороне клиента]]<br />
* [[RU/Server Scripting Functions|Функции, выполняемые на стороне сервера]]<br />
* [[RU/Server Scripting Events|События, генерируемые на стороне сервера]]<br />
* [[RU/MTA Classes|Классы MTA]] - Подробное описания всех специфических типов MTA<br />
** [[RU/Element|Элементы MTA]] / [[RU/Element tree|Дерево Элементов]]<br />
<!-- Incomplete * [[Module functions|Server-side external module scripting functions list]] --><br />
</div><br />
<br />
<div style="border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px;"><br />
<br />
====[[RU/Id|Список идентификаторов]]====<br />
*[[RU/Animations|Анимации]]<br />
*[[RU/Character Skins | Скины персонажей]]<br />
*[[RU/CJ_Clothes|Одежда]]<br />
*[[RU/Garage|Идентификаторы гаражей]]<br />
*[[Interior IDs | Интерьеры]]<br />
*[[RU/Projectiles|Снаряды]]<br />
*[[RU/Radar_blips|Метки радара]]<br />
*[[RU/Sounds|Звуки]]<br />
*[[RU/Vehicle IDs|Транспорт]]<br />
*[[RU/Vehicle_colors|Цвета транспорта]]<br />
*[[RU/Vehicle Upgrades|Апгрейды транспорта]]<br />
*[[RU/Weapons|Оружие]]<br />
*[[RU/Weather|Погода]]<br />
</div><br />
<br />
|-<br />
| colspan="2" |<br />
|}<br />
[[pl:Main Page]]<br />
[[en:Main Page]]<br />
[[es:Pagina Principal]]<br />
[[it:Pagina principale]]<br />
[[nl:Main Page]]<br />
[[de:Hauptseite]]</div>D0lph1nhttps://wiki.multitheftauto.com/index.php?title=Talk:%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&diff=22890Talk:Главная страница2010-04-17T07:29:27Z<p>D0lph1n: /* Стоит ли копировать англоязычную страницу? */</p>
<hr />
<div>Страницу восстановил, ошибка, по-видимому, возникала из-за какой-то ссылки на странице. Думаю, из-за того, что страницу не поддерживали в актуальном состоянии, т.к. с польской страницей то же самое.<br />
[[User:D0lph1n|D0lph1n]] 13:54, 11 April 2009 (CEST)<br />
<br />
Некоторые страницы типо этой надо было б озаглавливать русскими буквами типо "Главная страница"<br />
[[User:Enterprise|Enterprise]] 13:58, 9 July 2009<br />
<br />
<br />
Нельзя, можно только латинский алфавит использовать, иначе ошибки будут<br />
PS Для подписи используются 4 тильды (автоматически подставит ник и время) [[User:D0lph1n|D0lph1N]] 21:51, 9 July 2009 (CEST)<br />
<br />
спасибо, буду знать [[User:Enterprise|Enterprise]] 12:36, 10 July 2009 (CEST)<br />
<br />
== Русификация страниц, создание шаблонов ==<br />
<br />
Надо русифицировать скриптовые команды для помощи новичкам, таким как и мне в работе. Я понемногу разбираю все функции, страницы про все команды русифицирую понемногу... [[User:PoliticalOrel|PoliticalOrel]] 13:07, 27 October 2009 (UTC)<br />
<br />
Ну, на самом деле еще много что перевести нужно. К примеру руководство по отладке уже давно начато [[User:D0lph1n|D0lph1N]] 17:52, 5 November 2009 (UTC)<br />
<br />
== Стоит ли копировать англоязычную страницу? ==<br />
<br />
Собственно, вопрос задан выше. Думается мне, что повторять ее на 100% нет смысла. Взять хоть блок Databases (Базы данных). Его содержимое дублирует другие блоки, хотя логичнее было бы разместить там ссылки на описания плагинов [[Modules/MTA-MySQL]] и [[Modules/MySQL]], возможно, создать страницу с списком функций SQLite и добавить ссылку на нее в этот же блок.<br />
<br />
PS И не надо тут ссылки на свои сайты добавлять, это не рекламная площадка.<br />
[[User:D0lph1n|D0lph1N]] 07:29, 17 April 2010 (UTC)</div>D0lph1nhttps://wiki.multitheftauto.com/index.php?title=Talk:%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&diff=22889Talk:Главная страница2010-04-17T07:29:14Z<p>D0lph1n: </p>
<hr />
<div>Страницу восстановил, ошибка, по-видимому, возникала из-за какой-то ссылки на странице. Думаю, из-за того, что страницу не поддерживали в актуальном состоянии, т.к. с польской страницей то же самое.<br />
[[User:D0lph1n|D0lph1n]] 13:54, 11 April 2009 (CEST)<br />
<br />
Некоторые страницы типо этой надо было б озаглавливать русскими буквами типо "Главная страница"<br />
[[User:Enterprise|Enterprise]] 13:58, 9 July 2009<br />
<br />
<br />
Нельзя, можно только латинский алфавит использовать, иначе ошибки будут<br />
PS Для подписи используются 4 тильды (автоматически подставит ник и время) [[User:D0lph1n|D0lph1N]] 21:51, 9 July 2009 (CEST)<br />
<br />
спасибо, буду знать [[User:Enterprise|Enterprise]] 12:36, 10 July 2009 (CEST)<br />
<br />
== Русификация страниц, создание шаблонов ==<br />
<br />
Надо русифицировать скриптовые команды для помощи новичкам, таким как и мне в работе. Я понемногу разбираю все функции, страницы про все команды русифицирую понемногу... [[User:PoliticalOrel|PoliticalOrel]] 13:07, 27 October 2009 (UTC)<br />
<br />
Ну, на самом деле еще много что перевести нужно. К примеру руководство по отладке уже давно начато [[User:D0lph1n|D0lph1N]] 17:52, 5 November 2009 (UTC)<br />
<br />
== Стоит ли копировать англоязычную страницу? ==<br />
<br />
Собственно, вопрос задан выше. Думается мне, что повторять ее на 100% нет смысла. Взять хоть блок Databases (Базы данных). Его содержимое дублирует другие блоки, хотя логичнее было бы разместить там ссылки на описания плагинов [[Modules/MTA-MySQL]] и [[Modules/MySQL]], возможно, создать страницу с списком функций SQLite и добавить ссылку на нее в этот же блок.<br />
<br />
PS И не надо тут ссылки на свои сайты добавлять, это н ерекламная площадка.<br />
[[User:D0lph1n|D0lph1N]] 07:29, 17 April 2010 (UTC)</div>D0lph1nhttps://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&diff=22888Главная страница2010-04-17T07:18:17Z<p>D0lph1n: Небольшие правки</p>
<hr />
<div><div style="background: #FFEEAA; padding: 5px; float:right; width: 30%;">Последняя стабильная версия '''Multi Theft Auto: San Andreas''' - '''{{Current Version|full}}'''. Посетите [http://mtasa.com/dp.html эту страницу] для скачивания.<br />
<p><br />
Также вы можете получить актуальную [http://code.google.com/p/multitheftauto/wiki/NightlyBuilds?tm=2 версию для разработчиков], чтобы воспользоваться последними разработками.<br />
</p><br />
</div><br />
__NOTOC__<br />
Добро пожаловать в Wiki разработчиков Multi Theft Auto: San Andreas. <br />
Здесь вы найдёте информацию по разработке игровых модов и карт для Multi Theft Auto.<br />
<br />
Есть много [[RU/How you can help|способов помочь нам]] сделать MTA лучше: создать карту, игровой режим, добавить описание функции скриптинга, написать пример кода, руководство, или просто играть в MTA и сообщать о найденых багах на форум.<br />
<br />
Пожалуйста, отнеситесь с пониманием к неизбежному появлению ошибок и помните, что многие вещи еще не сделаны до конца!<br />
<br />
Если у вас есть какие-либо вопросы по скриптингу, вы можете задать их в нашем [[IRC Channel |IRC-канале]].<br />
<br />
'''Для редактирования статей вам понадобится учетная запись в [http://community.mtasa.com/ MTA Community].'''<br />
Акты вандализма будут караться баном вашего аккаунта.<br />
<br />
<div style="clear:both;"></div><br />
{| width="100%" cellspacing="0" cellpadding="0"<br />
| colspan="2" |<br />
<br />
|-<br />
| width="50%" style="vertical-align:top;" |<br />
<div style="border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px;"><br />
<br />
====Введение====<br />
* [[RU/Deathmatch_Client_Manual|Руководство по клиенской части]]<br />
* [[RU/Deathmatch_Server_Manual|Руководство по серверной части]]<br />
* [[RU/Known_Issues_-_FAQ|Известные проблемы]]<br />
* [[RU/Resource:Mapmanager|Менеджер карт]]<br />
<br />
</div><br />
<br />
<div style="border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px;"><br />
<br />
====Скриптинг====<br />
* [[RU/Scripting Introduction|Введение в скриптинг]]<br />
* [[RU/Introduction to Scripting the GUI | Введение в скриптинг пользовательского интерфейса]]<br />
* [http://robhol.net/guide/basics Основы скриптинга]<br />
* [[RU/Debugging| Руководство по отладке]]<br />
* [[RU/Resources| Введение в ресурсы]]<br />
** [[RU/Resource Web Access | Ресурс веб-доступа]]<br />
** [[:Category:RU/Resource|Каталог ресурсов]]<br />
** [[RU/Meta.xml | Meta.xml]]<br />
* [[:Category:Modules|Модули]]<br />
* [[RU/Writing_Gamemodes| Создание игровых режимов]]<br />
* [[Useful Functions|Полезные функции]]<br />
<br />
</div><br />
<br />
<div style="border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px;"><br />
<br />
====Базы данных====<br />
В этой секции описаны все возможности Lua, предоставляемые MTA и ресурсами.<br />
* [[:Category:RU/Resource|Каталог ресурсов]] - Изучите это, чтобы писать хорошие скрипты<br />
* [[RU/Client side scripts | Клиентские скрипты]]<br />
</div><br />
<div style="border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px;"><br />
<br />
====Основная помощь по Lua====<br />
Страницы, которые могут вам помочь в изучении Lua<br />
*[http://www.lua.ru/doc/ Руководство по программированию на Lua (русск.)] <br />
*[http://www.lua.org/pil/index.html Руководство по программированию на Lua (англ.)]<br />
*[http://lua-users.org/wiki/TutorialDirectory Lua Wiki (англ.)]<br />
*[http://nixstaller.berlios.de/manual/0.2/nixstaller_9.html Базовое руководство по Lua от Nixstaller (англ.)]<br />
*[http://gtascript.ru Портал по скриптингу. Строгая модерация.]<br />
</div><br />
<br />
<br />
| width="50%" style="vertical-align:top;" |<br />
<div style="border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px;"><br />
<br />
====Редактор карт====<br />
*[[RU/Resource:Editor|Руководство]]<br />
*[[RU/Resource:Editor/EDF|Формат объявлений редактора]]<br />
*[[RU/Resource:Editor/Plugins|Плагины]]<br />
*[[RU/Resource:Editor#FAQ|Часто задаваемые вопросы]]<br />
<br />
</div><br />
<div style="border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px;"><br />
<br />
====Разработка MTA====<br />
*[[Roadmap|План разработки]]<br />
*[[Git Coding Guidelines|Инструкция по использованию Git]]<br />
</div><br />
<div style="border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px; background:#CCCCFF;"><br />
<br />
====Описание====<br />
* [[RU/Client Scripting Functions|Функции, выполняемые на стороне клиента]]<br />
* [[RU/Client Scripting Events|События, генерируемые на стороне клиента]]<br />
* [[RU/Server Scripting Functions|Функции, выполняемые на стороне сервера]]<br />
* [[RU/Server Scripting Events|События, генерируемые на стороне сервера]]<br />
* [[RU/MTA Classes|Классы MTA]] - Подробное описания всех специфических типов MTA<br />
** [[RU/Element|Элементы MTA]] / [[RU/Element tree|Дерево Элементов]]<br />
<!-- Incomplete * [[Module functions|Server-side external module scripting functions list]] --><br />
</div><br />
<br />
<div style="border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px;"><br />
<br />
====[[RU/Id|Список идентификаторов]]====<br />
*[[RU/Animations|Анимации]]<br />
*[[RU/Character Skins | Скины персонажей]]<br />
*[[RU/CJ_Clothes|Одежда]]<br />
*[[RU/Garage|Идентификаторы гаражей]]<br />
*[[Interior IDs | Интерьеры]]<br />
*[[RU/Projectiles|Снаряды]]<br />
*[[RU/Radar_blips|Метки радара]]<br />
*[[RU/Sounds|Звуки]]<br />
*[[RU/Vehicle IDs|Транспорт]]<br />
*[[RU/Vehicle_colors|Цвета транспорта]]<br />
*[[RU/Vehicle Upgrades|Апгрейды транспорта]]<br />
*[[RU/Weapons|Оружие]]<br />
*[[RU/Weather|Погода]]<br />
</div><br />
<br />
|-<br />
| colspan="2" |<br />
|}<br />
[[pl:Main Page]]<br />
[[en:Main Page]]<br />
[[es:Pagina Principal]]<br />
[[it:Pagina principale]]<br />
[[nl:Main Page]]<br />
[[de:Hauptseite]]</div>D0lph1nhttps://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&diff=22887Главная страница2010-04-17T07:08:50Z<p>D0lph1n: давайте тут каждый ссылку на свой сайт выложит?</p>
<hr />
<div><div style="background: #FFEEAA; padding: 5px; float:right; width: 30%;">Последняя стабильная версия '''Multi Theft Auto: San Andreas''' - '''{{Current Version|full}}'''. Посетите [http://mtasa.com/dp.html эту страницу] для скачивания.<br />
<p><br />
Также вы можете получить актуальную [http://code.google.com/p/multitheftauto/wiki/NightlyBuilds?tm=2 версию для разработчиков], чтобы воспользоваться последними разработками.<br />
</p><br />
</div><br />
__NOTOC__<br />
Добро пожаловать в Wiki разработчиков Multi Theft Auto: San Andreas. <br />
Здесь вы найдёте информацию по разработке игровых модов и карт для Multi Theft Auto.<br />
<br />
Есть много [[RU/How you can help|способов помочь нам]] сделать MTA лучше - создать карту, игровой режим, добавить описание функции скриптинга, написать пример кода, руководство, или просто играть в MTA и сообщать о найденых багах на форум.<br />
<br />
Пожалуйста, отнеситесь с пониманием к неизбежному появлению ошибок и помните, что многие вещи еще не сделаны до конца!<br />
<br />
Если у вас есть какие-либо вопросы по скриптингу, вы можете задать их в нашем [[IRC Channel |IRC канале]].<br />
<br />
'''Для редактирования статей вам понадобится [http://community.mtasa.com/ MTA Community] аккаунт.'''<br />
Пожалуйста зарегистрируйтесь на сайте [http://community.mtasa.com MTA Community] и используйте полученные логин/пароль для авторизации здесь. Акты вандализма будут караться баном вашего аккаунта.<br />
<br />
<div style="clear:both;"></div><br />
{| width="100%" cellspacing="0" cellpadding="0"<br />
| colspan="2" |<br />
<br />
|-<br />
| width="50%" style="vertical-align:top;" |<br />
<div style="border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px;"><br />
<br />
====Введение====<br />
* [[RU/Deathmatch_Client_Manual|Руководство по клиенту]]<br />
* [[RU/Deathmatch_Server_Manual|Руководство по серверу]]<br />
* [[RU/Known_Issues_-_FAQ|Известные проблемы]]<br />
* [[RU/Resource:Mapmanager|Менеджер карт]]<br />
<br />
</div><br />
<br />
<div style="border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px;"><br />
<br />
====Скриптинг====<br />
* [[RU/Scripting Introduction|Введение в скриптинг]]<br />
* [[RU/Introduction to Scripting the GUI | Введение в скриптинг GUI (графический пользовательский интерфейс)]]<br />
* [http://robhol.net/guide/basics Основы скриптинга]<br />
* [[RU/Debugging| Руководство по отладке]] - Как найти ошибки в ваших скриптах.<br />
* [[RU/Resources| Введение в ресурсы]]<br />
** [[RU/Resource Web Access | Ресурс веб-доступа]]<br />
** [[:Category:RU/Resource|Каталог ресурсов]]<br />
** [[RU/Meta.xml | Meta.xml]]<br />
* [[:Category:Modules|Модули]]<br />
* [[RU/Writing_Gamemodes| Создание игровых режимов]]<br />
* [[Useful Functions|Полезные функции]]<br />
<br />
</div><br />
<br />
<div style="border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px;"><br />
<br />
====Базы данных====<br />
В этой секции описаны все возможности LUA, предоставляемые MTA и ресурсами.<br />
* [[:Category:RU/Resource|Каталог ресурсов]] - Изучите это, чтобы писать хорошие скрипты<br />
* [[RU/Client side scripts | Клиентские скрипты]]<br />
</div><br />
<div style="border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px;"><br />
<br />
====Основная помощь по Lua====<br />
Страницы, которые могут вам помочь в изучении LUA<br />
*[http://www.lua.ru/doc/ Руководство по программированию на Lua (русск.)] <br />
*[http://www.lua.org/pil/index.html Руководство по программированию на LUA (англ.)]<br />
*[http://lua-users.org/wiki/TutorialDirectory LUA Wiki (англ.)]<br />
*[http://nixstaller.berlios.de/manual/0.2/nixstaller_9.html Базовое руководство по Lua от Nixstaller (англ.)]<br />
*[http://gtascript.ru Портал по скриптингу. Строгая модерация.]<br />
</div><br />
<br />
<br />
| width="50%" style="vertical-align:top;" |<br />
<div style="border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px;"><br />
<br />
====Редактор карт====<br />
*[[RU/Resource:Editor|Руководство]]<br />
*[[RU/Resource:Editor/EDF|Формат объявлений редактора]]<br />
*[[RU/Resource:Editor/Plugins|Плагины]]<br />
*[[RU/Resource:Editor#FAQ|Часто задаваемые вопросы]]<br />
<br />
</div><br />
<div style="border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px;"><br />
<br />
====Разработка MTA====<br />
*[[Roadmap]]<br />
*[[Git Coding Guidelines]]<br />
</div><br />
<div style="border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px; background:#CCCCFF;"><br />
<br />
====Описание====<br />
* [[RU/Client Scripting Functions|Функции, выполняемые на стороне клиента]]<br />
* [[RU/Client Scripting Events|События, генерируемые на стороне клиента]]<br />
* [[RU/Server Scripting Functions|Функции, выполняемые на стороне сервера]]<br />
* [[RU/Server Scripting Events|События, генерируемые на стороне сервера]]<br />
* [[RU/MTA Classes|Классы MTA]] - Подробное описания всех специфических типов MTA<br />
** [[RU/Element|Элементы MTA]] / [[RU/Element tree|Дерево Элементов]]<br />
<!-- Incomplete * [[Module functions|Server-side external module scripting functions list]] --><br />
</div><br />
<br />
<div style="border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px;"><br />
<br />
====[[RU/Id|Список идентификаторов]]====<br />
*[[RU/Animations|Анимации]]<br />
*[[RU/Character Skins | Скины персонажей]]<br />
*[[RU/CJ_Clothes|Одежда]]<br />
*[[RU/Garage|Идентификаторы гаражей]]<br />
*[[Interior IDs | Интерьеры]]<br />
*[[RU/Projectiles|Снаряды]]<br />
*[[RU/Radar_blips|Метки радара]]<br />
*[[RU/Sounds|Звуки]]<br />
*[[RU/Vehicle IDs|Транспорт]]<br />
*[[RU/Vehicle_colors|Цвета транспорта]]<br />
*[[RU/Vehicle Upgrades|Апгрейды транспорта]]<br />
*[[RU/Weapons|Оружие]]<br />
*[[RU/Weather|Погода]]<br />
</div><br />
<br />
|-<br />
| colspan="2" |<br />
|}<br />
[[pl:Main Page]]<br />
[[en:Main Page]]<br />
[[es:Pagina Principal]]<br />
[[it:Pagina principale]]<br />
[[nl:Main Page]]<br />
[[de:Hauptseite]]</div>D0lph1nhttps://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_GUI&diff=22019Введение в скриптинг GUI2009-12-08T04:35:20Z<p>D0lph1n: gui editor</p>
<hr />
<div><!-- place holder --><br />
Одна из важных особенностей MTA:DM - возможность создания собственного GUI (графический пользовательский интерфейс). Графический интерфейс состоит из окон, кнопок, текстовых полей... Проще говоря, из всех стандартных компонент графических интерфейсов. Они могут использоваться пока пользователь в игре, и использоваться для ввода/вывода вместо команд. <br />
<br />
[[Image:AdminGUI.png|thumb|Admin Console GUI]]<br />
<br />
==Руководство по созданию интерфейса авторизации==<br />
В этом руководстве мы сделаем простое окно авторизаци с двумя полями ввода и кнопкой. Окно появляется, когда игрок подключается к игре, и после того, как нажата кнопка, игрок респаунится. Это руководство - продолжение предыдущего ([[RU/Scripting Introduction|Введение в скриптинг]]). Теперь мы познакомимся с написанием клиентских скриптов. <br />
<br />
===Отрисовка окна===<br />
GUI работает на стороне клиента. Хорошим решением будет поместить все клиентские скрипты в отдельный каталог. Перейдите в каталог /Ваш сервер MTA/mods/deathmatch/resources/myserver/ и создайте подкаталог "client". В нём создайте текстовый файл и назовите его "gui.lua". В этом файле мы напишем функцию, отображающую окно:<br />
<syntaxhighlight lang="lua"><br />
function CreateLoginWindow()<br />
local X = 0.375<br />
local Y = 0.375<br />
local Width = 0.25<br />
local Height = 0.25<br />
wdwLogin = guiCreateWindow(X, Y, Width, Height, "Please Log In", true)<br />
end<br />
</syntaxhighlight><br />
Вы можете кликнуть по имени функции, чтобы прочитать её описание. Заметьте, что координаты окна задаются в ''процентах'' от размеров экрана. Это значит, что левая граница экрана по ширине принимается за 0, а правая за 1, соответственно, "X" равное 0.5 обозначает середину экрана. Аналогично и для позиции по высоте, ширины и высоты окна (если "width" равно 0.5, окно будет в половину ширины экрана). Теперь мы добавим текстовые меткм (с надписями "username:" и "password:"), поля ввода и кнопку. Замените функцию её полной версией:<br />
<syntaxhighlight lang="lua"><br />
function CreateLoginWindow()<br />
local X = 0.375<br />
local Y = 0.375<br />
local Width = 0.25<br />
local Height = 0.25<br />
wdwLogin = guiCreateWindow(X, Y, Width, Height, "Please Log In", true)<br />
<br />
X = 0.0825<br />
Y = 0.2<br />
Width = 0.25<br />
Height = 0.25<br />
guiCreateLabel(X, Y, Width, Height, "Username", true, wdwLogin)<br />
Y = 0.5<br />
guiCreateLabel(X, Y, Width, Height, "Password", true, wdwLogin)<br />
<br />
X = 0.415<br />
Y = 0.2<br />
Width = 0.5<br />
Height = 0.15<br />
edtUser = guiCreateEdit(X, Y, Width, Height, "", true, wdwLogin)<br />
Y = 0.5<br />
edtPass = guiCreateEdit(X, Y, Width, Height, "", true, wdwLogin)<br />
guiEditSetMaxLength(edtUser, 50)<br />
guiEditSetMaxLength(edtPass, 50)<br />
<br />
X = 0.415<br />
Y = 0.7<br />
Width = 0.25<br />
Height = 0.2<br />
btnLogin = guiCreateButton(X, Y, Width, Height, "Log In", true, wdwLogin)<br />
<br />
guiSetVisible(wdwLogin, false)<br />
end<br />
</syntaxhighlight><br />
Обратите внимание на то, что каждый компонент интерфейса является дочерним по отношению к окну, это достигается указанием родительского элемента (wdwLogin, в данном случае) при создании элемента:<br />
<syntaxhighlight lang="lua"><br />
guiCreateLabel(X, Y, Width, Height, "Password", true, wdwLogin)<br />
</syntaxhighlight><br />
Это очень удобно, т.к. в дальнейшем, при отображении окна, можно обращаться только к родительскому элементу. К примеру:<br />
<syntaxhighlight lang="lua"><br />
guiSetVisible(wdwLogin, false) --прячет всё окно целиком так, что мы можем показать его игроку в любой момент. <br />
</syntaxhighlight><br />
<br />
Для редактироования GUI вы также можете воспользоваться [[RU/Resource:GUI_Editor | редактором GUI]].<br />
<br />
===Использование написаной нами функции===<br />
Функция CreateLoginWindow написана, но она не будет работать, пока мы её не вызовем. Рекомендуется создавать все окна при запуске ресурса на клиенте, прятать их, и показывать игроку позднее, когда они понадобятся. Для этого напишем обработчик события "[[onClientResourceStart]]", в котором будем создавать окно:<br />
<syntaxhighlight lang="lua"><br />
addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), <br />
function ()<br />
CreateLoginWindow()<br />
end<br />
) <br />
</syntaxhighlight><br />
Мы хотим показывать окно когда клиент подключается к игре, используя то же событие "[[onClientResourceStart]]". Теперь обработчик выглядит так:<br />
<syntaxhighlight lang="lua"><br />
addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), <br />
function ()<br />
CreateLoginWindow()<br />
<br />
outputChatBox("Welcome to My MTA DM Server, please log in. ")<br />
<br />
if (wdwLogin ~= nil) then<br />
guiSetVisible(wdwLogin, true)<br />
end <br />
<br />
showCursor(true)<br />
guiSetInputEnabled(true)<br />
end<br />
) <br />
</syntaxhighlight><br />
Заметьте, что мы выполняем проверку перед показом окна, так, в случае, если окно не создано, не возникнет ошибки. Функция [[showCursor]] включает управление мышью, а [[guiSetInputEnabled]] позволяет быть уверенным, что использование при вводе некоторых клавиш, таких как "A", "S", "D", "W", "T", не приведёт к движению персонажа, или вводу текста в чате. На следующем шаге мы заставим кнопку работать так, как задумывалось.<br />
<br />
===Обработчик нажатия кнопки===<br />
Когда пользователь кликает по любому элементу интерфейса, генерируется событие "[[onClientGUIClick]]" для этого элемента. К примеру, если вы кликните по кнопке, можно добавить обработчик для этого события:<br />
<syntaxhighlight lang="lua"><br />
addEventHandler("onClientGUIClick", theButtonElement, theHandlerFunction, false)<br />
</syntaxhighlight><br />
В нашем скрипте требуется только обработчик привязанный к кнопке. При клике по ней, клиент должен сообщить серверу, что нужно респаунить игрока. Найдите обработчик события "onClientResourceStart" из предыдущей части и добавьте следующую строку сразу ПОСЛЕ вызова CreateLoginWindow() :<br />
<syntaxhighlight lang="lua"><br />
addEventHandler("onClientGUIClick", btnLogin, clientSubmitLogin, false)<br />
</syntaxhighlight><br />
Обработчик должен быть добавлен здесь, чтобы быть уверенным, что переменная btnLogin содержит существующую кнопку. Нельзя привязать событие к несуществующему элементу. Вы, должно быть, заметили, что нам потребуется функция "clientSubmitLogin", вызываемая в предыдущей строке.<br />
<syntaxhighlight lang="lua"><br />
function clientSubmitLogin(button, state)<br />
if (button == "left" and state == "up") then<br />
<br />
triggerServerEvent("SubmitLogin", getRootElement(), guiGetText(edtUser), guiGetText(edtPass))<br />
guiSetInputEnabled(false)<br />
guiSetVisible(wdwLogin, false)<br />
showCursor(false)<br />
end<br />
end<br />
</syntaxhighlight><br />
Переменная "button" передается обработчиком события и содержит строку с именем этой кнопки (к примеру "left" или "right"). Здесь мы познакомились с новой концепцией пользовательских событий. Пользовательские события могут генерироваться как на одной стороне, так и на разных (с сервера на клиент и наоборот). Мы используем функцию [[triggerServerEvent]], чтобы сгенерировать событие "SubmitLogin" на сервере.<br />
<br />
Теперь у нас есть весь необходимый клиентский код. На сервере, как вы помните, мы спавним игрока как только он подключается к серверу: <br />
<syntaxhighlight lang="lua"><br />
function joinHandler()<br />
local x,y,z<br />
x = 1959.55<br />
y = -1714.46<br />
z = 10<br />
spawnPlayer(source, x, y, z)<br />
fadeCamera(source, true)<br />
outputChatBox("Welcome to My Server", source)<br />
end<br />
addEventHandler("onPlayerJoin", getRootElement(), joinHandler)<br />
</syntaxhighlight><br />
Так как теперь мы должны спавнить игрока после нажатия на кнопку, нам нужно заменить событие "onPlayerJoin" пользовательским событием, генерируемым клиентом. Замените приведенный выше код следующим образом:<br />
<syntaxhighlight lang="lua"><br />
function joinHandler(username, password)<br />
local x,y,z<br />
x = 1959.55<br />
y = -1714.46<br />
z = 10<br />
if (client) then<br />
spawnPlayer(client, x, y, z)<br />
fadeCamera(client, true)<br />
outputChatBox("Welcome to My Server", client)<br />
end<br />
end<br />
<br />
addEvent("SubmitLogin", true)<br />
addEventHandler("SubmitLogin", getRootElement(), joinHandler)<br />
</syntaxhighlight><br />
Обратите внимание на второй параметр функции [[addEvent]] (имеющий значение "true"), он указывает, что событие может быть сгенерировано другой стороной. так же заметьте, что "client" - внутренняя переменная, используемая MTA для идентификации игрока, сгенерировавшего событие. <br />
<br />
И, наконец, не забудьте добавить файл gui.lua в meta.xml основного ресурса и пометть его как клиентский:<br />
<syntaxhighlight lang="xml"><br />
<script src="client/gui.lua" type="client" /><br />
</syntaxhighlight><br />
<br />
Теперь у нас есть минимальное окно авторизации, спавнящее игрока при нажатии кнопки "login". Вы также можете использовать логин и пароль, передаваемые функцией [[triggerServerEvent]] для идентификации пользователя.<br />
<br />
[[en:Introduction_to_Scripting_GUI]]<br />
[[it:Introduzione_allo_scripting_della_GUI]]</div>D0lph1nhttps://wiki.multitheftauto.com/index.php?title=Template:RU/Resource_page&diff=22017Template:RU/Resource page2009-12-06T16:55:16Z<p>D0lph1n: </p>
<hr />
<div><pageclass class="resource" subcaption="Resource"></pageclass><br />
<removeNamespaceName></removeNamespaceName><br />
[[Category:RU/Resource]]</div>D0lph1nhttps://wiki.multitheftauto.com/index.php?title=RU/Resource:GUI_Editor&diff=22016RU/Resource:GUI Editor2009-12-06T16:54:22Z<p>D0lph1n: </p>
<hr />
<div>{{RU/Resource page}}<br />
С помощью этого ресурса вы сможете создавать элементы GUI и манипулировать ими прямо в игре, а затем сохранить код, чтобы использовать его в своих скриптах.<br />
<br />
<br />
Тема на [http://forum.mtasa.com/viewtopic.php?f=91&t=22831 форуме]<br />
<br />
<br />
Возможности:<br />
<br />
- навигация через меню доступное по клику правой клавиши<br />
<br />
- создание и манипуляция всеми возможными элементами GUI<br />
<br />
- базоваые возможности по загрузке существующих элементов GUI в редактор<br />
<br />
- вывод сгенерированного кода в файл или на экран<br />
<br />
<br />
Использование:<br />
- чтобы начать редактирование введите /guied или нажмите shift + g, повторите для остановки<br />
<br />
- для редактирования элемента GUI щелкните по нему правой кнопкой<br />
<br />
- создаваемый элемент будет потомком того, по которомы вы кликнули<br />
<br />
Например: правый клик по окну и выбор пункта "Create Button" создаст кнопку в окне<br />
<br />
<br />
- чтобы вывести код на экран введите /guiprint или выберите пункт "Print Code" в меню, чтобы скрыть окно нажмите кнопку close или введите /guihide<br />
<br />
- чтобы вывести код в файл введите /guioutput или выберите пункт "Output Code" в меню<br />
<br />
- информация будет дописана в конец файла и старая информация не потеряется<br />
<br />
<br />
В оконном режиме перемещение/изменение размера будет немного не совпадать с перемещением курсора из-за того, что игра неправильно возвращает его положение<br />
<br />
<br />
Для более подробной информации смотрите справку в игре ("Help" в меню)<br />
<br />
<br />
Выравнивание:<br />
<br />
- зажмите ctrl и кликните по элементу чтобы выбрать его. Кликните по другим элементам GUI чтобы выравнять их с выбранным ранее<br />
<br />
- используйте левый Сontrol для выравнивания по горизонтали и правый Сontrol для выравнивания по вертикали, левый и правый клик выравнивает по левому/правому и верхнему/нижнему краю соответственно<br />
<br />
- вы можете выравнять только объекты с общим родителем<br />
<br />
<br />
Копирование:<br />
<br />
- выбор пункта "Copy" создаст копию с идентичной позицией и размерами, другие атрибуты скопированы не будут<br />
<br />
- копия будет создана поверх оригинала, кликните правой кнопкой по нему и выберите "Move" чтобы переместить ее<br />
<br />
<br />
Загрузка GUI:<br />
<br />
- используется для получения информации о позиции и размерах существующих элементов GUI (к примеру из других ресурсов) и загрузки их в редактор, дополнительные опции (такие как атрибут "read-only" для memo) не загружаются<br />
<br />
- если вы этого не сделаете, все элементы GUI не созданные редактором в ТЕКУЩУЮ СЕССИЮ не будут загружены и сделанные вами изменения нельзя будет сохранить<br />
<br />
- выберите пункт "Load GUI" и кликните по элементу GUI, чтобы загрузить его и всех его потомков</div>D0lph1nhttps://wiki.multitheftauto.com/index.php?title=RU/Resource:GUI_Editor&diff=22015RU/Resource:GUI Editor2009-12-06T16:53:03Z<p>D0lph1n: Новая страница</p>
<hr />
<div>{{RU/Resource page}}<br />
С помощью этого ресурса вы сможете создавать элементы GUI и манипулировать ими прямо в игре, а затем сохранить код, чтобы использовать его в своих скриптах.<br />
<br />
Тема на [http://forum.mtasa.com/viewtopic.php?f=91&t=22831 форуме]<br />
<br />
Возможности:<br />
- навигация через меню доступное по клику правой клавиши<br />
- создание и манипуляция всеми возможными элементами GUI<br />
- базоваые возможности по загрузке существующих элементов GUI в редактор<br />
- вывод сгенерированного кода в файл или на экран<br />
<br />
Использование:<br />
- чтобы начать редактирование введите /guied или нажмите shift + g, повторите для остановки<br />
- для редактирования элемента GUI щелкните по нему правой кнопкой<br />
- создаваемый элемент будет потомком того, по которомы вы кликнули<br />
Например: правый клик по окну и выбор пункта "Create Button" создаст кнопку в окне<br />
<br />
- чтобы вывести код на экран введите /guiprint или выберите пункт "Print Code" в меню, чтобы скрыть окно нажмите кнопку close или введите /guihide<br />
- чтобы вывести код в файл введите /guioutput или выберите пункт "Output Code" в меню<br />
- информация будет дописана в конец файла и старая информация не потеряется<br />
<br />
В оконном режиме перемещение/изменение размера будет немного не совпадать с перемещением курсора из-за того, что игра неправильно возвращает его положение<br />
<br />
Для более подробной информации смотрите справку в игре ("Help" в меню)<br />
<br />
Выравнивание:<br />
- зажмите ctrl и кликните по элементу чтобы выбрать его. Кликните по другим элементам GUI чтобы выравнять их с выбранным ранее<br />
- используйте левый Сontrol для выравнивания по горизонтали и правый Сontrol для выравнивания по вертикали, левый и правый клик выравнивает по левому/правому и верхнему/нижнему краю соответственно<br />
- вы можете выравнять только объекты с общим родителем<br />
<br />
Копирование:<br />
- выбор пункта "Copy" создаст копию с идентичной позицией и размерами, другие атрибуты скопированы не будут<br />
- копия будет создана поверх оригинала, кликните правой кнопкой по нему и выберите "Move" чтобы переместить ее<br />
<br />
Загрузка GUI:<br />
- используется для получения информации о позиции и размерах существующих элементов GUI (к примеру из других ресурсов) и загрузки их в редактор, дополнительные опции (такие как атрибут "read-only" для memo) не загружаются<br />
- если вы этого не сделаете, все элементы GUI не созданные редактором в ТЕКУЩУЮ СЕССИЮ не будут загружены и сделанные вами изменения нельзя будет сохранить<br />
- выберите пункт "Load GUI" и кликните по элементу GUI, чтобы загрузить его и всех его потомков</div>D0lph1nhttps://wiki.multitheftauto.com/index.php?title=RU/Debugging&diff=22001RU/Debugging2009-12-01T09:25:44Z<p>D0lph1n: </p>
<hr />
<div>При написании скриптов вы обязательно столкнетесь с проблемами, которые не сможете решить немедленно. Цель этой страницы - показать вам основные способыы нахождения ошибок.<br />
<br />
==Консоль отладки==<br />
MTA включает консоль, которая показывает отладочные сообщения, выводимые функциями MTA и скриптами. Вы можете открыть ее введя ''debugscript x'' в консоли, где ''x'' уровень отладки:<br />
* '''1:''' только ошибки<br />
* '''2:''' ошибки и предупреждения<br />
* '''3:''' ошибки, предупреждения и информационные сообщения<br />
Так, введя ''debugscript 3'', вы будете видеть все сообщения, этот или 2 уровень рекомендуется в большинстве случаев. Рекомендуем держать debugscript включенным всё время, пока вы тестируете свой скрипт, это поможет вам обнаружить мелкие ошибки и исправить их.<br />
<br />
===Пример===<br />
Этот участок кода содержит две ошибки:<br />
<syntaxhighlight lang="lua"><br />
if (getPlayerName(player) == "Fedor")<br />
outputChatbox("Hello Fedor")<br />
end<br />
</syntaxhighlight><br />
При попытке запуска скрипта, содержащего этот участо кода, debugscript выведет что-то похожее на:<br />
{{Debug info|Loading script failed: C:\<server path>\mods\deathmatch\resources\myResource\script.lua:15: 'then' expected near ´outputChatbox'}}<br />
Это означает, что скрипт не может быть обработан из-за синтаксической ошибки. Показывается путь к скрипту, поэтому вы можете увидеть, какому ресурсу он принадлежит, ('myResource' в данном случае) и, конечно же, имя скрипта. После имени файла показан номер строки и информация об ошибке. Теперь проблема легко решается, мы просто забыли написать ключевое слово 'then':<br />
<syntaxhighlight lang="lua"><br />
if (getPlayerName(player) == "Fedor") then<br />
outputChatbox("Hello Fedor")<br />
end<br />
</syntaxhighlight><br />
Теперь скрипт загрузится нормально и не будет выводить ошибок пока не выполнится для игрока с ником 'Fedor'. Тогда debugscript выведет:<br />
{{Debug error|C:\<server path>\mods\deathmatch\resources\d\script.lua:15: attempt to call global 'outputChatbox' (a nil value)}}<br />
Это значит, вызванная вами функция не существует, оно и понятно, ведь правильное название этой функции ''outputChatBox'' (с заглавной буквы ''B''):<br />
<syntaxhighlight lang="lua"><br />
if (getPlayerName(player) == "Fedor") then<br />
outputChatBox("Hello Fedor")<br />
end<br />
</syntaxhighlight><br />
<br />
Конечно, это просто пример, есть множество других сообщений и сценариев.<br />
<br />
==Ведение лога==<br />
Можно также включить режим дебаггера, отредактировав ''coreconfig.xml'' в папке GTA\MTA. Найдите в нем следующий тэг:<br />
<syntaxhighlight lang="xml"><debugfile/></syntaxhighlight><br />
<br />
И впишите туда адрес будущего лог-файла (путь указывайте, начиная с папки GTA):<br />
<syntaxhighlight lang="xml"><debugfile>MTA\debugscript.log</debugfile></syntaxhighlight><br />
<br />
И теперь все сообщения дебаггера будут записываться в этот файл. Если хотите выключить ведение лога, оставьте содержимое тэга пустым:<br />
<syntaxhighlight lang="xml"><debugfile/></syntaxhighlight><br />
<br />
==Стратегии отладки==<br />
Есть несколько методов, помогающих в поиске ошибок, кроме проверки всего кода. Большинство из них включает вывод различной информации, зависящей от конкретной ситуации.<br />
<br />
===Полезные функции===<br />
Сперва несколько функций, которые можно использовать для отладки.<br />
* [[outputDebugString]] или [[outputChatBox]] для вывода информации<br />
* [http://www.lua.org/manual/5.1/manual.html#pdf-tostring tostring()] для преобразования значений переменных в строки, к примеру когда они содержат булевы значения<br />
* [[getElementType]] для определения типа элемента MTA<br />
{{translate}}<br />
===Add debugmessages to check ''if'', ''when'' or ''how often'' a section of code is executed===<br />
A typical example would be verify whether an ''if''-section is executed or not. To do that, just add any message you will recognize later within the ''if''-section.<br />
<syntaxhighlight lang="lua"><br />
if (variable1 == variable2) then<br />
outputDebugString("entered if")<br />
-- do anything<br />
end<br />
</syntaxhighlight><br />
<br />
Another application would be to check when variable values are modified. First search for all occurences of the variable being edited and add a message just beside it.<br />
<br />
===Add debugmessages to check the ''value'' of a variable===<br />
Let's say you want to create a marker, but it doesn't appear at the position you expect it to be. The first thing you might want to do is check if the [[createMarker]] function is executed. But while doing this, you can also check the values being used in the [[createMarker]] function in one run.<br />
<syntaxhighlight lang="lua"><br />
outputChatBox(tostring(x).." "..tostring(y).." "..tostring(z))<br />
createMarker(x,y,z)<br />
</syntaxhighlight><br />
This would output all three variables that are used as coordinates for the marker. Assuming you read those from a map file, you can now compare the debug output to the desired values. The [http://www.lua.org/manual/5.1/manual.html#pdf-tostring tostring()] will ensure that the variables' value can be put together as a string, even if it's a boolean value for example.<br />
<br />
==Example==<br />
Imagine you created a colshape (collision shape) somewhere and you want a player to stay 10 seconds in it, then perform some action.<br />
<syntaxhighlight lang="lua"><br />
function colShapeHit(player)<br />
-- set a timer to output a message (could as well execute another function)<br />
-- store the timer id in a table, using the player as index<br />
colshapeTimer[player] = setTimer(outputChatBox,10000,1,"The player stayed 10 seconds in the colshape!")<br />
end<br />
addEventHandler("onColShapeHit",getRootElement(),colShapeHit)<br />
<br />
function colShapeLeave(player)<br />
-- kill the timer when the player leaves the colshape<br />
killTimer(colshapeTimer[player])<br />
end<br />
addEventHandler("onColShapeLeave",getRootElement(),colShapeLeave)<br />
</syntaxhighlight><br />
When a player enters the colshape, debugscript outputs the following message:<br />
{{Debug error|..[path]: attempt to index global 'colshapeTimer' (a nil value)}}<br />
This means you tried to index a table that does not exist. In the example above, this is done when storing the timer id in the table. We need to add a check if the table exists and if not create it.<br />
<br />
<syntaxhighlight lang="lua"><br />
function colShapeHit(player)<br />
if (colshapeTimer == nil) then<br />
colshapeTimer = {}<br />
end<br />
-- set a timer to output a message (could as well execute another function)<br />
-- store the timer id in a table, using the player as index<br />
colshapeTimer[player] = setTimer(outputChatBox,10000,1,"The player stayed 10 seconds in the colshape!")<br />
end<br />
addEventHandler("onColShapeHit",getRootElement(),colShapeHit)<br />
<br />
function colShapeLeave(player)<br />
-- kill the timer when the player leaves the colshape<br />
killTimer(colshapeTimer[player])<br />
end<br />
addEventHandler("onColShapeLeave",getRootElement(),colShapeLeave)<br />
</syntaxhighlight><br />
<br />
Now we still get a warning when a player enters the colshape, waits for the message and leaves it again:<br />
<br />
{{Debug warning|[..]: Bad argument @ 'killTimer' Line: ..}}<br />
<br />
Except for that (we will talk about that later) everything seems to work fine. A player enters the colshape, the timer is started, if he stays the message occurs, if he leaves the timer is killed.<br />
<br />
===A more inconspicuous error===<br />
But for some reason the message gets outputted twice when you stay in the colcircle while in a vehicle. Since it would appear some code is executed twice, we add debug messages to check this.<br />
<br />
<syntaxhighlight lang="lua"><br />
function colShapeHit(player)<br />
if (colshapeTimer == nil) then<br />
colshapeTimer = {}<br />
end<br />
-- add a debug message<br />
outputDebugString("colShapeHit")<br />
-- set a timer to output a message (could as well execute another function)<br />
-- store the timer id in a table, using the player as index<br />
colshapeTimer[player] = setTimer(outputChatBox,10000,1,"The player stayed 10 seconds in the colshape!")<br />
end<br />
addEventHandler("onColShapeHit",getRootElement(),colShapeHit)<br />
<br />
function colShapeLeave(player)<br />
-- add a debug message<br />
outputDebugString("colShapeLeave")<br />
-- kill the timer when the player leaves the colshape<br />
killTimer(colshapeTimer[player])<br />
end<br />
addEventHandler("onColShapeLeave",getRootElement(),colShapeLeave)<br />
</syntaxhighlight><br />
<br />
Now we notice that both handler functions get executed twice when we are in a vehicle, but only once when we are on-foot. It would appear the vehicle triggers the colshape as well. To confirm this theory, we check the ''player'' variable that '''should''' contain a player element.<br />
<br />
<syntaxhighlight lang="lua"><br />
function colShapeHit(player)<br />
if (colshapeTimer == nil) then<br />
colshapeTimer = {}<br />
end<br />
-- add a debug message, with the element type<br />
outputDebugString("colShapeHit "..getElementType(player))<br />
-- set a timer to output a message (could as well execute another function)<br />
-- store the timer id in a table, using the player as index<br />
colshapeTimer[player] = setTimer(outputChatBox,10000,1,"The player stayed 10 seconds in the colshape!")<br />
end<br />
addEventHandler("onColShapeHit",getRootElement(),colShapeHit)<br />
<br />
function colShapeLeave(player)<br />
-- add a debug message, with the element type<br />
outputDebugString("colShapeLeave "..getElementType(player))<br />
-- kill the timer when the player leaves the colshape<br />
killTimer(colshapeTimer[player])<br />
end<br />
addEventHandler("onColShapeLeave",getRootElement(),colShapeLeave)<br />
</syntaxhighlight><br />
<br />
The debug messages tell us that one of the ''player'' variables is a player, the other one a vehicle element. Since we only want to react when a player enters the colshape, we add an ''if'' that will end the execution of the function if it's '''not''' an player element.<br />
<br />
<syntaxhighlight lang="lua"><br />
function colShapeHit(player)<br />
if (colshapeTimer == nil) then<br />
colshapeTimer = {}<br />
end<br />
-- add a check for the element type<br />
if (getElementType(player) ~= "player") then return end<br />
-- add a debug message, with the element type<br />
outputDebugString("colShapeHit "..getElementType(player))<br />
-- set a timer to output a message (could as well execute another function)<br />
-- store the timer id in a table, using the player as index<br />
colshapeTimer[player] = setTimer(outputChatBox,10000,1,"The player stayed 10 seconds in the colshape!")<br />
end<br />
addEventHandler("onColShapeHit",getRootElement(),colShapeHit)<br />
<br />
function colShapeLeave(player)<br />
-- add a check for the element type<br />
if (getElementType(player) ~= "player") then return end<br />
-- add a debug message, with the element type<br />
outputDebugString("colShapeLeave "..getElementType(player))<br />
-- kill the timer when the player leaves the colshape<br />
killTimer(colshapeTimer[player])<br />
end<br />
addEventHandler("onColShapeLeave",getRootElement(),colShapeLeave)<br />
</syntaxhighlight><br />
<br />
Now the script should work as desired, but will still output the warning mentioned above. This happens because the timer we try to kill when a player leaves the colshape will not exist anymore when it reached the 10 seconds and is executed. There are different ways to get rid of that warning (since you know that the timer might not exist anymore and you only want to kill it if it is there). One way would be to check if the timer referenced in the table really exists. To do this, we need a little help function:<br />
<syntaxhighlight lang="lua"><br />
function isTimer(timer)<br />
local timers = getTimers()<br />
for k,v in ipairs(timers) do<br />
if (v == timer) then<br />
return true<br />
end<br />
end<br />
return false<br />
end<br />
</syntaxhighlight><br />
Which we will use when we kill the timer:<br />
<syntaxhighlight lang="lua"><br />
if (isTimer(colshapeTimer[player])) then<br />
killTimer(colshapeTimer[player])<br />
end<br />
</syntaxhighlight><br />
<br />
So the complete working code would be:<br />
<syntaxhighlight lang="lua"><br />
function colShapeHit(player)<br />
if (colshapeTimer == nil) then<br />
colshapeTimer = {}<br />
end<br />
-- add a check for the element type<br />
if (getElementType(player) ~= "player") then return end<br />
-- add a debug message, with the element type<br />
outputDebugString("colShapeHit "..getElementType(player))<br />
-- set a timer to output a message (could as well execute another function)<br />
-- store the timer id in a table, using the player as index<br />
colshapeTimer[player] = setTimer(outputChatBox,10000,1,"The player stayed 10 seconds in the colshape!")<br />
end<br />
addEventHandler("onColShapeHit",getRootElement(),colShapeHit)<br />
<br />
function colShapeLeave(player)<br />
-- add a check for the element type<br />
if (getElementType(player) ~= "player") then return end<br />
-- add a debug message, with the element type<br />
outputDebugString("colShapeLeave "..getElementType(player))<br />
-- kill the timer when the player leaves the colshape<br />
if (isTimer(colshapeTimer[player])) then<br />
killTimer(colshapeTimer[player])<br />
end<br />
end<br />
addEventHandler("onColShapeLeave",getRootElement(),colShapeLeave)<br />
<br />
function isTimer(timer)<br />
local timers = getTimers()<br />
for k,v in ipairs(timers) do<br />
if (v == timer) then<br />
return true<br />
end<br />
end<br />
return false<br />
end<br />
</syntaxhighlight><br />
<br />
[[Category:Scripting Concepts]]<br />
[[en:Debugging]]<br />
[[it:Guida al Debug]]</div>D0lph1nhttps://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_GUI&diff=22000Введение в скриптинг GUI2009-12-01T09:03:33Z<p>D0lph1n: </p>
<hr />
<div><!-- place holder --><br />
Одна из важных особенностей MTA:DM - возможность создания собственного GUI (графический пользовательский интерфейс). Графический интерфейс состоит из окон, кнопок, текстовых полей... Проще говоря, из всех стандартных компонент графических интерфейсов. Они могут использоваться пока пользователь в игре, и использоваться для ввода/вывода вместо команд. <br />
<br />
[[Image:AdminGUI.png|thumb|Admin Console GUI]]<br />
<br />
==Руководство по созданию интерфейса авторизации==<br />
В этом руководстве мы сделаем простое окно авторизаци с двумя полями ввода и кнопкой. Окно появляется, когда игрок подключается к игре, и после того, как нажата кнопка, игрок респаунится. Это руководство - продолжение предыдущего ([[RU/Scripting Introduction|Введение в скриптинг]]). Теперь мы познакомимся с написанием клиентских скриптов. <br />
<br />
===Отрисовка окна===<br />
GUI работает на стороне клиента. Хорошим решением будет поместить все клиентские скрипты в отдельный каталог. Перейдите в каталог /Ваш сервер MTA/mods/deathmatch/resources/myserver/ и создайте подкаталог "client". В нём создайте текстовый файл и назовите его "gui.lua". В этом файле мы напишем функцию, отображающую окно:<br />
<syntaxhighlight lang="lua"><br />
function CreateLoginWindow()<br />
local X = 0.375<br />
local Y = 0.375<br />
local Width = 0.25<br />
local Height = 0.25<br />
wdwLogin = guiCreateWindow(X, Y, Width, Height, "Please Log In", true)<br />
end<br />
</syntaxhighlight><br />
Вы можете кликнуть по имени функции, чтобы прочитать её описание. Заметьте, что координаты окна задаются в ''процентах'' от размеров экрана. Это значит, что левая граница экрана по ширине принимается за 0, а правая за 1, соответственно, "X" равное 0.5 обозначает середину экрана. Аналогично и для позиции по высоте, ширины и высоты окна (если "width" равно 0.5, окно будет в половину ширины экрана). Теперь мы добавим текстовые меткм (с надписями "username:" и "password:"), поля ввода и кнопку. Замените функцию её полной версией:<br />
<syntaxhighlight lang="lua"><br />
function CreateLoginWindow()<br />
local X = 0.375<br />
local Y = 0.375<br />
local Width = 0.25<br />
local Height = 0.25<br />
wdwLogin = guiCreateWindow(X, Y, Width, Height, "Please Log In", true)<br />
<br />
X = 0.0825<br />
Y = 0.2<br />
Width = 0.25<br />
Height = 0.25<br />
guiCreateLabel(X, Y, Width, Height, "Username", true, wdwLogin)<br />
Y = 0.5<br />
guiCreateLabel(X, Y, Width, Height, "Password", true, wdwLogin)<br />
<br />
X = 0.415<br />
Y = 0.2<br />
Width = 0.5<br />
Height = 0.15<br />
edtUser = guiCreateEdit(X, Y, Width, Height, "", true, wdwLogin)<br />
Y = 0.5<br />
edtPass = guiCreateEdit(X, Y, Width, Height, "", true, wdwLogin)<br />
guiEditSetMaxLength(edtUser, 50)<br />
guiEditSetMaxLength(edtPass, 50)<br />
<br />
X = 0.415<br />
Y = 0.7<br />
Width = 0.25<br />
Height = 0.2<br />
btnLogin = guiCreateButton(X, Y, Width, Height, "Log In", true, wdwLogin)<br />
<br />
guiSetVisible(wdwLogin, false)<br />
end<br />
</syntaxhighlight><br />
Обратите внимание на то, что каждый компонент интерфейса является дочерним по отношению к окну, это достигается указанием родительского элемента (wdwLogin, в данном случае) при создании элемента:<br />
<syntaxhighlight lang="lua"><br />
guiCreateLabel(X, Y, Width, Height, "Password", true, wdwLogin)<br />
</syntaxhighlight><br />
Это очень удобно, т.к. в дальнейшем, при отображении окна, можно обращаться только к родительскому элементу. К примеру:<br />
<syntaxhighlight lang="lua"><br />
guiSetVisible(wdwLogin, false) --прячет всё окно целиком так, что мы можем показать его игроку в любой момент. <br />
</syntaxhighlight><br />
<br />
===Использование написаной нами функции===<br />
Функция CreateLoginWindow написана, но она не будет работать, пока мы её не вызовем. Рекомендуется создавать все окна при запуске ресурса на клиенте, прятать их, и показывать игроку позднее, когда они понадобятся. Для этого напишем обработчик события "[[onClientResourceStart]]", в котором будем создавать окно:<br />
<syntaxhighlight lang="lua"><br />
addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), <br />
function ()<br />
CreateLoginWindow()<br />
end<br />
) <br />
</syntaxhighlight><br />
Мы хотим показывать окно когда клиент подключается к игре, используя то же событие "[[onClientResourceStart]]". Теперь обработчик выглядит так:<br />
<syntaxhighlight lang="lua"><br />
addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), <br />
function ()<br />
CreateLoginWindow()<br />
<br />
outputChatBox("Welcome to My MTA DM Server, please log in. ")<br />
<br />
if (wdwLogin ~= nil) then<br />
guiSetVisible(wdwLogin, true)<br />
end <br />
<br />
showCursor(true)<br />
guiSetInputEnabled(true)<br />
end<br />
) <br />
</syntaxhighlight><br />
Заметьте, что мы выполняем проверку перед показом окна, так, в случае, если окно не создано, не возникнет ошибки. Функция [[showCursor]] включает управление мышью, а [[guiSetInputEnabled]] позволяет быть уверенным, что использование при вводе некоторых клавиш, таких как "A", "S", "D", "W", "T", не приведёт к движению персонажа, или вводу текста в чате. На следующем шаге мы заставим кнопку работать так, как задумывалось.<br />
<br />
===Обработчик нажатия кнопки===<br />
Когда пользователь кликает по любому элементу интерфейса, генерируется событие "[[onClientGUIClick]]" для этого элемента. К примеру, если вы кликните по кнопке, можно добавить обработчик для этого события:<br />
<syntaxhighlight lang="lua"><br />
addEventHandler("onClientGUIClick", theButtonElement, theHandlerFunction, false)<br />
</syntaxhighlight><br />
В нашем скрипте требуется только обработчик привязанный к кнопке. При клике по ней, клиент должен сообщить серверу, что нужно респаунить игрока. Найдите обработчик события "onClientResourceStart" из предыдущей части и добавьте следующую строку сразу ПОСЛЕ вызова CreateLoginWindow() :<br />
<syntaxhighlight lang="lua"><br />
addEventHandler("onClientGUIClick", btnLogin, clientSubmitLogin, false)<br />
</syntaxhighlight><br />
Обработчик должен быть добавлен здесь, чтобы быть уверенным, что переменная btnLogin содержит существующую кнопку. Нельзя привязать событие к несуществующему элементу. Вы, должно быть, заметили, что нам потребуется функция "clientSubmitLogin", вызываемая в предыдущей строке.<br />
<syntaxhighlight lang="lua"><br />
function clientSubmitLogin(button, state)<br />
if (button == "left" and state == "up") then<br />
<br />
triggerServerEvent("SubmitLogin", getRootElement(), guiGetText(edtUser), guiGetText(edtPass))<br />
guiSetInputEnabled(false)<br />
guiSetVisible(wdwLogin, false)<br />
showCursor(false)<br />
end<br />
end<br />
</syntaxhighlight><br />
Переменная "button" передается обработчиком события и содержит строку с именем этой кнопки (к примеру "left" или "right"). Здесь мы познакомились с новой концепцией пользовательских событий. Пользовательские события могут генерироваться как на одной стороне, так и на разных (с сервера на клиент и наоборот). Мы используем функцию [[triggerServerEvent]], чтобы сгенерировать событие "SubmitLogin" на сервере.<br />
<br />
Теперь у нас есть весь необходимый клиентский код. На сервере, как вы помните, мы спавним игрока как только он подключается к серверу: <br />
<syntaxhighlight lang="lua"><br />
function joinHandler()<br />
local x,y,z<br />
x = 1959.55<br />
y = -1714.46<br />
z = 10<br />
spawnPlayer(source, x, y, z)<br />
fadeCamera(source, true)<br />
outputChatBox("Welcome to My Server", source)<br />
end<br />
addEventHandler("onPlayerJoin", getRootElement(), joinHandler)<br />
</syntaxhighlight><br />
Так как теперь мы должны спавнить игрока после нажатия на кнопку, нам нужно заменить событие "onPlayerJoin" пользовательским событием, генерируемым клиентом. Замените приведенный выше код следующим образом:<br />
<syntaxhighlight lang="lua"><br />
function joinHandler(username, password)<br />
local x,y,z<br />
x = 1959.55<br />
y = -1714.46<br />
z = 10<br />
if (client) then<br />
spawnPlayer(client, x, y, z)<br />
fadeCamera(client, true)<br />
outputChatBox("Welcome to My Server", client)<br />
end<br />
end<br />
<br />
addEvent("SubmitLogin", true)<br />
addEventHandler("SubmitLogin", getRootElement(), joinHandler)<br />
</syntaxhighlight><br />
Обратите внимание на второй параметр функции [[addEvent]] (имеющий значение "true"), он указывает, что событие может быть сгенерировано другой стороной. так же заметьте, что "client" - внутренняя переменная, используемая MTA для идентификации игрока, сгенерировавшего событие. <br />
<br />
И, наконец, не забудьте добавить файл gui.lua в meta.xml основного ресурса и пометть его как клиентский:<br />
<syntaxhighlight lang="xml"><br />
<script src="client/gui.lua" type="client" /><br />
</syntaxhighlight><br />
<br />
Теперь у нас есть минимальное окно авторизации, спавнящее игрока при нажатии кнопки "login". Вы также можете использовать логин и пароль, передаваемые функцией [[triggerServerEvent]] для идентификации пользователя.<br />
<br />
[[en:Introduction_to_Scripting_GUI]]<br />
[[it:Introduzione_allo_scripting_della_GUI]]</div>D0lph1nhttps://wiki.multitheftauto.com/index.php?title=Talk:%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&diff=21832Talk:Главная страница2009-11-05T17:52:56Z<p>D0lph1n: /* Русификация страниц, создание шаблонов */</p>
<hr />
<div>Страницу восстановил, ошибка, по-видимому, возникала из-за какой-то ссылки на странице. Думаю, из-за того, что страницу не поддерживали в актуальном состоянии, т.к. с польской страницей то же самое.<br />
[[User:D0lph1n|D0lph1n]] 13:54, 11 April 2009 (CEST)<br />
<br />
Некоторые страницы типо этой надо было б озаглавливать русскими буквами типо "Главная страница"<br />
[[User:Enterprise|Enterprise]] 13:58, 9 July 2009<br />
<br />
<br />
Нельзя, можно только латинский алфавит использовать, иначе ошибки будут<br />
PS Для подписи используются 4 тильды (автоматически подставит ник и время) [[User:D0lph1n|D0lph1N]] 21:51, 9 July 2009 (CEST)<br />
<br />
спасибо, буду знать [[User:Enterprise|Enterprise]] 12:36, 10 July 2009 (CEST)<br />
<br />
== Русификация страниц, создание шаблонов ==<br />
<br />
Надо русифицировать скриптовые команды для помощи новичкам, таким как и мне в работе. Я понемногу разбираю все функции, страницы про все команды русифицирую понемногу... [[User:PoliticalOrel|PoliticalOrel]] 13:07, 27 October 2009 (UTC)<br />
<br />
Ну, на самом деле еще много что перевести нужно. К примеру руководство по отладке уже давно начато [[User:D0lph1n|D0lph1N]] 17:52, 5 November 2009 (UTC)</div>D0lph1nhttps://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&diff=20828Главная страница2009-07-23T06:36:40Z<p>D0lph1n: /* Map Editor */</p>
<hr />
<div><div style="background: #FFEEAA; padding: 5px; float:right; width: 30%;">Последняя стабильная версия '''Multi Theft Auto: San Andreas Deathmatch''' - '''{{Current Version|full}}'''. Посетите [http://mtasa.com/dp.html download page] для скачивания.<br />
<p><br />
Также вы можете получить актуальную [http://code.google.com/p/multitheftauto/wiki/NightlyBuilds?tm=2 версию для разработчиков], чтобы воспользоваться последними разработками.<br />
</p><br />
</div><br />
__NOTOC__<br />
Добро пожаловать в Wiki разработчиков Multi Theft Auto: San Andreas Deathmatch. <br />
Здесь вы найдёте информацию по разработке игровых модов и карт для Multi Theft Auto.<br />
<br />
Есть много [[RU/How you can help|способов помочь нам]] сделать MTA лучше - создать карту, игровой режим, добавить описание функции скриптинга, написать пример кода, руководство, или просто играть в MTA и сообщать о найденых багах на форум.<br />
<br />
Пожалуйста, отнеситесь с пониманием к неизбежному появлению ошибок и помните, что многие вещи еще не сделаны до конца!<br />
<br />
Если у вас есть какие-либо вопросы по скриптингу, вы можете задать их в нашем [[IRC Channel |IRC канале]].<br />
<br />
'''Для редактирования статей вам понадобится [http://community.mtasa.com/ MTA Community] аккаунт.'''<br />
Пожалуйста зарегистрируйтесь на сайте [http://community.mtasa.com MTA Community] и используйте полученные логин/пароль для авторизации здесь. Акты вандализма будут караться баном вашего аккаунта.<br />
<br />
Теперь Wiki поддерживает инструмент '''[http://gears.google.com/ Google Gears]''', позволяющий вам просматривать статьи оффлайн. Для этого установите Google Gears и кликните по ссылке Go Offline в нижней части страницы. Будьте готовы к тому, что скачивание всех страниц может занять до часа(!), когда загрузка будет завершена, вы увидите сообщение об этом рядом с той ссылкой. После этого вы сможете переключить ваш браузер в оффлайн режим, или просто отключить интернет, и просматривать вики дальше.<br />
<br />
<div style="clear:both;"></div><br />
{| width="100%" cellspacing="0" cellpadding="0"<br />
| colspan="2" |<br />
<br />
|-<br />
| width="50%" style="vertical-align:top;" |<br />
<div style="border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px;"><br />
====Начало====<br />
<br />
* [[RU/Deathmatch_Client_Manual|Руководство по клиентской части MTA]]<br />
* [[RU/Deathmatch_Server_Manual|Руководство по серверной части MTA]]<br />
* [[RU/Known_Issues_-_FAQ|Известные проблемы MTA:SA DM]]<br />
* [[RU/Scripting Introduction|Введение в скриптинг]]<br />
* [[RU/Introduction to Scripting the GUI | Введение в скриптинг GUI (графический пользовательский интерфейс)]]<br />
* [[RU/Debugging| Руководство по отладке]] - Как найти ошибки в ваших скриптах.<br />
* [[RU/MTA Classes | Классы MTA]] - Детальные описания всех специфических типов MTA<br />
** [[RU/Element|MTA Элементы]] / [[RU/Element tree | Дерево элементов]]<br />
* [[RU/Resources| Введение в ресурсы]]<br />
** [[RU/Resource Web Access | Ресурс Web Access]]<br />
** [[:Category:RU/Resource|Каталог ресурсов]]<br />
** [[RU/Meta.xml | Meta.xml]]<br />
* [[RU/Map_manager|Менеджер карт]]<br />
* [[RU/Introduction_to_Scripting_the_GUI|Введение в скриптинг пользовательских интерфейсов]]<br />
* [[RU/Writing_Gamemodes| Создание игровых режимов]]<br />
<br />
</div><br />
<br />
<div style="border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px;"><br />
<br />
====Базы данных====<br />
В этой секции описаны все возможности LUA, предоставляемые MTA и ресурсами.<br />
* [[:Category:RU/Resource|Каталог ресурсов]] - Изучите это, чтобы писать хорошие скрипты<br />
* [[RU/Client side scripts | Клиентские скрипты]]<br />
</div><br />
<div style="border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px;"><br />
<br />
====Основная помощь по Lua====<br />
Страницы, которые могут вам помочь в изучении LUA<br />
*[http://www.lua.ru/doc/ Руководство по программированию на Lua (русск.)] <br />
*[http://www.lua.org/pil/index.html Руководство по программированию на LUA (англ.)]<br />
*[http://lua-users.org/wiki/TutorialDirectory LUA Wiki (англ.)]<br />
*[http://nixstaller.berlios.de/manual/0.2/nixstaller_9.html Базовое руководство по Lua от Nixstaller (англ.)]<br />
*[http://gtascript.ru Портал по скриптингу. Строгая модерация.]<br />
</div><br />
<br />
<br />
| width="50%" style="vertical-align:top;" |<br />
<div style="border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px;"><br />
<br />
====Редактор карт====<br />
*[[RU/Resource:Editor|Руководство]]<br />
*[[RU/Resource:Editor/EDF|Формат объявлений редактора]]<br />
*[[RU/Resource:Editor/Plugins|Плагины]]<br />
</div><br />
<br />
<div style="border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px; background:#CCCCFF;"><br />
<br />
====Описание====<br />
* [[RU/Client Scripting Functions|Функции, выполняемые на стороне клиента]]<br />
* [[RU/Client Scripting Events|События, генерируемые на стороне клиента]]<br />
* [[RU/Server Scripting Functions|Функции, выполняемые на стороне сервера]]<br />
* [[RU/Server Scripting Events|События, генерируемые на стороне сервера]]<br />
<!-- Incomplete * [[Module functions|Server-side external module scripting functions list]] --><br />
</div><br />
<br />
<div style="border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px;"><br />
<br />
====Список идентификаторов====<br />
*[[Animations|Анимации]]<br />
*[[RU/Character Skins | Скины персонажей]]<br />
*[[RU/CJ_Clothes|Одежда]]<br />
*[[RU/Garage|Идентификаторы гаражей]]<br />
*[[Interior IDs | Интерьеры]]<br />
*[[RU/Projectiles|Снаряды]]<br />
*[[RU/Radar_blips|Метки радара]]<br />
*[[RU/Sounds|Звуки]]<br />
*[[RU/Vehicle IDs|Транспорт]]<br />
*[[RU/Vehicle_colors|Цвета транспорта]]<br />
*[[RU/Vehicle Upgrades|Апгрейды транспорта]]<br />
*[[RU/Weapons|Оружие]]<br />
*[[RU/Weather|Погода]]<br />
</div><br />
<br />
|-<br />
| colspan="2" |<br />
|}<br />
[[pl:Main Page]]<br />
[[en:Main Page]]<br />
[[es:Pagina Principal]]<br />
[[it:Pagina principale]]<br />
[[nl:Main Page]]<br />
[[de:Hauptseite]]</div>D0lph1nhttps://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&diff=20827Главная страница2009-07-23T06:35:22Z<p>D0lph1n: </p>
<hr />
<div><div style="background: #FFEEAA; padding: 5px; float:right; width: 30%;">Последняя стабильная версия '''Multi Theft Auto: San Andreas Deathmatch''' - '''{{Current Version|full}}'''. Посетите [http://mtasa.com/dp.html download page] для скачивания.<br />
<p><br />
Также вы можете получить актуальную [http://code.google.com/p/multitheftauto/wiki/NightlyBuilds?tm=2 версию для разработчиков], чтобы воспользоваться последними разработками.<br />
</p><br />
</div><br />
__NOTOC__<br />
Добро пожаловать в Wiki разработчиков Multi Theft Auto: San Andreas Deathmatch. <br />
Здесь вы найдёте информацию по разработке игровых модов и карт для Multi Theft Auto.<br />
<br />
Есть много [[RU/How you can help|способов помочь нам]] сделать MTA лучше - создать карту, игровой режим, добавить описание функции скриптинга, написать пример кода, руководство, или просто играть в MTA и сообщать о найденых багах на форум.<br />
<br />
Пожалуйста, отнеситесь с пониманием к неизбежному появлению ошибок и помните, что многие вещи еще не сделаны до конца!<br />
<br />
Если у вас есть какие-либо вопросы по скриптингу, вы можете задать их в нашем [[IRC Channel |IRC канале]].<br />
<br />
'''Для редактирования статей вам понадобится [http://community.mtasa.com/ MTA Community] аккаунт.'''<br />
Пожалуйста зарегистрируйтесь на сайте [http://community.mtasa.com MTA Community] и используйте полученные логин/пароль для авторизации здесь. Акты вандализма будут караться баном вашего аккаунта.<br />
<br />
Теперь Wiki поддерживает инструмент '''[http://gears.google.com/ Google Gears]''', позволяющий вам просматривать статьи оффлайн. Для этого установите Google Gears и кликните по ссылке Go Offline в нижней части страницы. Будьте готовы к тому, что скачивание всех страниц может занять до часа(!), когда загрузка будет завершена, вы увидите сообщение об этом рядом с той ссылкой. После этого вы сможете переключить ваш браузер в оффлайн режим, или просто отключить интернет, и просматривать вики дальше.<br />
<br />
<div style="clear:both;"></div><br />
{| width="100%" cellspacing="0" cellpadding="0"<br />
| colspan="2" |<br />
<br />
|-<br />
| width="50%" style="vertical-align:top;" |<br />
<div style="border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px;"><br />
====Начало====<br />
<br />
* [[RU/Deathmatch_Client_Manual|Руководство по клиентской части MTA]]<br />
* [[RU/Deathmatch_Server_Manual|Руководство по серверной части MTA]]<br />
* [[RU/Known_Issues_-_FAQ|Известные проблемы MTA:SA DM]]<br />
* [[RU/Scripting Introduction|Введение в скриптинг]]<br />
* [[RU/Introduction to Scripting the GUI | Введение в скриптинг GUI (графический пользовательский интерфейс)]]<br />
* [[RU/Debugging| Руководство по отладке]] - Как найти ошибки в ваших скриптах.<br />
* [[RU/MTA Classes | Классы MTA]] - Детальные описания всех специфических типов MTA<br />
** [[RU/Element|MTA Элементы]] / [[RU/Element tree | Дерево элементов]]<br />
* [[RU/Resources| Введение в ресурсы]]<br />
** [[RU/Resource Web Access | Ресурс Web Access]]<br />
** [[:Category:RU/Resource|Каталог ресурсов]]<br />
** [[RU/Meta.xml | Meta.xml]]<br />
* [[RU/Map_manager|Менеджер карт]]<br />
* [[RU/Introduction_to_Scripting_the_GUI|Введение в скриптинг пользовательских интерфейсов]]<br />
* [[RU/Writing_Gamemodes| Создание игровых режимов]]<br />
<br />
</div><br />
<br />
<div style="border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px;"><br />
<br />
====Базы данных====<br />
В этой секции описаны все возможности LUA, предоставляемые MTA и ресурсами.<br />
* [[:Category:RU/Resource|Каталог ресурсов]] - Изучите это, чтобы писать хорошие скрипты<br />
* [[RU/Client side scripts | Клиентские скрипты]]<br />
</div><br />
<div style="border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px;"><br />
<br />
====Основная помощь по Lua====<br />
Страницы, которые могут вам помочь в изучении LUA<br />
*[http://www.lua.ru/doc/ Руководство по программированию на Lua (русск.)] <br />
*[http://www.lua.org/pil/index.html Руководство по программированию на LUA (англ.)]<br />
*[http://lua-users.org/wiki/TutorialDirectory LUA Wiki (англ.)]<br />
*[http://nixstaller.berlios.de/manual/0.2/nixstaller_9.html Базовое руководство по Lua от Nixstaller (англ.)]<br />
*[http://gtascript.ru Портал по скриптингу. Строгая модерация.]<br />
</div><br />
<br />
<br />
| width="50%" style="vertical-align:top;" |<br />
<div style="border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px;"><br />
<br />
====Map Editor====<br />
*[[RU/Resource:Editor|Руководство]]<br />
*[[RU/Resource:Editor/EDF|Editor Definition Format]]<br />
*[[RU/Resource:Editor/Plugins|Плагины]]<br />
</div><br />
<br />
<div style="border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px; background:#CCCCFF;"><br />
<br />
====Описание====<br />
* [[RU/Client Scripting Functions|Функции, выполняемые на стороне клиента]]<br />
* [[RU/Client Scripting Events|События, генерируемые на стороне клиента]]<br />
* [[RU/Server Scripting Functions|Функции, выполняемые на стороне сервера]]<br />
* [[RU/Server Scripting Events|События, генерируемые на стороне сервера]]<br />
<!-- Incomplete * [[Module functions|Server-side external module scripting functions list]] --><br />
</div><br />
<br />
<div style="border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px;"><br />
<br />
====Список идентификаторов====<br />
*[[Animations|Анимации]]<br />
*[[RU/Character Skins | Скины персонажей]]<br />
*[[RU/CJ_Clothes|Одежда]]<br />
*[[RU/Garage|Идентификаторы гаражей]]<br />
*[[Interior IDs | Интерьеры]]<br />
*[[RU/Projectiles|Снаряды]]<br />
*[[RU/Radar_blips|Метки радара]]<br />
*[[RU/Sounds|Звуки]]<br />
*[[RU/Vehicle IDs|Транспорт]]<br />
*[[RU/Vehicle_colors|Цвета транспорта]]<br />
*[[RU/Vehicle Upgrades|Апгрейды транспорта]]<br />
*[[RU/Weapons|Оружие]]<br />
*[[RU/Weather|Погода]]<br />
</div><br />
<br />
|-<br />
| colspan="2" |<br />
|}<br />
[[pl:Main Page]]<br />
[[en:Main Page]]<br />
[[es:Pagina Principal]]<br />
[[it:Pagina principale]]<br />
[[nl:Main Page]]<br />
[[de:Hauptseite]]</div>D0lph1nhttps://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&diff=20826Главная страница2009-07-23T06:31:59Z<p>D0lph1n: </p>
<hr />
<div><div style="background: #FFEEAA; padding: 5px; float:right; width: 30%;">Latest stable version of '''Multi Theft Auto: San Andreas Deathmatch''' is '''{{Current Version|full}}'''. Visit the [http://mtasa.com/dp.html download page] and grab it.<br />
<p><br />
You can also grab the nightly [http://code.google.com/p/multitheftauto/wiki/NightlyBuilds?tm=2 developer builds] for the latest updates.<br />
</p><br />
</div><br />
__NOTOC__<br />
Добро пожаловать в Wiki разработчиков Multi Theft Auto: San Andreas Deathmatch. <br />
Здесь вы найдёте информацию по разработке игровых модов и карт для Multi Theft Auto.<br />
<br />
Есть много [[RU/How you can help|способов помочь нам]] сделать MTA лучше - создать карту, игровой режим, добавить описание функции скриптинга, написать пример кода, руководство, или просто играть в MTA и сообщать о найденых багах на форум.<br />
<br />
Пожалуйста, отнеситесь с пониманием к неизбежному появлению ошибок и помните, что многие вещи еще не сделаны до конца!<br />
<br />
Если у вас есть какие-либо вопросы по скриптингу, вы можете задать их в нашем [[IRC Channel |IRC канале]].<br />
<br />
'''Для редактирования статей вам понадобится [http://community.mtasa.com/ MTA Community] аккаунт.'''<br />
Пожалуйста зарегистрируйтесь на сайте [http://community.mtasa.com MTA Community] и используйте полученные логин/пароль для авторизации здесь. Акты вандализма будут караться баном вашего аккаунта.<br />
<br />
Теперь Wiki поддерживает инструмент '''[http://gears.google.com/ Google Gears]''', позволяющий вам просматривать статьи оффлайн. Для этого установите Google Gears и кликните по ссылке Go Offline в нижней части страницы. Будьте готовы к тому, что скачивание всех страниц может занять до часа(!), когда загрузка будет завершена, вы увидите сообщение об этом рядом с той ссылкой. После этого вы сможете переключить ваш браузер в оффлайн режим, или просто отключить интернет, и просматривать вики дальше.<br />
<br />
<div style="clear:both;"></div><br />
{| width="100%" cellspacing="0" cellpadding="0"<br />
| colspan="2" |<br />
<br />
|-<br />
| width="50%" style="vertical-align:top;" |<br />
<div style="border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px;"><br />
====Начало====<br />
<br />
* [[RU/Deathmatch_Client_Manual|Руководство по клиентской части MTA]]<br />
* [[RU/Deathmatch_Server_Manual|Руководство по серверной части MTA]]<br />
* [[RU/Known_Issues_-_FAQ|Известные проблемы MTA:SA DM]]<br />
* [[RU/Scripting Introduction|Введение в скриптинг]]<br />
* [[RU/Introduction to Scripting the GUI | Введение в скриптинг GUI (графический пользовательский интерфейс)]]<br />
* [[RU/Debugging| Руководство по отладке]] - Как найти ошибки в ваших скриптах.<br />
* [[RU/MTA Classes | Классы MTA]] - Детальные описания всех специфических типов MTA<br />
** [[RU/Element|MTA Элементы]] / [[RU/Element tree | Дерево элементов]]<br />
* [[RU/Resources| Введение в ресурсы]]<br />
** [[RU/Resource Web Access | Ресурс Web Access]]<br />
** [[:Category:RU/Resource|Каталог ресурсов]]<br />
** [[RU/Meta.xml | Meta.xml]]<br />
* [[RU/Map_manager|Менеджер карт]]<br />
* [[RU/Introduction_to_Scripting_the_GUI|Введение в скриптинг пользовательских интерфейсов]]<br />
* [[RU/Writing_Gamemodes| Создание игровых режимов]]<br />
<br />
</div><br />
<br />
<div style="border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px;"><br />
<br />
====Базы данных====<br />
В этой секции описаны все возможности LUA, предоставляемые MTA и ресурсами.<br />
* [[:Category:RU/Resource|Каталог ресурсов]] - Изучите это, чтобы писать хорошие скрипты<br />
* [[RU/Client side scripts | Клиентские скрипты]]<br />
</div><br />
<div style="border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px;"><br />
<br />
====Основная помощь по Lua====<br />
Страницы, которые могут вам помочь в изучении LUA<br />
*[http://www.lua.ru/doc/ Руководство по программированию на Lua (русск.)] <br />
*[http://www.lua.org/pil/index.html Руководство по программированию на LUA (англ.)]<br />
*[http://lua-users.org/wiki/TutorialDirectory LUA Wiki (англ.)]<br />
*[http://nixstaller.berlios.de/manual/0.2/nixstaller_9.html Базовое руководство по Lua от Nixstaller (англ.)]<br />
*[http://gtascript.ru Портал по скриптингу. Строгая модерация.]<br />
</div><br />
<br />
<br />
| width="50%" style="vertical-align:top;" |<br />
<div style="border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px;"><br />
<br />
====Map Editor====<br />
*[[RU/Resource:Editor|Руководство]]<br />
*[[RU/Resource:Editor/EDF|Editor Definition Format]]<br />
*[[RU/Resource:Editor/Plugins|Плагины]]<br />
</div><br />
<br />
<div style="border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px; background:#CCCCFF;"><br />
<br />
====Описание====<br />
* [[RU/Client Scripting Functions|Функции, выполняемые на стороне клиента]]<br />
* [[RU/Client Scripting Events|События, генерируемые на стороне клиента]]<br />
* [[RU/Server Scripting Functions|Функции, выполняемые на стороне сервера]]<br />
* [[RU/Server Scripting Events|События, генерируемые на стороне сервера]]<br />
<!-- Incomplete * [[Module functions|Server-side external module scripting functions list]] --><br />
</div><br />
<br />
<div style="border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px;"><br />
<br />
====Список идентификаторов====<br />
*[[Animations|Анимации]]<br />
*[[RU/Character Skins | Скины персонажей]]<br />
*[[RU/CJ_Clothes|Одежда]]<br />
*[[RU/Garage|Идентификаторы гаражей]]<br />
*[[Interior IDs | Интерьеры]]<br />
*[[RU/Projectiles|Снаряды]]<br />
*[[RU/Radar_blips|Метки радара]]<br />
*[[RU/Sounds|Звуки]]<br />
*[[RU/Vehicle IDs|Транспорт]]<br />
*[[RU/Vehicle_colors|Цвета транспорта]]<br />
*[[RU/Vehicle Upgrades|Апгрейды транспорта]]<br />
*[[RU/Weapons|Оружие]]<br />
*[[RU/Weather|Погода]]<br />
</div><br />
<br />
|-<br />
| colspan="2" |<br />
|}<br />
[[pl:Main Page]]<br />
[[en:Main Page]]<br />
[[es:Pagina Principal]]<br />
[[it:Pagina principale]]<br />
[[nl:Main Page]]<br />
[[de:Hauptseite]]</div>D0lph1nhttps://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&diff=20535Главная страница2009-07-11T11:41:51Z<p>D0lph1n: </p>
<hr />
<div>__NOTOC__<br />
<div style="float:left;"><div style="float:right;">[[Image:Scripting.jpg]]</div>Добро пожаловать в Wiki разработчиков Multi Theft Auto: San Andreas Deathmatch. <br />
Здесь вы найдёте информацию по разработке игровых модов и карт для Multi Theft Auto.<br />
<br />
Есть много [[RU/How you can help|способов помочь нам]] сделать MTA лучше - создать карту, игровой режим, добавить описание функции скриптинга, написать пример кода, руководство, или просто играть в MTA и сообщать о найденых багах на форум.<br />
<br />
Пожалуйста, отнеситесь с пониманием к неизбежному появлению ошибок и помните, что многие вещи еще не сделаны до конца!<br />
<br />
Если у вас есть какие-либо вопросы по скриптингу, вы можете задать их в нашем [[IRC Channel |IRC канале]].<br />
<br />
'''Для редактирования статей вам понадобится [http://community.mtasa.com/ MTA Community] аккаунт.'''<br />
Пожалуйста зарегистрируйтесь на сайте [http://community.mtasa.com MTA Community] и используйте полученные логин/пароль для авторизации здесь. Акты вандализма будут караться баном вашего аккаунта.<br />
<br />
Теперь Wiki поддерживает инструмент '''[http://gears.google.com/ Google Gears]''', позволяющий вам просматривать статьи оффлайн. Для этого установите Google Gears и кликните по ссылке Go Offline в нижней части страницы. Будьте готовы к тому, что скачивание всех страниц может занять до часа(!), когда загрузка будет завершена, вы увидите сообщение об этом рядом с той ссылкой. После этого вы сможете переключить ваш браузер в оффлайн режим, или просто отключить интернет, и просматривать вики дальше.<br />
<br />
<div style="border: 2px dotted navy; padding: 4px; margin: 10px">Последняя стабильная версия '''Multi Theft Auto: San Andreas Deathmatch''' - '''{{Current Version|full}}'''. Посетите [http://mtasa.com/dp.html эту страницу] для её скачивания. Также вы можете скачать ночные [http://nightly.mtasa.com сборки для разработчиков], чтобы использовать последние нововведения.</div><br />
<br />
</div><br />
<br />
<div style="clear:both;"></div><br />
{| width="100%" cellspacing="0" cellpadding="0"<br />
| colspan="2" |<br />
<br />
|-<br />
| width="50%" style="vertical-align:top;" |<br />
<div style="border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px;"><br />
====Начало====<br />
<br />
* [[RU/Deathmatch_Client_Manual|Руководство по клиентской части MTA]]<br />
* [[RU/Deathmatch_Server_Manual|Руководство по серверной части MTA]]<br />
* [[RU/Known_Issues_-_FAQ|Известные проблемы MTA:SA DM]]<br />
* [[RU/Scripting Introduction|Введение в скриптинг]]<br />
* [[RU/Introduction to Scripting the GUI | Введение в скриптинг GUI (графический пользовательский интерфейс)]]<br />
* [[RU/Debugging| Руководство по отладке]] - Как найти ошибки в ваших скриптах.<br />
* [[RU/MTA Classes | Классы MTA]] - Детальные описания всех специфических типов MTA<br />
** [[RU/Element|MTA Элементы]] / [[RU/Element tree | Дерево элементов]]<br />
* [[RU/Resources| Введение в ресурсы]]<br />
** [[RU/Resource Web Access | Ресурс Web Access]]<br />
** [[:Category:RU/Resource|Каталог ресурсов]]<br />
** [[RU/Meta.xml | Meta.xml]]<br />
* [[RU/Map_manager|Менеджер карт]]<br />
* [[RU/Introduction_to_Scripting_the_GUI|Введение в скриптинг пользовательских интерфейсов]]<br />
* [[RU/Writing_Gamemodes| Создание игровых режимов]]<br />
<br />
</div><br />
<br />
<div style="border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px;"><br />
<br />
====Базы данных====<br />
В этой секции описаны все возможности LUA, предоставляемые MTA и ресурсами.<br />
* [[:Category:RU/Resource|Каталог ресурсов]] - Изучите это, чтобы писать хорошие скрипты<br />
* [[RU/Client side scripts | Клиентские скрипты]]<br />
</div><br />
<div style="border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px;"><br />
<br />
====Основная помощь по Lua====<br />
Страницы, которые могут вам помочь в изучении LUA<br />
*[http://www.lua.ru/doc/ Руководство по программированию на Lua (русск.)] <br />
*[http://www.lua.org/pil/index.html Руководство по программированию на LUA (англ.)]<br />
*[http://lua-users.org/wiki/TutorialDirectory LUA Wiki (англ.)]<br />
*[http://nixstaller.berlios.de/manual/0.2/nixstaller_9.html Базовое руководство по Lua от Nixstaller (англ.)]<br />
*[http://gtascript.ru Портал по скриптингу. Строгая модерация.]<br />
</div><br />
<br />
<br />
| width="50%" style="vertical-align:top;" |<br />
<div style="border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px;"><br />
<br />
====Map Editor====<br />
*[[RU/Resource:Editor|Руководство]]<br />
*[[RU/Resource:Editor/EDF|Editor Definition Format]]<br />
*[[RU/Resource:Editor/Plugins|Плагины]]<br />
</div><br />
<br />
<div style="border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px; background:#CCCCFF;"><br />
<br />
====Описание====<br />
* [[RU/Client Scripting Functions|Функции, выполняемые на стороне клиента]]<br />
* [[RU/Client Scripting Events|События, генерируемые на стороне клиента]]<br />
* [[RU/Server Scripting Functions|Функции, выполняемые на стороне сервера]]<br />
* [[RU/Server Scripting Events|События, генерируемые на стороне сервера]]<br />
<!-- Incomplete * [[Module functions|Server-side external module scripting functions list]] --><br />
</div><br />
<br />
<div style="border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px;"><br />
<br />
====Список идентификаторов====<br />
*[[Animations|Анимации]]<br />
*[[RU/Character Skins | Скины персонажей]]<br />
*[[RU/CJ_Clothes|Одежда]]<br />
*[[RU/Garage|Идентификаторы гаражей]]<br />
*[[Interior IDs | Интерьеры]]<br />
*[[RU/Projectiles|Снаряды]]<br />
*[[RU/Radar_blips|Метки радара]]<br />
*[[RU/Sounds|Звуки]]<br />
*[[RU/Vehicle IDs|Транспорт]]<br />
*[[RU/Vehicle_colors|Цвета транспорта]]<br />
*[[RU/Vehicle Upgrades|Апгрейды транспорта]]<br />
*[[RU/Weapons|Оружие]]<br />
*[[RU/Weather|Погода]]<br />
</div><br />
<br />
|-<br />
| colspan="2" |<br />
|}<br />
[[pl:Main Page]]<br />
[[en:Main Page]]<br />
[[it:Pagina principale]]<br />
[[nl:Main Page]]<br />
[[de:Hauptseite]]</div>D0lph1nhttps://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&diff=20534Главная страница2009-07-11T11:39:54Z<p>D0lph1n: </p>
<hr />
<div>{{DISPLAYTITLE:Главная страница}}<br />
__NOTOC__<br />
<div style="float:left;"><div style="float:right;">[[Image:Scripting.jpg]]</div>Добро пожаловать в Wiki разработчиков Multi Theft Auto: San Andreas Deathmatch. <br />
Здесь вы найдёте информацию по разработке игровых модов и карт для Multi Theft Auto.<br />
<br />
Есть много [[RU/How you can help|способов помочь нам]] сделать MTA лучше - создать карту, игровой режим, добавить описание функции скриптинга, написать пример кода, руководство, или просто играть в MTA и сообщать о найденых багах на форум.<br />
<br />
Пожалуйста, отнеситесь с пониманием к неизбежному появлению ошибок и помните, что многие вещи еще не сделаны до конца!<br />
<br />
Если у вас есть какие-либо вопросы по скриптингу, вы можете задать их в нашем [[IRC Channel |IRC канале]].<br />
<br />
'''Для редактирования статей вам понадобится [http://community.mtasa.com/ MTA Community] аккаунт.'''<br />
Пожалуйста зарегистрируйтесь на сайте [http://community.mtasa.com MTA Community] и используйте полученные логин/пароль для авторизации здесь. Акты вандализма будут караться баном вашего аккаунта.<br />
<br />
Теперь Wiki поддерживает инструмент '''[http://gears.google.com/ Google Gears]''', позволяющий вам просматривать статьи оффлайн. Для этого установите Google Gears и кликните по ссылке Go Offline в нижней части страницы. Будьте готовы к тому, что скачивание всех страниц может занять до часа(!), когда загрузка будет завершена, вы увидите сообщение об этом рядом с той ссылкой. После этого вы сможете переключить ваш браузер в оффлайн режим, или просто отключить интернет, и просматривать вики дальше.<br />
<br />
<div style="border: 2px dotted navy; padding: 4px; margin: 10px">Последняя стабильная версия '''Multi Theft Auto: San Andreas Deathmatch''' - '''{{Current Version|full}}'''. Посетите [http://mtasa.com/dp.html эту страницу] для её скачивания. Также вы можете скачать ночные [http://nightly.mtasa.com сборки для разработчиков], чтобы использовать последние нововведения.</div><br />
<br />
</div><br />
<br />
<div style="clear:both;"></div><br />
{| width="100%" cellspacing="0" cellpadding="0"<br />
| colspan="2" |<br />
<br />
|-<br />
| width="50%" style="vertical-align:top;" |<br />
<div style="border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px;"><br />
====Начало====<br />
<br />
* [[RU/Deathmatch_Client_Manual|Руководство по клиентской части MTA]]<br />
* [[RU/Deathmatch_Server_Manual|Руководство по серверной части MTA]]<br />
* [[RU/Known_Issues_-_FAQ|Известные проблемы MTA:SA DM]]<br />
* [[RU/Scripting Introduction|Введение в скриптинг]]<br />
* [[RU/Introduction to Scripting the GUI | Введение в скриптинг GUI (графический пользовательский интерфейс)]]<br />
* [[RU/Debugging| Руководство по отладке]] - Как найти ошибки в ваших скриптах.<br />
* [[RU/MTA Classes | Классы MTA]] - Детальные описания всех специфических типов MTA<br />
** [[RU/Element|MTA Элементы]] / [[RU/Element tree | Дерево элементов]]<br />
* [[RU/Resources| Введение в ресурсы]]<br />
** [[RU/Resource Web Access | Ресурс Web Access]]<br />
** [[:Category:RU/Resource|Каталог ресурсов]]<br />
** [[RU/Meta.xml | Meta.xml]]<br />
* [[RU/Map_manager|Менеджер карт]]<br />
* [[RU/Introduction_to_Scripting_the_GUI|Введение в скриптинг пользовательских интерфейсов]]<br />
* [[RU/Writing_Gamemodes| Создание игровых режимов]]<br />
<br />
</div><br />
<br />
<div style="border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px;"><br />
<br />
====Базы данных====<br />
В этой секции описаны все возможности LUA, предоставляемые MTA и ресурсами.<br />
* [[:Category:RU/Resource|Каталог ресурсов]] - Изучите это, чтобы писать хорошие скрипты<br />
* [[RU/Client side scripts | Клиентские скрипты]]<br />
</div><br />
<div style="border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px;"><br />
<br />
====Основная помощь по Lua====<br />
Страницы, которые могут вам помочь в изучении LUA<br />
*[http://www.lua.ru/doc/ Руководство по программированию на Lua (русск.)] <br />
*[http://www.lua.org/pil/index.html Руководство по программированию на LUA (англ.)]<br />
*[http://lua-users.org/wiki/TutorialDirectory LUA Wiki (англ.)]<br />
*[http://nixstaller.berlios.de/manual/0.2/nixstaller_9.html Базовое руководство по Lua от Nixstaller (англ.)]<br />
*[http://gtascript.ru Портал по скриптингу. Строгая модерация.]<br />
</div><br />
<br />
<br />
| width="50%" style="vertical-align:top;" |<br />
<div style="border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px;"><br />
<br />
====Map Editor====<br />
*[[RU/Resource:Editor|Руководство]]<br />
*[[RU/Resource:Editor/EDF|Editor Definition Format]]<br />
*[[RU/Resource:Editor/Plugins|Плагины]]<br />
</div><br />
<br />
<div style="border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px; background:#CCCCFF;"><br />
<br />
====Описание====<br />
* [[RU/Client Scripting Functions|Функции, выполняемые на стороне клиента]]<br />
* [[RU/Client Scripting Events|События, генерируемые на стороне клиента]]<br />
* [[RU/Server Scripting Functions|Функции, выполняемые на стороне сервера]]<br />
* [[RU/Server Scripting Events|События, генерируемые на стороне сервера]]<br />
<!-- Incomplete * [[Module functions|Server-side external module scripting functions list]] --><br />
</div><br />
<br />
<div style="border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px;"><br />
<br />
====Список идентификаторов====<br />
*[[Animations|Анимации]]<br />
*[[RU/Character Skins | Скины персонажей]]<br />
*[[RU/CJ_Clothes|Одежда]]<br />
*[[RU/Garage|Идентификаторы гаражей]]<br />
*[[Interior IDs | Интерьеры]]<br />
*[[RU/Projectiles|Снаряды]]<br />
*[[RU/Radar_blips|Метки радара]]<br />
*[[RU/Sounds|Звуки]]<br />
*[[RU/Vehicle IDs|Транспорт]]<br />
*[[RU/Vehicle_colors|Цвета транспорта]]<br />
*[[RU/Vehicle Upgrades|Апгрейды транспорта]]<br />
*[[RU/Weapons|Оружие]]<br />
*[[RU/Weather|Погода]]<br />
</div><br />
<br />
|-<br />
| colspan="2" |<br />
|}<br />
[[pl:Main Page]]<br />
[[en:Main Page]]<br />
[[it:Pagina principale]]<br />
[[nl:Main Page]]<br />
[[de:Hauptseite]]</div>D0lph1nhttps://wiki.multitheftauto.com/index.php?title=Talk:%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&diff=20506Talk:Главная страница2009-07-09T19:51:40Z<p>D0lph1n: </p>
<hr />
<div>Страницу восстановил, ошибка, по-видимому, возникала из-за какой-то ссылки на странице. Думаю, из-за того, что страницу не поддерживали в актуальном состоянии, т.к. с польской страницей то же самое.<br />
[[User:D0lph1n|D0lph1n]] 13:54, 11 April 2009 (CEST)<br />
<br />
Некоторые страницы типо этой надо было б озаглавливать русскими буквами типо "Главная страница"<br />
[[User:Enterprise|Enterprise]] 13:58, 9 July 2009<br />
<br />
<br />
Нельзя, можно только латинский алфавит использовать, иначе ошибки будут<br />
PS Для подписи используются 4 тильды (автоматически подставит ник и время) [[User:D0lph1n|D0lph1N]] 21:51, 9 July 2009 (CEST)</div>D0lph1nhttps://wiki.multitheftauto.com/index.php?title=RU/Debugging&diff=20361RU/Debugging2009-07-05T10:29:38Z<p>D0lph1n: </p>
<hr />
<div>{{translate}}<br />
При написании скриптов вы обязательно столкнетесь с проблемами, которые не сможете решить немедленно. Цель этой страницы - показать вам основные способыы нахождения ошибок.<br />
<br />
==Консоль отладки==<br />
MTA включает консоль, которая показывает отладочные сообщения, выводимые функциями MTA и скриптами. Вы можете открыть ее введя ''debugscript x'' в консоли, где ''x'' уровень отладки:<br />
* '''1:''' только ошибки<br />
* '''2:''' ошибки и предупреждения<br />
* '''3:''' ошибки, предупреждения и информационные сообщения<br />
Так, введя ''debugscript 3'', вы будете видеть все сообщения, этот или 2 уровень рекомендуется в большинстве случаев. Рекомендуем держать debugscript включенным всё время, пока вы тестируете свой скрипт, это поможет вам обнаружить мелкие ошибки и исправить их.<br />
<br />
===Пример===<br />
Этот участок кода содержит две ошибки:<br />
<syntaxhighlight lang="lua"><br />
if (getClientName(player) == "Fedor")<br />
outputChatbox("Hello Fedor")<br />
end<br />
</syntaxhighlight><br />
При попытке запуска скрипта, содержащего этот участо кода, debugscript выведет что-то похожее на:<br />
{{Debug info|Loading script failed: C:\<server path>\mods\deathmatch\resources\myResource\script.lua:15: 'then' expected near ´outputChatbox'}}<br />
Это означает, что скрипт не может быть обработан из-за синтаксической ошибки. Показывается путь к скрипту, поэтому вы можете увидеть, какому ресурсу он принадлежит, ('myResource' в данном случае) и, конечно же, имя скрипта. После имени файла показан номер строки и информация об ошибке. Теперь проблема легко решается, мы просто забыли написать ключевое слово 'then':<br />
<syntaxhighlight lang="lua"><br />
if (getClientName(player) == "Fedor") then<br />
outputChatbox("Hello Fedor")<br />
end<br />
</syntaxhighlight><br />
Теперь скрипт загрузится нормально и не будет выводить ошибок пока не выполнится для игрока с ником 'Fedor'. Тогда debugscript выведет:<br />
{{Debug error|C:\<server path>\mods\deathmatch\resources\d\script.lua:15: attempt to call global 'outputChatbox' (a nil value)}}<br />
This means the called function does not exist, which can be easily explained since the functions' name is ''outputChatBox'' (with a capital ''B''):<br />
<syntaxhighlight lang="lua"><br />
if (getClientName(player) == "Fedor") then<br />
outputChatBox("Hello Fedor")<br />
end<br />
</syntaxhighlight><br />
<br />
Конечно, это просто пример, есть множество других сообщений и сценариев.<br />
<br />
==Debug logging==<br />
You can also turn debug message logging on by editing ''coreconfig.xml'' in your GTA\MTA folder. You should find the following tag:<br />
<syntaxhighlight lang="xml"><debugfile/></syntaxhighlight><br />
<br />
Replace that with a tag specifying the file you want to log messages to (file path is relative from the GTA folder):<br />
<syntaxhighlight lang="xml"><debugfile>MTA\debugscript.log</debugfile></syntaxhighlight><br />
<br />
All debug messages will be appended to the specified file from now on. To turn logging off, replace that line with an empty tag again.<br />
<br />
==Debug strategies==<br />
There are several strategies that support finding errors, apart from going through the code of course. Most of them include outputting debug messages, with differing information depending on the situtation.<br />
<br />
===Useful functions===<br />
First of all some functions that may come in handy for debugging.<br />
* [[outputDebugString]] or [[outputChatBox]] for outputting any information<br />
* [http://www.lua.org/manual/5.1/manual.html#pdf-tostring tostring()] on a variable to turn it into a string, for example when it contains a boolean value<br />
* [[getElementType]] to check an MTA Element for its type<br />
<br />
===Add debugmessages to check ''if'', ''when'' or ''how often'' a section of code is executed===<br />
A typical example would be verify whether an ''if''-section is executed or not. To do that, just add any message you will recognize later within the ''if''-section.<br />
<syntaxhighlight lang="lua"><br />
if (variable1 == variable2) then<br />
outputDebugString("entered if")<br />
-- do anything<br />
end<br />
</syntaxhighlight><br />
<br />
Another application would be to check when variable values are modified. First search for all occurences of the variable being edited and add a message just beside it.<br />
<br />
===Add debugmessages to check the ''value'' of a variable===<br />
Let's say you want to create a marker, but it doesn't appear at the position you expect it to be. The first thing you might want to do is check if the [[createMarker]] function is executed. But while doing this, you can also check the values being used in the [[createMarker]] function in one run.<br />
<syntaxhighlight lang="lua"><br />
outputChatBox(tostring(x).." "..tostring(y).." "..tostring(z))<br />
createMarker(x,y,z)<br />
</syntaxhighlight><br />
This would output all three variables that are used as coordinates for the marker. Assuming you read those from a map file, you can now compare the debug output to the desired values. The [http://www.lua.org/manual/5.1/manual.html#pdf-tostring tostring()] will ensure that the variables' value can be put together as a string, even if it's a boolean value for example.<br />
<br />
==Example==<br />
Imagine you created a colshape (collision shape) somewhere and you want a player to stay 10 seconds in it, then perform some action.<br />
<syntaxhighlight lang="lua"><br />
function colShapeHit(player)<br />
-- set a timer to output a message (could as well execute another function)<br />
-- store the timer id in a table, using the player as index<br />
colshapeTimer[player] = setTimer(outputChatBox,10000,1,"The player stayed 10 seconds in the colshape!")<br />
end<br />
addEventHandler("onColShapeHit",getRootElement(),colShapeHit)<br />
<br />
function colShapeLeave(player)<br />
-- kill the timer when the player leaves the colshape<br />
killTimer(colshapeTimer[player])<br />
end<br />
addEventHandler("onColShapeLeave",getRootElement(),colShapeLeave)<br />
</syntaxhighlight><br />
When a player enters the colshape, debugscript outputs the following message:<br />
{{Debug error|..[path]: attempt to index global 'colshapeTimer' (a nil value)}}<br />
This means you tried to index a table that does not exist. In the example above, this is done when storing the timer id in the table. We need to add a check if the table exists and if not create it.<br />
<br />
<syntaxhighlight lang="lua"><br />
function colShapeHit(player)<br />
if (colshapeTimer == nil) then<br />
colshapeTimer = {}<br />
end<br />
-- set a timer to output a message (could as well execute another function)<br />
-- store the timer id in a table, using the player as index<br />
colshapeTimer[player] = setTimer(outputChatBox,10000,1,"The player stayed 10 seconds in the colshape!")<br />
end<br />
addEventHandler("onColShapeHit",getRootElement(),colShapeHit)<br />
<br />
function colShapeLeave(player)<br />
-- kill the timer when the player leaves the colshape<br />
killTimer(colshapeTimer[player])<br />
end<br />
addEventHandler("onColShapeLeave",getRootElement(),colShapeLeave)<br />
</syntaxhighlight><br />
<br />
Now we still get a warning when a player enters the colshape, waits for the message and leaves it again:<br />
<br />
{{Debug warning|[..]: Bad argument @ 'killTimer' Line: ..}}<br />
<br />
Except for that (we will talk about that later) everything seems to work fine. A player enters the colshape, the timer is started, if he stays the message occurs, if he leaves the timer is killed.<br />
<br />
===A more inconspicuous error===<br />
But for some reason the message gets outputted twice when you stay in the colcircle while in a vehicle. Since it would appear some code is executed twice, we add debug messages to check this.<br />
<br />
<syntaxhighlight lang="lua"><br />
function colShapeHit(player)<br />
if (colshapeTimer == nil) then<br />
colshapeTimer = {}<br />
end<br />
-- add a debug message<br />
outputDebugString("colShapeHit")<br />
-- set a timer to output a message (could as well execute another function)<br />
-- store the timer id in a table, using the player as index<br />
colshapeTimer[player] = setTimer(outputChatBox,10000,1,"The player stayed 10 seconds in the colshape!")<br />
end<br />
addEventHandler("onColShapeHit",getRootElement(),colShapeHit)<br />
<br />
function colShapeLeave(player)<br />
-- add a debug message<br />
outputDebugString("colShapeLeave")<br />
-- kill the timer when the player leaves the colshape<br />
killTimer(colshapeTimer[player])<br />
end<br />
addEventHandler("onColShapeLeave",getRootElement(),colShapeLeave)<br />
</syntaxhighlight><br />
<br />
Now we notice that both handler functions get executed twice when we are in a vehicle, but only once when we are on-foot. It would appear the vehicle triggers the colshape as well. To confirm this theory, we check the ''player'' variable that '''should''' contain a player element.<br />
<br />
<syntaxhighlight lang="lua"><br />
function colShapeHit(player)<br />
if (colshapeTimer == nil) then<br />
colshapeTimer = {}<br />
end<br />
-- add a debug message, with the element type<br />
outputDebugString("colShapeHit "..getElementType(player))<br />
-- set a timer to output a message (could as well execute another function)<br />
-- store the timer id in a table, using the player as index<br />
colshapeTimer[player] = setTimer(outputChatBox,10000,1,"The player stayed 10 seconds in the colshape!")<br />
end<br />
addEventHandler("onColShapeHit",getRootElement(),colShapeHit)<br />
<br />
function colShapeLeave(player)<br />
-- add a debug message, with the element type<br />
outputDebugString("colShapeLeave "..getElementType(player))<br />
-- kill the timer when the player leaves the colshape<br />
killTimer(colshapeTimer[player])<br />
end<br />
addEventHandler("onColShapeLeave",getRootElement(),colShapeLeave)<br />
</syntaxhighlight><br />
<br />
The debug messages tell us that one of the ''player'' variables is a player, the other one a vehicle element. Since we only want to react when a player enters the colshape, we add an ''if'' that will end the execution of the function if it's '''not''' an player element.<br />
<br />
<syntaxhighlight lang="lua"><br />
function colShapeHit(player)<br />
if (colshapeTimer == nil) then<br />
colshapeTimer = {}<br />
end<br />
-- add a check for the element type<br />
if (getElementType(player) ~= "player") then return end<br />
-- add a debug message, with the element type<br />
outputDebugString("colShapeHit "..getElementType(player))<br />
-- set a timer to output a message (could as well execute another function)<br />
-- store the timer id in a table, using the player as index<br />
colshapeTimer[player] = setTimer(outputChatBox,10000,1,"The player stayed 10 seconds in the colshape!")<br />
end<br />
addEventHandler("onColShapeHit",getRootElement(),colShapeHit)<br />
<br />
function colShapeLeave(player)<br />
-- add a check for the element type<br />
if (getElementType(player) ~= "player") then return end<br />
-- add a debug message, with the element type<br />
outputDebugString("colShapeLeave "..getElementType(player))<br />
-- kill the timer when the player leaves the colshape<br />
killTimer(colshapeTimer[player])<br />
end<br />
addEventHandler("onColShapeLeave",getRootElement(),colShapeLeave)<br />
</syntaxhighlight><br />
<br />
Now the script should work as desired, but will still output the warning mentioned above. This happens because the timer we try to kill when a player leaves the colshape will not exist anymore when it reached the 10 seconds and is executed. There are different ways to get rid of that warning (since you know that the timer might not exist anymore and you only want to kill it if it is there). One way would be to check if the timer referenced in the table really exists. To do this, we need a little help function:<br />
<syntaxhighlight lang="lua"><br />
function isTimer(timer)<br />
local timers = getTimers()<br />
for k,v in ipairs(timers) do<br />
if (v == timer) then<br />
return true<br />
end<br />
end<br />
return false<br />
end<br />
</syntaxhighlight><br />
Which we will use when we kill the timer:<br />
<syntaxhighlight lang="lua"><br />
if (isTimer(colshapeTimer[player])) then<br />
killTimer(colshapeTimer[player])<br />
end<br />
</syntaxhighlight><br />
<br />
So the complete working code would be:<br />
<syntaxhighlight lang="lua"><br />
function colShapeHit(player)<br />
if (colshapeTimer == nil) then<br />
colshapeTimer = {}<br />
end<br />
-- add a check for the element type<br />
if (getElementType(player) ~= "player") then return end<br />
-- add a debug message, with the element type<br />
outputDebugString("colShapeHit "..getElementType(player))<br />
-- set a timer to output a message (could as well execute another function)<br />
-- store the timer id in a table, using the player as index<br />
colshapeTimer[player] = setTimer(outputChatBox,10000,1,"The player stayed 10 seconds in the colshape!")<br />
end<br />
addEventHandler("onColShapeHit",getRootElement(),colShapeHit)<br />
<br />
function colShapeLeave(player)<br />
-- add a check for the element type<br />
if (getElementType(player) ~= "player") then return end<br />
-- add a debug message, with the element type<br />
outputDebugString("colShapeLeave "..getElementType(player))<br />
-- kill the timer when the player leaves the colshape<br />
if (isTimer(colshapeTimer[player])) then<br />
killTimer(colshapeTimer[player])<br />
end<br />
end<br />
addEventHandler("onColShapeLeave",getRootElement(),colShapeLeave)<br />
<br />
function isTimer(timer)<br />
local timers = getTimers()<br />
for k,v in ipairs(timers) do<br />
if (v == timer) then<br />
return true<br />
end<br />
end<br />
return false<br />
end<br />
</syntaxhighlight><br />
<br />
[[it:Guida al Debug]]<br />
[[Category:Scripting Concepts]]</div>D0lph1nhttps://wiki.multitheftauto.com/index.php?title=RU/Projectiles&diff=20360RU/Projectiles2009-07-05T10:08:52Z<p>D0lph1n: </p>
<hr />
<div>** '''16:''' Гранаты<br />
** '''17:''' Газовые гранаты<br />
** '''18:''' Коктейль Молотова<br />
** '''19:''' РПГ<br />
** '''20:''' Самонаводящаяся ракета<br />
** '''21:''' Air Bomb<br />
** '''39:''' Взрывпакет<br />
<br />
<noinclude>[[it:Esplosivi]]</noinclude></div>D0lph1nhttps://wiki.multitheftauto.com/index.php?title=RU/Debugging&diff=20316RU/Debugging2009-07-01T15:12:54Z<p>D0lph1n: Translation started</p>
<hr />
<div>{{translate}}<br />
При написании скриптов вы обязательно столкнетесь с проблемами, которые не сможете решить немедленно. Цель этой страницы - показать вам основные способыы нахождения ошибок.<br />
<br />
==Консоль отладки==<br />
MTA включает консоль, которая показывает отладочные сообщения, выводимые функциями MTA и скриптами. Вы можете открыть ее введя ''debugscript x'' в консоли, где ''x'' уровень отладки:<br />
* '''1:''' только ошибки<br />
* '''2:''' ошибки и предупреждения<br />
* '''3:''' ошибки, предупреждения и информационные сообщения<br />
Так, введя ''debugscript 3'', вы будете видеть все сообщения, этот или 2 уровень рекомендуется в большинстве случаев. Рекомендуем держать debugscript включенным всё время, пока вы тестируете свой скрипт, это поможет вам обнаружить мелкие ошибки и исправить их.<br />
<br />
===Example===<br />
This example snippet has two errors:<br />
<syntaxhighlight lang="lua"><br />
if (getClientName(player) == "Fedor")<br />
outputChatbox("Hello Fedor")<br />
end<br />
</syntaxhighlight><br />
When the script this piece of code is in is tried to be loaded, debugscript will output something similiar to this:<br />
{{Debug info|Loading script failed: C:\<server path>\mods\deathmatch\resources\myResource\script.lua:15: 'then' expected near ´outputChatbox'}}<br />
This means the script could not be parsed, because there was a syntax error. It shows the path of the script, so you can also see what resource it is in ('myResource' in this case) and of course the name of the script. After the filename it shows the line number and again after that what was wrong. Easy to solve now, we just forgot the 'then' keyword:<br />
<syntaxhighlight lang="lua"><br />
if (getClientName(player) == "Fedor") then<br />
outputChatbox("Hello Fedor")<br />
end<br />
</syntaxhighlight><br />
Now the script will load fine and won't output any errors, until a player with the name 'Fedor' enters this section of the script. Then, debugscript will output:<br />
{{Debug error|C:\<server path>\mods\deathmatch\resources\d\script.lua:15: attempt to call global 'outputChatbox' (a nil value)}}<br />
This means the called function does not exist, which can be easily explained since the functions' name is ''outputChatBox'' (with a capital ''B''):<br />
<syntaxhighlight lang="lua"><br />
if (getClientName(player) == "Fedor") then<br />
outputChatBox("Hello Fedor")<br />
end<br />
</syntaxhighlight><br />
<br />
This is of course just an example, there are plenty of other messages and scenarios, but you should get the idea.<br />
<br />
==Debug logging==<br />
You can also turn debug message logging on by editing ''coreconfig.xml'' in your GTA\MTA folder. You should find the following tag:<br />
<syntaxhighlight lang="xml"><debugfile/></syntaxhighlight><br />
<br />
Replace that with a tag specifying the file you want to log messages to (file path is relative from the GTA folder):<br />
<syntaxhighlight lang="xml"><debugfile>MTA\debugscript.log</debugfile></syntaxhighlight><br />
<br />
All debug messages will be appended to the specified file from now on. To turn logging off, replace that line with an empty tag again.<br />
<br />
==Debug strategies==<br />
There are several strategies that support finding errors, apart from going through the code of course. Most of them include outputting debug messages, with differing information depending on the situtation.<br />
<br />
===Useful functions===<br />
First of all some functions that may come in handy for debugging.<br />
* [[outputDebugString]] or [[outputChatBox]] for outputting any information<br />
* [http://www.lua.org/manual/5.1/manual.html#pdf-tostring tostring()] on a variable to turn it into a string, for example when it contains a boolean value<br />
* [[getElementType]] to check an MTA Element for its type<br />
<br />
===Add debugmessages to check ''if'', ''when'' or ''how often'' a section of code is executed===<br />
A typical example would be verify whether an ''if''-section is executed or not. To do that, just add any message you will recognize later within the ''if''-section.<br />
<syntaxhighlight lang="lua"><br />
if (variable1 == variable2) then<br />
outputDebugString("entered if")<br />
-- do anything<br />
end<br />
</syntaxhighlight><br />
<br />
Another application would be to check when variable values are modified. First search for all occurences of the variable being edited and add a message just beside it.<br />
<br />
===Add debugmessages to check the ''value'' of a variable===<br />
Let's say you want to create a marker, but it doesn't appear at the position you expect it to be. The first thing you might want to do is check if the [[createMarker]] function is executed. But while doing this, you can also check the values being used in the [[createMarker]] function in one run.<br />
<syntaxhighlight lang="lua"><br />
outputChatBox(tostring(x).." "..tostring(y).." "..tostring(z))<br />
createMarker(x,y,z)<br />
</syntaxhighlight><br />
This would output all three variables that are used as coordinates for the marker. Assuming you read those from a map file, you can now compare the debug output to the desired values. The [http://www.lua.org/manual/5.1/manual.html#pdf-tostring tostring()] will ensure that the variables' value can be put together as a string, even if it's a boolean value for example.<br />
<br />
==Example==<br />
Imagine you created a colshape (collision shape) somewhere and you want a player to stay 10 seconds in it, then perform some action.<br />
<syntaxhighlight lang="lua"><br />
function colShapeHit(player)<br />
-- set a timer to output a message (could as well execute another function)<br />
-- store the timer id in a table, using the player as index<br />
colshapeTimer[player] = setTimer(outputChatBox,10000,1,"The player stayed 10 seconds in the colshape!")<br />
end<br />
addEventHandler("onColShapeHit",getRootElement(),colShapeHit)<br />
<br />
function colShapeLeave(player)<br />
-- kill the timer when the player leaves the colshape<br />
killTimer(colshapeTimer[player])<br />
end<br />
addEventHandler("onColShapeLeave",getRootElement(),colShapeLeave)<br />
</syntaxhighlight><br />
When a player enters the colshape, debugscript outputs the following message:<br />
{{Debug error|..[path]: attempt to index global 'colshapeTimer' (a nil value)}}<br />
This means you tried to index a table that does not exist. In the example above, this is done when storing the timer id in the table. We need to add a check if the table exists and if not create it.<br />
<br />
<syntaxhighlight lang="lua"><br />
function colShapeHit(player)<br />
if (colshapeTimer == nil) then<br />
colshapeTimer = {}<br />
end<br />
-- set a timer to output a message (could as well execute another function)<br />
-- store the timer id in a table, using the player as index<br />
colshapeTimer[player] = setTimer(outputChatBox,10000,1,"The player stayed 10 seconds in the colshape!")<br />
end<br />
addEventHandler("onColShapeHit",getRootElement(),colShapeHit)<br />
<br />
function colShapeLeave(player)<br />
-- kill the timer when the player leaves the colshape<br />
killTimer(colshapeTimer[player])<br />
end<br />
addEventHandler("onColShapeLeave",getRootElement(),colShapeLeave)<br />
</syntaxhighlight><br />
<br />
Now we still get a warning when a player enters the colshape, waits for the message and leaves it again:<br />
<br />
{{Debug warning|[..]: Bad argument @ 'killTimer' Line: ..}}<br />
<br />
Except for that (we will talk about that later) everything seems to work fine. A player enters the colshape, the timer is started, if he stays the message occurs, if he leaves the timer is killed.<br />
<br />
===A more inconspicuous error===<br />
But for some reason the message gets outputted twice when you stay in the colcircle while in a vehicle. Since it would appear some code is executed twice, we add debug messages to check this.<br />
<br />
<syntaxhighlight lang="lua"><br />
function colShapeHit(player)<br />
if (colshapeTimer == nil) then<br />
colshapeTimer = {}<br />
end<br />
-- add a debug message<br />
outputDebugString("colShapeHit")<br />
-- set a timer to output a message (could as well execute another function)<br />
-- store the timer id in a table, using the player as index<br />
colshapeTimer[player] = setTimer(outputChatBox,10000,1,"The player stayed 10 seconds in the colshape!")<br />
end<br />
addEventHandler("onColShapeHit",getRootElement(),colShapeHit)<br />
<br />
function colShapeLeave(player)<br />
-- add a debug message<br />
outputDebugString("colShapeLeave")<br />
-- kill the timer when the player leaves the colshape<br />
killTimer(colshapeTimer[player])<br />
end<br />
addEventHandler("onColShapeLeave",getRootElement(),colShapeLeave)<br />
</syntaxhighlight><br />
<br />
Now we notice that both handler functions get executed twice when we are in a vehicle, but only once when we are on-foot. It would appear the vehicle triggers the colshape as well. To confirm this theory, we check the ''player'' variable that '''should''' contain a player element.<br />
<br />
<syntaxhighlight lang="lua"><br />
function colShapeHit(player)<br />
if (colshapeTimer == nil) then<br />
colshapeTimer = {}<br />
end<br />
-- add a debug message, with the element type<br />
outputDebugString("colShapeHit "..getElementType(player))<br />
-- set a timer to output a message (could as well execute another function)<br />
-- store the timer id in a table, using the player as index<br />
colshapeTimer[player] = setTimer(outputChatBox,10000,1,"The player stayed 10 seconds in the colshape!")<br />
end<br />
addEventHandler("onColShapeHit",getRootElement(),colShapeHit)<br />
<br />
function colShapeLeave(player)<br />
-- add a debug message, with the element type<br />
outputDebugString("colShapeLeave "..getElementType(player))<br />
-- kill the timer when the player leaves the colshape<br />
killTimer(colshapeTimer[player])<br />
end<br />
addEventHandler("onColShapeLeave",getRootElement(),colShapeLeave)<br />
</syntaxhighlight><br />
<br />
The debug messages tell us that one of the ''player'' variables is a player, the other one a vehicle element. Since we only want to react when a player enters the colshape, we add an ''if'' that will end the execution of the function if it's '''not''' an player element.<br />
<br />
<syntaxhighlight lang="lua"><br />
function colShapeHit(player)<br />
if (colshapeTimer == nil) then<br />
colshapeTimer = {}<br />
end<br />
-- add a check for the element type<br />
if (getElementType(player) ~= "player") then return end<br />
-- add a debug message, with the element type<br />
outputDebugString("colShapeHit "..getElementType(player))<br />
-- set a timer to output a message (could as well execute another function)<br />
-- store the timer id in a table, using the player as index<br />
colshapeTimer[player] = setTimer(outputChatBox,10000,1,"The player stayed 10 seconds in the colshape!")<br />
end<br />
addEventHandler("onColShapeHit",getRootElement(),colShapeHit)<br />
<br />
function colShapeLeave(player)<br />
-- add a check for the element type<br />
if (getElementType(player) ~= "player") then return end<br />
-- add a debug message, with the element type<br />
outputDebugString("colShapeLeave "..getElementType(player))<br />
-- kill the timer when the player leaves the colshape<br />
killTimer(colshapeTimer[player])<br />
end<br />
addEventHandler("onColShapeLeave",getRootElement(),colShapeLeave)<br />
</syntaxhighlight><br />
<br />
Now the script should work as desired, but will still output the warning mentioned above. This happens because the timer we try to kill when a player leaves the colshape will not exist anymore when it reached the 10 seconds and is executed. There are different ways to get rid of that warning (since you know that the timer might not exist anymore and you only want to kill it if it is there). One way would be to check if the timer referenced in the table really exists. To do this, we need a little help function:<br />
<syntaxhighlight lang="lua"><br />
function isTimer(timer)<br />
local timers = getTimers()<br />
for k,v in ipairs(timers) do<br />
if (v == timer) then<br />
return true<br />
end<br />
end<br />
return false<br />
end<br />
</syntaxhighlight><br />
Which we will use when we kill the timer:<br />
<syntaxhighlight lang="lua"><br />
if (isTimer(colshapeTimer[player])) then<br />
killTimer(colshapeTimer[player])<br />
end<br />
</syntaxhighlight><br />
<br />
So the complete working code would be:<br />
<syntaxhighlight lang="lua"><br />
function colShapeHit(player)<br />
if (colshapeTimer == nil) then<br />
colshapeTimer = {}<br />
end<br />
-- add a check for the element type<br />
if (getElementType(player) ~= "player") then return end<br />
-- add a debug message, with the element type<br />
outputDebugString("colShapeHit "..getElementType(player))<br />
-- set a timer to output a message (could as well execute another function)<br />
-- store the timer id in a table, using the player as index<br />
colshapeTimer[player] = setTimer(outputChatBox,10000,1,"The player stayed 10 seconds in the colshape!")<br />
end<br />
addEventHandler("onColShapeHit",getRootElement(),colShapeHit)<br />
<br />
function colShapeLeave(player)<br />
-- add a check for the element type<br />
if (getElementType(player) ~= "player") then return end<br />
-- add a debug message, with the element type<br />
outputDebugString("colShapeLeave "..getElementType(player))<br />
-- kill the timer when the player leaves the colshape<br />
if (isTimer(colshapeTimer[player])) then<br />
killTimer(colshapeTimer[player])<br />
end<br />
end<br />
addEventHandler("onColShapeLeave",getRootElement(),colShapeLeave)<br />
<br />
function isTimer(timer)<br />
local timers = getTimers()<br />
for k,v in ipairs(timers) do<br />
if (v == timer) then<br />
return true<br />
end<br />
end<br />
return false<br />
end<br />
</syntaxhighlight><br />
<br />
[[it:Guida al Debug]]<br />
[[Category:Scripting Concepts]]</div>D0lph1nhttps://wiki.multitheftauto.com/index.php?title=RU/MTA_Classes&diff=20315RU/MTA Classes2009-07-01T14:57:51Z<p>D0lph1n: </p>
<hr />
<div>Чтобы производить операции над внутринними объектам MTA из скриптов, указатели на внутренние классы экспортируются как пользовательские данные в Lua. Каждый из этих классов экспортирует некоторое количество функций, связанных с ним.<br />
<br />
Полный список классов, которые вы можете использовать в скриптах:<br />
<br />
* [[account|Account]]<br />
* [[acl|ACL]]<br />
* [[aclgroup|ACL group]]<br />
* [[Ban]]<br />
* [[element|Element]]<br />
<ul>{{Elements}}</ul><br />
* [[resource|Resource]]<br />
* [[textdisplay|Text display]]<br />
* [[textitem|Text item]]<br />
* [[timer|Timer]]<br />
* [[xmlnode|XML node]]<br />
[[Category:Scripting Concepts]]<br />
[[en:MTA Classes]]<br />
[[it:Classi di MTA]]</div>D0lph1nhttps://wiki.multitheftauto.com/index.php?title=RU/MTA_Classes&diff=20314RU/MTA Classes2009-07-01T14:57:12Z<p>D0lph1n: </p>
<hr />
<div>Чтобы производить операции над внутринними объектам MTA из скриптов, указатели на внутренние классы экспортируются как пользовательские данные в Lua. Каждый из этих классов экспортирует некоторое количество функций, связанных с ним.<br />
<br />
Полный список классов, которые вы можете использовать в скриптах:<br />
<br />
* [[account|Account]]<br />
* [[acl|ACL]]<br />
* [[aclgroup|ACL group]]<br />
* [[Ban]]<br />
* [[element|Element]]<br />
<ul>{{Elements}}</ul><br />
* [[resource|Resource]]<br />
* [[textdisplay|Text display]]<br />
* [[textitem|Text item]]<br />
* [[timer|Timer]]<br />
* [[xmlnode|XML node]]<br />
[[Category:Scripting Concepts]]<br />
[[it:Classi di MTA]]<br />
[[ru:Классы MTA]]</div>D0lph1nhttps://wiki.multitheftauto.com/index.php?title=RU/Client_Manual&diff=20313RU/Client Manual2009-07-01T14:51:04Z<p>D0lph1n: </p>
<hr />
<div>__TOC__<br />
<br />
==Введение==<br />
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.<br />
<br />
Обратите внимание на то, что клиентское приложение MTA:SA Deathmatch находится на стадии бета-тестирования, что означает приложение может аварийно завершать работу или являться причиной возникновения неожиданных результатов.<br />
<br />
==Перед началом установки==<br />
<br />
Перед тем, как установить Multi Theft Auto: San Andreas, сначала убедитесь в том, что для игры GTA:SA не установлены какие-либо модификации. Они могут явиться причиной неправильной работе MTA. Если вы желаете оставить в игре режим одного игрока, вы можете повторно установить San Andreas в другую директорию на жестком диске.<br />
<br />
Также убедитесь, в том что у вас установлена одна из следующих операционных систем '''Windows XP''', '''Windows 2000''', '''Windows Vista''' или '''Windows Server 2003''' и что системные требования вашего компьютера соответствуют требованиям работы игры в одиночном режиме. обратите внимание на то, что если запускаете одиночный режим игры на компьютере обладающем минимальными системными требованиями, вы будете испытывать некоторые замедления в работе MTA, вызванные высокой загрузкой процессора.<br />
<br />
'''Обратите внимание: MTA:SA работает только с GTA:SA EXE v1.0.''' Если вы приобрели игру недавно, то возможно у вас более поздняя версия игры.<br />
<br />
Если у вас возникли ошибки в работе мультиплеера, убедитесь в том, что они описаны на странице [[Known_Issues_-_FAQ|Известные ошибки]], или свяжитесь с нами по IRC каналу по адресу irc://irc.multitheftauto.com/mta<br />
<br />
===Системные требования===<br />
Минимальные системные требования компьютера для Multi Theft Auto: San Andreas незначительно отличаются от системных требований игры Grand Theft Auto: San Andreas.<br />
* процессор класса Intel Pentium 4 или AMD Athlon XP<br />
* 512МБ ОЗУ<br />
* Установленная без модификаций игра Grand Theft Auto: San Andreas версии 1.0 или 1.1 (американская или европейская)<br />
* 3.7ГБ свободного места на жестком диске (3.6ГБ для установки Grand Theft Auto)<br />
* видеокарта семейства nVidia GeForce 4 или ATI Radeon 8xxx с 64MB ОЗУ и поддержкой DirectX 9.0<br />
* звуковая карта или кодек с поддержкой DirectX 9.0<br />
* клавиатура и мышь<br />
* широкополосный доступ в интернет для стабильной игры через сеть<br />
<br />
Для дополнительных возможностей игры рекомендуется использовать видеокарту, имеющую поддержку пиксельных шейдеров версии 2.0 (видеокарта семейства nVidia GeForce FX или выше, ATI Radeon 9xxx или выше).<br />
<br />
Для быстрой загрузки игры рекомендуется использовать больший объем оперативной памяти.<br />
<br />
==Установка игры==<br />
<br />
'''Этот раздел имеет смысл читать после того, как у вас будет установочный файл мультиплеера'''<br />
<br />
# Если у вас его нет, то перейдите на сайт http://www.mtabeta.com, зарегистрируйтесь и скачайте установщик клиентского приложения MTA:SA.<br />
# Запустите установочный файл. Вы увидите диалоговое окно приветствия, затем прочитайте Лицензионное соглашение с конечным пользователем (EULA). Вы должны быть согласны с условиями лицензионного соглашения для продолжения установки.<br />
# Далее вам будет необходимо выбрать один из трех вариантов: создать учетную запись, использовать уже имеющуюся учетную запись или не использовать учетную запись. После этого возможны два варианта продолжения установки.<br />
<br><br />
'''Выбран первый вариант: создать учетную запись'''<br><br />
Выполните создание новой учетной записи на MTABeta.com, после чего введите ваш логин и пароль в окно программы установки<br><br />
'''Выбран второй вариант: использовать уже имеющуюся учетную запись'''<br><br />
Введите данные учетной записи в программу установки<br />
<br><br><br />
# Затем вам будет необходимо выбрать компоненты для установки.<br />
#* '''Client''' интерфейсы игры, является обязательным компонентом.<br />
#* '''MTA Server''' позволяет вам использовать ваш собственный компьютер в качестве сервера.<br />
#* '''MTA Server > Editor''' используется для создания новых карт, является необязательным компонентом.<br />
# Затем вам необходимо выбрать директорию, в которую будет произведена установка. Вы качестве этой директории вы должны указать директорию, в которой установлена San Andreas. По умолчанию это: '''C:\Program Files\Rockstar Games\GTA San Andreas\'''. Нажмите кнопку '''Install''' для выполнения установки.<br />
# После завершения установки, вам будет предложено запустить MTA: San Andreas. Выберите эту опцию по своему усмотрению и нажмите кнопку '''Finish'''.<br />
# Вы можете также запускать MTA:DM из меню Пуск, когда пожелаете.<br />
<br />
==Запуск игры==<br />
# Запустите Multi Theft Auto щелкнув левой кнопкой мыши по иконке расположенной на вашем рабочем столе или выбрав в меню Пуск пункт '''MTA:San Andreas'''.<br />
# Запуститься GTA: San Andreas и после загрузки игры вы увидите главное меню MTA:SA. Ниже показаны варианты меню:<br />
<br />
{| border="0" align="center"<br />
| width="188" |<br />
[[Image:MENU_QuickConnect.jpg]]<br />
| width="380" |<br />
<font size="-1" face="tahoma,helvetica,arial,sans-serif">'''Quick connect''' – этот пункт позволяет вам соединиться с сервером, IP или URL адрес и порт которого вам уже известен. Этот вариант полезен, когда вы точно знаете, на каком сервере вы хотите играть и поэтому вам не нужно искать его в списке всех серверов.</font><br />
<br />
<br /><br />
|-<br />
| width="188" |<br />
[[Image:MENU_ServerBrowser.jpg|280px]]<br />
| width="380" |<br />
<font size="-1" face="tahoma,helvetica,arial,sans-serif">'''Browse servers''' – при выборе этого пункта отображается список доступных для игры серверов. </font><br />
<br />
<br /><br />
|-<br />
| width="188" |<br />
[[Image:Settings.jpg|280px]]<br />
| width="380" |<br />
<font size="-1" face="tahoma,helvetica,arial,sans-serif">'''Settings '''– это пункт позволяет вам сменить ваш nickname в игре, настроить управление и свойства дисплея.</font><br />
<br />
<br /><br /><br />
|-<br />
| width="188" |<br />
[[Image:MENU_About.jpg|280px]]<br />
| width="380" |<br />
<font size="-1" face="tahoma,helvetica,arial,sans-serif">'''About '''– этот пункт позволяет вам посмотреть список участников проекта.</font><br />
<br />
<br /><br />
|-<br />
| width="188" |<br />
<br><br />
| width="380" |<br />
<font size="-1" face="tahoma,helvetica,arial,sans-serif">'''Map editor '''– этот пункт позволяет вам создавать собственные карты, контрольные точки, рампы, препятствия и другие объекты. Эти карты вы можете затем загрузить на сервер, чтобы вы могли играть на них с другими игроками.</font><br />
<br />
<br /><br /><br />
|-<br />
| width="188" |<br />
<br><br />
| width="380" |<br />
<font size="-1" face="tahoma,helvetica,arial,sans-serif">'''Quit '''– этот пункт позволяет вам выйти из игры на рабочий стол Windows.</font><br />
<br />
<br /><br /><br />
|}<br />
<br />
Простейшим способом начать игру - выбрать в меню пункт '''Browse Servers'''. Появится новое окно:<br />
<br />
<center>[[Image:MENU_ServerBrowser.jpg]]<br />'''Server Browser'''</center><br />
<br />
Если сервера не отображаются, нажмите кнопку '''Refresh''' и MTA просканирует сервера и отобразит их список.<br />
<br />
* В столбце '''Name''' отображается название каждого сервера.<br />
* В столбце '''Players''' отображается число игроков и максимально возможное число игроков на сервере, в формате [Имеющееся число игроков] / [Максимальное число игроков].<br />
* В столбце '''Ping''' отображается время задержки в миллисекундах между вашим компьютером и сервером. Время задержки - это время между моментом отправки вашим компьютером пакетов данных серверу и моментом получения ответного сообщения от сервера, поэтому чем больше время задержки, тем больше вы будете испытывать задержек в работе клиентского приложения с конкретным сервером. Обычно, сервера расположенные недалеко от вас по географическому местоположению должны иметь более низкое время задержки.<br />
* В столбце '''Host''' отображается IP адрес сервера. Вы можете использовать этот адрес для будущих соединений с этим же сервером посредством выбора пункта меню Quick Connect в главном меню.<br />
<br />
По каждому столбцу можно щелкать указателем мыши для упорядочивания значений столбца по возрастанию или убыванию.<br />
<br />
Для оптимальной работы приложения и процесса игры, выбирайте сервера с наилучшим балансом между числом игроков и временем задержки.<br />
<br />
После того как вы выбрали нужный вам сервер, выберите его строку списка и щелкните левой кнопкой мыши кнопку '''Connect''' в верхнем правом углу диалогового окна. Если процесс соединения будет выполнен успешно, вы соединиться с сервером и автоматически включиться в процесс игры.<br />
<br />
<!--===Запуск игры из ASE (The All-Seeing Eye)===<br />
<br />
Если вам не нравится встроенный в игру просмотр серверов MTA:San Andreas, вы можете захотеть использовать '''The All-Seeing Eye''', который позволит вам просмотреть список игровых серверов, и применить настраиваемые фильтры поиска. Этот учебник поможет вам установить ASE, и покажет как легко с ним работать.<br />
# Скачайте ASE по адресу http://videogames.yahoo.com/multiplayer и установите.<br />
# '''Следующее применимо к MTA:SA вплоть до версии 1.0 dp2, и будет скорее всего зафиксировано в дальнейшей версии''' <br /> Скачайте [http://www.xup.in/dl,19686489/ASELauncher.zip/ ASELauncher] и извлеките ASELauncher.exe в директорию, где установлен MTA (по умолчанию, это C:\Program Files\MTA San Andreas). Эта небольшая программа конвертирует командную строку ASE в формат понятный MTA. <br />
# Теперь добавьте MTA:SA в ваш список игр в ASE:<br />
#* В ASE щелкните левой кнопкой мыши ''Tools'' -> ''Options'', и выберите вкладку ''Games''<br />
#* Откройте категорию ''Not installed'' и выберите в списке ''Multi Theft Auto'' <br />
#* Выберите ''Visible in filter list'', щелкните ''Browse'' и выберите в '''ASELauncher.exe''' вашу директорию MTA San Andreas<br />
#* Оставьте поле ''Player name'' пустым, и нажмите кнопку ''OK''<br />
# Запуститься '''Multi Theft Auto'''. После того, как вы нажмете кнопку ''Refresh'' на панели инструментов, вы увидите список сервером для всех версий MTA. Теперь добавьте модификатор для того, чтобы отображалась текущая версия '''1.0 dp2'''<br />
#* Щелкните правой кнопкой мыши по ''Multi Theft Auto'' и выберите пункт ''New...''<br />
#* В нижнем левом углу выберите ''Modifier'' и замените MYMOD на '''MTADP2'''<br />
#* Введите название модификатора в поле ''Name'', например '''MTA:SA 1.0 dp2'''<br />
#* Вставьте следующий код фильтра (со строкой номера):<br /><tt>1 if version != "1.0dp2" remove</tt><br />
#* Щелкните ''OK''<br />
#* Ваш новый модификатор отображается в ''My filters''<br />
# Все готово! Теперь активируйте ваш модификатор для того, чтобы отображать только вашу версию игры, выберите игру ''Multi Theft Auto'', и дважды щелкните по строке, содержащей сервер, чтобы начать игру.<br />
--><br />
==Как играть==<br />
<br />
MTA:SA предоставляет полную систему написания сценариев, которая позволяет создателем игровых карт настраивать многие элементы игры различным образом, вплоть до создания своих собственных новых игровых режимов. Игра объединяет множество игроков, с некоторыми исключениями, отличающими многопользовательский режим от однопользовательского.<br />
<br />
В многопользовательской игре нет пешеходов и на дорогах нет машин, "искусственно" управляемых алгоритмами самой игры. Вашими оппонентами на игровой карте являются только другие игроки, или союзники если это карта командной игры. Вы можете общаться с ними используя окно чата, расположенное в левом верхнем углу экрана, нажав клавишу '''T'''. Чтобы переписываться только с игроками вашей команды, нажмите клавишу '''Y'''.<br />
<br />
Редактор карт MTA позволяет создателям карт добавлять различные объекты GTA в свои карты включая дороги, взрывающиеся баки, рампы, строения, возвышенности и так далее. Не только для этих, но и для других объектов могут быть написаны сценарии движения, модели изменения и исчезновения. Это позволит сделать игровой процесс более интересным и разнообразным. <br />
<br />
Окно просмотра игроков будет отображать очки, заработанные игроком. По умолчанию, отображаются только имена и время задержки, но сценарии могут добавить дополнительные столбцы, которые являются специфичными определенному режиму игры. Например, режим игры "deathmatch" может иметь столбец перечисляющий общее число убийств, но создатель карт может выбирать сам и добавить дополнительные колонки для числа смертей вашего персонажа, длительности вашей игры, а также поместить очки, заработанные вами.<br />
<br />
==Управление==<br />
<br />
===Клавиши управления в игре===<br />
<br />
* F8 (или клавиша "тильда") - Консоль<br />
* F9 - Помощь игрового сервера<br />
* F11 - Показать карту SA ''(следующий список клавиш используется при отображении карты)''<br />
**numpad +/- - Увеличить/уменьшить масштаб карты<br />
**numpad 4, 8, 6, 2 - переместиться влево, вверх, вправо, вниз по карте<br />
**numpad 0 - переключиться между режимами карты: закрепить карту за локальным игроком (карта следует за меткой игрока) и свободное передвижение (карта остается неподвижной) <br />
* F12 - Сделать снимок изображения экрана<br />
* T - Чат<br />
* Y - Командный чат<br />
* TAB - Список игроков (если ресурс [[Scoreboard]] запущен на сервере)<br />
<br />
==Команды консоли==<br />
<br />
'''bind defaults''' Сбросить настроийки управления на настройки по умолчанию<br />
<br />
Нажатие '''~ (тильда)''' или '''F8''' доступ к консоли, затем вводится команда, за которой при необходимости следуют параметры (если нужно) затем нажимается Enter.<br />
<br />
;'''maps''' :Отобразить список всех карт доступных на сервере. <br />
<br />
;'''nick [nickname]''' :Изменить nickname, отображаемый в игре на тот, который служит параметром в данной команде.<br />
<br />
;'''msg [nickname] [message]''' или '''pm [nickname] [message]''' :Отправить личное сообщение игроку, который определяется параметром [nickname]. Только игрок, определенный вами может увидеть это сообщение. И '''msg''' и '''pm''' выполняют одну и ту же функцию.<br />
<br />
;'''quit''' или '''exit''' :Выполнить разрыв связи с сервером и выйти из игры на рабочий стол Windows. Выполняет ту же функцию, что и кнопка Quit в главном меню.<br />
<br />
;'''ver''' :Отобразить номер версии и информацию об авторских правах программного обеспечения.<br />
<br />
;'''time''' :Отобразить текущее время.<br />
<br />
;'''disconnect''' :Разорвать соединение с игровым сервером и вернуться в главное меню.<br />
<br />
;'''say [text]''' :Позволяет вам продолжить общение с игроками через окно чата из консоли.<br />
<br />
;'''ignore [nickname]''' :Не отображать любой текст, введенный игроком, которого вы игнорируете. Чтобы отменить игнорирование сообщений игрока введите команду '''ignore [nickname]''' снова.<br />
<br />
'''Совет:''' Вы можете использовать эти команды непосредственно в окне чата, поместив перед ними / (слеш).<br />
<br />
Список команд консоли можно увидеть, введя в консоли команду '''help''' и нажав клавишу Enter. Любая карта может также иметь дополнительные команды, к которым вы можете получить доступ введя в консоли команду '''commands'''.<br />
<br />
==Коды ошибок и их описание==<br />
'''Ошибки загрузки'''<br><br />
0: UNKNOWN_ERROR<br><br />
1: INVALID_FILE_DESCRIPTORS<br><br />
2: INVALID_MAX_FILE_DESCRIPTOR<br><br />
3: INVALID_SELECT_RETURN<br><br />
4: INVALID_INITIAL_MULTI_PERFORM<br><br />
5: INVALID_MULTI_PERFORM_CODE<br><br />
6: INVALID_MULTI_PERFORM_CODE_NEW_DOWNLOADS<br><br />
7: UNEXPECTED_CURL_MESSAGE<br><br />
8: UNABLE_TO_CONNECT<br><br />
9: UNABLE_TO_DOWNLOAD_FILE<br><br />
10: FAILED_TO_INITIALIZE_DOWNLOAD<br><br />
<br />
'''Неустранимые ошибки'''<br><br />
1: no local player model on ingame event<br><br />
2: no local player on ingame event<br><br />
3: server downloads disabled<br><br />
4: no local player model on player-list packet<br><br />
5: no local player on player-list packet<br><br />
6: invalid custom data length on entity-add packet<br><br />
7: invalid bitstream data on entity-add packet<br><br />
8: system entity on entity-add packet<br><br />
9: failed to create object on entity-add packet<br><br />
10: failed to create pickup on entity-add packet<br><br />
11: failed to create vehicle on entity-add packet<br><br />
12: invalid team-name length on entity-add packet<br><br />
13: invalid lua-event name length in lua-event packet<br><br />
14: invalid resource name length in resource-start packet<br><br />
<br />
'''Ошибки типа 'Unable to enter vehicle''''<br><br />
1: script cancelled<br><br />
2: script cancelled (jack)<br><br />
3: current occupier is entering/exiting<br><br />
4: invalid seat<br><br />
5: not close enough<br><br />
6: already in a vehicle<br><br />
7: already entering/exiting<br><br />
8: invalid vehicle (trailer)<br><br />
<br />
[[de:MTA DM Client Anleitung]]<br />
[[es:Manual Cliente Deathmatch]]<br />
[[en:Deathmatch Client Manual]]<br />
[[it:Manuale del Client]]<br />
[[nl:Deathmatch Client Manual]]</div>D0lph1nhttps://wiki.multitheftauto.com/index.php?title=RU/How_you_can_help&diff=20233RU/How you can help2009-06-27T18:40:30Z<p>D0lph1n: </p>
<hr />
<div>{{translate}}<br />
__NOTOC__<br />
Multi Theft Auto has loads of areas in which you can help us. In turn, we'll be more than happy to help you get started with any ideas you have, help test them and - if they're good enough - release them to the whole community. This page outlines the key areas you could do something in, of course, there's many things we've not thought of, so think outside the box!<br />
<br />
==Coding for MTASA==<br />
* Submit source patches for the mod, containing requested features or bugfixes<br />
<br />
==Скриптинг==<br />
* Создайте мод<br />
* Создайте страницу администрирования на HTTP сервере<br />
* Сделайте ресурс, направленный на предоставление полезных функций для других ресурсов<br />
<br />
==Mapping==<br />
* Create a map with the map editor for an existing gamemode<br />
<br />
==Веб разработка==<br />
* Работайте с lil_Toady, чтобы добавлять новые возможности и улучшения на community.mtasa.com<br />
* Создайте свою собственную систему статистики на основе [[PHP SDK]]. За помощью обращайтесь к eAi или jbeta.<br />
<br />
==Documentation==<br />
* Finish documentation for [[:Category:Incomplete|Incomplete functions]] - ask in #mta.scripting if you're not sure of something<br />
* Add examples to [[:Category:Needs Example|functions missing examples]] - please test them, and again, as if you need help<br />
* Review and verify [[:Category:Needs Checking|pages that need checking]] - make sure highlighted issues are solved before removing pages from the category<br />
* Expand the pages that explain [[:Category:Scripting_Concepts|MTA core concepts]]<br />
<br />
==Specific tasks==<br />
* Create a fuzzer to check for crashes in our scripting functions<br />
* Help develop/fix existing gamemodes. Contact the original author on IRC (or ask a developer) to tell the author so you can work together.<br />
* The web interface resources (resourcemanager, resourcebrowser and webadmin chiefly) are really only compatible with Firefox. Someone could put in some time to make these work on Internet Explorer, Opera and Safari. See [[User_talk:EAi|eAi]] for help.<br />
<br />
[[pl:Jak możesz pomóc]]<br />
[[en:How you can help]]</div>D0lph1nhttps://wiki.multitheftauto.com/index.php?title=RU/How_you_can_help&diff=20232RU/How you can help2009-06-27T18:39:51Z<p>D0lph1n: </p>
<hr />
<div>{{translate}}<br />
_NOTOC_<br />
Multi Theft Auto has loads of areas in which you can help us. In turn, we'll be more than happy to help you get started with any ideas you have, help test them and - if they're good enough - release them to the whole community. This page outlines the key areas you could do something in, of course, there's many things we've not thought of, so think outside the box!<br />
<br />
==Coding for MTASA==<br />
* Submit source patches for the mod, containing requested features or bugfixes<br />
<br />
==Скриптинг==<br />
* Создайте мод<br />
* Создайте страницу администрирования на HTTP сервере<br />
* Сделайте ресурс, направленный на предоставление полезных функций для других ресурсов<br />
<br />
==Mapping==<br />
* Create a map with the map editor for an existing gamemode<br />
<br />
==Веб разработка==<br />
* Работайте с lil_Toady, чтобы добавлять новые возможности и улучшения на community.mtasa.com<br />
* Создайте свою собственную систему статистики на основе [[PHP SDK]]. За помощью обращайтесь к eAi или jbeta.<br />
<br />
==Documentation==<br />
* Finish documentation for [[:Category:Incomplete|Incomplete functions]] - ask in #mta.scripting if you're not sure of something<br />
* Add examples to [[:Category:Needs Example|functions missing examples]] - please test them, and again, as if you need help<br />
* Review and verify [[:Category:Needs Checking|pages that need checking]] - make sure highlighted issues are solved before removing pages from the category<br />
* Expand the pages that explain [[:Category:Scripting_Concepts|MTA core concepts]]<br />
<br />
==Specific tasks==<br />
* Create a fuzzer to check for crashes in our scripting functions<br />
* Help develop/fix existing gamemodes. Contact the original author on IRC (or ask a developer) to tell the author so you can work together.<br />
* The web interface resources (resourcemanager, resourcebrowser and webadmin chiefly) are really only compatible with Firefox. Someone could put in some time to make these work on Internet Explorer, Opera and Safari. See [[User_talk:EAi|eAi]] for help.<br />
<br />
[[pl:Jak możesz pomóc]]<br />
[[en:How you can help]]</div>D0lph1nhttps://wiki.multitheftauto.com/index.php?title=RU/How_you_can_help&diff=20231RU/How you can help2009-06-27T18:37:56Z<p>D0lph1n: </p>
<hr />
<div>{{translate}}<br />
Multi Theft Auto has loads of areas in which you can help us. In turn, we'll be more than happy to help you get started with any ideas you have, help test them and - if they're good enough - release them to the whole community. This page outlines the key areas you could do something in, of course, there's many things we've not thought of, so think outside the box!<br />
<br />
==Coding for MTASA==<br />
* Submit source patches for the mod, containing requested features or bugfixes<br />
<br />
==Скриптинг==<br />
* Создайте мод<br />
* Создайте страницу администрирования на HTTP сервере<br />
* Сделайте ресурс, направленный на предоставление полезных функций для других ресурсов<br />
<br />
==Mapping==<br />
* Create a map with the map editor for an existing gamemode<br />
<br />
==Веб разработка==<br />
* Работайте с lil_Toady, чтобы добавлять новые возможности и улучшения на community.mtasa.com<br />
* Создайте свою собственную систему статистики на основе [[PHP SDK]]. За помощью обращайтесь к eAi или jbeta.<br />
<br />
==Documentation==<br />
* Finish documentation for [[:Category:Incomplete|Incomplete functions]] - ask in #mta.scripting if you're not sure of something<br />
* Add examples to [[:Category:Needs Example|functions missing examples]] - please test them, and again, as if you need help<br />
* Review and verify [[:Category:Needs Checking|pages that need checking]] - make sure highlighted issues are solved before removing pages from the category<br />
* Expand the pages that explain [[:Category:Scripting_Concepts|MTA core concepts]]<br />
<br />
==Specific tasks==<br />
* Create a fuzzer to check for crashes in our scripting functions<br />
* Help develop/fix existing gamemodes. Contact the original author on IRC (or ask a developer) to tell the author so you can work together.<br />
* The web interface resources (resourcemanager, resourcebrowser and webadmin chiefly) are really only compatible with Firefox. Someone could put in some time to make these work on Internet Explorer, Opera and Safari. See [[User_talk:EAi|eAi]] for help.<br />
<br />
[[pl:Jak możesz pomóc]]<br />
[[en:How you can help]]</div>D0lph1nhttps://wiki.multitheftauto.com/index.php?title=RU/How_you_can_help&diff=20230RU/How you can help2009-06-27T18:28:49Z<p>D0lph1n: </p>
<hr />
<div>__NOTOC__<br />
Multi Theft Auto has loads of areas in which you can help us. In turn, we'll be more than happy to help you get started with any ideas you have, help test them and - if they're good enough - release them to the whole community. This page outlines the key areas you could do something in, of course, there's many things we've not thought of, so think outside the box!<br />
<br />
==Coding for MTASA==<br />
* Submit source patches for the mod, containing requested features or bugfixes<br />
<br />
==Скриптинг==<br />
* Создайте мод<br />
* Создайте страницу администрирования на HTTP сервере<br />
* Сделайте ресурс, направленный на предоставление полезных функций для других ресурсов<br />
<br />
==Mapping==<br />
* Create a map with the map editor for an existing gamemode<br />
<br />
==Веб разработка==<br />
* Работайте с lil_Toady, чтобы добавлять новые возможности и улучшения на community.mtasa.com<br />
* Создайте свою собственную систему статистики на основе [[PHP SDK]]. За помощью обращайтесь к eAi или jbeta.<br />
<br />
==Documentation==<br />
* Finish documentation for [[:Category:Incomplete|Incomplete functions]] - ask in #mta.scripting if you're not sure of something<br />
* Add examples to [[:Category:Needs Example|functions missing examples]] - please test them, and again, as if you need help<br />
* Review and verify [[:Category:Needs Checking|pages that need checking]] - make sure highlighted issues are solved before removing pages from the category<br />
* Expand the pages that explain [[:Category:Scripting_Concepts|MTA core concepts]]<br />
<br />
==Specific tasks==<br />
* Create a fuzzer to check for crashes in our scripting functions<br />
* Help develop/fix existing gamemodes. Contact the original author on IRC (or ask a developer) to tell the author so you can work together.<br />
* The web interface resources (resourcemanager, resourcebrowser and webadmin chiefly) are really only compatible with Firefox. Someone could put in some time to make these work on Internet Explorer, Opera and Safari. See [[User_talk:EAi|eAi]] for help.<br />
<br />
[[pl:Jak możesz pomóc]]<br />
[[en:How you can help]]</div>D0lph1nhttps://wiki.multitheftauto.com/index.php?title=How_you_can_help&diff=20229How you can help2009-06-27T18:27:56Z<p>D0lph1n: russian page</p>
<hr />
<div>__NOTOC__<br />
Multi Theft Auto has loads of areas in which you can help us. In turn, we'll be more than happy to help you get started with any ideas you have, help test them and - if they're good enough - release them to the whole community. This page outlines the key areas you could do something in, of course, there's many things we've not thought of, so think outside the box!<br />
<br />
==Coding for MTASA==<br />
* Submit source patches for the mod, containing requested features or bugfixes<br />
<br />
==Scripting==<br />
* Create a gamemode<br />
* Create an administration page on the HTTP server<br />
* Make a general purpose resource that provides useful functions to other resources<br />
<br />
==Mapping==<br />
* Create a map with the map editor for an existing gamemode<br />
<br />
==Web development==<br />
* Work with lil_Toady to add new features and improvements to community.mtasa.com<br />
* Create your own system for statistics - using the [[PHP SDK]] as a basis. Contact eAi or jbeta for help.<br />
<br />
==Documentation==<br />
* Finish documentation for [[:Category:Incomplete|Incomplete functions]] - ask in #mta.scripting if you're not sure of something<br />
* Add examples to [[:Category:Needs Example|functions missing examples]] - please test them, and again, as if you need help<br />
* Review and verify [[:Category:Needs Checking|pages that need checking]] - make sure highlighted issues are solved before removing pages from the category<br />
* Expand the pages that explain [[:Category:Scripting_Concepts|MTA core concepts]]<br />
<br />
==Specific tasks==<br />
* Create a fuzzer to check for crashes in our scripting functions<br />
* Help develop/fix existing gamemodes. Contact the original author on IRC (or ask a developer) to tell the author so you can work together.<br />
* The web interface resources (resourcemanager, resourcebrowser and webadmin chiefly) are really only compatible with Firefox. Someone could put in some time to make these work on Internet Explorer, Opera and Safari. See [[User_talk:EAi|eAi]] for help.<br />
<br />
[[pl:Jak możesz pomóc]]<br />
[[ru:How you can help]]</div>D0lph1nhttps://wiki.multitheftauto.com/index.php?title=RU/How_you_can_help&diff=20228RU/How you can help2009-06-27T18:25:35Z<p>D0lph1n: New page: __NOTOC__ Multi Theft Auto has loads of areas in which you can help us. In turn, we'll be more than happy to help you get started with any ideas you have, help test them and - if they're g...</p>
<hr />
<div>__NOTOC__<br />
Multi Theft Auto has loads of areas in which you can help us. In turn, we'll be more than happy to help you get started with any ideas you have, help test them and - if they're good enough - release them to the whole community. This page outlines the key areas you could do something in, of course, there's many things we've not thought of, so think outside the box!<br />
<br />
==Coding for MTASA==<br />
* Submit source patches for the mod, containing requested features or bugfixes<br />
<br />
==Скриптинг==<br />
* Создайте мод<br />
* Создайте страницу администрирования на HTTP сервере<br />
* Сделайте ресурс, направленный на предоставление полезных функций для других ресурсов<br />
<br />
==Mapping==<br />
* Create a map with the map editor for an existing gamemode<br />
<br />
==Веб разработка==<br />
* Работайте с lil_Toady, чтобы добавлять новые возможности и улучшения на community.mtasa.com<br />
* Создайте свою собственную систему статистики на основе [[PHP SDK]]. За помощью обращайтесь к eAi или jbeta.<br />
<br />
==Documentation==<br />
* Finish documentation for [[:Category:Incomplete|Incomplete functions]] - ask in #mta.scripting if you're not sure of something<br />
* Add examples to [[:Category:Needs Example|functions missing examples]] - please test them, and again, as if you need help<br />
* Review and verify [[:Category:Needs Checking|pages that need checking]] - make sure highlighted issues are solved before removing pages from the category<br />
* Expand the pages that explain [[:Category:Scripting_Concepts|MTA core concepts]]<br />
<br />
==Specific tasks==<br />
* Create a fuzzer to check for crashes in our scripting functions<br />
* Help develop/fix existing gamemodes. Contact the original author on IRC (or ask a developer) to tell the author so you can work together.<br />
* The web interface resources (resourcemanager, resourcebrowser and webadmin chiefly) are really only compatible with Firefox. Someone could put in some time to make these work on Internet Explorer, Opera and Safari. See [[User_talk:EAi|eAi]] for help.<br />
<br />
[[pl:Jak możesz pomóc]]</div>D0lph1nhttps://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&diff=20227Главная страница2009-06-27T18:24:48Z<p>D0lph1n: </p>
<hr />
<div>__NOTOC__<br />
<div style="float:left;"><div style="float:right;">[[Image:Scripting.jpg]]</div>Добро пожаловать в Wiki разработчиков Multi Theft Auto: San Andreas Deathmatch. <br />
Здесь вы найдёте информацию по разработке игровых модов и карт для Multi Theft Auto.<br />
<br />
Есть много [[RU/How you can help|способов помочь нам]] сделать MTA лучше - создать карту, игровой режим, добавить описание функции скриптинга, написать пример кода, руководство, или просто играть в MTA и сообщать о найденых багах на форум.<br />
<br />
Пожалуйста, отнеситесь с пониманием к неизбежному появлению ошибок и помните, что многие вещи еще не сделаны до конца!<br />
<br />
Если у вас есть какие-либо вопросы по скриптингу, вы можете задать их в нашем [[IRC Channel |IRC канале]].<br />
<br />
'''Для редактирования статей вам понадобится [http://community.mtasa.com/ MTA Community] аккаунт.'''<br />
Пожалуйста зарегистрируйтесь на сайте [http://community.mtasa.com MTA Community] и используйте полученные логин/пароль для авторизации здесь. Акты вандализма будут караться баном вашего аккаунта.<br />
<br />
Теперь Wiki поддерживает инструмент '''[http://gears.google.com/ Google Gears]''', позволяющий вам просматривать статьи оффлайн. Для этого установите Google Gears и кликните по ссылке Go Offline в нижней части страницы. Будьте готовы к тому, что скачивание всех страниц может занять до часа(!), когда загрузка будет завершена, вы увидите сообщение об этом рядом с той ссылкой. После этого вы сможете переключить ваш браузер в оффлайн режим, или просто отключить интернет, и просматривать вики дальше.<br />
<br />
<div style="border: 2px dotted navy; padding: 4px; margin: 10px">Последняя стабильная версия '''Multi Theft Auto: San Andreas Deathmatch''' - '''{{Current Version|full}}'''. Посетите [http://mtasa.com/dp.html эту страницу] для её скачивания. Также вы можете скачать ночные [http://nightly.mtasa.com сборки для разработчиков], чтобы использовать последние нововведения.</div><br />
<br />
</div><br />
<br />
<div style="clear:both;"></div><br />
{| width="100%" cellspacing="0" cellpadding="0"<br />
| colspan="2" |<br />
<br />
|-<br />
| width="50%" style="vertical-align:top;" |<br />
<div style="border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px;"><br />
====Начало====<br />
<br />
* [[RU/Deathmatch_Client_Manual|Руководство по клиентской части MTA]]<br />
* [[RU/Deathmatch_Server_Manual|Руководство по серверной части MTA]]<br />
* [[RU/Known_Issues_-_FAQ|Известные проблемы MTA:SA DM]]<br />
* [[RU/Scripting Introduction|Введение в скриптинг]]<br />
* [[RU/Introduction to Scripting the GUI | Введение в скриптинг GUI (графический пользовательский интерфейс)]]<br />
* [[RU/Debugging| Руководство по отладке]] - Как найти ошибки в ваших скриптах.<br />
* [[RU/MTA Classes | Классы MTA]] - Детальные описания всех специфических типов MTA<br />
** [[RU/Element|MTA Элементы]] / [[RU/Element tree | Дерево элементов]]<br />
* [[RU/Resources| Введение в ресурсы]]<br />
** [[RU/Resource Web Access | Ресурс Web Access]]<br />
** [[:Category:RU/Resource|Каталог ресурсов]]<br />
** [[RU/Meta.xml | Meta.xml]]<br />
* [[RU/Map_manager|Менеджер карт]]<br />
* [[RU/Introduction_to_Scripting_the_GUI|Введение в скриптинг пользовательских интерфейсов]]<br />
* [[RU/Writing_Gamemodes| Создание игровых режимов]]<br />
<br />
</div><br />
<br />
<div style="border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px;"><br />
<br />
====Базы данных====<br />
В этой секции описаны все возможности LUA, предоставляемые MTA и ресурсами.<br />
* [[:Category:RU/Resource|Каталог ресурсов]] - Изучите это, чтобы писать хорошие скрипты<br />
* [[RU/Client side scripts | Клиентские скрипты]]<br />
</div><br />
<div style="border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px;"><br />
<br />
====Основная помощь по Lua====<br />
Страницы, которые могут вам помочь в изучении LUA<br />
*[http://www.lua.ru/doc/ Руководство по программированию на Lua (русск.)] <br />
*[http://www.lua.org/pil/index.html Руководство по программированию на LUA (англ.)]<br />
*[http://lua-users.org/wiki/TutorialDirectory LUA Wiki (англ.)]<br />
*[http://nixstaller.berlios.de/manual/0.2/nixstaller_9.html Базовое руководство по Lua от Nixstaller (англ.)]<br />
*[http://gtascript.ru Портал по скриптингу. Строгая модерация.]<br />
</div><br />
<br />
<br />
| width="50%" style="vertical-align:top;" |<br />
<div style="border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px;"><br />
<br />
====Map Editor====<br />
*[[RU/Resource:Editor|Руководство]]<br />
*[[RU/Resource:Editor/EDF|Editor Definition Format]]<br />
*[[RU/Resource:Editor/Plugins|Плагины]]<br />
</div><br />
<br />
<div style="border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px; background:#CCCCFF;"><br />
<br />
====Описание====<br />
* [[Client Scripting Functions|Функции, выполняемые на стороне клиента]]<br />
* [[Client Scripting Events|События, генерируемые на стороне клиента]]<br />
* [[Server Scripting Functions|Функции, выполняемые на стороне сервера]]<br />
* [[Server Scripting Events|События, генерируемые на стороне сервера]]<br />
<!-- Incomplete * [[Module functions|Server-side external module scripting functions list]] --><br />
</div><br />
<br />
<div style="border: 1px dotted #AAAAAA;padding:4px 8px 8px 8px;margin:10px;"><br />
<br />
====Список идентификаторов====<br />
*[[Animations|Анимации]]<br />
*[[RU/Character Skins | Скины персонажей]]<br />
*[[RU/CJ_Clothes|Одежда]]<br />
*[[RU/Garage|Идентификаторы гаражей]]<br />
*[[Interior IDs | Интерьеры]]<br />
*[[RU/Projectiles|Projectiles]]<br />
*[[RU/Radar_blips|Метки радара]]<br />
*[[RU/Sounds|Звуки]]<br />
*[[Vehicle IDs|Транспорт]]<br />
*[[RU/Vehicle_colors|Цвета транспорта]]<br />
*[[RU/Vehicle Upgrades|Апгрейды транспорта]]<br />
*[[RU/Weapons|Оружие]]<br />
*[[RU/Weather|Погода]]<br />
</div><br />
<br />
|-<br />
| colspan="2" |<br />
|}<br />
[[pl:Main Page]]<br />
[[en:Main Page]]<br />
[[it:Pagina principale]]<br />
[[nl:Main Page]]<br />
[[de:Hauptseite]]</div>D0lph1nhttps://wiki.multitheftauto.com/index.php?title=How_you_can_help&diff=20226How you can help2009-06-27T18:23:58Z<p>D0lph1n: </p>
<hr />
<div>__NOTOC__<br />
Multi Theft Auto has loads of areas in which you can help us. In turn, we'll be more than happy to help you get started with any ideas you have, help test them and - if they're good enough - release them to the whole community. This page outlines the key areas you could do something in, of course, there's many things we've not thought of, so think outside the box!<br />
<br />
==Coding for MTASA==<br />
* Submit source patches for the mod, containing requested features or bugfixes<br />
<br />
==Scripting==<br />
* Create a gamemode<br />
* Create an administration page on the HTTP server<br />
* Make a general purpose resource that provides useful functions to other resources<br />
<br />
==Mapping==<br />
* Create a map with the map editor for an existing gamemode<br />
<br />
==Web development==<br />
* Work with lil_Toady to add new features and improvements to community.mtasa.com<br />
* Create your own system for statistics - using the [[PHP SDK]] as a basis. Contact eAi or jbeta for help.<br />
<br />
==Documentation==<br />
* Finish documentation for [[:Category:Incomplete|Incomplete functions]] - ask in #mta.scripting if you're not sure of something<br />
* Add examples to [[:Category:Needs Example|functions missing examples]] - please test them, and again, as if you need help<br />
* Review and verify [[:Category:Needs Checking|pages that need checking]] - make sure highlighted issues are solved before removing pages from the category<br />
* Expand the pages that explain [[:Category:Scripting_Concepts|MTA core concepts]]<br />
<br />
==Specific tasks==<br />
* Create a fuzzer to check for crashes in our scripting functions<br />
* Help develop/fix existing gamemodes. Contact the original author on IRC (or ask a developer) to tell the author so you can work together.<br />
* The web interface resources (resourcemanager, resourcebrowser and webadmin chiefly) are really only compatible with Firefox. Someone could put in some time to make these work on Internet Explorer, Opera and Safari. See [[User_talk:EAi|eAi]] for help.<br />
<br />
[[pl:Jak możesz pomóc]]</div>D0lph1nhttps://wiki.multitheftauto.com/index.php?title=RU/Resources&diff=20176RU/Resources2009-06-23T11:32:21Z<p>D0lph1n: Translation fineshed</p>
<hr />
<div>Ресурсы - ключевая часть MTA. Ресурс представляет из себя каталог или zip архив, содержащий набор файлов, таких как скрипты, плю ''meta'' файл, описывающий то, как ресурс должен загружаться. Отчасти, ресурс можно рассматривать как эквивалент программе, работающей под управлением операционной системы - он может быть запущен, остановлен, и множество ресурсов может работать одновременно. Несмотря на это важно помнить, что, в отличии от программ, между ресурсами нет многозадачности.<br />
<br />
==Терминология==<br />
* '''Ресурс''' - Zip-архив или каталог, содержащий файл meta.xml и некоторое количество других элементов. Они размещаются в каталоге ''mods/deathmatch/resources'' сервера.<br />
* '''Элемент ресурса''' - Файл, содержащийся в ресурсе, на данный момент это может быть карта, скрипт, рисунок и т.д.<br />
<br />
==Мета-файл==<br />
''Прочитайте статью [[RU/Meta.xml]] чтобы узнать подробности''<br />
<br />
Мета-файл это основа любого ресурса. Он описывает, какие файлы в ресурсе должны использоваться и как. Следующий пример показывает все доступные опции. Ваши мета-файлы могут содержать столько тэгов, сколько вам понадобится:<br />
<br />
<syntaxhighlight lang="xml"><br />
<meta><br />
<info author="eAi" description="This is a basic CTF script" version="4"/><br />
<br />
<include resource="radarblips"/><br />
<include resource="markermanagement" /><br />
<br />
<script src="ctf.lua" /><br />
<script src="flag.lua" /><br />
<script src="ctf_client.lua" type="client" /><br />
<br />
<file src="model.dff" /><br />
<file src="quitbutton.png" /><br />
<file src="killed.png" /><br />
<br />
<html src="test.htm" default="true"/><br />
<html src="logo.png" raw="true" /><br />
<br />
<export function="multiply" http="true" /><br />
<export function="getPlayerList" /><br />
<export function="getElementOwner" type="client"/><br />
<br />
<config src="vehicle-list.xml" type="client" /><br />
<config src="markerconfig.xml" type="server" /><br />
<br />
<map src="somestuff.map" dimension="99" /><br />
</meta><br />
</syntaxhighlight><br />
В то же время карта CTF может содержать следующий meta.xml:<br />
<syntaxhighlight lang="xml"><br />
<meta><br />
<include resource="ctf" /><br />
<map src="myuberl33tctfmap.map" /><br />
<br />
<info author="Tom" instructions="this is uber l33t !!!!!1111111" type="map" /><br />
</meta><br />
</syntaxhighlight><br />
<br />
<br />
Атрибуты Script/type, Config/type и File/type определяют, должен ли скрипт/ресурс отправляться клиенту, и по умолчанию равны "server".<br />
<br />
Тэг include указывает какие ресурсы должны быть запущены перед запуском данного ресурса. Другими словами, если ваш ресурс зависит от других, вы можете подключить их так, чтобы они стартовали первыми.<br />
<br />
<br />
Каждый ресурс работает в собственной виртуальной машине (VM). В ней работает каждый скрипт ресурса. Это значит, что переменные не разделяются с другими ресурсами. Наилучший способ взаимодействовать с другими ресурсами - использовать тэг ''export'' для экспортирования функции. Это позволит другим ресурсам выполнять функцию используя вызов функции [[call]].<br />
<br />
<br />
Скрипты, отправляемые клиенту, запускаются сразу по завершении скачивания.<br />
<br />
<br />
У скриптов есть достум на чтение и запись в каталог ресурса через такие функции, как [[xmlCreateFile]] и [[fileCreate]]. Так же они могут читать/писать в другие ресурсы, но для этого нужны разрешения [[RU/Access_Control_List|ACL]]. <br />
<br />
<br />
Каждый ресурс может быть запущен только 1 раз, за этим следит сервер. Если ресурс подключен более одного раза, для всех ресурсов, подключивших его, будет использоваться одна копия.<br />
<br />
==Файловые хранилища==<br />
Файлы ресурсов могут храниться в zip-архивах или каталогах. Они размещаются в:<br />
<br />
server/mods/deathmatch/resources/ (для клиентов MTASA)<br />
<br />
или<br />
<br />
mods/deathmatch/resources/ (для выделенных серверов)<br />
<br />
Каждый ресурс может быть zip-архивом, каталогом, либо объединять оба варианта. Приоритет каталога выше, чем у архива, таким образом файлы могут быть помещены в каталог, чтобы заменить файлы из архива. Это позволяет использовать каталоги для разработки и тестирования карт/скриптов, в то время, как архивы используются конечными пользователями.<br />
<br />
==Скриптовые функции==<br />
Системой ресурсов можно управлять из скриптов. Для этого существуют следующие серверные функции:<br />
{{Resource functions}}<br />
<br />
Также генерируются следующие события:<br />
{{Resource_events}}<br />
<br />
[[en:Resources]]<br />
[[it:Introduzione alle Risorse]]</div>D0lph1nhttps://wiki.multitheftauto.com/index.php?title=RU/Access_Control_List&diff=20175RU/Access Control List2009-06-23T11:15:08Z<p>D0lph1n: New page: MTA includes a complete Access Control List (ACL) that allows you to secure and limit access to the server, it's functions and resources in any number of ways. The key concept of MTA's AC...</p>
<hr />
<div>MTA includes a complete Access Control List (ACL) that allows you to secure and limit access to the server, it's functions and resources in any number of ways.<br />
<br />
The key concept of MTA's ACL (and ACLs in general) is that you're giving a specific object a set of rights. In MTA's case objects are one of two things - resources or users. There are numerous ''rights'' available in MTA - these mainly focus on server-side scripting functions. <br />
<br />
What this essentially means is that the ACL allows you to choose exactly what functions a resource or user can perform. This can obviously be invaluable - for example preventing all your server's players from being able to ban each other, or preventing your new untested resources from doing the same. <br />
<br />
Of course, ''with great power comes great responsibility'' and it is very easily possible to completely break resources - for example, disabling [[spawnPlayer]] for all resources would be a Bad Thing. Of course, there are situations when you might want to do this - if you want to force all your resources to use a spawn manager resource for example, but even this is somewhat draconian.<br />
<br />
==How it works==<br />
There are three ways you can modify the ACL - how you do it depends who you are.<br />
<br />
===HTTP Interface===<br />
You can use the [[Resource/webadmin|webadmin]] http interface to modify the ACL in your web browser. This is by far the easiest way to do so. Just make sure the ''webadmin'' resource is started on your server and visit ''<nowiki>http://ServerIP:HttpPort/</nowiki>''. You can then use the two sections - ACLs and Groups. ACLs allows you to create your Access Control Lists - lists of rights. Groups allow you to group together collections of users and assign ACLs to them. For example, the ACLs section allows you to specify that the Admin ACL has access to the ''start'' console command. You can the go to the Groups section and create an Admin ''group'' that has access to your Admin ''acl''. You can then add users to your Admin ''group''.<br />
<br />
===XML file===<br />
You can modify the ACL.xml file manually. This has a fairly straightforward syntax, but it can get a bit confusing at times. If you do it while the server is running, don't forget to call the scripting function [[aclReload]] ("start runcode", "run aclReload()") so the new ACL is loaded, or otherwise stop your server before modifying. This also prevents your changes from being accidentally overwritten by the server.<br />
<br />
===Scripting functions===<br />
You can use a large number of ACL scripting functions to modify the ACL on the fly. Of course, you can (and really should!) limit access to the ACL functions with the ACL.<br />
<br />
{{ACL functions}}<br />
[[Category:Scripting Concepts]]</div>D0lph1nhttps://wiki.multitheftauto.com/index.php?title=RU/Resources&diff=20174RU/Resources2009-06-23T10:09:33Z<p>D0lph1n: </p>
<hr />
<div>{{translate}}<br />
Ресурсы - ключевая часть MTA. Ресурс представляет из себя каталог или zip архив, содержащий набор файлов, таких как скрипты, плю ''meta'' файл, описывающий то, как ресурс должен загружаться. Отчасти, ресурс можно рассматривать как эквивалент программе, работающей под управлением операционной системы - он может быть запущен, остановлен, и множество ресурсов может работать одновременно. Несмотря на это важно помнить, что, в отличии от программ, между ресурсами нет многозадачности.<br />
<br />
==Терминология==<br />
* '''Ресурс''' - Zip-архив или каталог, содержащий файл meta.xml и некоторое количество других элементов. Они размещаются в каталоге ''mods/deathmatch/resources'' сервера.<br />
* '''Элемент ресурса''' - Файл, содержащийся в ресурсе, на данный момент это может быть карта, скрипт, рисунок и т.д.<br />
<br />
==Мета-файл==<br />
''Прочитайте статью [[RU/Meta.xml]] чтобы узнать подробности''<br />
<br />
Мета-файл это основа любого ресурса. Он описывает, какие файлы в ресурсе должны использоваться и как. Следующий пример показывает все доступные опции. Ваши мета-файлы могут содержать столько тэгов, сколько вам понадобится:<br />
<br />
<syntaxhighlight lang="xml"><br />
<meta><br />
<info author="eAi" description="This is a basic CTF script" version="4"/><br />
<br />
<include resource="radarblips"/><br />
<include resource="markermanagement" /><br />
<br />
<script src="ctf.lua" /><br />
<script src="flag.lua" /><br />
<script src="ctf_client.lua" type="client" /><br />
<br />
<file src="model.dff" /><br />
<file src="quitbutton.png" /><br />
<file src="killed.png" /><br />
<br />
<html src="test.htm" default="true"/><br />
<html src="logo.png" raw="true" /><br />
<br />
<export function="multiply" http="true" /><br />
<export function="getPlayerList" /><br />
<export function="getElementOwner" type="client"/><br />
<br />
<config src="vehicle-list.xml" type="client" /><br />
<config src="markerconfig.xml" type="server" /><br />
<br />
<map src="somestuff.map" dimension="99" /><br />
</meta><br />
</syntaxhighlight><br />
В то же время карта CTF может содержать следующий meta.xml:<br />
<syntaxhighlight lang="xml"><br />
<meta><br />
<include resource="ctf" /><br />
<map src="myuberl33tctfmap.map" /><br />
<br />
<info author="Tom" instructions="this is uber l33t !!!!!1111111" type="map" /><br />
</meta><br />
</syntaxhighlight><br />
<br />
<br />
Атрибуты Script/type, Config/type и File/type определяют, должен ли скрипт/ресурс отправляться клиенту, и по умолчанию равны "server".<br />
<br />
Тэг include указывает какие ресурсы должны быть запущены перед запуском данного ресурса. Другими словами, если ваш ресурс зависит от других, вы можете подключить их так, чтобы они стартовали первыми.<br />
<br />
<br />
Каждый ресурс работает в собственной виртуальной машине (VM). В ней работает каждый скрипт ресурса. Это значит, что переменные не разделяются с другими ресурсами. Наилучший способ взаимодействовать с другими ресурсами - использовать тэг ''export'' для экспортирования функции. Это позволит другим ресурсам выполнять функцию используя вызов функции [[call]].<br />
<br />
<br />
Скрипты, отправляемые клиенту, запускаются сразу по завершении скачивания.<br />
<br />
<br />
У скриптов есть достум на чтение и запись в каталог ресурса через такие функции, как [[xmlCreateFile]] и [[fileCreate]]. Так же они могут читать/писать в другие ресурсы, но для этого нужны разрешения [[RU/Access_Control_List|ACL]]. <br />
<br />
<br />
Каждый ресурс может быть запущен только 1 раз, за этим следит сервер. Если ресурс подключен более одного раза, для всех ресурсов, подключивших его, будет использоваться одна копия.<br />
<br />
==Файловые хранилища==<br />
Resource files can either be stored in a zip or a directory. This is located in:<br />
<br />
server/mods/deathmatch/resources/ (for MTASA clients)<br />
<br />
or<br />
<br />
mods/deathmatch/resources/ (for dedicated server installations)<br />
<br />
Each resource can have a zip file, a directory or both. In the case of both existing, the directory has precedence over the zip file, as such files can be placed in the directory to over-ride the files in the zip file. This allows directories to be used for testing and developing of maps/scripts while zip files used by end-users.<br />
<br />
==Script functions==<br />
The resource system can be manipulated by script. As such, the following Serverside scripting functions are provided:<br />
{{Resource functions}}<br />
<br />
The following events are also provided:<br />
{{Resource_events}}<br />
<br />
[[en:Resources]]<br />
[[it:Introduzione alle Risorse]]</div>D0lph1nhttps://wiki.multitheftauto.com/index.php?title=RU/Resources&diff=20137RU/Resources2009-06-22T12:50:30Z<p>D0lph1n: Few translations</p>
<hr />
<div>{{translate}}<br />
Ресурсы - ключевая часть MTA. Ресурс представляет из себя каталог или zip архив, содержащий набор файлов, таких как скрипты, плю ''meta'' файл, описывающий то, как ресурс должен загружаться. Отчасти, ресурс можно рассматривать как эквивалент программе, работающей под управлением операционной системы - он может быть запущен, остановлен, и множество ресурсов может работать одновременно. Несмотря на это важно помнить, что, в отличии от программ, между ресурсами нет многозадачности.<br />
<br />
==Терминология==<br />
* '''Ресурс''' - Zip-архив или каталог, содержащий файл meta.xml и некоторое количество других элементов. Они размещаются в каталоге ''mods/deathmatch/resources'' сервера.<br />
* '''Элемент ресурса''' - Файл, содержащийся в ресурсе, на данный момент это может быть, скрипт, рисунок и т.д.<br />
<br />
==Мета-файл==<br />
''Прочитайте статью [[RU/Meta.xml]] чтобы узнать подробности''<br />
<br />
Мета-файл это основа любого ресурса. Он описывает, какие файлы в ресурсе должны использоваться и как. Следующий пример показывает все доступные опции. Ваши мета-файлы могут содержать столько тэгов, сколько вам понадобится:<br />
<br />
<syntaxhighlight lang="xml"><br />
<meta><br />
<info author="eAi" description="This is a basic CTF script" version="4"/><br />
<br />
<include resource="radarblips"/><br />
<include resource="markermanagement" /><br />
<br />
<script src="ctf.lua" /><br />
<script src="flag.lua" /><br />
<script src="ctf_client.lua" type="client" /><br />
<br />
<file src="model.dff" /><br />
<file src="quitbutton.png" /><br />
<file src="killed.png" /><br />
<br />
<html src="test.htm" default="true"/><br />
<html src="logo.png" raw="true" /><br />
<br />
<export function="multiply" http="true" /><br />
<export function="getPlayerList" /><br />
<export function="getElementOwner" type="client"/><br />
<br />
<config src="vehicle-list.xml" type="client" /><br />
<config src="markerconfig.xml" type="server" /><br />
<br />
<map src="somestuff.map" dimension="99" /><br />
</meta><br />
</syntaxhighlight><br />
В то же время карта CTF может содержать следующий meta.xml:<br />
<syntaxhighlight lang="xml"><br />
<meta><br />
<include resource="ctf" /><br />
<map src="myuberl33tctfmap.map" /><br />
<br />
<info author="Tom" instructions="this is uber l33t !!!!!1111111" type="map" /><br />
</meta><br />
</syntaxhighlight><br />
<br />
<br />
Script/type, Config/type и File/type атрибуты определяют, должен ли скрипт/ресурс отправляться клиенту, и по умолчанию равны "server".<br />
<br />
The include tag specifies other resources that should be started before this resoucre is started. In other words, if your resource is dependent on another, you can include it so that the other resource is started first,<br />
<br />
<br />
Each resource has its own virtual machine (VM). This contains every script in the resource. This means that variables are not shared with other resources. The best way to communictate with other resources is by using the ''export'' tag and exporting a function. This will enable other resources to fire this function using the [[call]] scripting function.<br />
<br />
<br />
Scripts sent to clients are started as soon as all the scripts have been downloaded.<br />
<br />
<br />
Scripts are able to read and write to their own resource folder with functions such as [[xmlCreateFile]] and [[fileCreate]]. They can also read and write to other resources, but must have [[Access_Control_List|ACL]] access. <br />
<br />
<br />
Each resource can only be loaded once, the server will ensure this. If a resource is included more than once, the same instance will be used by each resource that includes it.<br />
<br />
==File storage==<br />
Resource files can either be stored in a zip or a directory. This is located in:<br />
<br />
mods/deathmatch/resources/<br />
<br />
Each resource can have a zip file, a directory or both. In the case of both existing, the directory has precedence over the zip file, as such files can be placed in the directory to over-ride the files in the zip file. This allows directories to be used for testing and developing of maps/scripts while zip files used by end-users.<br />
<br />
==Script functions==<br />
The resource system can be manipulated by script. As such, the following Serverside scripting functions are provided:<br />
{{Resource functions}}<br />
<br />
The following events are also provided:<br />
{{Resource_events}}</div>D0lph1nhttps://wiki.multitheftauto.com/index.php?title=RU/Resources&diff=19365RU/Resources2009-05-01T06:56:57Z<p>D0lph1n: </p>
<hr />
<div>{{translate}}<br />
Ресурсы - ключевая часть MTA. Ресурс представляет из себя каталог или zip архив, содержащий набор файлов, таких как скрипты, плю ''meta'' файл, описывающий то, как ресурс должен загружаться. Отчасти, ресурс можно рассматривать как эквивалент программе, работающей под управлением операционной системы - он может быть запущен, остановлен, и множество ресурсов может работать одновременно. Несмотря на это важно помнить, что, в отличии от программ, между ресурсами нет многозадачности.<br />
<br />
==Terminology==<br />
* '''Resource''' - A zip file or folder containing a meta.xml file and a number of resource items. These are placed in the ''mods/deathmatch/resources'' folder in the server directory.<br />
* '''Resource item''' - A file contained within a resource, currently this can be a map, script, images etc.<br />
<br />
==The Meta File==<br />
''See main article [[Meta.xml]] for details''<br />
<br />
The Meta file is the core of each the resource. It describes exactly what files in the resource should be used, and how. The following is an example that covers every option there is, your meta files can have as many or as few of these tags as you require:<br />
<br />
<syntaxhighlight lang="xml"><br />
<meta><br />
<info author="eAi" description="This is a basic CTF script" version="4"/><br />
<br />
<include resource="radarblips"/><br />
<include resource="markermanagement" /><br />
<br />
<script src="ctf.lua" /><br />
<script src="flag.lua" /><br />
<script src="ctf_client.lua" type="client" /><br />
<br />
<file src="model.dff" /><br />
<file src="quitbutton.png" /><br />
<file src="killed.png" /><br />
<br />
<html src="test.htm" default="true"/><br />
<html src="logo.png" raw="true" /><br />
<br />
<export function="multiply" http="true" /><br />
<export function="getPlayerList" /><br />
<export function="getElementOwner" type="client"/><br />
<br />
<config src="vehicle-list.xml" type="client" /><br />
<config src="markerconfig.xml" type="server" /><br />
<br />
<map src="somestuff.map" dimension="99" /><br />
</meta><br />
</syntaxhighlight><br />
While a CTF map may have a meta.xml that looks like:<br />
<syntaxhighlight lang="xml"><br />
<meta><br />
<include resource="ctf" /><br />
<map src="myuberl33tctfmap.map" /><br />
<br />
<info author="Tom" instructions="this is uber l33t !!!!!1111111" type="map" /><br />
</meta><br />
</syntaxhighlight><br />
<br />
<br />
Script/type, Config/type and File/type attributes specify if the script/resource should be sent to clients or not, and defaults to "server".<br />
<br />
The include tag specifies other resources that should be started before this resoucre is started. In other words, if your resource is dependent on another, you can include it so that the other resource is started first,<br />
<br />
<br />
Each resource has its own virtual machine (VM). This contains every script in the resource. This means that variables are not shared with other resources. The best way to communictate with other resources is by using the ''export'' tag and exporting a function. This will enable other resources to fire this function using the [[call]] scripting function.<br />
<br />
<br />
Scripts sent to clients are started as soon as all the scripts have been downloaded.<br />
<br />
<br />
Scripts are able to read and write to their own resource folder with functions such as [[xmlCreateFile]] and [[fileCreate]]. They can also read and write to other resources, but must have [[Access_Control_List|ACL]] access. <br />
<br />
<br />
Each resource can only be loaded once, the server will ensure this. If a resource is included more than once, the same instance will be used by each resource that includes it.<br />
<br />
==File storage==<br />
Resource files can either be stored in a zip or a directory. This is located in:<br />
<br />
mods/deathmatch/resources/<br />
<br />
Each resource can have a zip file, a directory or both. In the case of both existing, the directory has precedence over the zip file, as such files can be placed in the directory to over-ride the files in the zip file. This allows directories to be used for testing and developing of maps/scripts while zip files used by end-users.<br />
<br />
==Script functions==<br />
The resource system can be manipulated by script. As such, the following Serverside scripting functions are provided:<br />
{{Resource functions}}<br />
<br />
The following events are also provided:<br />
{{Resource_events}}</div>D0lph1nhttps://wiki.multitheftauto.com/index.php?title=Element&diff=19323Element2009-04-26T11:10:32Z<p>D0lph1n: </p>
<hr />
<div>An [[element]] is a generic class that can represent almost all in-game [[entity|entities]]. The built-in element types are:<br />
<br />
{{Elements}}<br />
<br />
Any other element type can be created as an abstract element, not referring to any game [[entity]]. For example, '''resource''' and '''map''' elements are created when resources and maps are loaded to group entities they create as their children.<br />
<br />
Elements share common functions such as type and list retrieval, a destroy operation to remove both the element and the game entity it is linked to (except for some elements which can't be destroyed, for example client elements), [[element data]] storing and retrieval, and many more common operations.<br />
<br />
All elements are stored internally in a [[Element tree|tree structure]], and as such every element except the '''root''' element has a parent element, that can be the '''root''' element, a '''resource''', '''map''' or another element. This is purely for declaring the scope of function calls.<br />
<br />
==Related scripting functions==<br />
===Client===<br />
{{Client element functions}}<br />
===Server===<br />
{{Element functions}}<br />
[[Category:Scripting Concepts]]<br />
<br />
[[it:Elemento]]<br />
[[ru:Element]]</div>D0lph1nhttps://wiki.multitheftauto.com/index.php?title=RU/Resource:Editor&diff=19322RU/Resource:Editor2009-04-26T11:09:23Z<p>D0lph1n: </p>
<hr />
<div>{{RU/Resource page}}<br />
{{translate}}<br />
MTA:SA Редактор Карт позволяет создавать карты для вашего игрового мода.<br />
<br />
==Начало==<br />
Чтобы запустить редактор, просто нажмите на "Map editor" в главном MTA меню.<br />
<br />
==Меню==<br />
После запуска вы увидите два меню: в главном меню вверху, и элемент меню в левом нижнем углу.<br />
<br />
===Главное меню===<br />
Это меню состоит из нескольких кнопок:<br />
* [[Image:Editor_New.png]] Создать новую карту.<br />
* [[Image:Editor_Open.png]] Открыть существующую карту.<br />
* [[Image:Editor_Save.png]] Сохранить карту.<br />
* [[Image:Editor_Save_as.png]] Сохраните карту под другим именем.<br />
* [[Image:Editor_Options.png]] Общие настройки карты.<br />
* [[Image:Editor_Undo.png]] Отменить последнее действие.<br />
* [[Image:Editor_Redo.png]] Восстановить отмененное действие.<br />
* [[Image:Editor_Locations.png]] Stored game world locations. The editor comes with a great list of San Andreas Interior locations but you can also add your own interior and non-interior locations to the list.<br />
* [[Image:Editor_Current_elements.png]] List all the elements the map contains (objects, vehicles, markers, pickups etc.)<br />
* [[Image:Editor_Map_settings.png]] Map specific settings, like time of day, gravity etc. Here you can also specify what gamemodes the map is compatible with.<br />
* [[Image:Editor_Definitions.png]] Load [[Resource:Editor/EDF|editor definition files (EDF)]] that you want to use. <br />
* [[Image:Editor_Test.png]] Go into play mode to try out the map. This will load up the gamemode the map is made for.<br />
<br />
===Элементы меню===<br />
The element menu is used to add new elements to the map.<br />
* [[Image:Editor_Vehicle.png]] Создать новую машину.<br />
* [[Image:Editor_Object.png]] Создать новый объект (plfybz, дороги и другие декорации).<br />
* [[Image:Editor_Pickup.png]] Cjplfnm yjdsq gbrfg.<br />
* [[Image:Editor_Marker.png]] Создать новый маркер.<br />
<br />
Additionally, if you have [[Resource:Editor/EDF|editor definitions loaded]], you can roll the mousewheel in this menu to bring up custom elements.<br />
<br />
==Использование редактора==<br />
This section explains how to create and modify maps.<br />
<br />
===Перемещение по карте===<br />
When you initially start the editor, you are in ''camera mode''. You are able to use the '''WSAD''' keys to move the camera and the mouse to pan the camera. While moving around, you can hold '''ALT''' to move more slowly or '''SHIFT''' to go faster.<br />
<br />
To access the editor's interface and control panel you need to switch to ''cursor mode''. You can toggle between cursor mode and camera mode with the '''F''' key. When in cursor mode, your view is fixed, and you can use the mouse cursor to manipulate elements and use the graphical interface.<br />
<br />
Camera mode can be recognized by a crosshair in the center of the screen. You can use it to select and move elements just like in cursor mode.<br />
<br />
[[Image:Editor_Crosshair.png|center]]<br />
<br />
===Запуск карты===<br />
* Запустите редактор, выберите в меню ''New''.<br />
* Выберите ''Map settings''. В ''Meta'' . Заполните все поля. Откройте ''Gamemodes'' и добавте игровой мод к вашей карте (they will be moved to the ''Added gamemodes'' list). You can do this by selecting them and clicking ''Add'', or by double clicking them. Click OK when you're done.<br />
[[Image:Editor_Mapsettings.png|center]]<br />
* Click the ''Definitions'' window and add the resources of which you want to use the custom elements. These will consist of the gamemodes you selected in the ''Map settings'' window, plus eventual additional resources. For more information about editor definitions, see [[Resource:Editor/EDF|EDF]]. Click OK when you're done.<br />
<br />
===Создание новых элементов===<br />
Adding elements to your map, such as vehicles and objects, is very straightforward.<br />
* If you are in camera mode, switch to cursor mode first by pressing '''F'''.<br />
* Click the button in the element menu that represents what you want. E.g., click the button with a car on it to add a vehicle.<br />
* A new element of the selected type will be created and attached to your cursor. Move it to the location where you want it and '''left click''' to drop it off.<br />
<br />
<br />
[[Image:Editor_Addelem.png|center]]<br />
<br />
<br />
To create custom elements that are specific to a resource, hover the cursor over the element menu and turn the scroll wheel until the desired resource comes up. Note that for this to work, you first have to add the [[Resource:Editor/EDF|EDF]] file of the resource in the ''Definitions'' window.<br />
<br />
[[Image:Editor_Selectedf.png|center]]<br />
<br />
===Выбор===<br />
* '''Left click''' an element to select it in ''keyboard mode''.<br />
* '''Right click''' it to select it in ''mouse mode''.<br />
* Press the '''Spacebar''' or click in an empty area to deselect.<br />
<br />
The selected element, if any, is denoted by a yellow cone marker. Elements (particularly objects) with poor collisions can be detected easier by enabling ''High sensitivity mode'', by pressing the '''E''' key. This increases detection at the expense of accuracy.<br />
<br />
The ''Current elements'' dialog can also be used to select elements. Double-clicking an item within the list will select it in ''Keyboard mode''.<br />
<br />
===Перемещение===<br />
Moving elements can be done in several ways.<br />
<br />
'''With the mouse'''<br />
* Simply drag and drop with the '''left mouse button'''.<br />
Or:<br />
* Select the element in mouse mode ('''right click'''), move it to where you want it, and click to drop it off.<br />
<br />
You can also adjust the ''Hold distance'' of an element toward and away from the camera by switching to camera mode, '''right clicking''' the element, and rolling the '''mouse wheel'''.<br />
<br />
'''With the keyboard'''<br />
* Select the element in keyboard mode ('''left click''').<br />
* Use the '''arrow keys''' to move the element in the horizontal plane, and '''PgUp'''/'''PgDn''' to move it vertically. Hold '''ALT''' to decrease the movement speed, or '''SHIFT''' to increase it.<br />
<br />
By default, elements move relative to the camera and are not locked to any axes. This can be disabled in the ''Options'' menu.<br />
<br />
===Вращение===<br />
'''With the mouse'''<br />
<br />
You can rotate selected elements around the Z axis with the mouse wheel.<br />
* Select the element in keyboard mode ('''left click''') and roll the mouse wheel while holding '''Left CTRL'''.<br />
Or:<br />
* Select the element in mouse mode ('''right click'''), hold '''CTRL''', and roll the mouse wheel.<br />
<br />
'''With the keyboard'''<br />
* Select the element in keyboard mode ('''left click''').<br />
* While holding '''CTRL''' (the selection marker will turn green), use the '''arrow keys''' and '''PgUp'''/'''PgDn''' to rotate the element around the different axes.<br />
<br />
With both methods you can additionally hold '''ALT''' to decrease the rotation speed or '''SHIFT''' to increase it.<br />
<br />
<br />
[[Image:Editor_Rotateelem.png|center]]<br />
<br />
===Смена модели===<br />
Most elements have a variety of options that can be altered to change their appearance and behaviour. Examples are the model, color and visual upgrades of a car.<br />
<br />
* Open the properties window of an element by either double clicking it or by selecting it and pressing '''F3'''.<br />
* Make any alterations that you want. For example, to change the model of a car or object, click the '''Browse''' button next to "model" to open the model browser.<br />
* Click OK when you're done.<br />
<br />
[[Image:Editor_Props.png|center]]<br />
<br />
===Копирование===<br />
You can clone an element by selecting it and pressing '''C'''. <br />
<br />
* In mouse mode the cloned element will be attached to your cursor. '''Left click''' to place it in the map.<br />
* In keyboard mode the cloned element will be cloned in the identical position.<br />
<br />
If you hold '''CTRL''' while clicking, the element will be cloned again and will again be attached to the cursor. This way you can easily place large quantities of something.<br />
<br />
Alternatively you can use the ''Pullout'' button located in the bottom-right corner of the properties box to clone an element.<br />
<br />
===Удаление===<br />
Simply select the element and press '''DEL''' ''(Delete)''.<br />
<br />
Alternatively you can use the ''Pullout'' button located in the bottom-right corner of the properties box to delete an element.<br />
<br />
==Управление==<br />
Here is a list of all default controls. To change them please go to the MTA Settings menu while the Editor is started.<br />
<br />
===Камера===<br />
{|<br />
|-<br />
| camera_move_forwards<br />
| '''w'''<br />
|-<br />
| camera_move_backwards<br />
| '''s'''<br />
|-<br />
| camera_move_left<br />
| '''a'''<br />
|-<br />
| camera_move_right<br />
| '''d'''<br />
|-<br />
| high_sensitivity_mode<br />
| '''e'''<br />
|}<br />
<br />
===Клонирование===<br />
{|<br />
|-<br />
| clone_selected_element<br />
| '''c'''<br />
|-<br />
| clone_drop_modifier<br />
| '''lctrl''' || ''(Left CTRL)''<br />
|}<br />
<br />
===Манипуляции с элементами===<br />
{|<br />
|-<br />
| element_move_forward<br />
| '''arrow_u''' || ''(Arrow key Up)''<br />
|-<br />
| element_move_backward<br />
| '''arrow_d''' || ''(Arrow key Down)''<br />
|-<br />
| element_move_left<br />
| '''arrow_l''' || ''(Arrow key Left)''<br />
|-<br />
| element_move_right<br />
| '''arrow_r''' || ''(Arrow key Right)''<br />
|-<br />
| element_move_downwards<br />
| '''pgdn''' || ''(Page Down)''<br />
|-<br />
| element_move_upwards<br />
| '''pgup''' || ''(Page Up)''<br />
|-<br />
| zoom_in<br />
| '''mouse_wheel_down'''<br />
|-<br />
| zoom_out<br />
| '''mouse_wheel_up'''<br />
|-<br />
| quick_rotate_increase<br />
| '''mod_rotate''' + '''mouse_wheel_up''' || ''(Left CTRL + Mouse wheel Up)''<br />
|-<br />
| quick_rotate_decrease<br />
| '''mod_rotate''' + '''mouse_wheel_down''' || ''(Left CTRL + Mouse wheel Down)''<br />
|-<br />
| mod_rotate<br />
| '''lctrl''' || ''(Left CTRL)''<br />
|-<br />
| mod_slow_speed<br />
| '''lalt''' || ''(Left ALT)''<br />
|-<br />
| mod_fast_speed<br />
| '''lshift''' || ''(Left SHIFT)''<br />
|-<br />
| destroy_selected_element<br />
| '''delete'''<br />
|-<br />
| drop_selected_element<br />
| '''space'''<br />
|-<br />
| pickup_selected_element<br />
| '''F2'''<br />
|-<br />
| reset_rotation<br />
| '''mod_rotate''' + '''r''' || ''(Left CTRL + R)''<br />
|}<br />
<br />
===GUI===<br />
{|<br />
| toggle_gui_display<br />
| '''F4'''<br />
|-<br />
| toggle_cursor<br />
| '''f'''<br />
|-<br />
| select_target_keyboard<br />
| '''mouse1''' || ''(Left Mouse button)''<br />
|-<br />
| select_target_mouse<br />
| '''mouse2''' || ''(Right Mouse button)''<br />
|-<br />
| edf_next<br />
| '''mouse_wheel_up'''<br />
|-<br />
| edf_prev<br />
| '''mouse_wheel_down'''<br />
|-<br />
| undo<br />
| '''Ctrl''' + '''z'''<br />
|-<br />
| redo<br />
| '''Ctrl''' + '''y'''<br />
|-<br />
| properties_toggle<br />
| '''F3'''<br />
|-<br />
| browser_up<br />
| '''arrow_u''' || ''(Arrow key Up)''<br />
|-<br />
| browser_down<br />
| '''arrow_d''' || ''(Arrow key Down)''<br />
|-<br />
| browser_zoom_in<br />
| '''mouse_wheel_up'''<br />
|-<br />
| browser_zoom_out<br />
| '''mouse_wheel_down'''<br />
|-<br />
| browser_confirm<br />
| '''enter'''<br />
|-<br />
| currentelements_up<br />
| '''num_8''' || ''(Numpad key 8)''<br />
|-<br />
| currentelements_down<br />
| '''num_2''' || ''(Numpad key 2)''<br />
|-<br />
| toggle_test<br />
| '''F5'''<br />
|}<br />
<br />
==Мультиплеер==<br />
The editor is built with both serverside and clientside components, and therefore supports multiplayer out of the box. To use the editor in multiplayer with other players, simply copy all of the editor's resources into your server, start the '''editor''' resource and allow other players to join.<br />
<br />
Please note that currently the editor lacks any permissions system, ao all users have access to every function.<br />
<br />
==Плагины и внешние ресурсы==<br />
{{Main|Resource:Editor/Plugins}}<br />
<br />
The editor allows basic importing of elements from external resources. This is useful for resources that may have to manipulate an element in a specific way that cannot be performed by the editor. For example, a map resource which uses custom models (and has a script to import these models) cannot be manipulated by default within the editor. <br />
<br />
By using the '''import <resourceName>''' command in console the resource's elements can be imported within the editor.<br />
<br />
==FAQ==<br />
==== I get an "Could not start the local server. See console for details" when using the "Map Editor" button====<br />
This is because you do not have a valid editor.conf installed. You can download the default one [http://multitheftauto.googlecode.com/svn/trunk/MTA10_Server/mods/deathmatch/editor.conf here]. It should be placed in '''server/mods/deathmatch/''' in your MTA: San Andreas installation directory.<br />
<br />
==== I have saved a map but cannot find it in my server's resources directory, despite the Editor itself being able to see it ====<br />
This is due to the fact that Vista limits write-access for non-admin processes in Program Files directory. Files get written in the "VirtualStore" dir instead of real Program Files folder. You should be able to locate your map resource in a similar directory to:<br />
C:\Users\<USERNAME>\AppData\Local\VirtualStore\Program Files\MTA San Andreas\server\mods\deathmatch\resources\<br />
<br />
Running the Server/MTA San Andreas with Administrative rights will allow the map to be saved to the proper location.<br />
<br />
==== I have found a bug or have a suggestion/feedback for the map editor ====<br />
Please use the official [http://bugs.mtasa.com bugtracker] for reporting bugs. Feel free to also join us on [http://mtasa.com/irc.html IRC].<br />
<br />
<nowiki>Insert non-formatted text here</nowiki></div>D0lph1nhttps://wiki.multitheftauto.com/index.php?title=RU/Resource:Editor/EDF&diff=19321RU/Resource:Editor/EDF2009-04-26T11:09:16Z<p>D0lph1n: </p>
<hr />
<div>{{RU/Resource page}}<br />
{{translate}}<br />
EDF stands for ''Editor Definition File''. EDF's are XML files with an .edf extension that describe the custom elements used by a resource: new element types that have no meaning to MTA itself. Examples are &lt;spawnpoint&gt;, &lt;flag&gt;, &lt;checkpoint&gt; etc. They also are used to define settings that are used by gamemodes, which are placed under the &lt;settings&gt; tag within a resource's ''meta.xml''.<br />
<br />
==Введение==<br />
Some resources use custom map elements. A capture the flag gamemode, for example, will likely use &lt;flag&gt; elements that contain flag positions and teams. When a map is loaded, the gamemode looks for any &lt;flag&gt; elements and installs flags accordingly - for example by creating a flag object and a collision shape.<br />
<br />
The problem with these custom elements is that, unlike built-in MTA elements, the map editor has no idea of their meaning. How should a &lt;flag&gt; element be visually represented? What properties does it have? Without telling the editor this information, you could not use it to create these custom elements and would instead have to resort to manually editing the .map file with a text editor. Fortunately this isn't necessary: any resource can contain an editor definition file that describes the custom map elements used by that resource.<br />
<br />
==Использование определенных файлов в редакторе==<br />
As described in the [[Resource:Editor|main editor manual]], to be able to create the custom elements of a resource in your map you need to add it in the ''Definitions'' window. Click the ''Definitions'' button in the main menu and double click the resource in the left list. Then close the window and roll the mousewheel in the element panel until the resource comes up. At that point you can create and manipulate custom elements of that resource like any other element.<br />
<br />
==EDF файлы==<br />
EDF files are simply XML files with an .edf extension. We'll start with an example: the EDF of the Capture the Orb gamemode.<br />
<br />
<syntaxhighlight lang="xml"><br />
<def name="Capture the Orb"><br />
<element name="orb" friendlyname="Orb spawnpoint" instructions="Place your orb in a position that can be collected."><br />
<data name="position" type="coord3d" default="0,0,0" /><br />
<marker size="0.5" type="corona" color="#ffff00ff" /><br />
</element><br />
<element name="objective" friendlyname="Objective point" instructions="Place your objective point in a position that can be reached."><br />
<data name="position" type="coord3d" default="0,0,0" /><br />
<marker size="3" type="cylinder" color="#9370dbaa" /><br />
</element><br />
<element name="spawnpoint" friendlyname="Spawnpoint"><br />
<object editorOnly="true" model="3092" posZ="1" /><br />
<data name="position" type="coord3d" default="0,0,0" /><br />
<data name="rotation" type="coord3d" default="0,0,0" /><br />
<data name="skin" type="skinID" default="0" /><br />
</element><br />
</def><br />
</syntaxhighlight><br />
<br />
As you can see, the syntax is fairly straightforward. The root element, &lt;def&gt;, contains a number of &lt;element&gt;s. Each of these &lt;element&gt;s describes a custom element and specifies its name, visual representation and available properties.<br />
<br />
===Визуальное представление===<br />
<br />
Any child node of an &lt;element&gt; that is not a &lt;data&gt; node is part of the visual representation. There can be one or more objects, markers, pickups etc. For each representation element you can optionally specify a position (posX, posY, posZ) and rotation (rotX, rotY, rotZ): these are ''relative'' to the position and rotation of the represented custom element. Using the above Capture the Orb example, if you were to create a spawnpoint at (30, 14, 3), the editor would display an object of model 3092 at (30, 14, 4) to represent it, because the object's posZ of 1 is added to the spawnpoint's z position of 3.<br />
<br />
===Настройки===<br />
<br />
Properties of a custom element are described by &lt;data&gt; nodes. Some property names have a special meaning, like ''position'' and ''rotation'': these can be changed by moving and rotating the element in the editor. The other properties can be changed in the Properties window.<br />
<br />
===Настройки визуального редактора===<br />
<br />
It is possible to make the representation of a custom element depend on one or more of the element's properties. Take as example a &lt;checkpoint&gt; element of a race gamemode that contains a &lt;marker&gt; for representation: the checkpoint has several attributes like color and size that should be reflected in the marker. To accomplish this, specify something of the form ''!propertyname!'' in one or more of the representing element's attributes. For example:<br />
<br />
<syntaxhighlight lang="xml"><br />
<def name="Race"><br />
<element name="checkpoint" friendlyname="Race checkpoint"><br />
<data name="position" type="coord3d" required="true" default="0,0,0" /><br />
<br />
<data name="type" type="selection:checkpoint,ring" required="true" default="checkpoint" /><br />
<data name="size" type="number" required="true" default="2.25"/><br />
<data name="color" type="color" required="false" default="#ff0000ff" /><br />
...<br />
<br />
<marker type="!type!" size="!size!" color="!color!" /><br />
</element><br />
</def><br />
</syntaxhighlight><br />
<br />
Now whenever the "type", "size" or "color" property of a checkpoint is changed, the new value will be copied to its marker, and the marker's visual appearance changes accordingly.<br />
<br />
===Интеграция в ресурсах===<br />
<br />
Once you've written your EDF, save it as an .edf file in your resource's folder and add an "edf:definition" attribute to your meta.xml's &lt;info&gt; tag, like so:<br />
<br />
<syntaxhighlight lang="xml"><br />
<meta><br />
<info author="erorr404" type="gamemode" ... edf:definition="cto.edf" /><br />
...<br />
</meta><br />
</syntaxhighlight><br />
<br />
==EDF reference==<br />
<br />
===Built-in elements===<br />
These are the elements you can use for representing your custom elements, along with their properties.<br />
<br />
{| cellspacing="1"<br />
! style="background-color: #EEE" colspan="2" | &lt;blip&gt;<br />
|-<br />
! style="background-color: #EEE"|Property<br />
! style="background-color: #EEE"|Type<br />
|-<br />
| style="background-color: #EEE"|position<br />
| style="background-color: #EEE"|coord3d<br />
|-<br />
| style="background-color: #EEE"|icon<br />
| style="background-color: #EEE"|blipID<br />
|-<br />
| style="background-color: #EEE"|size<br />
| style="background-color: #EEE"|integer<br />
|-<br />
| style="background-color: #EEE"|color<br />
| style="background-color: #EEE"|color<br />
|-<br />
| style="background-color: #EEE"|dimension<br />
| style="background-color: #EEE"|integer<br />
|}<br />
<br />
<br />
{| cellspacing="1"<br />
! style="background-color: #EEE" colspan="2" | &lt;marker&gt;<br />
|-<br />
! style="background-color: #EEE"|Property<br />
! style="background-color: #EEE"|Type<br />
|-<br />
| style="background-color: #EEE"|position<br />
| style="background-color: #EEE"|coord3d<br />
|-<br />
| style="background-color: #EEE"|type<br />
| style="background-color: #EEE"|markerType<br />
|-<br />
| style="background-color: #EEE"|size<br />
| style="background-color: #EEE"|number<br />
|-<br />
| style="background-color: #EEE"|color<br />
| style="background-color: #EEE"|color<br />
|-<br />
| style="background-color: #EEE"|interior<br />
| style="background-color: #EEE"|integer<br />
|-<br />
| style="background-color: #EEE"|dimension<br />
| style="background-color: #EEE"|integer<br />
|}<br />
<br />
<br />
{| cellspacing="1"<br />
! style="background-color: #EEE" colspan="2" | &lt;object&gt;<br />
|-<br />
! style="background-color: #EEE"|Property<br />
! style="background-color: #EEE"|Type<br />
|-<br />
| style="background-color: #EEE"|model<br />
| style="background-color: #EEE"|objectID<br />
|-<br />
| style="background-color: #EEE"|position<br />
| style="background-color: #EEE"|coord3d<br />
|-<br />
| style="background-color: #EEE"|rotation<br />
| style="background-color: #EEE"|coord3d<br />
|-<br />
| style="background-color: #EEE"|interior<br />
| style="background-color: #EEE"|integer<br />
|-<br />
| style="background-color: #EEE"|dimension<br />
| style="background-color: #EEE"|integer<br />
|}<br />
<br />
<br />
{| cellspacing="1"<br />
! style="background-color: #EEE" colspan="2" | &lt;ped&gt;<br />
|-<br />
! style="background-color: #EEE"|Property<br />
! style="background-color: #EEE"|Type<br />
|-<br />
| style="background-color: #EEE"|position<br />
| style="background-color: #EEE"|coord3d<br />
|-<br />
| style="background-color: #EEE"|model<br />
| style="background-color: #EEE"|skinID<br />
|-<br />
| style="background-color: #EEE"|rotZ<br />
| style="background-color: #EEE"|number<br />
|-<br />
| style="background-color: #EEE"|interior<br />
| style="background-color: #EEE"|integer<br />
|-<br />
| style="background-color: #EEE"|dimension<br />
| style="background-color: #EEE"|integer<br />
|}<br />
<br />
<br />
{| cellspacing="1"<br />
! style="background-color: #EEE" colspan="2" | &lt;pickup&gt;<br />
|-<br />
! style="background-color: #EEE"|Property<br />
! style="background-color: #EEE"|Type<br />
|-<br />
| style="background-color: #EEE"|position<br />
| style="background-color: #EEE"|coord3d<br />
|-<br />
| style="background-color: #EEE"|type<br />
| style="background-color: #EEE"|pickupType<br />
|-<br />
| style="background-color: #EEE"|amount<br />
| style="background-color: #EEE"|number<br />
|-<br />
| style="background-color: #EEE"|respawn<br />
| style="background-color: #EEE"|integer<br />
|-<br />
| style="background-color: #EEE"|interior<br />
| style="background-color: #EEE"|integer<br />
|-<br />
| style="background-color: #EEE"|dimension<br />
| style="background-color: #EEE"|integer<br />
|}<br />
<br />
<br />
{| cellspacing="1"<br />
! style="background-color: #EEE" colspan="2" | &lt;vehicle&gt;<br />
|-<br />
! style="background-color: #EEE"|Property<br />
! style="background-color: #EEE"|Type<br />
|-<br />
| style="background-color: #EEE"|model<br />
| style="background-color: #EEE"|vehicleID<br />
|-<br />
| style="background-color: #EEE"|position<br />
| style="background-color: #EEE"|coord3d<br />
|-<br />
| style="background-color: #EEE"|rotation<br />
| style="background-color: #EEE"|coord3d<br />
|-<br />
| style="background-color: #EEE"|color<br />
| style="background-color: #EEE"|vehiclecolors<br />
|-<br />
| style="background-color: #EEE"|upgrades<br />
| style="background-color: #EEE"|vehicleupgrades<br />
|-<br />
| style="background-color: #EEE"|plate<br />
| style="background-color: #EEE"|plate<br />
|-<br />
| style="background-color: #EEE"|interior<br />
| style="background-color: #EEE"|integer<br />
|-<br />
| style="background-color: #EEE"|dimension<br />
| style="background-color: #EEE"|integer<br />
|}<br />
<br />
<br />
{| cellspacing="1"<br />
! style="background-color: #EEE" colspan="2" | &lt;radararea&gt;<br />
|-<br />
! style="background-color: #EEE"|Property<br />
! style="background-color: #EEE"|Type<br />
|-<br />
| style="background-color: #EEE"|posX<br />
| style="background-color: #EEE"|number<br />
|-<br />
| style="background-color: #EEE"|posY<br />
| style="background-color: #EEE"|number<br />
|-<br />
| style="background-color: #EEE"|sizeX<br />
| style="background-color: #EEE"|number<br />
|-<br />
| style="background-color: #EEE"|sizeY<br />
| style="background-color: #EEE"|number<br />
|-<br />
| style="background-color: #EEE"|color<br />
| style="background-color: #EEE"|color<br />
|-<br />
| style="background-color: #EEE"|dimension<br />
| style="background-color: #EEE"|integer<br />
|}<br />
<br />
===Built-in property names===<br />
Properties with these names have a special meaning to the editor and can be modified by other means than the Properties window.<br />
{| cellspacing="1"<br />
! style="background-color: #EEE"|Name<br />
! style="background-color: #EEE"|Type<br />
|-<br />
! style="background-color: #EEE"|position<br />
| style="background-color: #EEE"|coord3d<br />
|-<br />
! style="background-color: #EEE"|rotation<br />
| style="background-color: #EEE"|coord3d<br />
|}<br />
<br />
===Property types===<br />
These are the types you can choose from for the properties (&lt;data&gt;) of your custom elements.<br />
<br />
====Primitives====<br />
{| cellspacing="1"<br />
! style="background-color: #EEE"|Name<br />
! style="background-color: #EEE"|Description<br />
! style="background-color: #EEE"|Value<br />
|-<br />
! style="background-color: #EEE"|boolean<br />
| style="background-color: #EEE"|Simple boolean value.<br />
| style="background-color: #EEE"|"true" or "false"<br />
|-<br />
! style="background-color: #EEE"|natural<br />
| style="background-color: #EEE"|Natural number (whole and positive).<br />
| style="background-color: #EEE"|&nbsp;<br />
|-<br />
! style="background-color: #EEE"|integer<br />
| style="background-color: #EEE"|Whole number.<br />
| style="background-color: #EEE"|&nbsp;<br />
|-<br />
! style="background-color: #EEE"|number<br />
| style="background-color: #EEE"|Rational number.<br />
| style="background-color: #EEE"|&nbsp;<br />
|-<br />
! style="background-color: #EEE"|string<br />
| style="background-color: #EEE"|Simple string of text.<br />
| style="background-color: #EEE"|&nbsp;<br />
|-<br />
! style="background-color: #EEE"|color<br />
| style="background-color: #EEE"|color, with or without alpha.<br />
| style="background-color: #EEE"|#RRGGBB or #RRGGBBAA<br />
|}<br />
<br />
====Coordinates====<br />
{| cellspacing="1"<br />
! style="background-color: #EEE"|Name<br />
! style="background-color: #EEE"|Description<br />
! style="background-color: #EEE"|Value<br />
|-<br />
! style="background-color: #EEE"|camera<br />
| style="background-color: #EEE"|Position and lookat coordinates for the camera.<br />
| style="background-color: #EEE"|posX,posY,posZ,lookatX,lookatY,lookatZ<br />
|-<br />
! style="background-color: #EEE"|coord3d<br />
| style="background-color: #EEE"|3-component vector, typically used for positions and rotations.<br />
| style="background-color: #EEE"|x,y,z<br />
|}<br />
<br />
====Vehicles====<br />
{| cellspacing="1"<br />
! style="background-color: #EEE"|Name<br />
! style="background-color: #EEE"|Description<br />
! style="background-color: #EEE"|Value<br />
|-<br />
! style="background-color: #EEE"|plate<br />
| style="background-color: #EEE"|Number plate text for a vehicle.<br />
| style="background-color: #EEE"|&nbsp;<br />
|-<br />
! style="background-color: #EEE"|vehiclecolors<br />
| style="background-color: #EEE"|colors of a vehicle<br />
| style="background-color: #EEE"|colorID1,colorID2,colorID3,colorID4<br />
|-<br />
! style="background-color: #EEE"|vehicleupgrades<br />
| style="background-color: #EEE"|Upgrades of a vehicle<br />
| style="background-color: #EEE"|upgradeID1,upgradeID2,...<br />
|}<br />
<br />
====Model ID's====<br />
{| cellspacing="1"<br />
! style="background-color: #EEE"|Name<br />
! style="background-color: #EEE"|Description<br />
! style="background-color: #EEE"|Value<br />
|-<br />
! style="background-color: #EEE"|blipID<br />
| style="background-color: #EEE"|Picture ID for blips<br />
| style="background-color: #EEE"|&nbsp;<br />
|-<br />
! style="background-color: #EEE"|objectID<br />
| style="background-color: #EEE"|Model ID for objects<br />
| style="background-color: #EEE"|&nbsp;<br />
|-<br />
! style="background-color: #EEE"|pickupType<br />
| style="background-color: #EEE"|Armor, health or weapon<br />
| style="background-color: #EEE"|"armor", "health" or numeric weapon ID<br />
|-<br />
! style="background-color: #EEE"|skinID<br />
| style="background-color: #EEE"|Skin ID for peds<br />
| style="background-color: #EEE"|&nbsp;<br />
|-<br />
! style="background-color: #EEE"|vehicleID<br />
| style="background-color: #EEE"|Model ID for vehicles<br />
| style="background-color: #EEE"|&nbsp;<br />
|-<br />
! style="background-color: #EEE"|weaponID<br />
| style="background-color: #EEE"|Weapon, e.g. M4<br />
| style="background-color: #EEE"|Numeric weapon ID, e.g. 31<br />
|}<br />
<br />
====Colshapes and markers====<br />
{| cellspacing="1"<br />
! style="background-color: #EEE"|Name<br />
! style="background-color: #EEE"|Description<br />
! style="background-color: #EEE"|Value<br />
|-<br />
! style="background-color: #EEE"|colshapeType<br />
| style="background-color: #EEE"|collision circle, cube, rectangle, sphere or tube<br />
| style="background-color: #EEE"|One of: "colcircle", "colcube", "colrectangle", "colsphere", "coltube"<br />
|-<br />
! style="background-color: #EEE"|markerType<br />
| style="background-color: #EEE"|Arrow, checkpoint, corona, cylinder or ring marker.<br />
| style="background-color: #EEE"|One of: "arrow", "checkpoint", "corona", "cylinder", "ring"<br />
|-<br />
|}<br />
<br />
====Specials====<br />
{| cellspacing="1"<br />
! style="background-color: #EEE"|Name<br />
! style="background-color: #EEE"|Description<br />
! style="background-color: #EEE"|Value<br />
|-<br />
! style="background-color: #EEE"|element:type<br />
| style="background-color: #EEE"|Element of a certain type, for example: element:flag<br />
| style="background-color: #EEE"|The element's ID<br />
|-<br />
! style="background-color: #EEE"|selection:val1,val2,...<br />
| style="background-color: #EEE"|Shows a dropdown box from which to pick one value.<br />
| style="background-color: #EEE"|The selected value<br />
|}</div>D0lph1nhttps://wiki.multitheftauto.com/index.php?title=RU/Client_side_scripts&diff=19320RU/Client side scripts2009-04-26T11:08:37Z<p>D0lph1n: </p>
<hr />
<div>{{translate}}<br />
lient side scripts are scripts that run inside the deathmatch mod client side. This means that have access to more information about the game world, but slightly less information about the rest of the players in the game.<br />
<br />
This is useful for things that need to be done client-side, such as visual effects, creation and manipulation of GUI elements.<br />
<br />
==How does it work?==<br />
Client-side scripts follow the same pattern as server-side scripts. We will try to provide the necessary functionality for client-side scripts. Interfacing between a server-side and client-side script is done by using the same event system as we already have. The server-side and client-side scripts will need to be in two different files, which are included from the resource (in the metafile) by using a <script> tag (and type attribute).<br />
<br />
For example:<br />
<syntaxhighlight lang="xml"><br />
<!-- GUI (client) testing script --><br />
<meta><br />
<script src="guitest.lua" type="client" /><br />
<info author="IJs" /><br />
</meta><br />
</syntaxhighlight><br />
<br />
If you wanted to trigger a client side event from the server, you would first have to register the client side event using [[addEvent]]. Then, you can attach a handler to the event as you would in a server side script. Then in the server side script, you'll be able to call [[triggerClientEvent]] ( player, "eventName", fromElement, args ... ) which will trigger the event client side. The same can be done in reverse using [[triggerServerEvent]].<br />
<br />
For example:<br />
<br />
'''Client-side:'''<br />
<syntaxhighlight lang="lua"><br />
function showObjectBrowser(id)<br />
-- code here<br />
end<br />
<br />
addEvent("doShowObjectBrowser", true)<br />
addEventHandler("doShowObjectBrowser", getRootElement(), showObjectBrowser)<br />
</syntaxhighlight><br />
<br />
'''Server-side:'''<br />
<syntaxhighlight lang="lua"><br />
triggerClientEvent ( somePlayer, "doShowObjectBrowser", getRootElement(), 1034 )<br />
</syntaxhighlight><br />
<br />
[[it:Script client-side]]</div>D0lph1nhttps://wiki.multitheftauto.com/index.php?title=RU/Map_manager&diff=19319RU/Map manager2009-04-26T11:08:02Z<p>D0lph1n: </p>
<hr />
<div>{{translate}}<br />
The map manager is a resource included in the MTA DM server suite. It offers commands, functions and events for the gamemodes to dynamically manage their maps. For example, when a race server needs to load different tracks for each race, instead of having all of them in the same resource as the main script, they can be stored in separate resources and then loaded simply with the "changeGamemodeMap" function when a new race starts. <br />
<br />
Specifically, the map manager lists gamemodes/maps and manages gamemode/map loading. It applies certain map settings affecting the game world and sets ASE game type and map name rule values as well. It includes a web listing which autoupdates and highglights the current mode/map combination.<br />
<br />
==A simple tutorial==<br />
In this section we are going to continue the basic gamemode we created in the [[Scripting Introduction|Introduction to Scripting]]. We will add a simple map resource that only contains the spawnpoint data for the players, and load the data in the main script when the player needs to spawn.<br />
<br />
First of all, we make a folder under /Your MTA Server/mods/deathmatch/resources/, and name it "mymap". Then under /mymap/ directory, create a text file and name it "meta.xml", which is required for every resource.<br />
<br />
Enter the following codes in the ''meta.xml'' file:<br />
<syntaxhighlight lang="xml"><br />
<meta><br />
<info type="map" gamemodes="myserver"/><br />
<map src="mymap.map"/><br />
</meta><br />
</syntaxhighlight><br />
Note that this resource is "linked" to the main resource with the ''gamemodes=""'' tag, which contains the name of the main resource. In the ''map'' tag, it indicates the name of the .map file which contains the actual map data.<br />
<br />
Now let's create another text file under /mymap/ and name it "mymap.map", and enter the following codes:<br />
<syntaxhighlight lang="xml"><br />
<map><br />
<spawnpoint id="spawnpoint1" posX="1959.5487060547" posY="-1714.4613037109" posZ="18" rot="63.350006103516" model="0"/><br />
</map><br />
</syntaxhighlight><br />
Note that "spawnpoint" is the type of the element, used in [[getElementsByType]] function; likewise, "id" is used in [[getElementByID]] function. <br />
<br />
To load the map data, the main script needs access to the map resource itself. Now let's edit the script.lua file in "myserver" resource. Enter the following code:<br />
<br />
<syntaxhighlight lang="lua"><br />
function loadMap(startedMap)<br />
mapRoot = getResourceRootElement(startedMap)<br />
end<br />
<br />
addEventHandler("onGamemodeMapStart", getRootElement(), loadMap)<br />
</syntaxhighlight><br />
Basically, the "onGamemodeMapStart" event gives us the handle of the map ("startedMap"), which we used to extract the handle of the resource containing the map ("mapRoot").<br />
<br />
With the resource handle, we can extract the spawnpoint information from it. Look at the joinHandler() function in script.lua, instead of specifying x, y and z, we can use the map data as the following:<br />
<syntaxhighlight lang="lua"><br />
function joinHandler()<br />
local spawn = getElementsByType("spawnpoint", mapRoot)<br />
local x,y,z,r<br />
for key, value in pairs(spawn) do<br />
x = getElementData(value, "posX")<br />
y = getElementData(value, "posY")<br />
z = getElementData(value, "posZ")<br />
r = getElementData(value, "rot")<br />
end<br />
spawnPlayer(source, x, y, z)<br />
fadeCamera(source, true)<br />
end<br />
</syntaxhighlight><br />
Now you may start the gamemode in the server console with the following command:<br />
<br />
'''gamemode myserver mymap'''<br />
<br />
==Usage==<br />
To use the map manager, your resources must first be marked as either gamemodes or maps.<br />
<br />
You have to tag the '''gamemode resource''' with the correct type in its info tag:<br />
<syntaxhighlight lang="xml"><info description="A gamemode" type="gamemode" /></syntaxhighlight><br />
<br />
'''Map resources''' also need the ''type="map"'' tag, plus a ''gamemodes'' tag listing the gamemode resources they're compatible with in a comma-separated list ''without spaces''.<br />
<syntaxhighlight lang="xml"><info description="A gamemode map" type="map" gamemodes="ctv,koth" /></syntaxhighlight><br />
<br />
There can be only one gamemode and one gamemode map loaded at once.<br />
<br />
==Optional resource attributes==<br />
These attributes all go in the corresponding resource's info tag.<br />
<br />
'''name:''' A friendly name for your gamemode or map, to be displayed in the start messages or map listings instead of the filename.<br />
<br />
==Commands==<br />
'''changemap newmap [newgamemode]''' (changes the gamemode map to a new one, optionally changing the gamemode as well)<br />
<br />
'''changemode newgamemode [newmap]''' (changes to a new gamemode, optionally starting a map with it)<br />
<br />
'''gamemode newgamemode [newmap]''' (same as previous one)<br />
<br />
'''stopmode''' (stops the current mode and mode map)<br />
<br />
'''stopmap''' (stops the current mode map)<br />
<br />
'''maps [gamemode]''' (lists all maps in the server, optionally all maps compatible with a gamemode)<br />
<br />
'''gamemodes''' (lists all gamemodes)<br />
<br />
==Settings==<br />
'''*mapmanager.color''' [hex color string] (changes the mapmanager's output messages' color) (default: #E1AA5A)<br />
<br />
'''*mapmanager.messages''' [boolean] (whether map/gm changes are enabled) (default: true)<br />
<br />
'''*mapmanager.ASE''' [boolean] (whether the manager will set ASE gametype / mapname) (default: true)<br />
<br />
==Exported functions==<br />
<syntaxhighlight lang="lua">bool changeGamemode ( resource newGamemode, [ resource mapToLoadWith ] )</syntaxhighlight><br />
Changes the gamemode to a new one, optionally specifying an initial map for it (will load without a map by default).<br />
<syntaxhighlight lang="lua">bool changeGamemodeMap ( resource newMap, [ resource gamemodeToChangeTo ] )</syntaxhighlight><br />
Changes the GM map to a new one, optionally specifying a gamemode to change to before loading it (will load with the current gamemode by default).<br />
<syntaxhighlight lang="lua">table getGamemodes ( )</syntaxhighlight><br />
Returns a table of all gamemode resource pointers.<br />
<syntaxhighlight lang="lua">table getGamemodesCompatibleWithMap ( resource theMap )</syntaxhighlight><br />
Returns a table of compatible gamemode resource pointers.<br />
<syntaxhighlight lang="lua">table getMaps ( )</syntaxhighlight><br />
Returns a table of all map resource pointers.<br />
<syntaxhighlight lang="lua">table getMapsCompatibleWithGamemode ( [ resource theGamemode ] )</syntaxhighlight><br />
Returns a table of compatible map resource pointers. If the gamemode is left blank, it returns all maps which aren't compatible with any gamemode.<br />
<syntaxhighlight lang="lua">resource getRunningGamemode ( )</syntaxhighlight><br />
Returns the currently running gamemode's resource pointer.<br />
<syntaxhighlight lang="lua">resource getRunningGamemodeMap ( )</syntaxhighlight><br />
Returns the currently running GM map's resource pointer.<br />
<syntaxhighlight lang="lua">bool isGamemode ( resource theGamemode )</syntaxhighlight><br />
Determines if a resource is a gamemode or not.<br />
<syntaxhighlight lang="lua">bool isGamemodeCompatibleWithMap ( resource theGamemode, resource theMap )</syntaxhighlight><br />
Determines if a gamemode is compatible with a map or not.<br />
<syntaxhighlight lang="lua">bool isMap ( resource theMap )</syntaxhighlight><br />
Determines if a resource is a map or not.<br />
<syntaxhighlight lang="lua">bool isMapCompatibleWithGamemode ( resource theMap, resource theGamemode )</syntaxhighlight><br />
Determines if a map is compatible with a gamemode or not.<br />
<syntaxhighlight lang="lua">bool stopGamemode ( )</syntaxhighlight><br />
Stops the current gamemode and its map.<br />
<syntaxhighlight lang="lua">bool stopGamemodeMap ( )</syntaxhighlight><br />
Stop the current GM map.<br />
Determines if a map is compatible with a gamemode or not.<br />
<br />
==Fired events==<br />
''(For all these events, "source" is the resource's root element.)''<br />
<syntaxhighlight lang="lua">onGamemodeStart ( resource startedGamemode )</syntaxhighlight><br />
Fired before a gamemode starts.<br />
<syntaxhighlight lang="lua">onGamemodeStop ( resource stoppedGamemode )</syntaxhighlight><br />
Fired before a gamemode is stopped.<br />
<syntaxhighlight lang="lua">onGamemodeMapStart ( resource startedMap )</syntaxhighlight><br />
Fired before a GM map starts.<br />
<syntaxhighlight lang="lua">onGamemodeMapStop ( resource stoppedMap )</syntaxhighlight><br />
Fired before a GM map is stopped.<br />
<br />
==Supported map settings==<br />
The following settings from the [[settings system|registry]] are applied by the map manager when a map is started:<br />
<br>'''gamespeed''' [number]: The map's game speed.<br />
<br>'''gravity''' [number]: The map's gravity.<br />
<br>'''time''' [string of the form '''hh:mm''']: The map's time.<br />
<br>'''weather''' [number]: The map's weather ID.<br />
<br>'''waveheight''' [number]: The map's wave height.<br />
<br>'''locked_time''' [boolean]: Whether the set time will be frozen by the manager or not.<br />
<br>'''minplayers''' [number]: The required minimum number of players to start the map.<br />
<br>'''maxplayers''' [number]: The allowed maximum number of players to start the map.<br />
<br />
[[en:Map manager]]<br />
[[it:Map manager]]</div>D0lph1nhttps://wiki.multitheftauto.com/index.php?title=RU/Meta.xml&diff=19318RU/Meta.xml2009-04-26T11:07:52Z<p>D0lph1n: </p>
<hr />
<div>{{translate}}<br />
This file stores one of the most important stuff that resource/gamemode/map can load. You'll need to include names of files that you script/gamemode (resource) is going to use in an '''meta.xml''' file.<br />
Eg. If you want to display an image on the client's screen, the client needs to download the image first. To tell the server that you want to use an image in the script you'll need to include the file's name in the meta.xml file.<br /><br />
If you want to use some settings for the script as a variable you can set them in <settings> tag.<br />
<br />
Note: You can try simple Meta.xml generator made by 50p: http://forum.mtasa.com/viewtopic.php?f=91&t=22247<br />
<br />
== Possible tags ==<br />
Tags in .xml are same as in the . html. meta.xml file has got couple of tags that are required and not required. There are attributes as well.<br />
<br />
Possible tags:<br />
*'''<info />''' Information about this resource, possible parameters include (any arbitrary parameters can be used and read using [[getResourceInfo]]):<br />
** '''author:''' The author of this resource<br />
** '''version:''' The version of this resource<br />
** '''name:''' The name of this resource<br />
** '''description:''' A brief description of this resource<br />
** '''type:''' The type of this resource, that can be "gamemode", "script" or "map".<br />
*'''<script />''' Source code for this resource, possible parameters are:<br />
** '''src:''' The file name of the source code<br />
** '''type:''' The type of source code: "client" or "server"<br />
*'''<map />''' The map for a gamemode, possible parameters are:<br />
**'''src:''' .map file name (can be path too eg. "maps/filename.map")<br />
*'''<file />''' A client-side file. Generally these are images, .txd, .col, .dff or .xml files. They'll be downloaded by clients when the resources is started (or on join)<br />
**'''src:''' client-side file name (can be path too eg. "images/image.png")<br />
*'''<include />''' Include resources that this resource will use<br />
**'''resource:''' Resource name that you want to start with this resource<br />
*'''<config />''' Config file (.xml) can be accessed by resource, possible parameters are:<br />
**'''src:''' The file name of the config file<br />
**'''type:''' The type of the config file: "client" or "server"<br />
*'''<export />''' This exports functions from this resource, so other resources can use them with [[call]]<br />
**'''function:''' The function name<br />
**'''http:''' Can the function be called via HTTP (true/false)<br />
*'''<html />'''<br />
**'''src:''' The filename for the HTTP file (can be a path)<br />
**'''default:''' The html file is one that is shown by default when visiting /resourceName/ on the server. Only one html can be default, the rest are ignored. (true/false)<br />
**'''raw:''' The html file is not parsed by the LUA interpreter and is treated as binary data. Must be used for binary files (images mainly) (true/false)<br />
*'''<settings> </settings>'''<br />
<br />
== Example ==<br />
Heres an example of a meta file using some of the tags mentioned:<br />
<syntaxhighlight lang="xml"><meta><br />
<info author="Slothman" type="gamemode" name="Stealth" /><br />
<config src="help.xml" type="client"/><br />
<br />
<script src="stealthmain_server.lua" /><br />
<script src="noiseblip.lua" /><br />
<script src="mission_timer.lua" /><br />
<script src="gadgets_server.lua" /><br />
<script src="gadgets_client.lua" type="client"/><br />
<script src="stealthmain_client.lua" type="client"/><br />
<script src="noisebar.lua" type="client"/><br />
<script src="spycam.lua" type="client"/><br />
<br />
<file src="riot_shield.txd" /><br />
<file src="riot_shield.dff" /><br />
<file src="riot_shield.col" /><br />
<file src="armor.png" /><br />
<file src="camera.png" /><br />
<file src="cloak.png" /><br />
<file src="goggles.png" /><br />
<file src="mine.png" /><br />
<file src="radar.png" /><br />
<file src="shield.png" /><br />
<br />
<include resource="scoreboard" /><br />
<include resource="killmessages" /><br />
<include resource="maplimits" /><br />
<br />
<settings><br />
<setting name="roundlimit" value="[6]" /> <!-- round length in minutes --><br />
<setting name="teamdamage" value="[1]" /> <!-- 0 for team protection off, 1 for team protection on --><br />
<setting name="teambalance" value="[1]" /> <!-- difference limit of amount of players between teams --><br />
<setting name="spazammo" value="[25]" /> <!-- ammo amounts --><br />
<setting name="m4ammo" value="[100]" /><br />
<setting name="shotgunammo" value="[25]" /><br />
<setting name="sniperammo" value="[20]" /><br />
<setting name="ak47ammo" value="[120]" /><br />
<setting name="rifleammo" value="[40]" /><br />
<setting name="deserteagleammo" value="[45]" /><br />
<setting name="pistolammo" value="[132]" /><br />
<setting name="uziammo" value="[150]" /><br />
<setting name="tec9ammo" value="[150]" /><br />
<setting name="silencedammo" value="[65]" /><br />
<setting name="grenadeammo" value="[4]" /><br />
<setting name="satchelammo" value="[4]" /><br />
<setting name="teargasammo" value="[4]" /><br />
<setting name="molatovammo" value="[4]" /><br />
</settings><br />
</meta></syntaxhighlight><br />
[[Category:Scripting Concepts]]<br />
[[Category:Incomplete]]</div>D0lph1nhttps://wiki.multitheftauto.com/index.php?title=RU/Resources&diff=19317RU/Resources2009-04-26T11:07:39Z<p>D0lph1n: </p>
<hr />
<div>{{translate}}<br />
Resources are a key part of MTA. A resource is essentially a folder or zip file that contains a collection of files - including essential script files, plus a ''meta'' file that describes how the resource should be loaded. 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. Its worth remember though, that unlike programs on an operating system, there is no multi-tasking between resources.<br />
<br />
==Terminology==<br />
* '''Resource''' - A zip file or folder containing a meta.xml file and a number of resource items. These are placed in the ''mods/deathmatch/resources'' folder in the server directory.<br />
* '''Resource item''' - A file contained within a resource, currently this can be a map, script, images etc.<br />
<br />
==The Meta File==<br />
''See main article [[Meta.xml]] for details''<br />
<br />
The Meta file is the core of each the resource. It describes exactly what files in the resource should be used, and how. The following is an example that covers every option there is, your meta files can have as many or as few of these tags as you require:<br />
<br />
<syntaxhighlight lang="xml"><br />
<meta><br />
<info author="eAi" description="This is a basic CTF script" version="4"/><br />
<br />
<include resource="radarblips"/><br />
<include resource="markermanagement" /><br />
<br />
<script src="ctf.lua" /><br />
<script src="flag.lua" /><br />
<script src="ctf_client.lua" type="client" /><br />
<br />
<file src="model.dff" /><br />
<file src="quitbutton.png" /><br />
<file src="killed.png" /><br />
<br />
<html src="test.htm" default="true"/><br />
<html src="logo.png" raw="true" /><br />
<br />
<export function="multiply" http="true" /><br />
<export function="getPlayerList" /><br />
<export function="getElementOwner" type="client"/><br />
<br />
<config src="vehicle-list.xml" type="client" /><br />
<config src="markerconfig.xml" type="server" /><br />
<br />
<map src="somestuff.map" dimension="99" /><br />
</meta><br />
</syntaxhighlight><br />
While a CTF map may have a meta.xml that looks like:<br />
<syntaxhighlight lang="xml"><br />
<meta><br />
<include resource="ctf" /><br />
<map src="myuberl33tctfmap.map" /><br />
<br />
<info author="Tom" instructions="this is uber l33t !!!!!1111111" type="map" /><br />
</meta><br />
</syntaxhighlight><br />
<br />
<br />
Script/type, Config/type and File/type attributes specify if the script/resource should be sent to clients or not, and defaults to "server".<br />
<br />
The include tag specifies other resources that should be started before this resoucre is started. In other words, if your resource is dependent on another, you can include it so that the other resource is started first,<br />
<br />
<br />
Each resource has its own virtual machine (VM). This contains every script in the resource. This means that variables are not shared with other resources. The best way to communictate with other resources is by using the ''export'' tag and exporting a function. This will enable other resources to fire this function using the [[call]] scripting function.<br />
<br />
<br />
Scripts sent to clients are started as soon as all the scripts have been downloaded.<br />
<br />
<br />
Scripts are able to read and write to their own resource folder with functions such as [[xmlCreateFile]] and [[fileCreate]]. They can also read and write to other resources, but must have [[Access_Control_List|ACL]] access. <br />
<br />
<br />
Each resource can only be loaded once, the server will ensure this. If a resource is included more than once, the same instance will be used by each resource that includes it.<br />
<br />
==File storage==<br />
Resource files can either be stored in a zip or a directory. This is located in:<br />
<br />
mods/deathmatch/resources/<br />
<br />
Each resource can have a zip file, a directory or both. In the case of both existing, the directory has precedence over the zip file, as such files can be placed in the directory to over-ride the files in the zip file. This allows directories to be used for testing and developing of maps/scripts while zip files used by end-users.<br />
<br />
==Script functions==<br />
The resource system can be manipulated by script. As such, the following Serverside scripting functions are provided:<br />
{{Resource functions}}<br />
<br />
The following events are also provided:<br />
{{Resource_events}}</div>D0lph1nhttps://wiki.multitheftauto.com/index.php?title=Category:%D0%AD%D0%BB%D0%B5%D0%BC%D0%B5%D0%BD%D1%82&diff=19316Category:Элемент2009-04-26T11:07:15Z<p>D0lph1n: </p>
<hr />
<div>{{translate}}<br />
An [[element]] is a generic class that can represent almost all in-game [[entity|entities]]. The built-in element types are:<br />
<br />
{{Elements}}<br />
<br />
Any other element type can be created as an abstract element, not referring to any game [[entity]]. For example, '''resource''' and '''map''' elements are created when resources and maps are loaded to group entities they create as their children.<br />
<br />
Elements share common functions such as type and list retrieval, a destroy operation to remove both the element and the game entity it is linked to (except for some elements which can't be destroyed, for example client elements), [[element data]] storing and retrieval, and many more common operations.<br />
<br />
All elements are stored internally in a [[Element tree|tree structure]], and as such every element except the '''root''' element has a parent element, that can be the '''root''' element, a '''resource''', '''map''' or another element. This is purely for declaring the scope of function calls.<br />
<br />
==Related scripting functions==<br />
===Client===<br />
{{Client element functions}}<br />
===Server===<br />
{{Element functions}}<br />
[[Category:Scripting Concepts]]<br />
<br />
[[it:Elemento]]<br />
[[en:Element]]</div>D0lph1nhttps://wiki.multitheftauto.com/index.php?title=RU/MTA_Classes&diff=19315RU/MTA Classes2009-04-26T11:05:01Z<p>D0lph1n: </p>
<hr />
<div>{{translate}}<br />
In order to perform operations on MTA objects via scripting, pointers to internal classes are exported to scripts as Lua userdata. Each of these classes has a number of exported scripting functions associated to them.<br />
<br />
The complete list of classes to be found in scripts follows:<br />
<br />
* [[account|Account]]<br />
* [[acl|ACL]]<br />
* [[aclgroup|ACL group]]<br />
* [[Ban]]<br />
* [[element|Element]]<br />
<ul>{{Elements}}</ul><br />
* [[resource|Resource]]<br />
* [[textdisplay|Text display]]<br />
* [[textitem|Text item]]<br />
* [[timer|Timer]]<br />
* [[xmlnode|XML node]]<br />
[[Category:Scripting Concepts]]<br />
[[it:Classi di MTA]]<br />
[[ru:Классы MTA]]</div>D0lph1nhttps://wiki.multitheftauto.com/index.php?title=RU/Debugging&diff=19314RU/Debugging2009-04-26T11:04:47Z<p>D0lph1n: </p>
<hr />
<div>{{translate}}<br />
While scripting you will often come across problems that are not immediately apparent. This page tries to point out some basic strategies to locate the error.<br />
<br />
==Debug console==<br />
MTA features a built-in debug console that shows debug messages output from MTA functions or from scripts. You can open it by typing ''debugscript x'' in console, while ''x'' is the debug level:<br />
* '''1:''' only errors<br />
* '''2:''' errors and warnings<br />
* '''3:''' errors, warnings and info messages<br />
Thus, by typing ''debugscript 3'' all messages are visible, that or level 2 are recommended for most occasions. You should have debugscript enabled most of the time you are testing your scripts, this will help you detect typos or other simple issues and solve them easily.<br />
<br />
===Example===<br />
This example snippet has two errors:<br />
<syntaxhighlight lang="lua"><br />
if (getClientName(player) == "Fedor")<br />
outputChatbox("Hello Fedor")<br />
end<br />
</syntaxhighlight><br />
When the script this piece of code is in is tried to be loaded, debugscript will output something similiar to this:<br />
{{Debug info|Loading script failed: C:\<server path>\mods\deathmatch\resources\myResource\script.lua:15: 'then' expected near ´outputChatbox'}}<br />
This means the script could not be parsed, because there was a syntax error. It shows the path of the script, so you can also see what resource it is in ('myResource' in this case) and of course the name of the script. After the filename it shows the line number and again after that what was wrong. Easy to solve now, we just forgot the 'then' keyword:<br />
<syntaxhighlight lang="lua"><br />
if (getClientName(player) == "Fedor") then<br />
outputChatbox("Hello Fedor")<br />
end<br />
</syntaxhighlight><br />
Now the script will load fine and won't output any errors, until a player with the name 'Fedor' enters this section of the script. Then, debugscript will output:<br />
{{Debug error|C:\<server path>\mods\deathmatch\resources\d\script.lua:15: attempt to call global 'outputChatbox' (a nil value)}}<br />
This means the called function does not exist, which can be easily explained since the functions' name is ''outputChatBox'' (with a capital ''B''):<br />
<syntaxhighlight lang="lua"><br />
if (getClientName(player) == "Fedor") then<br />
outputChatBox("Hello Fedor")<br />
end<br />
</syntaxhighlight><br />
<br />
This is of course just an example, there are plenty of other messages and scenarios, but you should get the idea.<br />
<br />
==Debug logging==<br />
You can also turn debug message logging on by editing ''coreconfig.xml'' in your GTA\MTA folder. You should find the following tag:<br />
<syntaxhighlight lang="xml"><debugfile/></syntaxhighlight><br />
<br />
Replace that with a tag specifying the file you want to log messages to (file path is relative from the GTA folder):<br />
<syntaxhighlight lang="xml"><debugfile>MTA\debugscript.log</debugfile></syntaxhighlight><br />
<br />
All debug messages will be appended to the specified file from now on. To turn logging off, replace that line with an empty tag again.<br />
<br />
==Debug strategies==<br />
There are several strategies that support finding errors, apart from going through the code of course. Most of them include outputting debug messages, with differing information depending on the situtation.<br />
<br />
===Useful functions===<br />
First of all some functions that may come in handy for debugging.<br />
* [[outputDebugString]] or [[outputChatBox]] for outputting any information<br />
* [http://www.lua.org/manual/5.1/manual.html#pdf-tostring tostring()] on a variable to turn it into a string, for example when it contains a boolean value<br />
* [[getElementType]] to check an MTA Element for its type<br />
<br />
===Add debugmessages to check ''if'', ''when'' or ''how often'' a section of code is executed===<br />
A typical example would be verify whether an ''if''-section is executed or not. To do that, just add any message you will recognize later within the ''if''-section.<br />
<syntaxhighlight lang="lua"><br />
if (variable1 == variable2) then<br />
outputDebugString("entered if")<br />
-- do anything<br />
end<br />
</syntaxhighlight><br />
<br />
Another application would be to check when variable values are modified. First search for all occurences of the variable being edited and add a message just beside it.<br />
<br />
===Add debugmessages to check the ''value'' of a variable===<br />
Let's say you want to create a marker, but it doesn't appear at the position you expect it to be. The first thing you might want to do is check if the [[createMarker]] function is executed. But while doing this, you can also check the values being used in the [[createMarker]] function in one run.<br />
<syntaxhighlight lang="lua"><br />
outputChatBox(tostring(x).." "..tostring(y).." "..tostring(z))<br />
createMarker(x,y,z)<br />
</syntaxhighlight><br />
This would output all three variables that are used as coordinates for the marker. Assuming you read those from a map file, you can now compare the debug output to the desired values. The [http://www.lua.org/manual/5.1/manual.html#pdf-tostring tostring()] will ensure that the variables' value can be put together as a string, even if it's a boolean value for example.<br />
<br />
==Example==<br />
Imagine you created a colshape (collision shape) somewhere and you want a player to stay 10 seconds in it, then perform some action.<br />
<syntaxhighlight lang="lua"><br />
function colShapeHit(player)<br />
-- set a timer to output a message (could as well execute another function)<br />
-- store the timer id in a table, using the player as index<br />
colshapeTimer[player] = setTimer(outputChatBox,10000,1,"The player stayed 10 seconds in the colshape!")<br />
end<br />
addEventHandler("onColShapeHit",getRootElement(),colShapeHit)<br />
<br />
function colShapeLeave(player)<br />
-- kill the timer when the player leaves the colshape<br />
killTimer(colshapeTimer[player])<br />
end<br />
addEventHandler("onColShapeLeave",getRootElement(),colShapeLeave)<br />
</syntaxhighlight><br />
When a player enters the colshape, debugscript outputs the following message:<br />
{{Debug error|..[path]: attempt to index global 'colshapeTimer' (a nil value)}}<br />
This means you tried to index a table that does not exist. In the example above, this is done when storing the timer id in the table. We need to add a check if the table exists and if not create it.<br />
<br />
<syntaxhighlight lang="lua"><br />
function colShapeHit(player)<br />
if (colshapeTimer == nil) then<br />
colshapeTimer = {}<br />
end<br />
-- set a timer to output a message (could as well execute another function)<br />
-- store the timer id in a table, using the player as index<br />
colshapeTimer[player] = setTimer(outputChatBox,10000,1,"The player stayed 10 seconds in the colshape!")<br />
end<br />
addEventHandler("onColShapeHit",getRootElement(),colShapeHit)<br />
<br />
function colShapeLeave(player)<br />
-- kill the timer when the player leaves the colshape<br />
killTimer(colshapeTimer[player])<br />
end<br />
addEventHandler("onColShapeLeave",getRootElement(),colShapeLeave)<br />
</syntaxhighlight><br />
<br />
Now we still get a warning when a player enters the colshape, waits for the message and leaves it again:<br />
<br />
{{Debug warning|[..]: Bad argument @ 'killTimer' Line: ..}}<br />
<br />
Except for that (we will talk about that later) everything seems to work fine. A player enters the colshape, the timer is started, if he stays the message occurs, if he leaves the timer is killed.<br />
<br />
===A more inconspicuous error===<br />
But for some reason the message gets outputted twice when you stay in the colcircle while in a vehicle. Since it would appear some code is executed twice, we add debug messages to check this.<br />
<br />
<syntaxhighlight lang="lua"><br />
function colShapeHit(player)<br />
if (colshapeTimer == nil) then<br />
colshapeTimer = {}<br />
end<br />
-- add a debug message<br />
outputDebugString("colShapeHit")<br />
-- set a timer to output a message (could as well execute another function)<br />
-- store the timer id in a table, using the player as index<br />
colshapeTimer[player] = setTimer(outputChatBox,10000,1,"The player stayed 10 seconds in the colshape!")<br />
end<br />
addEventHandler("onColShapeHit",getRootElement(),colShapeHit)<br />
<br />
function colShapeLeave(player)<br />
-- add a debug message<br />
outputDebugString("colShapeLeave")<br />
-- kill the timer when the player leaves the colshape<br />
killTimer(colshapeTimer[player])<br />
end<br />
addEventHandler("onColShapeLeave",getRootElement(),colShapeLeave)<br />
</syntaxhighlight><br />
<br />
Now we notice that both handler functions get executed twice when we are in a vehicle, but only once when we are on-foot. It would appear the vehicle triggers the colshape as well. To confirm this theory, we check the ''player'' variable that '''should''' contain a player element.<br />
<br />
<syntaxhighlight lang="lua"><br />
function colShapeHit(player)<br />
if (colshapeTimer == nil) then<br />
colshapeTimer = {}<br />
end<br />
-- add a debug message, with the element type<br />
outputDebugString("colShapeHit "..getElementType(player))<br />
-- set a timer to output a message (could as well execute another function)<br />
-- store the timer id in a table, using the player as index<br />
colshapeTimer[player] = setTimer(outputChatBox,10000,1,"The player stayed 10 seconds in the colshape!")<br />
end<br />
addEventHandler("onColShapeHit",getRootElement(),colShapeHit)<br />
<br />
function colShapeLeave(player)<br />
-- add a debug message, with the element type<br />
outputDebugString("colShapeLeave "..getElementType(player))<br />
-- kill the timer when the player leaves the colshape<br />
killTimer(colshapeTimer[player])<br />
end<br />
addEventHandler("onColShapeLeave",getRootElement(),colShapeLeave)<br />
</syntaxhighlight><br />
<br />
The debug messages tell us that one of the ''player'' variables is a player, the other one a vehicle element. Since we only want to react when a player enters the colshape, we add an ''if'' that will end the execution of the function if it's '''not''' an player element.<br />
<br />
<syntaxhighlight lang="lua"><br />
function colShapeHit(player)<br />
if (colshapeTimer == nil) then<br />
colshapeTimer = {}<br />
end<br />
-- add a check for the element type<br />
if (getElementType(player) ~= "player") then return end<br />
-- add a debug message, with the element type<br />
outputDebugString("colShapeHit "..getElementType(player))<br />
-- set a timer to output a message (could as well execute another function)<br />
-- store the timer id in a table, using the player as index<br />
colshapeTimer[player] = setTimer(outputChatBox,10000,1,"The player stayed 10 seconds in the colshape!")<br />
end<br />
addEventHandler("onColShapeHit",getRootElement(),colShapeHit)<br />
<br />
function colShapeLeave(player)<br />
-- add a check for the element type<br />
if (getElementType(player) ~= "player") then return end<br />
-- add a debug message, with the element type<br />
outputDebugString("colShapeLeave "..getElementType(player))<br />
-- kill the timer when the player leaves the colshape<br />
killTimer(colshapeTimer[player])<br />
end<br />
addEventHandler("onColShapeLeave",getRootElement(),colShapeLeave)<br />
</syntaxhighlight><br />
<br />
Now the script should work as desired, but will still output the warning mentioned above. This happens because the timer we try to kill when a player leaves the colshape will not exist anymore when it reached the 10 seconds and is executed. There are different ways to get rid of that warning (since you know that the timer might not exist anymore and you only want to kill it if it is there). One way would be to check if the timer referenced in the table really exists. To do this, we need a little help function:<br />
<syntaxhighlight lang="lua"><br />
function isTimer(timer)<br />
local timers = getTimers()<br />
for k,v in ipairs(timers) do<br />
if (v == timer) then<br />
return true<br />
end<br />
end<br />
return false<br />
end<br />
</syntaxhighlight><br />
Which we will use when we kill the timer:<br />
<syntaxhighlight lang="lua"><br />
if (isTimer(colshapeTimer[player])) then<br />
killTimer(colshapeTimer[player])<br />
end<br />
</syntaxhighlight><br />
<br />
So the complete working code would be:<br />
<syntaxhighlight lang="lua"><br />
function colShapeHit(player)<br />
if (colshapeTimer == nil) then<br />
colshapeTimer = {}<br />
end<br />
-- add a check for the element type<br />
if (getElementType(player) ~= "player") then return end<br />
-- add a debug message, with the element type<br />
outputDebugString("colShapeHit "..getElementType(player))<br />
-- set a timer to output a message (could as well execute another function)<br />
-- store the timer id in a table, using the player as index<br />
colshapeTimer[player] = setTimer(outputChatBox,10000,1,"The player stayed 10 seconds in the colshape!")<br />
end<br />
addEventHandler("onColShapeHit",getRootElement(),colShapeHit)<br />
<br />
function colShapeLeave(player)<br />
-- add a check for the element type<br />
if (getElementType(player) ~= "player") then return end<br />
-- add a debug message, with the element type<br />
outputDebugString("colShapeLeave "..getElementType(player))<br />
-- kill the timer when the player leaves the colshape<br />
if (isTimer(colshapeTimer[player])) then<br />
killTimer(colshapeTimer[player])<br />
end<br />
end<br />
addEventHandler("onColShapeLeave",getRootElement(),colShapeLeave)<br />
<br />
function isTimer(timer)<br />
local timers = getTimers()<br />
for k,v in ipairs(timers) do<br />
if (v == timer) then<br />
return true<br />
end<br />
end<br />
return false<br />
end<br />
</syntaxhighlight><br />
<br />
[[it:Guida al Debug]]<br />
[[Category:Scripting Concepts]]</div>D0lph1nhttps://wiki.multitheftauto.com/index.php?title=RU/Known_Issues_-_FAQ&diff=19313RU/Known Issues - FAQ2009-04-26T11:04:15Z<p>D0lph1n: </p>
<hr />
<div>{{translate}}<br />
Пишите здесь ваши вопросы и ответы ,касающиеся известных проблем с MTA:SA DM и их решений, как тех, с которыми вы сталкиваетесь сейчас, так и тех, с которыми пользователи могут столкнуться в финальной версии.<br />
<br />
== Клиент ==<br />
<br />
=== Общее ===<br />
==== Работает ли MTASA:DM с версиями GTA San Andreas 1.01 или 2.00? ====<br />
Нет. Пожалуйста, прочитайте [http://forum.mtavc.com/viewtopic.php?t=15151 эту тему на форуме] чтобы узнать как пропатчить игру до версии 1.0<br />
<br />
==== Клиент пишет, что не может найти редактор карт. ====<br />
Редактор для MTA: Deathmatch еще не выпущен. Сейчас вы можете использовать редактор MTA: Race, а затем сконвертировать карту в формат MTA:DM используя различные сторонние редакторы.<br />
Дополнено: на данный момент можно использовать редактор MTA:DM в nightly-версиях MTA.<br />
<br />
==== Initial black screen/hanging GTA splash screens ====<br />
* '''MTA shows a permanent black screen or hanging GTA splash screens.'''<br />
<br />
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.<br />
<br />
* '''MTA shows a permanent black screen after the GTA splash screens (possibly with text in the bottom right corner).'''<br />
<br />
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. You can disable it by opening your [[coreconfig.xml]] configuration file located in the ''GTA San Andreas\MTA'' directory, and changing the value of ''menu_options'' to ''248''.<br />
<br />
==== Halt after MTA splash screen ====<br />
* '''Nothing happens after the 'Stop playing with yourself' splash screen'''<br />
<br />
If you use nVidia GeForce, try turning off nView Desktop Manager before starting MTA.<br />
<br />
Also try deleting GTA San Andreas settings file ("gta_sa.set") in "Documents\GTA San Andreas User Files" folder<br />
<br />
==== Crash after MTA splash screen ====<br />
* '''MTA crashes after the 'Stop playing with yourself' logo. Both single player and the MTA: Race ran fine before.'''<br />
<br />
Try downloading the latest DirectX Runtime files from [http://www.microsoft.com/downloads/details.aspx?FamilyID=2da43d38-db71-4c1b-bc6a-9b6652cd92a3&DisplayLang=en Microsoft]. Also check in Task Manager, if gta_sa.exe process isn't already running.<br />
<br />
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.<br />
<br />
==== Assertion in CMainMenu.cpp line 106 upon launching MTASA ====<br />
* '''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.'''<br />
<br />
This is likely caused by GTASA or MTASA being installed in a path that contains non-ASCII characters (eg. Cyrillic, Polish, Japanese) in it. <br />
<br />
To resolve this, you need to uninstall MTASA and GTASA, then install them in such paths that don't contain such characters.<br />
<br />
==== Controls not working ====<br />
* '''My controls don't seem to work as they should.'''<br />
<br />
Try using the 'copygtacontrols' command in the console.<br />
<br />
==== Incorrect models ====<br />
* '''Woman model's breasts look awkward ingame / I'm seeing odd, spider-like shaped player models.'''<br />
<br />
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.<br />
<br />
==== Incorrect drive-by functionality ====<br />
* '''Drivebys arent working as they should'''<br />
<br />
Drivebys are handled by script, and will change depending on the loaded gamemode.<br />
<br />
==== Unsaved settings ====<br />
* '''My MTA setting(s) didn't get saved (...) I crashed.'''<br />
<br />
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.<br />
<br />
==== Gamepad support ====<br />
* '''MTA doesnt recognise my gamepad'''<br />
<br />
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&t=21167 this forum topic] for a brief guide on how to use XPadder.<br />
<br />
==== Free mouselook not working properly ====<br />
* '''MTA doesnt recognise my mouse'''<br />
<br />
Some people got problems with their mouse in MTA. They can use it in the menu, connect to a server, but they can't use the mouse for free look.<br />
This problem can be solved by entering a server, click your Win/Windows key at your keyboard once, and then click your mouse.<br />
If that doesn't work try starting GTA in Singleplayer, go to options > controler setup and set "Configuration" to "Mouse + Keys" instead of "Joypad".<br />
<br />
==== Sky flickering ====<br />
* '''My screen/sky flickers when weather or sky effects are enabled.<br />
<br />
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 F8, 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.<br />
<br />
==== Server browser not working ====<br />
* '''The in-game server browser shows "Loading" but does not come up with any servers'''<br />
<br />
Depending on the type and status of the internet connection you are using, it can take up to a few seconds for the server browser to retrieve all the servers. Please wait a little longer for the results to appear.<br />
<br />
==== Invalid serial number ====<br />
* '''I am getting an 'Invalid serial number' error when trying to launch or play the game'''<br />
<br />
You are running an outdated version of Multi Theft Auto. Head over to the [http://www.mtasa.com/deathmatch.html download page] and download the latest version of Multi Theft Auto.<br />
<br />
==== 'Network module could not be located' ====<br />
* '''I am getting 'Network module could not be located' error message upon launching MTA:SA DM<br />
<br />
Copy the file 'net.dll' from your GTA:SA/mta directory into your GTA:SA directory, overwriting existing files.<br />
<br />
==== 'Network module not compatible!' on MTASA launch ====<br />
* '''I am getting 'Network module not compatible!' error message upon launching MTA:SA DM<br />
<br />
This could mean that your MTASA install is incomplete or broken. Reinstall it.<br />
<br />
==== 'No such mod installed (deathmatch)' ====<br />
* '''I am getting a 'No such mod installed (deathmatch)' error message when trying to connect to any server<br />
<br />
'''Option 1:''' Simply re-install MTA. <br><br />
'''Option 2:''' Run both gta_sa.exe and Multi Theft Auto.exe with administrator privileges.<br />
<br />
==== D3dx9_**.dll is not found ====<br />
* '''When I start Multi Theft Auto: San Andreas I am getting an error D3dx9_**.dll (** = a number) cannot be found.<br />
<br />
This means that DirectX 9 is not installed or not up to date.<br />
To install/update DirectX download the [http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=2da43d38-db71-4c1b-bc6a-9b6652cd92a3 DirectX End-User Runtime Web Installer] from the Microsoft download site.<br />
<br />
=== Windows Vista®-related ===<br />
<br />
==== Crash on launch ====<br />
* '''I've successfully upgraded from MTA Race to MTASA DM on Vista, but it seems to crash on launch.<br />
<br />
'''Option 1''' Go to your Program Files\MTA San Andreas\mods\race directory, and rename client.dll to something else. <br><br />
'''Option 2''' Go to your Grand Theft Auto: San Andreas directory (usually Program Files\Rockstar Games\GTA San Andreas"), navigate to the MTA directory, then enter the "data" directory and remove the menu.mkv file. This will start Multi Theft Auto: San Andreas without main menu video rendering.<br />
<br />
==== Crash on connect ====<br />
* '''I seem to crash whenever I connect to a server just before I go in-game on Vista'''<br />
<br />
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.<br />
<br />
==== Invalid or disabled serial error ====<br />
* '''MTASA DM installer complains about wrong serial provided. I'm running it for the first time.<br />
<br />
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.<br />
<br />
Some have found that setting compatibility to Windows XP/2000 have fixed the problem.<br />
<br />
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.<br />
<br />
*'''I am getting 'invalid serial' when I try to connect to a server'''<br />
After some research we have found that in most cases this problem occurs if registry data has not been set for some reason. To fix this problem, take the following steps:<br />
<br />
Open regedit (start > run > regedit)<br><br />
Go to HKEY_LOCAL_MACHINE\SOFTWARE\Multi Theft Auto: San Andreas<br><br />
Create a new string key called Username and fill there the username you have on mtabeta.com<br><br />
Create one more string key called Serial and paste there the serial from mtabeta.com<br><br />
<br />
If you have no serial at http://community.mtasa.com (mtabeta.com) to complete the last step, register on our forums and request one [http://forum.mtasa.com/viewtopic.php?f=89&t=21435&p=269057 here]<br />
<br />
*'''I am getting 'disabled serial' when I try to connect to a server'''<br />
If you receive this message, your serial has been banned (most likely for cheating). There is nothing you can do to fix this. Registering a new account does not unban you.<br />
<br />
==== Clock manipulation error ====<br />
* '''I am getting 'Clock manipulation detected!' error message upon launching MTA:SA DM<br />
<br />
Further info coming soon.<br />
<br />
==== Halt on launch ====<br />
* '''When I launch MTA:SA DM, nothing happens (GTA_SA.exe is running but not loading up)<br />
<br />
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.<br />
<br />
==== General GTA problems ====<br />
* '''I have unexplainable GTA problems or crashes'''<br />
<br />
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.<br />
<br />
Also try the solutions from these pages:<br />
* http://www.gtaforums.com/index.php?showtopic=273549&view=findpost&p=4537502<br />
* http://pullmonkey.com/2007/4/30/how-i-got-gta-san-andreas-to-work-with-a-crappy-os-vista<br />
<br />
== Server ==<br />
<br />
=== General ===<br />
==== Fatal error 3 ====<br />
* '''I'm getting ''Fatal Error 3'' whenever I connect to my server'''<br />
<br />
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'''.<br />
==== Download error 9: Error downloading requested files ====<br />
* '''I'm getting ''Download Error 9: Error downloading requested files'' whenever I connect to my server'''<br />
<br />
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.<br />
<br />
* 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.<br />
<br />
* 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.<br />
==== Download error 28 ====<br />
Try closing anti-virus or firewall applications. If it then works, try adding an exception to your firewall to allow your http port through.<br />
<br />
=== Windows-related ===<br />
No known reported issues in the version {{Current Version|full}}.<br />
<br />
=== Linux-related ===<br />
====Default nohup creates infinitely big nohup.out====<br />
<br />
Temporary fix, disable the nohup file: 'nohup ./mta_server > /dev/null &'</div>D0lph1n