https://wiki.multitheftauto.com/api.php?action=feedcontributions&user=Wittx&feedformat=atomMulti Theft Auto: Wiki - User contributions [en]2024-03-29T15:46:37ZUser contributionsMediaWiki 1.39.3https://wiki.multitheftauto.com/index.php?title=Element_tree&diff=50152Element tree2017-01-01T18:31:22Z<p>Wittx: Undo revision 50041 by Marcin778 (talk)</p>
<hr />
<div>[[File:Tre.png|frame|Element tree]]<br />
MTA uses a so-called ''element tree'' to store all the elements that exist on the server and the client. This is directly related to the set of running [[resources]] and their map files' XML layout, although it can be changed at run-time by scripts.<br />
<br />
If you are familiar with the concept of ''trees'' in computer-science, this should be easy to understand. If you are not, think of it like a family tree - except everyone only has a single parent. Every [[element]] has a ''parent'' element.<br />
<br />
All elements that are created within scripts or from .map files are child elements of the resource they belong to. Thus, most elements (except for [[client]]s) exist only within resources and are also destroyed as soon as their resource is stopped.<br />
<br />
==Tree elements==<br />
* '''root''': This is at the very base of the tree - all elements are children (or descendants) of this element.<br />
<syntaxhighlight lang="lua"><br />
getRootElement()<br />
</syntaxhighlight><br />
* '''resource''': These are direct children of the root element - with one for each ''running'' resource. This element is called the ''resource root''. Its ID holds the name of the resource.<br />
<syntaxhighlight lang="lua"><br />
getResourceRootElement()<br />
</syntaxhighlight><br />
* '''map''': Each resource element contains at least one map element, representing either a ".map" file in the resource or the one containing the elements created by scripts (this is called the ''dynamic'' map). Their IDs contain the maps' filenames, or ''dynamic'' for the dynamic map.<br />
** Map files can contain a number of other [[element]]s as well as an unlimited number of custom elements.<br />
<br />
==Example==<br />
This in an example of a serverside tree dumped to XML from a running server.<br />
''Please note that it is shortened on some places for the sake of overview.''<br />
<syntaxhighlight lang="xml"><br />
<root><br />
<console/><br />
<player dontRespawn="false"/><br />
<player dontRespawn="false" lastSpawnarea=""/><br />
<resource id="resourcebrowser"/><br />
<resource id="ajax"/><br />
<resource id="resourcemanager"/><br />
<resource id="spawnmanager"/><br />
<resource id="mapmanager"/><br />
<resource id="runcode"/><br />
<resource id="fr"><br />
<map id="dynamic"><br />
<vehicle/><br />
</map><br />
</resource><br />
<resource id="elementbrowser"/><br />
<resource id="assault"><br />
<map id="dynamic"><br />
<team/><br />
<team/><br />
<blip/><br />
<marker/><br />
<colshape/><br />
<blip/><br />
<blip/><br />
</map><br />
</resource><br />
<resource id="as-farm"><br />
<map id="dynamic"/><br />
<map id="as-farm.map"><br />
<spawngroup req="" type="attacker"><br />
<spawnarea posY="-8.3976354598999" posX="20.182683944702" skins="9" ... /><br />
</spawngroup><br />
<spawngroup req="" type="attacker"><br />
<spawnarea posY="32.166355133057" posX="-46.90763092041" skins="9" ... /><br />
</spawngroup><br />
<spawngroup req="" type="attacker"><br />
<spawnarea posY="35.214984893799" posX="-33.486911773682" skins="9" ... /><br />
</spawngroup><br />
<spawngroup req="" type="attacker"><br />
<spawnarea posY="35.214984893799" posX="-33.486911773682" skins="9" ... /><br />
</spawngroup><br />
<objective id="first" type="checkpoint" description="Breach into the farm" ... /><br />
<pickup type="weapon" ... /><br />
</map><br />
</resource><br />
</root><br />
</syntaxhighlight><br />
===Explanation===<br />
This tree consists of a number of resource root elements, the [[Element/Console|server console]] and two [[player]] elements, that are direct children of the '''root''' element. All these resources have a ''dynamic map'' as child element (it is just not shown for most of them). These contain the elements that are created dynamically by this resource using scripts, for example a [[vehicle]]. If the resource has a map file, it is also a child element, itself containing all the elements in the .map file.<br />
<br />
Let's have a closer look at the '''assault''' resource: This contains just one ''dynamic'' map that has 2 teams, 3 blips, 1 marker and 1 colshape as child elements. These are the elements that are created by the script, for example the marker, the colshape and one of the blips are probably used for the objective.<br />
<br />
The '''as-farm''' resource's function on the contrary is to be a map for the '''assault''' gamemode. The dynamic map is empty (it could contain elements if there was a script in it though), while there is a map called 'as-farm.map', that contains a number of elements. These are mostly custom elements (like spawngroup, spawnarea, objective) but also a few elements that MTA creates automactically after loading the map (like pickup). In the brackets after the element type, you can see the element data it contains. These are identical with the attributes the .map file contains within these elements, while you can also set and get element data for any other elements (e.g. players) with [[setElementData]] and [[getElementData]].<br />
<br />
==Pratical application==<br />
Elements can have as many children as they like. This does not directly affect the map in any way, but it comes in to its own when combined with the scripting system.<br />
<br />
===Setting data for elements===<br />
If you call a set... function on a node of the element tree, the function will affect every element within it (that it can work on).<br />
<br />
So, the following code would set the size of every marker (the only type of element the setMarkerSize function can work on) that is below the root element to ''2.5''.<br />
<syntaxhighlight lang="lua"><br />
setMarkerSize ( getRootElement(), 2.5 )<br />
</syntaxhighlight><br />
<br />
The same can be done on any element, it is not restricted to the root element.<br />
<br />
===Map manager===<br />
The [[#Example|example above]] shows the way the [[map manager]] uses different resources. The 'assault' resource is the gamemode, that manages what happens on the server using scripts and thus by creating elements in the tree dynamically. When a map resource is started, the gamemode receives a [[resource|resource pointer]] referring to the started resource - in this case ''as-farm'' - from which you can retrieve and store the resource root element. Using this element in conjunction with functions like [[getElementsByType]], [[getElementData]] and various others, you can access any of the information that was loaded into the tree from the 'as-farm.map'-file through scripts in the gamemode resource.<br />
<br />
Another thing that has to be considered related to the tree of elements is the fact that when you change the map, you don't have to remove any elements you created within the map resource, while you '''do''' have to remove elements that are created within the gamemode resource, '''if''' they are specific to the map (which will be probably the case for those items you create based on information read from the map resource's .map files).<br />
<br />
==Element browser==<br />
You can start the resource ''elementbrowser'' to see a live view of the element tree on your server. Just start the resource and browser to your server's web page and choose the ''Element browser'' option in the sidebar (firefox only currently).<br />
[[Category:Scripting Concepts]]<br />
[[es:Árbol de elementos]]<br />
[[ru:Element tree]]</div>Wittxhttps://wiki.multitheftauto.com/index.php?title=Element&diff=50151Element2017-01-01T18:31:12Z<p>Wittx: Undo revision 50040 by Marcin778 (talk)</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]]<br />
[[es:Elemento]]</div>Wittxhttps://wiki.multitheftauto.com/index.php?title=MTA_Classes&diff=50150MTA Classes2017-01-01T18:31:01Z<p>Wittx: Undo revision 50039 by Marcin778 (talk)</p>
<hr />
<div>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 />
Elements that have a physical representation in the game are also known as [[entity|Entities]].<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 />
* [[connection|Connection]]<br />
[[Category:Scripting Concepts]]<br />
[[es:Clases MTA]]<br />
[[it:Classi di MTA]]<br />
[[ru:Классы MTA]]</div>Wittxhttps://wiki.multitheftauto.com/index.php?title=Useful_Functions&diff=50149Useful Functions2017-01-01T18:30:39Z<p>Wittx: Undo revision 50038 by Marcin778 (talk)</p>
<hr />
<div><pageclass class="#228B22"></pageclass><br />
{{MessageBox|<br />
bordercolorhex = 000000 |<br />
bordertype = dotted |<br />
bgcolorhex = EFEFEF |<br />
image = File:Package-x-generic.png |<br />
title = Don't forget to check out the [[Useful Classes]] |<br />
subtext = <span style="font-size: 85%;">''That page lists user-made classes that are not included by default in MTA. ''</span> |<br />
}}<br />
{{Adding_Pages_to_Categories_and_Templates}}<br />
<br />
This page lists user-made Lua functions that are not included by default in MTA. Its purpose is to quickly provide some useful functions for scripters, so they do not waste time recreating them when needed.<br />
<br/><br />
{{Useful_Functions}}<br />
[[ES:Funciones Útiles]]<br />
[[ru:Useful Functions]]<br />
[[de:Nützliche_Funktionen]]<br />
[[PL:Użyteczne Funkcje]]<br />
[[Ar:وظائف مفيدة]]</div>Wittxhttps://wiki.multitheftauto.com/index.php?title=Client_Scripting_Functions&diff=50148Client Scripting Functions2017-01-01T18:30:05Z<p>Wittx: Undo revision 50086 by Marcin778 (talk)</p>
<hr />
<div><pageclass class="client"></pageclass><br />
{{Adding_Pages_to_Categories_and_Templates}}<br />
This page lists all the '''client-side''' scripting functions that have been implemented and are available as native functions from the Deathmatch mod. To request a function or event, use [[Requested Functions and Events]]<br />
<br />
For more functions, check the [[Useful_Functions|useful functions page]].<br />
__TOC__<br />
<br />
==Audio functions==<br />
{{Client_audio_functions}}<br />
<br />
==Blip functions==<br />
{{Client_blip_functions}}<br />
<br />
==Browser functions==<br />
{{CEF_functions}}<br />
<br />
==Camera functions==<br />
{{Client_camera_functions}}<br />
<br />
==Clothes and body functions==<br />
{{Client_Clothes and body functions}}<br />
<br />
==Collision shape functions==<br />
{{Client_collision_shape_functions}}<br />
<br />
==Cursor functions==<br />
{{Client_cursor_functions}}<br />
<br />
==Drawing functions==<br />
{{Drawing_functions}}<br />
<br />
==Effects functions==<br />
{{Client_Effects_functions}}<br />
<br />
==Element functions==<br />
{{Client_element_functions}}<br />
<br />
==Engine functions==<br />
{{Engine_functions}}<br />
<br />
==Event functions==<br />
{{Client_event_functions}}<br />
<br />
==Explosion functions==<br />
{{Client_explosion_functions}}<br />
<br />
==File functions==<br />
{{Client file functions}}<br />
<br />
==Fire functions==<br />
{{Client fire functions}}<br />
<br />
==GUI functions==<br />
{{GUI_functions}}<br />
<br />
==Input functions==<br />
{{Client_input_functions}}<br />
<br />
==Light functions==<br />
{{Client_light_functions}}<br />
<br />
==Marker functions==<br />
{{Client_marker_functions}}<br />
<br />
==Matrix functions==<br />
{{Shared_matrix_functions}}<br />
<br />
==Object functions==<br />
{{Client_object_functions}}<br />
<br />
==Output functions==<br />
{{Client_output_functions}}<br />
<br />
==Ped functions==<br />
{{Client_ped_functions}}<br />
<br />
==Pickup functions==<br />
{{Client_pickup_functions}}<br />
<br />
==Player functions==<br />
{{Client_player_functions}}<br />
<br />
==Projectile functions==<br />
{{Client_projectile_functions}}<br />
<br />
==Radar area functions==<br />
{{Client_radar-area_functions}}<br />
<br />
==Resource functions==<br />
{{Client_resource_functions}}<br />
<br />
==Searchlight functions==<br />
{{Client_searchlight_functions}}<br />
<br />
==Team functions==<br />
{{Client_team_functions}}<br />
<br />
==Utility functions==<br />
{{Client_utility_functions}}<br />
<br />
==UTF8 Library==<br />
{{UTF8 functions}}<br />
<br />
==Vehicle functions==<br />
{{Client_vehicle_functions}}<br />
<br />
==Water functions==<br />
{{Client_water_functions}}<br />
<br />
==Weapon functions==<br />
{{Client_weapon_functions}}<br />
<br />
==Weapon Creation functions==<br />
<strike>Documentation can be found [http://code.google.com/p/mtasa-blue/source/detail?r=4555 here] [https://github.com/multitheftauto/mtasa-blue/commit/c0ac461867e24fe5fc471fe373ec6212e8736c01 (GitHub)] and [http://code.google.com/p/mtasa-blue/source/detail?r=4557 here] [https://github.com/multitheftauto/mtasa-blue/commit/9c2464b5e0c7d0f2915a9b46273832cd950af48e (GitHub)]</strike><br />
{{Client_weapon_creation_functions}}<br />
<br />
==World functions==<br />
{{Client_world_functions}}<br />
<br />
==XML functions==<br />
{{Client XML functions}}<br />
<br />
[[ar:Client Scripting Functions]]<br />
[[pl:Funkcje po stronie klienta]]<br />
[[it:Funzioni Client-side]]<br />
[[ru:Client Scripting Functions]]<br />
[[es:Funciones del cliente]]<br />
[[de:Clientseitige_Funktionen]]<br />
[[tr:Client Taraflı Fonksiyonlar]]<br />
[[zh-cn:客户端脚本函数]]</div>Wittxhttps://wiki.multitheftauto.com/index.php?title=Resource:Custom_coronas&diff=50142Resource:Custom coronas2017-01-01T18:23:10Z<p>Wittx: Undo revision 50134 by Marcin778 (talk)</p>
<hr />
<div>{{Resource page}}<br />
This resource lets You create some coronas. Not just your typical gtasa coronas <br />
that often times fail to appear. Since in this case corona Elements are created using<br />
dxDrawMaterialLine3d MTA function. I have changed the behaviour of the material <br />
to act as cylindrical billboards do.<br />
<br />
== Overview ==<br />
<br />
It is easy to use, gives a few options to manage coronas. <br />
<br />
The resource itself adds exported clientside functions:<br />
<br />
==Exported functions==<br />
====createCorona====<br />
<section name="Client" class="client" show="true"><br />
This function creates a shadered materialLine3d Corona.<br />
<syntaxhighlight lang="lua">coronaElement exports.custom_coronas:createCorona(float posX,posY,posZ,size,int colorR,colorG,colorB,colorA,[bool isSoftParticle = false])</syntaxhighlight> <br />
===Required Arguments=== <br />
*'''float posX, posY, posZ:''' Position in world space.<br />
*'''float size:''' Size of the corona.<br />
*'''int colorR,colorG,colorB,colorA:''' RGBA color (0 - 255).<br />
===Optional Arguments===<br />
*'''bool isSoftParticle:''' The aim with soft particles is to remove the ugly artifact that appears when the particle quad intersects the scene. The option requires DepthBuffer access.<br />
===Returns===<br />
The function returns coronaElement if set successfully, false otherwise.<br />
</section><br />
<br />
====createMaterialCorona====<br />
<section name="Client" class="client" show="true"><br />
This function creates a shadered materialLine3d Corona with a custom material.<br />
<syntaxhighlight lang="lua">coronaElement exports.custom_coronas:createMaterialCorona(element material,float posX,posY,posZ,size,int colorR,colorG,colorB,colorA,[bool isSoftParticle = false])</syntaxhighlight> <br />
===Required Arguments===<br />
*'''element material:''' Material to replace the standard corona texture with.<br />
*'''float posX, posY, posZ:''' Position in world space.<br />
*'''float size:''' Size of the corona.<br />
*'''int colorR,colorG,colorB,colorA:''' RGBA color (0 - 255).<br />
===Optional Arguments===<br />
*'''bool isSoftParticle:''' The aim with soft particles is to remove the ugly artifact that appears when the particle quad intersects the scene. The option requires DepthBuffer access.<br />
===Returns===<br />
The function returns coronaElement if set successfully, false otherwise.<br />
</section><br />
<br />
====destroyCorona====<br />
<section name="Client" class="client" show="true"><br />
This function destroys a shadered materialLine3d Corona element.<br />
<syntaxhighlight lang="lua">bool exports.custom_coronas:destroyCorona(element coronaElement)</syntaxhighlight> <br />
===Required Arguments=== <br />
*'''element coronaElement:''' A previously declared corona element.<br />
===Returns===<br />
The function returns true if set successfully, false otherwise.<br />
</section><br />
<br />
====setCoronaMaterial====<br />
<section name="Client" class="client" show="true"><br />
This function sets custom material for the corona.<br />
<syntaxhighlight lang="lua">bool exports.custom_coronas:setCoronaMaterial(element coronaElement,element material)</syntaxhighlight> <br />
===Required Arguments=== <br />
*'''element coronaElement:''' A previously declared corona element.<br />
*'''element material:''' Material to replace the standard corona texture with.<br />
===Returns===<br />
The function returns true if set successfully, false otherwise.<br />
</section><br />
<br />
====setCoronaSize====<br />
<section name="Client" class="client" show="true"><br />
This function sets size of the corona.<br />
<syntaxhighlight lang="lua">bool exports.custom_coronas:setCoronaSize(element coronaElement,float size)</syntaxhighlight> <br />
===Required Arguments=== <br />
*'''element coronaElement:''' A previously declared corona element.<br />
*'''float size:''' Size of the corona.<br />
===Returns===<br />
The function returns true if set successfully, false otherwise.<br />
</section><br />
<br />
====setCoronaSizeXY====<br />
<section name="Client" class="client" show="true"><br />
This function sets size of the corona (width and height).<br />
<syntaxhighlight lang="lua">bool exports.custom_coronas:setCoronaSizeXY(element coronaElement,float width,height)</syntaxhighlight> <br />
===Required Arguments=== <br />
*'''element coronaElement:''' A previously declared corona element.<br />
*'''float width, height:''' Size of the corona.<br />
===Returns===<br />
The function returns true if set successfully, false otherwise.<br />
</section><br />
<br />
====setCoronaDepthBias====<br />
<section name="Client" class="client" show="true"><br />
On createCorona the depthBias is set properly (0-1). You can however set other value depending on your needs. To see the results you'll need to set enableDepthBiasScale to true.<br />
<syntaxhighlight lang="lua">bool exports.custom_coronas:setCoronaDepthBias(element coronaElement,float depthBiasValue)</syntaxhighlight> <br />
===Required Arguments=== <br />
*'''element coronaElement:''' A previously declared corona element.<br />
*'''float depthBiasValue:''' depthBias value.<br />
===Returns===<br />
The function returns true if set successfully, false otherwise.<br />
</section><br />
<br />
====setCoronaPosition====<br />
<section name="Client" class="client" show="true"><br />
This function sets corona position.<br />
<syntaxhighlight lang="lua">bool exports.custom_coronas:setCoronaPosition(element coronaElement,float posX,posY,posZ)</syntaxhighlight> <br />
===Required Arguments=== <br />
*'''element coronaElement:''' A previously declared corona element.<br />
*'''float posX, posY, posZ:''' Position in world space.<br />
===Returns===<br />
The function returns true if set successfully, false otherwise.<br />
</section><br />
<br />
====setCoronaColor====<br />
<section name="Client" class="client" show="true"><br />
This function sets light color values.<br />
<syntaxhighlight lang="lua">bool exports.custom_coronas:setCoronaColor(element coronaElement,float colorR,colorG,colorB,colorA)</syntaxhighlight> <br />
===Required Arguments=== <br />
*'''element coronaElement:''' A previously declared corona element.<br />
*'''float colorR,colorG,colorB,colorA:''' RGBA color (0 - 255).<br />
===Returns===<br />
The function returns true if set successfully, false otherwise.<br />
</section><br />
<br />
====setCoronasDistFade====<br />
<section name="Client" class="client" show="true"><br />
Set the Max distance of the corona to sync and the distance on which the it starts to fade out.<br />
<syntaxhighlight lang="lua">bool exports.custom_coronas:setCoronasDistFade(int MaxEffectFade,int MinEffectFade)</syntaxhighlight> <br />
===Required Arguments=== <br />
*'''int MaxEffectFade:''' Set the Max distance of the corona to sync.(Must be greater than MinEffectFade).<br />
*'''int MinEffectFade:''' Set the distance on which the corona starts to fade out.<br />
===Returns===<br />
The function returns true if set successfully, false otherwise.<br />
</section><br />
<br />
====enableDepthBiasScale====<br />
<section name="Client" class="client" show="true"><br />
Standard depthBias for GTASA coronas is about 1 unit, despite the corona scale. This function elables depthBias scaling.<br />
<syntaxhighlight lang="lua">bool exports.custom_coronas:enableDepthBiasScale(bool isDepthScaleEnabled)</syntaxhighlight> <br />
===Required Arguments=== <br />
*'''bool isDepthScaleEnabled:''' Enable/disable depthBias scaling.<br />
===Returns===<br />
The function returns true if set successfully, false otherwise.<br />
</section><br />
<br />
==Examples== <br />
<syntaxhighlight lang="lua">function addStuff()<br />
for i=1,30 do<br />
for j=1,30 do<br />
exports.custom_coronas:createCorona(i * 7,j * 7,10,4,math.random()*255,math.random()*255,math.random()*255,1*255,false) <br />
end <br />
end<br />
end<br />
<br />
addEventHandler("onClientResourceStart", getResourceRootElement( getThisResource()), addStuff)</syntaxhighlight><br />
This creates a 400 coronas near position (0,0,0)<br />
<br />
<syntaxhighlight lang="lua">local vehicle1 = nil<br />
addEventHandler("onClientVehicleEnter", getRootElement(),<br />
function(thePlayer, seat)<br />
if thePlayer == getLocalPlayer() then<br />
vehicle1 = source<br />
end<br />
end<br />
)<br />
<br />
local carLight = exports.custom_coronas:createCorona(0,0,0,4,math.random()*255,math.random()*255,math.random()*255,1*255)<br />
addEventHandler("onClientPreRender", root, function()<br />
if vehicle1 then <br />
xxx1,yyy1,zzz1 = getElementPosition(vehicle1)<br />
exports.custom_coronas:setCoronaPosition(carLight,xxx1,yyy1,zzz1)<br />
end<br />
end<br />
) </syntaxhighlight><br />
This creates a corona and attaches it to a vehicle that the player enters.<br />
<br />
Of course when you want to use these functions in your resources you have to include<br />
the custom_coronas resource in meta.<br />
<br />
==See Also==<br />
[http://www.youtube.com/watch?v=5lruyY1fviQ A youtube video]<br />
<br />
[http://community.multitheftauto.com/index.php?p=resources&s=details&id=9558 Custom Coronas resource on MTA Community]<br />
<br />
[http://www.html5rocks.com/en/tutorials/webgl/webgl_orthographic_3d WebGL Orthographic 3D]</div>Wittxhttps://wiki.multitheftauto.com/index.php?title=Resource:Customblips&diff=50141Resource:Customblips2017-01-01T18:22:00Z<p>Wittx: Undo revision 50135 by Marcin778 (talk)</p>
<hr />
<div>{{Resource page}}<br />
__NOTOC__<br />
The '''customblips''' resource allows you to create Blip icons clientside that appear on radar and on the F11 map. Custom blips can be any image or GUI element.<br />
<br />
==Exported Client functions==<br />
* '''createCustomBlip'''<br />
** This function creates a custom blip using DirectX image functions. If the stream radius is lower than 180, then the blip will only appear when it is visible on the radar.<br />
<syntaxhighlight lang="lua"><br />
customblip exports.customblips:createCustomBlip ( float worldX, float worldY, int imageWidth, int imageHeight, string imagePath, [float streamRadius = 500] )<br />
</syntaxhighlight><br />
<br />
<br />
* '''guiConvertToCustomBlip'''<br />
** This function creates a custom blip using any GUI element. If the stream radius is lower than 180, then the blip will only appear when it is visible on the radar.<br />
<syntaxhighlight lang="lua"><br />
gui-elem exports.customblips:guiConvertToCustomBlip ( gui-element blipGUI, float worldX, float worldY, [float streamRadius = 500] )<br />
</syntaxhighlight><br />
<br />
<br />
* '''getCustomBlipStreamRadius'''<br />
** This function gets the current stream radius of a customblip. Note, stream radius does not affect the F11 map.<br />
<syntaxhighlight lang="lua"><br />
float exports.customblips:getCustomBlipStreamRadius ( customblip theBlip )<br />
</syntaxhighlight><br />
<br />
<br />
* '''setCustomBlipStreamRadius'''<br />
** This function sets the current stream radius of a customblip. Note, stream radius does not affect the F11 map.<br />
<syntaxhighlight lang="lua"><br />
bool exports.customblips:setCustomBlipStreamRadius ( customblip theBlip, float streamRadius )<br />
</syntaxhighlight><br />
<br />
<br />
* '''getCustomBlipPosition'''<br />
** This function gets the world position of a customblip.<br />
<syntaxhighlight lang="lua"><br />
float worldX, float worldY exports.customblips:getCustomBlipPosition ( customblip theBlip )<br />
</syntaxhighlight><br />
<br />
<br />
* '''setCustomBlipPosition'''<br />
** This function sets the world position of a customblip.<br />
<syntaxhighlight lang="lua"><br />
bool exports.customblips:setCustomBlipPosition ( customblip theBlip, float worldX, float worldY )<br />
</syntaxhighlight><br />
<br />
<br />
* '''setCustomBlipRadarScale'''<br />
** This function sets the scale (where 0 is invisible, and 1 is 100% size. Going beyond 1 will increase the size) of the blip when it appears on the radar, relative to the size specified during creation. Passing nil will default to GTA's radar blip size.<br />
<syntaxhighlight lang="lua"><br />
bool exports.customblips:setCustomBlipRadarScale ( customblip theBlip, float scale )<br />
</syntaxhighlight><br />
<br />
<br />
* '''setCustomBlipAlpha'''<br />
** This function sets the alpha (values 0-1) of the blip, allowing the adjustment of transparency.<br />
<syntaxhighlight lang="lua"><br />
bool exports.customblips:setCustomBlipAlpha ( customblip theBlip, float alpha )<br />
</syntaxhighlight><br />
<br />
<br />
* '''setCustomBlipVisible'''<br />
** This function sets the visibility of the blip. Invisible blips will not be drawn.<br />
<syntaxhighlight lang="lua"><br />
bool exports.customblips:setCustomBlipAlpha ( customblip theBlip, bool visible )<br />
</syntaxhighlight><br />
<br />
<br />
* '''destroyCustomBlip'''<br />
** This function destroys a custom blip.<br />
<syntaxhighlight lang="lua"><br />
bool exports.customblips:destroyCustomBlip ( customblip theBlip )<br />
</syntaxhighlight><br />
<br />
==Examples==<br />
'''Example 1'''<br />
This example creates a blip that says 'Spawn' at Toreno's house, using GUI<br />
<syntaxhighlight lang="lua"><br />
addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()),<br />
function()<br />
local blip = guiCreateButton ( 0, 0, 25, 20, "Spawn", false )<br />
guiSetFont(blip,"default-small")<br />
exports.customblips:guiConvertToCustomBlip ( blip, -700, 960, 10 )<br />
end<br />
)<br />
</syntaxhighlight><br />
<br />
<br />
'''Example 2'''<br />
This example creates an image blip of "icon.png" at 0,0 - assuming the size of the image is 20x20px.<br />
<syntaxhighlight lang="lua"><br />
addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()),<br />
function()<br />
exports.customblips:createCustomBlip ( 0,0, 20, 20, "icon.png" )<br />
end<br />
)<br />
</syntaxhighlight><br />
<br />
[[ru:Resource:Customblips]]</div>Wittxhttps://wiki.multitheftauto.com/index.php?title=CJ_Clothes&diff=50139CJ Clothes2017-01-01T18:21:11Z<p>Wittx: Undo revision 50091 by Marcin778 (talk)</p>
<hr />
<div>These pages contain clothing images and details for all of CJ's apparel.<br />
<br />
*[[CJ Clothes\Shirt (0)|Type 0 - Shirt]]<br />
*[[CJ Clothes\Head (1)|Type 1 - Head]]<br />
*[[CJ Clothes\Trousers (2)|Type 2 - Trousers]]<br />
*[[CJ Clothes\Shoes (3)|Type 3 - Shoes]]<br />
*[[CJ Clothes\Tattoos: Left Upper Arm (4)|Type 4 - Tattoos: Left Upper Arm]]<br />
*[[CJ Clothes\Tattoos: Left Lower Arm (5)|Type 5 - Tattoos: Left Lower Arm]]<br />
*[[CJ Clothes\Tattoos: Right Upper Arm (6)|Type 6 - Tattoos: Right Upper Arm]]<br />
*[[CJ Clothes\Tattoos: Right Lower Arm (7)|Type 7 - Tattoos: Right Lower Arm]]<br />
*[[CJ Clothes\Tattoos: Back (8)|Type 8 - Tattoos: Back]]<br />
*[[CJ Clothes\Tattoos: Left Chest (9)|Type 9 - Tattoos: Left Chest]]<br />
*[[CJ Clothes\Tattoos: Right Chest (10)|Type 10 - Tattoos: Right Chest]]<br />
*[[CJ Clothes\Tattoos: Stomach (11)|Type 11 - Tattoos: Stomach]]<br />
*[[CJ Clothes\Tattoos: Lower Back (12)|Type 12 - Tattoos: Lower Back]]<br />
*[[CJ Clothes\Necklace (13)|Type 13 - Necklace]]<br />
*[[CJ Clothes\Watches (14)|Type 14 - Watches]]<br />
*[[CJ Clothes\Glasses (15)|Type 15 - Glasses]]<br />
*[[CJ Clothes\Hats (16)|Type 16 - Hats]]<br />
*[[CJ Clothes\Extra (17)|Type 17 - Extra]]<br />
<br />
==Functions used for this==<br />
{{Client_Clothes and body functions}}<br />
<br />
[[pl:CJ Clothes]]<br />
[[it:Vestiti di CJ]]<br />
[[pt-br:Roupas do CJ]]<br />
[[ru:CJ Clothes]]<br />
[[de:CJ Kleider]]<br />
[[Category:Scripting Concepts]]<br />
[[Category:ID Lists]]</div>Wittxhttps://wiki.multitheftauto.com/index.php?title=SpawnPlayer&diff=50138SpawnPlayer2017-01-01T18:20:43Z<p>Wittx: Undo revision 50121 by Marcin778 (talk)</p>
<hr />
<div>__NOTOC__<br />
{{Server function}}<br />
This function spawns the player at an arbitary point on the map.<br><br />
{{Note|[[setCameraTarget]] must be used to focus on the player. Also, all players have their camera initially faded out after connect. To ensure that the camera is faded in, please do a [[fadeCamera]] after.}}<br />
<br />
==Syntax==<br />
<syntaxhighlight lang="lua"><br />
bool spawnPlayer ( player thePlayer, float x, float y, float z, [ int rotation = 0, int skinID = 0, int interior = 0, int dimension = 0, team theTeam = getPlayerTeam(thePlayer) ] )<br />
</syntaxhighlight><br />
{{OOP||[[player]]:spawn||}}<br />
===Required Arguments===<br />
*'''thePlayer:''' The player you want to spawn.<br />
*'''x:''' The x co-ordinate to spawn the player at.<br />
*'''y:''' The y co-ordinate to spawn the player at.<br />
*'''z:''' The z co-ordinate to spawn the player at.<br />
<br />
===Optional Arguments===<br />
*'''rotation:''' rotation of the player on spawn.<br />
*'''skinID:''' player's skin on spawn. [[Character Skins]]<br />
*'''interior:''' interior the player will spawn into. [[Interior IDs]]<br />
*'''dimension:''' The ID of the [[dimension]] that the player should be in.<br />
*'''theTeam:''' the team the player will join.<br />
<br />
===Returns===<br />
Returns ''true'' if the player was spawned successfully, ''false'' otherwise.<br />
<br />
==Example== <br />
This example spawns all the players in the middle of the game map.<br />
<syntaxhighlight lang="lua"><br />
-- Get a table of all the players<br />
players = getElementsByType ( "player" )<br />
-- Go through every player<br />
for playerKey, playerValue in ipairs(players) do<br />
-- Spawn them at the desired coordinates<br />
spawnPlayer ( playerValue, 0.0, 0.0, 5.0, 90.0, 0 )<br />
end<br />
</syntaxhighlight><br />
<br />
This example spawns a player when he logs in.<br />
<syntaxhighlight lang="lua"><br />
spawnTeam = createTeam ("Teamname", 255, 0, 0) -- Create team to spawn.<br />
function spawnOnLogin (prevA, curA )<br />
outputChatBox ("Welcome to ...", source, 255, 0, 0, false)<br />
spawnPlayer (source, 0, 0, 5, 0, math.random (0,288), 0, 0, spawnTeam) -- spawns player with random skin<br />
fadeCamera (source, true)<br />
setCameraTarget (source, source)<br />
end<br />
addEventHandler("onPlayerLogin", getRootElement(), spawnOnLogin)<br />
</syntaxhighlight><br />
<br />
==See Also==<br />
{{Player_functions}}<br />
[[ru:spawnPlayer]]</div>Wittxhttps://wiki.multitheftauto.com/index.php?title=Client_Scripting_Functions&diff=50085Client Scripting Functions2017-01-01T18:12:09Z<p>Wittx: Undo revision 50081 by Marcin778 (talk)</p>
<hr />
<div><pageclass class="client"></pageclass><br />
{{Adding_Pages_to_Categories_and_Templates}}<br />
This page lists all the '''client-side''' scripting functions that have been implemented and are available as native functions from the Deathmatch mod. To request a function or event, use [[Requested Functions and Events]]<br />
<br />
For more functions, check the [[Useful_Functions|useful functions page]].<br />
__TOC__<br />
<br />
==Audio functions==<br />
{{Client_audio_functions}}<br />
<br />
==Blip functions==<br />
{{Client_blip_functions}}<br />
<br />
==Browser functions==<br />
{{CEF_functions}}<br />
<br />
==Camera functions==<br />
{{Client_camera_functions}}<br />
<br />
==Clothes and body functions==<br />
{{Client_Clothes and body functions}}<br />
<br />
==Collision shape functions==<br />
{{Client_collision_shape_functions}}<br />
<br />
==Cursor functions==<br />
{{Client_cursor_functions}}<br />
<br />
==Drawing functions==<br />
{{Drawing_functions}}<br />
<br />
==Effects functions==<br />
{{Client_Effects_functions}}<br />
<br />
==Element functions==<br />
{{Client_element_functions}}<br />
<br />
==Engine functions==<br />
{{Engine_functions}}<br />
<br />
==Event functions==<br />
{{Client_event_functions}}<br />
<br />
==Explosion functions==<br />
{{Client_explosion_functions}}<br />
<br />
==File functions==<br />
{{Client file functions}}<br />
<br />
==Fire functions==<br />
{{Client fire functions}}<br />
<br />
==GUI functions==<br />
{{GUI_functions}}<br />
<br />
==Input functions==<br />
{{Client_input_functions}}<br />
<br />
==Light functions==<br />
{{Client_light_functions}}<br />
<br />
==Marker functions==<br />
{{Client_marker_functions}}<br />
<br />
==Matrix functions==<br />
{{Shared_matrix_functions}}<br />
<br />
==Object functions==<br />
{{Client_object_functions}}<br />
<br />
==Output functions==<br />
{{Client_output_functions}}<br />
<br />
==Ped functions==<br />
{{Client_ped_functions}}<br />
<br />
==Pickup functions==<br />
{{Client_pickup_functions}}<br />
<br />
==Player functions==<br />
{{Client_player_functions}}<br />
<br />
==Projectile functions==<br />
{{Client_projectile_functions}}<br />
<br />
==Radar area functions==<br />
{{Client_radar-area_functions}}<br />
<br />
==Resource functions==<br />
{{Client_resource_functions}}<br />
<br />
==Searchlight functions==<br />
{{Client_searchlight_functions}}<br />
<br />
==Team functions==<br />
{{Client_team_functions}}<br />
<br />
==Utility functions==<br />
{{Client_utility_functions}}<br />
<br />
==UTF8 Library==<br />
{{UTF8 functions}}<br />
<br />
==Vehicle functions==<br />
{{Client_vehicle_functions}}<br />
<br />
==Water functions==<br />
{{Client_water_functions}}<br />
<br />
==Weapon functions==<br />
{{Client_weapon_functions}}<br />
<br />
==Weapon Creation functions==<br />
<strike>Documentation can be found [http://code.google.com/p/mtasa-blue/source/detail?r=4555 here] [https://github.com/multitheftauto/mtasa-blue/commit/c0ac461867e24fe5fc471fe373ec6212e8736c01 (GitHub)] and [http://code.google.com/p/mtasa-blue/source/detail?r=4557 here] [https://github.com/multitheftauto/mtasa-blue/commit/9c2464b5e0c7d0f2915a9b46273832cd950af48e (GitHub)]</strike><br />
{{Client_weapon_creation_functions}}<br />
<br />
==World functions==<br />
{{Client_world_functions}}<br />
<br />
==XML functions==<br />
{{Client XML functions}}<br />
<br />
[[ar:Client Scripting Functions]]<br />
[[pl:Funkcje po stronie klienta]]<br />
[[it:Funzioni Client-side]]<br />
[[ru:Client Scripting Functions]]<br />
[[es:Funciones del cliente]]<br />
[[de:Clientseitige_Funktionen]]<br />
[[tr:Client Taraflı Fonksiyonlar]]<br />
[[zh-cn:客户端脚本函数]]</div>Wittxhttps://wiki.multitheftauto.com/index.php?title=Multi_Theft_Auto&diff=50080Multi Theft Auto2017-01-01T18:10:54Z<p>Wittx: Undo revision 50073 by Marcin778 (talk)</p>
<hr />
<div>[[File:Am3.jpg|thumb|Proof of concept.]]<br />
{{note|If you just want to download Multi Theft Auto go here:<br />
* [http://mtasa.com Download MTA: San Andreas {{Current Version|full}}]<br />
* [[Archive|Download Multi Theft Auto 0.5r2 (GTA3 and Vice City)]]<br />
}}<br />
Multi Theft Auto (MTA) is the world's first multiplayer add-on for the Grand Theft Auto 3 Trilogy<ref>Trilogy: Grand Theft Auto III, Grand Theft Auto: Vice City and Grand Theft Auto: San Andreas</ref>. Starting as a very simple two player system with no on-foot support, has become one of the most active (multiplayer) add-ons for Grand Theft Auto.<br />
<br />
Although often referred to as a modification, Multi Theft Auto is based on [http://en.wikipedia.org/wiki/Code_injection code injection] and [http://en.wikipedia.org/wiki/Hooking hooking] techniques whereby the game is manipulated without altering any original files supplied with the game. The software functions as a [http://en.wikipedia.org/wiki/Game_engine game engine] that installs itself as an extension of the original game, adding core functionality such as [http://en.wikipedia.org/wiki/Computer_networking networking] and [http://en.wikipedia.org/wiki/Graphical_User_Interface GUI rendering] while exposing the original game's engine functionality through a [http://en.wikipedia.org/wiki/Scripting_Language scripting language].<br />
<br />
== Before Multi Theft Auto ==<br />
[[File:Gta3am01.jpg|thumb|GTA3:Alternative Multiplayer]]<br />
In February 2003, IJs (formerly known as IJsVogel), founder of the project, was searching for a trainer for GTA3. He stumbled upon the GTA3 Admin Console<ref>http://hobby.estetiksoft.de/gta3console/html/getgta3console.htm</ref> and its source code. When looking through the code he found a way to read all the data from the previous used car, and he decided to synchronize this with two computers over a network. The result of this was the creation of GTA3:AM, less than an hour later.<br />
<br />
However, after the release it was difficult to convince people it actually worked because of various hoaxes and earlier attempts that had failed. This was the start of the MTA project.<br />
<br />
== History of Multi Theft Auto ==<br />
<br />
=== Milestones 2003-2006 ===<br />
Main article: [[Timeline]]<br />
<br />
=== Milestones since 2006 ===<br />
[[File:MTA Main Menu 1.0.x.png|thumb|MTA:SA 1.0 Main Menu]]<br />
* '''January 3, 2008 MTA:San Andreas 1.0 Deathmatch Developer Preview(s)'''<br />
MTA:San Andreas Deathmatch Developer Preview 1 was the first release that featured on-foot synchronization for San Andreas. The name deathmatch refers to the ability to shoot with weapons and get on-foot unlike the race version. The tag deathmatch has been dropped in later releases because this version allowed customized gamemodes with LUA scripting and confused people. While the first 5 releases were called 'Developer Preview' it was very popular.<br />
* '''August 21, 2009 MTA:San Andreas 1.0 released'''<br />
Version 1.0.x was released with the GPLv3 license this allowed to work with more people on the next release when it became open source.<br />
* '''August 25, 2011 MTA:San Andreas 1.1 released'''<br />
** Custom vehicle handling<br />
** Voice chat<br />
** Improved sound support, including streaming audio (BASS library<ref>http://www.un4seen.com/bass.html</ref>)<br />
** Custom shaders<br />
* '''December 17, 2011 MTA:San Andreas 1.2 released'''<br />
** Custom weapon stats<br />
** Ability to replace weapon models <br />
** Ability to replace ped models <br />
** Major bandwidth usage reductions <br />
* '''2011 Mod of the Year - Players Choice #1'''<ref>http://www.moddb.com/events/2011-mod-of-the-year-awards/features/moty-players-choice-mod-of-the-year</ref><br />
* '''January 24, 2012 MTA:San Andreas 1.3 released'''<br />
** Fixes for various network problems which occured in 1.1 and 1.2 series. (including a fix for "Map download breaking often on large transfers" issue)<br />
** Added new scripting functions for removal of default GTASA map objects. (including breakable ones)<br />
** Introduced a new scripting event. - [[onClientVehicleCollision]]<br />
** Implemented a new scripting function. - [[takePlayerScreenShot]]<br />
** Fixes for various crashes and issues. (including "warp glitch", inaccurate heat seekers sync, createProjectile() velocity desync between clients, custom models texture crash, "white models" when using custom models and more)<br />
** Added functionality to protect client-side scripts which pre-compiles them before being sent and stops resources from being saved on disk. This is configurable in the resource's meta.xml.<br />
** Added pixel manipulation functionality.<br />
** Introduced new client-side scripting functions - [[setBirdsEnabled]] and [[getBirdsEnabled]]<br />
** Included a new gui skin - [http://forum.mtasa.com/viewtopic.php?f=139&t=36010#p371815 Lighter black] - contributed by Aibo<br />
* '''September 3, 2012 MTA:San Andreas 1.3.1 released'''<br />
** Added support for Windows 8<br />
** MTA:SA client installers (main and nightlies) are now digitally signed<br />
** Increased max players for a single server to 4096<br />
** New features: BASS Effects ([http://www.youtube.com/watch?v=3sMlgF9LKPs video]), Analog Controls States, Bullet Sync and Custom Vehicle Sirens ([http://www.youtube.com/watch?v=ZJDrVf3qSm0 video1] [http://www.youtube.com/watch?v=1J0_v85FioA video2] [http://www.youtube.com/watch?v=X3zE6hZOx4c video3])<br />
** Added ability to create pedless weapons via weapon creation ([http://www.youtube.com/watch?v=LN1nZZnzlms video])<br />
** Added ability to shoot with any weapon with jetpack ([http://www.youtube.com/watch?v=mFQOyyLfo5U video1] [http://www.youtube.com/watch?v=_JuQqQ8g67A video2])<br />
** Editor stability improvements and new features<br />
* '''November 4, 2012 Over ten thousand concurrent players online'''<br />
On that day, at 17.30 UTC we had over ten thousand concurrent players online on all MTASA servers around the world. That was more than the number of players combined playing GTA4 and EFLC on Steam at the time, or other hit titles such as Call of Duty: Black Ops or Total War: Shogun 2 (according to [http://store.steampowered.com/stats/ Steam Stats]).<br />
This shows, that after all these years there is still a lot of interest in the older GTA games, especially the will to play them online with friends.<br />
This also shows that you guys appreciate what we do, and that makes us very happy! The current record is 11128 concurrent players, set on 22nd December, so there is still room to improve.<ref>http://forum.mtasa.com/viewtopic.php?f=31&t=51863</ref><br />
* '''May 5, 2013 MTA:San Andreas 1.3.2 released'''<br />
** Client setting: Turn off selected sounds when minimized.<br />
** Client setting: Added aim vertical sensitivity setting.<br />
** Client setting: Added process priority setting.<br />
** Added glitch 'hitanim' to allow 'being hit by bullet' animation when aiming certain weapons.<br />
** Added 'sinfo' command to client to output server info.<br />
** Added 'showframegraph' command for displaying frame timings.<br />
** Added server multiple IP support.<br />
** Reduced stutter on big maps.<br />
** Fixed vehicles losing velocity on race respawn .<br />
** Fixed a server browser crash.<br />
** Fixed smoothness when using server setting 'latency_reduction'.<br />
** Fixed PNG files with alpha channel sometimes being all black.<br />
** Fixed a cause of train desync.<br />
** Fixed depth buffer shaders not working right with mirrors.<br />
* '''July 2, 2013 MTA:San Andreas 1.3.3 released'''<br />
** Anti-cheat updates.<br />
** Optimized streamer to work better with complex maps.<br />
** Smoothed fonts when scaling chat box.<br />
** Added option to scale HUD elements correctly for widescreen.<br />
** Added option to disable OS and graphic driver 'tweaks', as they can interfere with MTA.<br />
** Better compatibility with NVidia Optimus laptops.<br />
** Improved server performance.<br />
** Updated our Audio Library to the latest version to improve some of our sound functions specifically beat detection and prevent crashes caused by calling getSoundMetaTags.<br />
* '''September 7, 2013 MTA:San Andreas 1.3.4 released'''<br />
** Added "shared" export type in meta.xml<br />
** Added Lua source encryption option<br />
** Added the ability to cancel onClientKey<br />
** Added escape to onClientKey (can't be cancelled twice in a row)<br />
** Added SettingHUDMatchAspectRatio, SettingAspectRatio to dxGetStatus <br />
<br />
== Versions ==<br />
=== [[Archive#Multi_Theft_Auto_0.5|GTA3:MTA]] ===<br />
GTA3:MTA was originally named GTA3:AM (Alternative Multiplayer) But since there was no other multiplayer available this could hardly be an alternative. It started out as a two player system with the so-called previous-car-method. Before going to MTA:VC there were 3 versions released. 0.1a and 0.2a only supported the previous-car-method, whilst 0.3b was more advanced and had a lot more synchronization. These original versions were written in Visual Basic. The 0.3b server however was made in C++ and was available for Win32 and Linux.<br />
<br />
The GTA3:MTA series was discontinued until the latter half of 2004 when it was picked up again with MTA 0.4. Support for GTA3 was later improved in version 0.5.<br />
<br />
It has been said many times that GTA3:MTA was based on code left behind by Rockstar, the developers of GTA3. Even though there is left-over multiplayer content in GTA3, none of the code left behind was used for MTA. <br />
<br />
=== [[Archive#Multi_Theft_Auto_0.5|MTA:VC]] ===<br />
When Vice City was released it didn't take long before the MTA project switched to this new game. GTA3 was dropped for the moment and development focused on Vice City. We also took this opportunity to start our codebase from scratch, this time completely in C++. It wasn't until version 0.2 that we could see major improvements. 0.2 was the first version to feature a new chat box system and score board. Later versions of MTA:VC had mixed results. Some people still prefer the gameplay from 0.2.2 or 0.3. Some call the latest version (0.5) a failure. In February 2005 MTA 0.5.1 preview was shown to the public, addressing known issues and adding new features.<ref>http://files.mtasa.com/web/mta_0.5_launch/051.htm</ref> 0.5.1 was never released.<br />
<br />
=== '[[Blue]]' ===<br />
In late 2003 a spin-off project was launched codenamed Blue. The goal of this project was to try out new ideas and then backport them to the current codebase. Due to the "ugly" coding of the MTA:VC codebase it was decided that there would be no backporting and that the Blue codebase would form the basis of a new MTA project that, when finished, would be easy to adapt to new games. Initially set for Vice City, the development didn't pick up pace until San Andreas was released in June 2005. MTA:SA is built upon the Blue project. The concepts used in this project also make it possible for user add-ons to be added to the game, and therefore a decision was made to not simply create a multiplayer mod, but rather a multiplayer-enabled Software Development Kit (SDK). <br />
<br />
=== [[Archive#MTA:_San_Andreas_Race|MTA:SA Race]] ===<br />
The first release of MTA:SA incorporates only vehicle synchronisation. The team has decided to start once more from scratch and build a modular codebase. Another decision made was to focus on one area of the game at a time and release when that area is completed. Therefore the first release will only feature gameplay in cars. Also a basic map editor has been added. Even though there is no on-foot sync like with GTA3:AM, there is no comparison between them on a technical basis. <br />
<br />
=== [[Main Page|MTA:SA (Deathmatch)]] ===<br />
Multi Theft Auto's latest release is for the game Grand Theft Auto: San Andreas and is built upon a now open source game engine that has been in development for several years and is the only project that is still actively maintained. The engine provides users with all the necessary tools they need to create their own [http://en.wikipedia.org/wiki/Gameplay game modes] and [http://en.wikipedia.org/wiki/Level_(video_gaming) maps] by exposing a large part of the original game functionality through a [http://en.wikipedia.org/wiki/Lua_(programming_language) Lua scripting machine].<br />
<br />
On Saturday, 22nd of August, 2009, Multi Theft Auto: San Andreas v1.0 was officially distributed as the first open source release. This release abandoned the now obsolete "Deathmatch" tag in the product name to emphasize on the versatility of the software. Gameplay functionality is solely provided by the scripting language, so users can choose or develop their own combination of scripts and other contents to customize and host their own type of game. <br />
<br />
{{Comparison of Versions}}<br />
<br />
{| width="100%" cellspacing="0" cellpadding="0"<br />
| colspan="2" |<br />
<div align="center"><gallery perrow=5 caption="Screenshots"><br />
File:SSV Scramble.png|MTA 0.5 Mini mission on GTA3's Shoreside Vale<br />
File:Vc0.1-3.jpg|MTA:VC 0.1<br />
File:Mtavcbluelaunching.png|MTA 'Blue' Loading screen<br />
File:MTASA-Race-Mainmenu.png|The 'Blue' look/interface in MTA:SA Race<br />
File:MTASA-Race-Racing.jpg|Racing in MTA: SA Race<br />
File:Sa-airrace.jpg|A mid-air race in MTA:SA Race<br />
File:Mtasa-nyan.png|Nyan Cat in MTA:SA<br />
File:Mta-screen 2010-09-25 21-59-07.png|Custom map in MTA:SA<br />
</gallery></div><br />
|}<br />
<br />
== See Also ==<br />
* [[Timeline]] (from 2003 to 2006)<br />
* [[Version History]] (More detailed version history)<br />
* [[Press Coverage]]<br />
* [[Archive]]<br />
<br />
== External Links ==<br />
* [http://gathering.tweakers.net/forum/list_messages/707958/0 GoT Tweakers.net Topic #1] (Dutch)<br />
* [http://gathering.tweakers.net/forum/list_messages/714034/0 GoT Tweakers.net Topic #2] (Dutch)<br />
* [http://www.youtube.com/playlist?list=PL1C361986E95BCA42&feature=plcp Video Archive] - Media from older MTA releases on Youtube.<br />
<br />
== References ==<br />
<references/><br />
<br />
[[Category:Historical]]<br />
<br />
[[pl:Multi_Theft_Auto]]<br />
[[es:Multi_Theft_Auto]]</div>Wittxhttps://wiki.multitheftauto.com/index.php?title=Modules&diff=50072Modules2017-01-01T18:10:15Z<p>Wittx: Undo revision 50061 by Marcin778 (talk)</p>
<hr />
<div>Modules are extensions for Multi Theft Auto's Lua core, allowing the integration and use of custom Lua functions that have been written in C++, and compiled as a DLL or SO file. Modules are commonly used to create functions for such purposes that Multi Theft Auto lacks, such as sockets. All modules listed here are not distributed with Multi Theft Auto, and must be manually installed.<br />
<br />
==Modules list==<br />
You can view a list of all the documented modules in this wiki [[:Category:Modules|here]].<br />
<br />
==Modules SDK==<br />
To be able to create your own modules, you must use the Modules SDK. You can download it from one of the links below - choose a link in accordance with your server's operating system.<br />
<br />
* Linux<br />
** [http://files.mtasa.com/apps/1.0/dm/ml_devkit.tar.gz Official]<br />
*** (Delete the .d files, and add #include <cstring> to Common.h)<br />
**** (On 64bit add -m32 to CPPFLAGS and LDFLAGS lines in Makefile)<br />
* Microsoft Windows<br />
** [http://www.mediafire.com/?b8b3asgegn0xkm4 Mirror (Mediafire)]<br />
** [https://mega.co.nz/#!nBNGUCgQ!3AHEJt684Heu9bN5de8xwAQ3h-qq5-V6fjUeU7rj5hI Mirror (MEGA)]<br />
<br />
===SDK Functions===<br />
*Currently in there:<br />
**Base:<br />
***HelloWorld<br />
**MySQL<br />
***MySQLCreate<br />
***MySQLOpen<br />
***MySQLDestroy<br />
***MySQLQuery<br />
***MySQLSafeString<br />
<br />
<br />
<br />
[[Category:Scripting Concepts]]<br />
[[Category:Incomplete]]<br />
[[Category:Modules]]<br />
<br />
[[pl:Modules]]<br />
[[pt-br:Módulos]]<br />
[[ru:Modules]]</div>Wittxhttps://wiki.multitheftauto.com/index.php?title=Client_Scripting_Functions&diff=50059Client Scripting Functions2017-01-01T18:08:56Z<p>Wittx: Undo revision 50034 by Marcin778 (talk)</p>
<hr />
<div><pageclass class="client"></pageclass><br />
{{Adding_Pages_to_Categories_and_Templates}}<br />
This page lists all the '''client-side''' scripting functions that have been implemented and are available as native functions from the Deathmatch mod. To request a function or event, use [[Requested Functions and Events]]<br />
<br />
For more functions, check the [[Useful_Functions|useful functions page]].<br />
__TOC__<br />
<br />
==Audio functions==<br />
{{Client_audio_functions}}<br />
<br />
==Blip functions==<br />
{{Client_blip_functions}}<br />
<br />
==Browser functions==<br />
{{CEF_functions}}<br />
<br />
==Camera functions==<br />
{{Client_camera_functions}}<br />
<br />
==Clothes and body functions==<br />
{{Client_Clothes and body functions}}<br />
<br />
==Collision shape functions==<br />
{{Client_collision_shape_functions}}<br />
<br />
==Cursor functions==<br />
{{Client_cursor_functions}}<br />
<br />
==Drawing functions==<br />
{{Drawing_functions}}<br />
<br />
==Effects functions==<br />
{{Client_Effects_functions}}<br />
<br />
==Element functions==<br />
{{Client_element_functions}}<br />
<br />
==Engine functions==<br />
{{Engine_functions}}<br />
<br />
==Event functions==<br />
{{Client_event_functions}}<br />
<br />
==Explosion functions==<br />
{{Client_explosion_functions}}<br />
<br />
==File functions==<br />
{{Client file functions}}<br />
<br />
==Fire functions==<br />
{{Client fire functions}}<br />
<br />
==GUI functions==<br />
{{GUI_functions}}<br />
<br />
==Input functions==<br />
{{Client_input_functions}}<br />
<br />
==Light functions==<br />
{{Client_light_functions}}<br />
<br />
==Marker functions==<br />
{{Client_marker_functions}}<br />
<br />
==Matrix functions==<br />
{{Shared_matrix_functions}}<br />
<br />
==Object functions==<br />
{{Client_object_functions}}<br />
<br />
==Output functions==<br />
{{Client_output_functions}}<br />
<br />
==Ped functions==<br />
{{Client_ped_functions}}<br />
<br />
==Pickup functions==<br />
{{Client_pickup_functions}}<br />
<br />
==Player functions==<br />
{{Client_player_functions}}<br />
<br />
==Projectile functions==<br />
{{Client_projectile_functions}}<br />
<br />
==Radar area functions==<br />
{{Client_radar-area_functions}}<br />
<br />
==Resource functions==<br />
{{Client_resource_functions}}<br />
<br />
==Searchlight functions==<br />
{{Client_searchlight_functions}}<br />
<br />
==Team functions==<br />
{{Client_team_functions}}<br />
<br />
==Utility functions==<br />
{{Client_utility_functions}}<br />
<br />
==UTF8 Library==<br />
{{UTF8 functions}}<br />
<br />
==Vehicle functions==<br />
{{Client_vehicle_functions}}<br />
<br />
==Water functions==<br />
{{Client_water_functions}}<br />
<br />
==Weapon functions==<br />
{{Client_weapon_functions}}<br />
<br />
==Weapon Creation functions==<br />
<strike>Documentation can be found [http://code.google.com/p/mtasa-blue/source/detail?r=4555 here] [https://github.com/multitheftauto/mtasa-blue/commit/c0ac461867e24fe5fc471fe373ec6212e8736c01 (GitHub)] and [http://code.google.com/p/mtasa-blue/source/detail?r=4557 here] [https://github.com/multitheftauto/mtasa-blue/commit/9c2464b5e0c7d0f2915a9b46273832cd950af48e (GitHub)]</strike><br />
{{Client_weapon_creation_functions}}<br />
<br />
==World functions==<br />
{{Client_world_functions}}<br />
<br />
==XML functions==<br />
{{Client XML functions}}<br />
<br />
[[ar:Client Scripting Functions]]<br />
[[pl:Funkcje po stronie klienta]]<br />
[[it:Funzioni Client-side]]<br />
[[ru:Client Scripting Functions]]<br />
[[es:Funciones del cliente]]<br />
[[de:Clientseitige_Funktionen]]<br />
[[tr:Client Taraflı Fonksiyonlar]]<br />
[[zh-cn:客户端脚本函数]]</div>Wittx