<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.multitheftauto.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=X86dev</id>
	<title>Multi Theft Auto: Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.multitheftauto.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=X86dev"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/wiki/Special:Contributions/X86dev"/>
	<updated>2026-04-25T19:01:34Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetVehicleHandling&amp;diff=66946</id>
		<title>SetVehicleHandling</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetVehicleHandling&amp;diff=66946"/>
		<updated>2020-06-17T05:59:22Z</updated>

		<summary type="html">&lt;p&gt;X86dev: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Server client function}}&lt;br /&gt;
__NOTOC__ &lt;br /&gt;
This function is used to change the handling data of a vehicle.&lt;br /&gt;
&lt;br /&gt;
{{New feature/item|3.0156|1.5.5|12009|Implemented also for client-sided vehicles.}}&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool setVehicleHandling ( element theVehicle, string property, var value ) &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Syntaxes for reset configurations:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool setVehicleHandling ( element theVehicle, string property, nil, false )  -- Reset one property to model handling value&lt;br /&gt;
bool setVehicleHandling ( element theVehicle, string property, nil, true )   -- Reset one property to GTA default value&lt;br /&gt;
bool setVehicleHandling ( element theVehicle, false )  -- Reset all properties to model handling value&lt;br /&gt;
bool setVehicleHandling ( element theVehicle, true )   -- Reset all properties to GTA default value&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theVehicle:''' The vehicle you wish to set the handling of.&lt;br /&gt;
*'''property:''' The property you wish to set the handling of the vehicle to.&lt;br /&gt;
&lt;br /&gt;
{{Note|For functionality reasons suspension modification is disabled on monster trucks, trains, boats and trailers.}}&lt;br /&gt;
{{Handling Properties}}&lt;br /&gt;
*'''value:''' The value of the property you wish to set the handling of the vehicle to.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the handling was set successfully, ''false'' otherwise. See below a list of valid properties and their required values:&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This example will make Infernus handling very fast and also make it damage proof from collision (handling by Mr.unpredictable).&lt;br /&gt;
this example will help you in creating your own vehicle Handling.&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function vhandling ( theVehicle )&lt;br /&gt;
    if getElementModel(theVehicle) == 411 then -------------- vehicle Id&lt;br /&gt;
        setVehicleHandling(theVehicle, &amp;quot;mass&amp;quot;, 300.0)&lt;br /&gt;
        setVehicleHandling(theVehicle, &amp;quot;turnMass&amp;quot;, 200)&lt;br /&gt;
        setVehicleHandling(theVehicle, &amp;quot;dragCoeff&amp;quot;, 4.0 )&lt;br /&gt;
        setVehicleHandling(theVehicle, &amp;quot;centerOfMass&amp;quot;, { 0.0,0.08,-0.09 } )&lt;br /&gt;
        setVehicleHandling(theVehicle, &amp;quot;percentSubmerged&amp;quot;, 103)&lt;br /&gt;
        setVehicleHandling(theVehicle, &amp;quot;tractionMultiplier&amp;quot;, 1.8)&lt;br /&gt;
        setVehicleHandling(theVehicle, &amp;quot;tractionLoss&amp;quot;, 1.0)&lt;br /&gt;
        setVehicleHandling(theVehicle, &amp;quot;tractionBias&amp;quot;, 0.48)&lt;br /&gt;
        setVehicleHandling(theVehicle, &amp;quot;numberOfGears&amp;quot;, 5)&lt;br /&gt;
        setVehicleHandling(theVehicle, &amp;quot;maxVelocity&amp;quot;, 300.0)&lt;br /&gt;
        setVehicleHandling(theVehicle, &amp;quot;engineAcceleration&amp;quot;, 90.0 )&lt;br /&gt;
        setVehicleHandling(theVehicle, &amp;quot;engineInertia&amp;quot;, 5.0)&lt;br /&gt;
        setVehicleHandling(theVehicle, &amp;quot;driveType&amp;quot;, &amp;quot;rwd&amp;quot;)&lt;br /&gt;
        setVehicleHandling(theVehicle, &amp;quot;engineType&amp;quot;, &amp;quot;petrol&amp;quot;)&lt;br /&gt;
        setVehicleHandling(theVehicle, &amp;quot;brakeDeceleration&amp;quot;, 20.0)&lt;br /&gt;
        setVehicleHandling(theVehicle, &amp;quot;brakeBias&amp;quot;, 0.60)&lt;br /&gt;
        -----abs----&lt;br /&gt;
        setVehicleHandling(theVehicle, &amp;quot;steeringLock&amp;quot;,  35.0 )&lt;br /&gt;
        setVehicleHandling(theVehicle, &amp;quot;suspensionForceLevel&amp;quot;, 0.85)&lt;br /&gt;
        setVehicleHandling(theVehicle, &amp;quot;suspensionDamping&amp;quot;, 0.15 )&lt;br /&gt;
        setVehicleHandling(theVehicle, &amp;quot;suspensionHighSpeedDamping&amp;quot;, 0.0)&lt;br /&gt;
        setVehicleHandling(theVehicle, &amp;quot;suspensionUpperLimit&amp;quot;, 0.15 )&lt;br /&gt;
        setVehicleHandling(theVehicle, &amp;quot;suspensionLowerLimit&amp;quot;, -0.16)&lt;br /&gt;
        setVehicleHandling(theVehicle, &amp;quot;suspensionFrontRearBias&amp;quot;, 0.5 )&lt;br /&gt;
        setVehicleHandling(theVehicle, &amp;quot;suspensionAntiDiveMultiplier&amp;quot;, 0.0)&lt;br /&gt;
        setVehicleHandling(theVehicle, &amp;quot;seatOffsetDistance&amp;quot;, 0.0)&lt;br /&gt;
        setVehicleHandling(theVehicle, &amp;quot;collisionDamageMultiplier&amp;quot;, 0.00)&lt;br /&gt;
        --setVehicleHandling(theVehicle, &amp;quot;monetary&amp;quot;,  10000) This one is disabled for now&lt;br /&gt;
        setVehicleHandling(theVehicle, &amp;quot;modelFlags&amp;quot;, 1002000)&lt;br /&gt;
        setVehicleHandling(theVehicle, &amp;quot;handlingFlags&amp;quot;, 1000002)&lt;br /&gt;
        --setVehicleHandling(theVehicle, &amp;quot;headLight&amp;quot;, 3) This one is disabled for now&lt;br /&gt;
        --setVehicleHandling(theVehicle, &amp;quot;tailLight&amp;quot;, 2) This one is disabled for now&lt;br /&gt;
        --setVehicleHandling(theVehicle, &amp;quot;animGroup&amp;quot;, 4) This one is disabled for now&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler ( &amp;quot;onPlayerVehicleEnter&amp;quot;, getRootElement(), vhandling )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This example will add a command for players with which they can change the mass of the vehicle.&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;	 &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function massChange ( me, command, mass )&lt;br /&gt;
    local mass = tonumber ( mass ) -- Convert mass to a number&lt;br /&gt;
    local veh = getPedOccupiedVehicle ( me ) -- Get the player's vehicle&lt;br /&gt;
    &lt;br /&gt;
    if mass and veh then  -- If valid mass and in a vehicle&lt;br /&gt;
        local success = setVehicleHandling ( veh, &amp;quot;mass&amp;quot;, mass) -- Set the vehicle's mass, and check if successful&lt;br /&gt;
        &lt;br /&gt;
        if success then -- If successful&lt;br /&gt;
            outputChatBox ( &amp;quot;Your vehicle's mass has been changed to: &amp;quot;..mass..&amp;quot; kg&amp;quot;, me, 0, 255, 0 ) -- Notify the player of success&lt;br /&gt;
        else -- Too bad failure is still an option&lt;br /&gt;
            outputChatBox ( &amp;quot;Setting mass failed. It's probably above or below allowed limits&amp;quot;, me, 255, 0, 0 ) -- Notify the player of failure, and give a possible reason&lt;br /&gt;
        end&lt;br /&gt;
    elseif not veh then -- If not in a vehicle&lt;br /&gt;
        outputChatBox ( &amp;quot;You're not in a vehicle&amp;quot;, me, 255, 0, 0 ) -- Tell the player; He / she obviously doesn't know&lt;br /&gt;
    elseif not mass then -- If not a valid mass&lt;br /&gt;
        outputChatBox ( &amp;quot;Syntax: /changemass [mass]&amp;quot;, me, 255, 0, 0 ) -- Tell the player the proper syntax&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler ( &amp;quot;changemass&amp;quot;, massChange )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This example will apply custom handling as defined for each specific vehicle (ID) in below table&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;	 &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local predefinedHandling = {&lt;br /&gt;
	[411] = {&lt;br /&gt;
		[&amp;quot;engineAcceleration&amp;quot;] = 14,&lt;br /&gt;
		[&amp;quot;dragCoeff&amp;quot;] = 0,&lt;br /&gt;
		[&amp;quot;maxVelocity&amp;quot;] = 100000,&lt;br /&gt;
		[&amp;quot;tractionMultiplier&amp;quot;] = 0.9,&lt;br /&gt;
		[&amp;quot;tractionLoss&amp;quot;] = 1.1,&lt;br /&gt;
	},&lt;br /&gt;
	[415] = {&lt;br /&gt;
		[&amp;quot;engineAcceleration&amp;quot;] = 14,&lt;br /&gt;
		[&amp;quot;dragCoeff&amp;quot;] = 0,&lt;br /&gt;
		[&amp;quot;maxVelocity&amp;quot;] = 100000,&lt;br /&gt;
		[&amp;quot;tractionMultiplier&amp;quot;] = 0.9,&lt;br /&gt;
		[&amp;quot;tractionLoss&amp;quot;] = 1.1,&lt;br /&gt;
	},&lt;br /&gt;
		[562] = { -- Universal drift handling&lt;br /&gt;
		[&amp;quot;driveType&amp;quot;] = &amp;quot;rwd&amp;quot;,&lt;br /&gt;
		[&amp;quot;engineAcceleration&amp;quot;] = 200,&lt;br /&gt;
		[&amp;quot;dragCoeff&amp;quot;] = 1.5,&lt;br /&gt;
		[&amp;quot;maxVelocity&amp;quot;] = 300,&lt;br /&gt;
		[&amp;quot;tractionMultiplier&amp;quot;] = 0.7,&lt;br /&gt;
		[&amp;quot;tractionLoss&amp;quot;] = 0.8,&lt;br /&gt;
		[&amp;quot;collisionDamageMultiplier&amp;quot;] = 0.4,&lt;br /&gt;
		[&amp;quot;engineInertia&amp;quot;] = -175,&lt;br /&gt;
		[&amp;quot;steeringLock&amp;quot;] = 75,&lt;br /&gt;
		[&amp;quot;numberOfGears&amp;quot;] = 4,&lt;br /&gt;
		[&amp;quot;suspensionForceLevel&amp;quot;] = 0.8,&lt;br /&gt;
		[&amp;quot;suspensionDamping&amp;quot;] = 0.8,&lt;br /&gt;
		[&amp;quot;suspensionUpperLimit&amp;quot;] = 0.33,&lt;br /&gt;
		[&amp;quot;suspensionFrontRearBias&amp;quot;] = 0.3,&lt;br /&gt;
		[&amp;quot;mass&amp;quot;] = 1800,&lt;br /&gt;
		[&amp;quot;turnMass&amp;quot;] = 3000,&lt;br /&gt;
		[&amp;quot;centerOfMass&amp;quot;] = { [1]=0, [2]=-0.2, [3]=-0.5 }, -- Good example to understand centerOfMass parameter usage&lt;br /&gt;
	},&lt;br /&gt;
&lt;br /&gt;
	--next model below etc (copy rows)&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
for i,v in pairs (predefinedHandling) do&lt;br /&gt;
	if i then&lt;br /&gt;
		for handling, value in pairs (v) do&lt;br /&gt;
			if not setModelHandling (i, handling, value) then&lt;br /&gt;
				outputDebugString (&amp;quot;* Predefined handling '&amp;quot;..tostring(handling)..&amp;quot;' for vehicle model '&amp;quot;..tostring(i)..&amp;quot;' could not be set to '&amp;quot;..tostring(value)..&amp;quot;'&amp;quot;)&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
for _,v in ipairs (getElementsByType(&amp;quot;vehicle&amp;quot;)) do&lt;br /&gt;
	if v and predefinedHandling[getElementModel(v)] then&lt;br /&gt;
		for k,vl in pairs (predefinedHandling[getElementModel(v)]) do&lt;br /&gt;
			setVehicleHandling (v, k, vl)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function resetHandling()&lt;br /&gt;
	for model in pairs (predefinedHandling) do&lt;br /&gt;
		if model then&lt;br /&gt;
			for k in pairs(getOriginalHandling(model)) do&lt;br /&gt;
				setModelHandling(model, k, nil)&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	for _,v in ipairs (getElementsByType(&amp;quot;vehicle&amp;quot;)) do&lt;br /&gt;
		if v then&lt;br /&gt;
			local model = getElementModel(v)&lt;br /&gt;
			if predefinedHandling[model] then&lt;br /&gt;
				for k,h in pairs(getOriginalHandling(model)) do&lt;br /&gt;
					setVehicleHandling(v, k, h)&lt;br /&gt;
				end&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onResourceStop&amp;quot;, resourceRoot, resetHandling)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Changelog==&lt;br /&gt;
{{ChangelogHeader}}&lt;br /&gt;
{{ChangelogItem|1.5.5-3.12009|Added for vehicles created on client-side.}}&lt;br /&gt;
&lt;br /&gt;
==See other vehicle functions==&lt;br /&gt;
{{Vehicle functions}}&lt;/div&gt;</summary>
		<author><name>X86dev</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetGarageOpen&amp;diff=39458</id>
		<title>SetGarageOpen</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetGarageOpen&amp;diff=39458"/>
		<updated>2014-04-24T11:31:28Z</updated>

		<summary type="html">&lt;p&gt;X86dev: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Server client function}}&lt;br /&gt;
This function opens or closes the specified garage door in the world.&lt;br /&gt;
{{Note|setGarageOpen does not work with ID 32 (Pay 'n' Spray near Royal Casino). This garage doesn't work in SP too. You can remove this gate by [[removeWorldModel]] and recreate them for later using with moveObject.}}&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool setGarageOpen ( int garageID, bool open )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''garageID:''' The [[Garage|garage ID]] that represents the garage door being opened or closed.&lt;br /&gt;
*'''isOpen:''' A boolean indicating whether or not to open the door.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if successful, ''false'' if an invalid garage id was given.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
&amp;lt;section name=&amp;quot;Server&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This example opens a garage door when a player enters a collision shape near it, and closes it when they leave:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
GARAGE_ID = 25&lt;br /&gt;
&lt;br /&gt;
-- create a collision shape and attach event handlers to it when the resource starts&lt;br /&gt;
addEventHandler(&amp;quot;onResourceStart&amp;quot;, getResourceRootElement(getThisResource()),&lt;br /&gt;
function (resource)&lt;br /&gt;
	local garageCube = createColCuboid(1337, 194, 28, 6, 10, 4)&lt;br /&gt;
	addEventHandler(&amp;quot;onColShapeHit&amp;quot;, garageCube, onGarageCubeHit)&lt;br /&gt;
	addEventHandler(&amp;quot;onColShapeLeave&amp;quot;, garageCube, onGarageCubeLeave)&lt;br /&gt;
end)&lt;br /&gt;
&lt;br /&gt;
-- open the door when someone enters the garage's collision shape&lt;br /&gt;
function onGarageCubeHit(hitElement, matchingDimension)&lt;br /&gt;
	if (getElementType(hitElement) == &amp;quot;player&amp;quot;) then&lt;br /&gt;
		-- check to make sure the door is closed&lt;br /&gt;
		if (not isGarageOpen(GARAGE_ID)) then&lt;br /&gt;
			-- open the door&lt;br /&gt;
			setGarageOpen(GARAGE_ID, true)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- close the door when someone leaves the garage's collision shape&lt;br /&gt;
function onGarageCubeLeave(leaveElement, matchingDimension)&lt;br /&gt;
	if (getElementType(leaveElement) == &amp;quot;player&amp;quot;) then&lt;br /&gt;
		-- check to make sure the door is open&lt;br /&gt;
		if (isGarageOpen(GARAGE_ID)) then&lt;br /&gt;
			-- close the door&lt;br /&gt;
			setGarageOpen(GARAGE_ID, false)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{World functions}}&lt;br /&gt;
&lt;br /&gt;
[[ru:setGarageOpen]]&lt;/div&gt;</summary>
		<author><name>X86dev</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=DestroyElement&amp;diff=38672</id>
		<title>DestroyElement</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=DestroyElement&amp;diff=38672"/>
		<updated>2014-01-29T08:24:37Z</updated>

		<summary type="html">&lt;p&gt;X86dev: Undo revision 38671 by Thecoolser (talk)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Server client function}}&lt;br /&gt;
This function destroys an [[element]] and all elements within it in the hierarchy (its children, the children of those children etc). [[player|Player]] elements cannot be destroyed using this function. A player can only be removed from the hierarchy when they quit or are kicked. The root element also cannot be destroyed, however, passing the root as an argument will wipe all elements from the server, except for the players and clients, which will become direct descendants of the root node, and other elements that cannot be destroyed, such as resource root elements.&lt;br /&gt;
&lt;br /&gt;
Players are not the only elements that cannot be deleted. This list also includes remote clients and console elements.&lt;br /&gt;
{{Note|As element ids are eventually recycled, always make sure you nil variables containing the element after calling this function}}&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool destroyElement ( element elementToDestroy )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''elementToDestroy:''' The element you wish to destroy. &lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the element was destroyed successfully, ''false'' if either the element passed to it was invalid or it could not be destroyed for some other reason (for example, clientside destroyElement can't destroy serverside elements).&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
'''Example 1:''' This example would destroy every element in the map, with the exception of players and the root element itself.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- Find the root element (the element that contains all others)&lt;br /&gt;
root = getRootElement ()&lt;br /&gt;
-- Destroy all its children, except players.&lt;br /&gt;
destroyElement ( root )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example 2:''' This example destroys all vehicles of the specified model:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function destroyVehiclesOfModel(modelID)&lt;br /&gt;
	-- get a table of all the vehicles that exist and loop through it&lt;br /&gt;
	local vehicles = getElementsByType(&amp;quot;vehicle&amp;quot;)&lt;br /&gt;
	for i,v in ipairs(vehicles) do&lt;br /&gt;
		-- if the vehicle's ID is the one provided, destroy it&lt;br /&gt;
		if (getElementModel(v) == modelID) then&lt;br /&gt;
			destroyElement(v)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
destroyVehiclesOfModel(445)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example 3:''' This example allows creation of claymores, which trigger and explode.  When they explode, the colshape and object for the claymore are destroyed.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;function createClaymore ( x,y,z, creator )&lt;br /&gt;
	local claymoreObject = createObject ( 1945, x, y, z - 1, 0, 0, 90 )  -- create an object which looks like a claymore&lt;br /&gt;
	local claymoreCol = createColSphere ( x, y, z, 1 )                   -- create a col sphere with radius 1&lt;br /&gt;
	setElementData ( claymoreCol, &amp;quot;object&amp;quot;, claymoreObject )             -- store the object of the claymore&lt;br /&gt;
	setElementData ( claymoreCol, &amp;quot;creatorPlayer&amp;quot;, creator )             -- store the person who created it&lt;br /&gt;
	addEventHandler ( &amp;quot;onColShapeHit&amp;quot;, claymoreCol, claymoreHit )        -- add an event handler to the colshape&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function claymoreHit ( thePlayer, matchingDimension )&lt;br /&gt;
	-- retrieve the object associated to the claymore, and who created it&lt;br /&gt;
	local claymoreObject = getElementData ( source, &amp;quot;object&amp;quot; )&lt;br /&gt;
	local claymoreCreator = getElementData ( source, &amp;quot;creatorPlayer&amp;quot; )&lt;br /&gt;
	-- get the position of the claymore&lt;br /&gt;
	local x,y,z = getElementPosition ( source )&lt;br /&gt;
	createExplosion ( x,y,z, 12, claymoreCreator ) -- create an explosion, associated to the creator, of a small size at the col's position&lt;br /&gt;
	-- remove the event handler for the colshape&lt;br /&gt;
	removeEventHandler ( &amp;quot;onColShapeHit&amp;quot;, source, claymoreHit )&lt;br /&gt;
	-- destroy the claymore object, and the col shape so it doesn't trigger again.&lt;br /&gt;
	destroyElement ( claymoreObject )&lt;br /&gt;
	destroyElement ( source )&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
'''Example 4:''' This example destroys all vehicles, regardless of ID, name, etc:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function allvehiclesaredoomed()&lt;br /&gt;
	-- get a table of all the vehicles that exist and loop through it&lt;br /&gt;
	vehicles = getElementsByType(&amp;quot;vehicle&amp;quot;)&lt;br /&gt;
	for i,v in ipairs(vehicles) do&lt;br /&gt;
		-- destroy every vehicle.&lt;br /&gt;
		destroyElement(v)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
--The command handler below will destroy all vehicles once&lt;br /&gt;
--you enter /vdoom in the chat box or vdoom in the game console.&lt;br /&gt;
addCommandHandler(&amp;quot;vdoom&amp;quot;, allvehiclesaredoomed)&lt;br /&gt;
--This is very useful if you use the freeroam resource and some&lt;br /&gt;
--heartless players start spawn spamming.&lt;br /&gt;
--You can also set it on a timer to have your server clear all&lt;br /&gt;
--vehicles ever 60 minutes, (1 hour).  Timer below:&lt;br /&gt;
setTimer(allvehiclesaredoomed, 3600000, 0)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Element functions}}&lt;/div&gt;</summary>
		<author><name>X86dev</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=File_talk:Res_loader_sys.png&amp;diff=37682</id>
		<title>File talk:Res loader sys.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=File_talk:Res_loader_sys.png&amp;diff=37682"/>
		<updated>2013-11-28T12:39:49Z</updated>

		<summary type="html">&lt;p&gt;X86dev: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Can you re-make this in Microsoft Visio ? Thanks.&lt;br /&gt;
&lt;br /&gt;
-- Sure, when I come back home (in the evening). [[User:The GTA|The GTA]]&lt;br /&gt;
&lt;br /&gt;
Nice! Keep up the good work! --[[User:X86dev|X86dev]] 12:39, 28 November 2013 (UTC)&lt;/div&gt;</summary>
		<author><name>X86dev</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=File_talk:Res_loader_sys.png&amp;diff=37677</id>
		<title>File talk:Res loader sys.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=File_talk:Res_loader_sys.png&amp;diff=37677"/>
		<updated>2013-11-28T08:04:06Z</updated>

		<summary type="html">&lt;p&gt;X86dev: Created page with &amp;quot;Can you re-make this in Microsoft Visio ? Thanks.&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Can you re-make this in Microsoft Visio ? Thanks.&lt;/div&gt;</summary>
		<author><name>X86dev</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetCameraClip&amp;diff=37666</id>
		<title>SetCameraClip</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetCameraClip&amp;diff=37666"/>
		<updated>2013-11-27T07:36:04Z</updated>

		<summary type="html">&lt;p&gt;X86dev: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Client function}} &lt;br /&gt;
__NOTOC__ &lt;br /&gt;
This function sets if the camera will &amp;quot;collide&amp;quot; with any objects or vehicles in its way. This means that if object clip is enabled an object is in the way of where the camera actually wants to be, the camera will try to be in front of it. This function can disable that.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' This function doesn't fix the issue of camera clip not working on objects out of world bounds.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool setCameraClip ( [ bool objects = true, bool vehicles = true ] ) &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
*'''objects:''' Sets if you want the camera to clip on objects.&lt;br /&gt;
*'''vehicles:''' Sets if you want the camera to clip on vehicles.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Always returns ''true''.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
&amp;lt;section name=&amp;quot;Client&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This function enables it to look though cars&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function enableCameraThoughCars ()&lt;br /&gt;
  setCameraClip (true,false)&lt;br /&gt;
  outputChatBox (&amp;quot;Your camera can see the vehicle interior now!&amp;quot;,255,0,0,false)&lt;br /&gt;
end&lt;br /&gt;
addEventHandler (&amp;quot;onClientResourceStart&amp;quot;,getResourceRootElement(getThisResource()),enableCameraThoughCars)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Client camera functions}}&lt;/div&gt;</summary>
		<author><name>X86dev</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetElementData&amp;diff=37520</id>
		<title>SetElementData</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetElementData&amp;diff=37520"/>
		<updated>2013-11-06T08:28:42Z</updated>

		<summary type="html">&lt;p&gt;X86dev: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Server client function}}&lt;br /&gt;
__NOTOC__ &lt;br /&gt;
This function stores [[element data]] under a certain key, attached to an element. Element data set using this is then synced with all clients or the server. As such you should avoid passing data that is not able to be synced into this function (i.e. xmlnodes, acls, aclgroups etc.) Server-created elements are able to be synced.&lt;br /&gt;
&lt;br /&gt;
{{Tip|A simple and efficient way to make a variable known to the server and clients is to use setElementData on the [[root]] element.}}&lt;br /&gt;
{{Note|See [[Script security]] for tips on preventing cheaters when using events and element data}}&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool setElementData ( element theElement, string key, var value [, bool synchronize = true ] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theElement:''' The [[element]] you wish to attach the data to.&lt;br /&gt;
*'''key:''' The key you wish to store the data under. (Maximum 31 characters.) &lt;br /&gt;
*'''value:''' The value you wish to store. See [[element data]] for a list of acceptable datatypes.&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments=== &lt;br /&gt;
*'''synchronize:''' Determines whether or not the data will be synchronized with the server (client-side variation) and remote clients (both variations).&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the data was set succesfully, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
&amp;lt;section name=&amp;quot;Server&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This example allows a player to add a custom tag onto their nickname, and also reverts it back to normal if they wish.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function addPlayerCustomTag ( thePlayer, command, newTag )&lt;br /&gt;
	--Let's make sure the newTag param has been entered...&lt;br /&gt;
	if ( newTag ) then&lt;br /&gt;
		--Grab their current playername for saving.&lt;br /&gt;
		local sPlayerNickname = getPlayerName ( thePlayer )&lt;br /&gt;
		--Create their new nickname with their tag&lt;br /&gt;
		local sNewPlayerNickname = newTag .. &amp;quot; &amp;quot; .. sPlayerNickname&lt;br /&gt;
		&lt;br /&gt;
		--Let's first load the element data, see if it's there already&lt;br /&gt;
		--The reason for this is that if a player were to do /addtag twice,&lt;br /&gt;
		--the tag would be prepended a second time&lt;br /&gt;
		local sOldNick = getElementData( thePlayer, &amp;quot;tempdata.originalnick&amp;quot; )&lt;br /&gt;
		if ( sOldNick == false ) then&lt;br /&gt;
			--Save their orignal nickname in their element data&lt;br /&gt;
			setElementData ( thePlayer, &amp;quot;tempdata.originalnick&amp;quot;, sPlayerNickname )&lt;br /&gt;
		end&lt;br /&gt;
		&lt;br /&gt;
		--Set their new nickname globally&lt;br /&gt;
		setPlayerName ( thePlayer, sNewPlayerNickname )&lt;br /&gt;
		&lt;br /&gt;
		--Tell them it's done&lt;br /&gt;
		outputChatBox ( &amp;quot;Your new nickname has been set, to put it back to its original state you can use /deltag&amp;quot;, thePlayer )&lt;br /&gt;
	else&lt;br /&gt;
		--The newTag param was not entered, give an error message&lt;br /&gt;
		outputChatBox ( &amp;quot;/addtag - Incorrect syntax, Correct: /addtag &amp;lt;newtag&amp;gt;&amp;quot;, thePlayer )&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler ( &amp;quot;addtag&amp;quot;, addPlayerCustomTag )&lt;br /&gt;
&lt;br /&gt;
function removePlayerCustomTag ( thePlayer, command )&lt;br /&gt;
	--We first need to check that they have already used /addtag, let's do that now&lt;br /&gt;
	local sOldNick = getElementData( thePlayer, &amp;quot;tempdata.originalnick&amp;quot; )&lt;br /&gt;
	if ( sOldNick ) then&lt;br /&gt;
		--Great, they have a tag added, let's reset them&lt;br /&gt;
		&lt;br /&gt;
		--First we will want to reset the element data back to its default (that being false)&lt;br /&gt;
		setElementData ( thePlayer, &amp;quot;tempdata.originalnick&amp;quot;, false )&lt;br /&gt;
		&lt;br /&gt;
		--Now set the client name back&lt;br /&gt;
		setPlayerName( thePlayer, sOldNick )&lt;br /&gt;
		&lt;br /&gt;
		--Notify them&lt;br /&gt;
		outputChatBox ( &amp;quot;Your old nickname has been set&amp;quot;, thePlayer )&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler ( &amp;quot;deltag&amp;quot;, removePlayerCustomTag )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Element_functions}}&lt;/div&gt;</summary>
		<author><name>X86dev</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=User_talk:Qaisjp&amp;diff=37492</id>
		<title>User talk:Qaisjp</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=User_talk:Qaisjp&amp;diff=37492"/>
		<updated>2013-11-04T12:48:19Z</updated>

		<summary type="html">&lt;p&gt;X86dev: Created page with &amp;quot;Please use the wiki guidelines defined here: https://wiki.multitheftauto.com/wiki/Category:MTA_Wiki:Editing --~~~~&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Please use the wiki guidelines defined here: https://wiki.multitheftauto.com/wiki/Category:MTA_Wiki:Editing --[[User:X86dev|X86dev]] 12:48, 4 November 2013 (UTC)&lt;/div&gt;</summary>
		<author><name>X86dev</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Client_Scripting_Functions&amp;diff=37298</id>
		<title>Client Scripting Functions</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Client_Scripting_Functions&amp;diff=37298"/>
		<updated>2013-10-10T06:33:42Z</updated>

		<summary type="html">&lt;p&gt;X86dev: Undo revision 37285 by آحمد آلعلَي (talk)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;pageclass class=&amp;quot;client&amp;quot;&amp;gt;&amp;lt;/pageclass&amp;gt;&lt;br /&gt;
{{Adding_Pages_to_Categories_and_Templates}}&lt;br /&gt;
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]]&lt;br /&gt;
&lt;br /&gt;
For more functions, check the [[Useful_Functions|useful functions page]].&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
==Audio functions==&lt;br /&gt;
{{Client_audio_functions}}&lt;br /&gt;
&lt;br /&gt;
==Blip functions==&lt;br /&gt;
{{Client_blip_functions}}&lt;br /&gt;
&lt;br /&gt;
==Camera functions==&lt;br /&gt;
{{Client_camera_functions}}&lt;br /&gt;
&lt;br /&gt;
==Clothes and body functions==&lt;br /&gt;
{{Client_Clothes and body functions}}&lt;br /&gt;
&lt;br /&gt;
==Collision shape functions==&lt;br /&gt;
{{Client_collision_shape_functions}}&lt;br /&gt;
&lt;br /&gt;
==Cursor functions==&lt;br /&gt;
{{Client_cursor_functions}}&lt;br /&gt;
&lt;br /&gt;
==Drawing functions==&lt;br /&gt;
{{Drawing_functions}}&lt;br /&gt;
&lt;br /&gt;
==Effects functions==&lt;br /&gt;
{{Client_Effects_functions}}&lt;br /&gt;
&lt;br /&gt;
==Element functions==&lt;br /&gt;
{{Client_element_functions}}&lt;br /&gt;
&lt;br /&gt;
==Engine functions==&lt;br /&gt;
{{Engine_functions}}&lt;br /&gt;
&lt;br /&gt;
==Event functions==&lt;br /&gt;
{{Client_event_functions}}&lt;br /&gt;
&lt;br /&gt;
==Explosion functions==&lt;br /&gt;
{{Client_explosion_functions}}&lt;br /&gt;
&lt;br /&gt;
==File functions==&lt;br /&gt;
{{Client file functions}}&lt;br /&gt;
&lt;br /&gt;
==Fire functions==&lt;br /&gt;
{{Client fire functions}}&lt;br /&gt;
&lt;br /&gt;
==GUI functions==&lt;br /&gt;
{{GUI_functions}}&lt;br /&gt;
&lt;br /&gt;
==Input functions==&lt;br /&gt;
{{Client_input_functions}}&lt;br /&gt;
&lt;br /&gt;
==Marker functions==&lt;br /&gt;
{{Client_marker_functions}}&lt;br /&gt;
&lt;br /&gt;
==Object functions==&lt;br /&gt;
{{Client_object_functions}}&lt;br /&gt;
&lt;br /&gt;
==Output functions==&lt;br /&gt;
{{Client_output_functions}}&lt;br /&gt;
&lt;br /&gt;
==Ped functions==&lt;br /&gt;
{{Client_ped_functions}}&lt;br /&gt;
&lt;br /&gt;
==Pickup functions==&lt;br /&gt;
{{Client_pickup_functions}}&lt;br /&gt;
&lt;br /&gt;
==Player functions==&lt;br /&gt;
{{Client_player_functions}}&lt;br /&gt;
&lt;br /&gt;
==Projectile functions==&lt;br /&gt;
{{Client_projectile_functions}}&lt;br /&gt;
&lt;br /&gt;
==Radar-area functions==&lt;br /&gt;
{{Client_radar-area_functions}}&lt;br /&gt;
&lt;br /&gt;
==Resource functions==&lt;br /&gt;
{{Client_resource_functions}}&lt;br /&gt;
&lt;br /&gt;
==Serial functions==&lt;br /&gt;
{{Client_serial_functions}}&lt;br /&gt;
&lt;br /&gt;
==Team functions==&lt;br /&gt;
{{Client_team_functions}}&lt;br /&gt;
&lt;br /&gt;
==Utility functions==&lt;br /&gt;
{{Client_utility_functions}}&lt;br /&gt;
&lt;br /&gt;
==Vehicle functions==&lt;br /&gt;
{{Client_vehicle_functions}}&lt;br /&gt;
&lt;br /&gt;
==Water functions==&lt;br /&gt;
{{Client_water_functions}}&lt;br /&gt;
&lt;br /&gt;
==Weapon functions==&lt;br /&gt;
{{Client_weapon_functions}}&lt;br /&gt;
&lt;br /&gt;
==Weapon Creation functions==&lt;br /&gt;
Documentation can be found [http://code.google.com/p/mtasa-blue/source/detail?r=4555 here] and [http://code.google.com/p/mtasa-blue/source/detail?r=4557 here]&lt;br /&gt;
{{Client_weapon_creation_functions}}&lt;br /&gt;
&lt;br /&gt;
==World functions==&lt;br /&gt;
{{Client_world_functions}}&lt;br /&gt;
&lt;br /&gt;
==XML functions==&lt;br /&gt;
{{Client XML functions}}&lt;br /&gt;
&lt;br /&gt;
[[pl:Funkcje po stronie klienta]]&lt;br /&gt;
[[it:Funzioni Client-side]]&lt;br /&gt;
[[ru:Client Scripting Functions]]&lt;br /&gt;
[[de:Clientseitige_Funktionen]]&lt;br /&gt;
[[tr:Client Taraflı Fonksiyonlar]]&lt;/div&gt;</summary>
		<author><name>X86dev</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Meta.xml&amp;diff=37239</id>
		<title>Meta.xml</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Meta.xml&amp;diff=37239"/>
		<updated>2013-10-01T08:20:15Z</updated>

		<summary type="html">&lt;p&gt;X86dev: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The ''meta.xml'' file presents MTA with a set of metadata, such as the resource's name, the scripts to include, and which files to precache for sending to clients among other things. It is also the scope of &amp;quot;elements&amp;quot;. It is written in XML, which is based on HTML and is the parent of XHTML.&lt;br /&gt;
&lt;br /&gt;
=Tags=&lt;br /&gt;
XML is a textual data format which is widely used for the representation of data. MTA uses an XML-based language to describe the metadata for resources by using the tags below:&lt;br /&gt;
&lt;br /&gt;
*'''&amp;lt;info /&amp;gt;''' Information about this resource, possible parameters include (any arbitrary parameters can be used and read using [[getResourceInfo]]):&lt;br /&gt;
** '''author:''' The author of this resource&lt;br /&gt;
** '''version:''' The version of this resource&lt;br /&gt;
** '''name:''' The name of this resource&lt;br /&gt;
** '''description:''' A brief description of this resource&lt;br /&gt;
** '''type:''' The type of this resource, that can be &amp;quot;gamemode&amp;quot;, &amp;quot;script&amp;quot;, &amp;quot;map&amp;quot; or &amp;quot;misc&amp;quot;.&lt;br /&gt;
*'''&amp;lt;script /&amp;gt;''' Source code for this resource, possible parameters are:&lt;br /&gt;
** '''src:''' The file name of the source code&lt;br /&gt;
** '''type:''' The type of source code: &amp;quot;client&amp;quot;, &amp;quot;server&amp;quot; or &amp;quot;shared&amp;quot;.&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
**'''cache:''' When the script file type is &amp;quot;client&amp;quot;, this setting controls whether the file is saved on the players hard drive. Default is &amp;quot;true&amp;quot;. Using &amp;quot;false&amp;quot; will mean the file is not saved.&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
**'''validate:''' If set to &amp;quot;false&amp;quot;, compatibility checks are skipped.&lt;br /&gt;
*'''&amp;lt;map /&amp;gt;''' The map for a gamemode, possible parameters are:&lt;br /&gt;
**'''src:''' .map file name (can be path too eg. &amp;quot;maps/filename.map&amp;quot;)&lt;br /&gt;
**'''dimension:''' Dimension in which the map will be loaded (optional)&lt;br /&gt;
*'''&amp;lt;file /&amp;gt;''' 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)&lt;br /&gt;
**'''src:''' client-side file name (can be path too eg. &amp;quot;images/image.png&amp;quot;)&lt;br /&gt;
**'''download:''' Whether or not to be sent to the client automatically (optional). Default is &amp;quot;true&amp;quot;. Using &amp;quot;false&amp;quot; will mean they are not sent on resource start but could later be used by [[downloadFile]] (from version 1.4)&lt;br /&gt;
*'''&amp;lt;include /&amp;gt;''' Include resources that this resource will use&lt;br /&gt;
**'''resource:''' Resource name that you want to start with this resource&lt;br /&gt;
**'''minversion:''' Minimum version that '''resource''' needs to be (optional)&lt;br /&gt;
**'''maxversion:''' Maximum version that '''resource''' needs to be (optional)&lt;br /&gt;
*'''&amp;lt;config /&amp;gt;''' Config file (.xml) can be accessed by resource, possible parameters are:&lt;br /&gt;
**'''src:''' The file name of the config file&lt;br /&gt;
**'''type:''' The type of the config file: &amp;quot;client&amp;quot; or &amp;quot;server&amp;quot;&lt;br /&gt;
*'''&amp;lt;export /&amp;gt;''' This exports functions from this resource, so other resources can use them with [[call]]&lt;br /&gt;
**'''function:''' The function name&lt;br /&gt;
**'''type''' Whether function is exported server-side or client-side (valid values are: &amp;quot;server&amp;quot; and &amp;quot;client&amp;quot;)&lt;br /&gt;
**'''http:''' Can the function be called via HTTP (true/false)&lt;br /&gt;
*'''&amp;lt;html /&amp;gt;'''&lt;br /&gt;
**'''src:''' The filename for the HTTP file (can be a path)&lt;br /&gt;
**'''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)&lt;br /&gt;
**'''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)&lt;br /&gt;
*'''&amp;lt;settings&amp;gt; &amp;lt;setting name=&amp;quot;&amp;quot; value=&amp;quot;&amp;quot;/&amp;gt; &amp;lt;/settings&amp;gt;:''' Most gamemodes use [[settings system]] to let server admins to configure it how they like. For instance you could set round time and then use [[get]] and [[set]] to get the value or change it, respectively.&lt;br /&gt;
*'''&amp;lt;min_mta_version /&amp;gt;''' Minimum version requirements for this resource to run correctly. When authoring resources, the minimum version should usually be set to the current released version of MTA:SA (which at the moment is &amp;quot;{{Current Version|full}}&amp;quot;). See example for example.&lt;br /&gt;
**'''client:''' The minimum client version&lt;br /&gt;
**'''server:''' The minimum server version&lt;br /&gt;
*'''&amp;lt;aclrequest /&amp;gt;''' A list of [[Access_Control_List|ACL]] rights this resource will need.&lt;br /&gt;
{{New items|3.0132|1.3.1 r4141|&lt;br /&gt;
*'''&amp;lt;sync_map_element_data /&amp;gt;''' Controls whether map [[Element_data|element data]] such as &amp;quot;PosX&amp;quot; and &amp;quot;DoubleSided&amp;quot; are transferred to the client. This data is usually not required by most gamemodes or resources. (Map Editor and Interiors require this to be not set to false to work). When set in a gamemode meta.xml, the setting will apply to all maps loaded by that resource.&lt;br /&gt;
**'''false:''' Disable transfer of map element data. This can reduce map download times considerably.&lt;br /&gt;
**'''true:''' Enable transfer of map element data (default).&lt;br /&gt;
}}&lt;br /&gt;
{{New items|3.0140|1.4.0 r5313|&lt;br /&gt;
*'''&amp;lt;oop/&amp;gt;''' todo.&lt;br /&gt;
**'''false:''' todo.&lt;br /&gt;
**'''true:''' todo.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
Heres an example of a meta file using some of the tags mentioned:&lt;br /&gt;
{{#tag:code |&lt;br /&gt;
&amp;lt;meta&amp;gt;&lt;br /&gt;
    &amp;lt;info author=&amp;quot;Slothman&amp;quot; type=&amp;quot;gamemode&amp;quot; name=&amp;quot;Stealth&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;config src=&amp;quot;help.xml&amp;quot; type=&amp;quot;client&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;min_mta_version client=&amp;quot;{{Current Version|full}}&amp;quot; server=&amp;quot;{{Current Version|full}}&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;sync_map_element_data&amp;gt;false&amp;lt;/sync_map_element_data&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;script src=&amp;quot;stealthmain_server.lua&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;script src=&amp;quot;noiseblip.lua&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;script src=&amp;quot;mission_timer.lua&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;script src=&amp;quot;gadgets_server.lua&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;script src=&amp;quot;gadgets_client.lua&amp;quot; type=&amp;quot;client&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;script src=&amp;quot;stealthmain_client.lua&amp;quot; type=&amp;quot;client&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;script src=&amp;quot;noisebar.lua&amp;quot; type=&amp;quot;client&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;script src=&amp;quot;spycam.lua&amp;quot; type=&amp;quot;client&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;script src=&amp;quot;riemann_z_demonstration.lua&amp;quot; type=&amp;quot;client&amp;quot; cache=&amp;quot;false&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;file src=&amp;quot;riot_shield.txd&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;file src=&amp;quot;riot_shield.dff&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;file src=&amp;quot;riot_shield.col&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;file src=&amp;quot;armor.png&amp;quot; download=&amp;quot;true&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;file src=&amp;quot;camera.png&amp;quot; download=&amp;quot;false&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;file src=&amp;quot;cloak.png&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;file src=&amp;quot;goggles.png&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;file src=&amp;quot;mine.png&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;file src=&amp;quot;radar.png&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;file src=&amp;quot;shield.png&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;include resource=&amp;quot;scoreboard&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;include resource=&amp;quot;killmessages&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;include resource=&amp;quot;maplimits&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;settings&amp;gt;&lt;br /&gt;
         &amp;lt;setting name=&amp;quot;roundlimit&amp;quot; value=&amp;quot;[6]&amp;quot; /&amp;gt; &amp;lt;!-- round length in minutes --&amp;gt;&lt;br /&gt;
	 &amp;lt;setting name=&amp;quot;teamdamage&amp;quot; value=&amp;quot;[1]&amp;quot; /&amp;gt; &amp;lt;!-- 0 for team protection off, 1 for team protection on --&amp;gt;&lt;br /&gt;
	 &amp;lt;setting name=&amp;quot;teambalance&amp;quot; value=&amp;quot;[1]&amp;quot; /&amp;gt; &amp;lt;!--  difference limit of amount of players between teams --&amp;gt;&lt;br /&gt;
	 &amp;lt;setting name=&amp;quot;spazammo&amp;quot; value=&amp;quot;[25]&amp;quot; /&amp;gt; &amp;lt;!-- ammo amounts --&amp;gt;&lt;br /&gt;
	 &amp;lt;setting name=&amp;quot;m4ammo&amp;quot; value=&amp;quot;[100]&amp;quot; /&amp;gt;&lt;br /&gt;
	 &amp;lt;setting name=&amp;quot;shotgunammo&amp;quot; value=&amp;quot;[25]&amp;quot; /&amp;gt;&lt;br /&gt;
	 &amp;lt;setting name=&amp;quot;sniperammo&amp;quot; value=&amp;quot;[20]&amp;quot; /&amp;gt;&lt;br /&gt;
	 &amp;lt;setting name=&amp;quot;ak47ammo&amp;quot; value=&amp;quot;[120]&amp;quot; /&amp;gt;&lt;br /&gt;
	 &amp;lt;setting name=&amp;quot;rifleammo&amp;quot; value=&amp;quot;[40]&amp;quot; /&amp;gt;&lt;br /&gt;
	 &amp;lt;setting name=&amp;quot;deserteagleammo&amp;quot; value=&amp;quot;[45]&amp;quot; /&amp;gt;&lt;br /&gt;
	 &amp;lt;setting name=&amp;quot;pistolammo&amp;quot; value=&amp;quot;[132]&amp;quot; /&amp;gt;&lt;br /&gt;
	 &amp;lt;setting name=&amp;quot;uziammo&amp;quot; value=&amp;quot;[150]&amp;quot; /&amp;gt;&lt;br /&gt;
	 &amp;lt;setting name=&amp;quot;tec9ammo&amp;quot; value=&amp;quot;[150]&amp;quot; /&amp;gt;&lt;br /&gt;
	 &amp;lt;setting name=&amp;quot;silencedammo&amp;quot; value=&amp;quot;[65]&amp;quot; /&amp;gt;&lt;br /&gt;
	 &amp;lt;setting name=&amp;quot;grenadeammo&amp;quot; value=&amp;quot;[4]&amp;quot; /&amp;gt;&lt;br /&gt;
	 &amp;lt;setting name=&amp;quot;satchelammo&amp;quot; value=&amp;quot;[4]&amp;quot; /&amp;gt;&lt;br /&gt;
	 &amp;lt;setting name=&amp;quot;teargasammo&amp;quot; value=&amp;quot;[4]&amp;quot; /&amp;gt;&lt;br /&gt;
	 &amp;lt;setting name=&amp;quot;molatovammo&amp;quot; value=&amp;quot;[4]&amp;quot; /&amp;gt;&lt;br /&gt;
	 &amp;lt;setting name=&amp;quot;isAllowedToShoot&amp;quot; value=&amp;quot;true&amp;quot; /&amp;gt;&lt;br /&gt;
     &amp;lt;/settings&amp;gt;&lt;br /&gt;
&lt;br /&gt;
     &amp;lt;aclrequest&amp;gt;&lt;br /&gt;
	 &amp;lt;right name=&amp;quot;function.startResource&amp;quot; access=&amp;quot;true&amp;quot; /&amp;gt;&lt;br /&gt;
	 &amp;lt;right name=&amp;quot;function.stopResource&amp;quot; access=&amp;quot;true&amp;quot; /&amp;gt;&lt;br /&gt;
	 &amp;lt;right name=&amp;quot;function.setPlayerMuted&amp;quot; access=&amp;quot;true&amp;quot; /&amp;gt;&lt;br /&gt;
     &amp;lt;/aclrequest&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/meta&amp;gt;&lt;br /&gt;
|lang=&amp;quot;xml&amp;quot;}}&lt;br /&gt;
[[Category:Scripting Concepts]]&lt;br /&gt;
[[cs:Meta.xml]]&lt;br /&gt;
[[de:Meta.xml]]&lt;br /&gt;
[[es:Sobre el archivo &amp;quot;meta.xml&amp;quot;]]&lt;br /&gt;
[[it:Meta.xml]]&lt;br /&gt;
[[pl:Meta.xml]]&lt;br /&gt;
[[ru:Meta.xml]]&lt;/div&gt;</summary>
		<author><name>X86dev</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=User_talk:Quit_key&amp;diff=37212</id>
		<title>User talk:Quit key</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=User_talk:Quit_key&amp;diff=37212"/>
		<updated>2013-09-26T13:36:41Z</updated>

		<summary type="html">&lt;p&gt;X86dev: Blanked the page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>X86dev</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=User_talk:Ahmet_Y%C4%B1lmaz&amp;diff=37194</id>
		<title>User talk:Ahmet Yılmaz</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=User_talk:Ahmet_Y%C4%B1lmaz&amp;diff=37194"/>
		<updated>2013-09-15T18:07:14Z</updated>

		<summary type="html">&lt;p&gt;X86dev: Blanked the page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>X86dev</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetHeliBladeCollisionsEnabled&amp;diff=37094</id>
		<title>SetHeliBladeCollisionsEnabled</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetHeliBladeCollisionsEnabled&amp;diff=37094"/>
		<updated>2013-09-13T09:07:34Z</updated>

		<summary type="html">&lt;p&gt;X86dev: /* Oops ... */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Server client function}}&lt;br /&gt;
This function changes the state of the helicopter blades collisions on the specified vehicle.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool setHeliBladeCollisionsEnabled ( vehicle theVehicle, bool collisions )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theVehicle:''' The vehicle that will have the sirens set.&lt;br /&gt;
*'''collisions:''' The state of the helicopter blades collisions.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the collisions are set for the specified vehicle, ''false'' if the collisions can't be set for the specified vehicle, if the vehicle is not a helicopter or if invalid arguments are specified.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
&amp;lt;section name=&amp;quot;Server&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This example disables blades collisions when a player enters a helicopter as a driver.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function onVehicleEnter ( thePlayer, seat, jacked )&lt;br /&gt;
	--If the player entered a helicopter&lt;br /&gt;
	if ( getVehicleType ( source ) == &amp;quot;Helicopter&amp;quot; ) then&lt;br /&gt;
		--If the player entered as a driver&lt;br /&gt;
		if ( seat == 0 ) then&lt;br /&gt;
			-- Turn off collisions&lt;br /&gt;
			setHeliBladeCollisionsEnabled ( source, false )&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler ( &amp;quot;onVehicleEnter&amp;quot;, root, onVehicleEnter )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Vehicle functions}}&lt;/div&gt;</summary>
		<author><name>X86dev</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetHeliBladeCollisionsEnabled&amp;diff=37093</id>
		<title>SetHeliBladeCollisionsEnabled</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetHeliBladeCollisionsEnabled&amp;diff=37093"/>
		<updated>2013-09-13T09:07:14Z</updated>

		<summary type="html">&lt;p&gt;X86dev: /* Fixed example as it should be */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Server client function}}&lt;br /&gt;
This function changes the state of the helicopter blades collisions on the specified vehicle.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool setHeliBladeCollisionsEnabled ( vehicle theVehicle, bool collisions )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theVehicle:''' The vehicle that will have the sirens set.&lt;br /&gt;
*'''collisions:''' The state of the helicopter blades collisions.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the collisions are set for the specified vehicle, ''false'' if the collisions can't be set for the specified vehicle, if the vehicle is not a helicopter or if invalid arguments are specified.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
&amp;lt;section name=&amp;quot;Server&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This example disables blades collisions when a player enters a helicopter as a driver.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function onVehicleEnter ( thePlayer, seat, jacked )&lt;br /&gt;
	--If the player entered a helicopter&lt;br /&gt;
	if ( getVehicleType ( source ) == &amp;quot;Helicopter&amp;quot; ) then&lt;br /&gt;
		--If the player entered as a driver&lt;br /&gt;
		if ( seat == 0 ) then&lt;br /&gt;
			-- Turn off collisions&lt;br /&gt;
			setHeliBladeCollisionsEnabled( source, true )&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler ( &amp;quot;onVehicleEnter&amp;quot;, root, onVehicleEnter )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Vehicle functions}}&lt;/div&gt;</summary>
		<author><name>X86dev</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetHeliBladeCollisionsEnabled&amp;diff=37092</id>
		<title>SetHeliBladeCollisionsEnabled</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetHeliBladeCollisionsEnabled&amp;diff=37092"/>
		<updated>2013-09-13T09:04:14Z</updated>

		<summary type="html">&lt;p&gt;X86dev: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Server client function}}&lt;br /&gt;
This function changes the state of the helicopter blades collisions on the specified vehicle.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool setHeliBladeCollisionsEnabled ( vehicle theVehicle , bool collisions )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theVehicle:''' The vehicle that will have the sirens set.&lt;br /&gt;
*'''collisions:''' The state of the helicopter blades collisions.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the collisions are set for the specified vehicle, ''false'' if the collisions can't be set for the specified vehicle, if the vehicle is not a helicopter or if invalid arguments are specified.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
&amp;lt;section name=&amp;quot;Server&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This example disables blades collisions when a player enters a helicopter as a driver.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function onVehicleEnter ( thePlayer, seat, jacked )&lt;br /&gt;
	--If the player entered a helicopter&lt;br /&gt;
	if ( table.find({425,487,488,497,563,447,469},getElementModel(source)) ) then&lt;br /&gt;
		--If the player entered as a driver&lt;br /&gt;
		if ( seat == 0 ) then&lt;br /&gt;
			--If blade collisions were off&lt;br /&gt;
			if not getHeliBladeCollisionsEnabled( source ) then&lt;br /&gt;
				setHeliBladeCollisionsEnabled( source, true )&lt;br /&gt;
			else&lt;br /&gt;
				setHeliBladeCollisionsEnabled( source, false )&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler ( &amp;quot;onVehicleEnter&amp;quot;, root, onVehicleEnter )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Vehicle functions}}&lt;/div&gt;</summary>
		<author><name>X86dev</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetPedAnimation&amp;diff=37089</id>
		<title>GetPedAnimation</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetPedAnimation&amp;diff=37089"/>
		<updated>2013-09-12T07:01:02Z</updated>

		<summary type="html">&lt;p&gt;X86dev: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Client function}}&lt;br /&gt;
&lt;br /&gt;
Gets the animation of a player or ped that was set using [[setPedAnimation]].&lt;br /&gt;
&lt;br /&gt;
''Note: Use [[getPedTask]] to monitor what movements the player is currently doing.''&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
string string getPedAnimation ( ped thePed )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''thePed:''' the player or ped you want to get the animation of.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns two ''strings'': the first is the name of the block, the second is the name of the animation. Returns ''false'' if there was an error or if the ped is not doing an animation.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This example adds a command that allows you to copy the animation being used by another player using /copyanim theirName&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function CopyAnimation(theCommand, thePlayer) -- The Command Function&lt;br /&gt;
	if thePlayer then -- If a player name entered then&lt;br /&gt;
		thePlayerToCopyFrom = getPlayerFromName(thePlayer) -- get player from his name&lt;br /&gt;
		Block, Anim = getPedAnimation(thePlayerToCopyFrom) -- get the player animation&lt;br /&gt;
		if Block then -- if got the animation successfully then&lt;br /&gt;
			setPedAnimation(localPlayer, Block, Anim) -- set my animation the same&lt;br /&gt;
			outputChatBox(&amp;quot;* Copied Successfully !&amp;quot;) -- output chat message&lt;br /&gt;
		end&lt;br /&gt;
	else	&lt;br /&gt;
		outputChatBox(&amp;quot;* Please Enter a Player Name To Copy From !&amp;quot;) -- if you didnt entered a player name , then output a chat box message&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler(&amp;quot;copyanim&amp;quot;, CopyAnimation) --  adding the Command Handler&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Example 2==&lt;br /&gt;
&lt;br /&gt;
This example shows what block and animation your player is currently performing. Note this will return &amp;quot;N/A&amp;quot; if you did not set an animation with [[setPedAnimation]]. If you want to see what the player ped is doing as you control them that is [[getPedTask]].&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addEventHandler(&amp;quot;onClientPreRender&amp;quot;,root,&lt;br /&gt;
	function ()&lt;br /&gt;
    local block, animation = getPedAnimation(localPlayer)&lt;br /&gt;
	dxDrawText ( &amp;quot;CURRENT ANIMATION INFO...&amp;quot;, 100, 300 )&lt;br /&gt;
	if not block then block = &amp;quot;N/A&amp;quot; end&lt;br /&gt;
	if not animation then animation = &amp;quot;N/A&amp;quot; end&lt;br /&gt;
	dxDrawText ( &amp;quot;Block = &amp;quot;..block..&amp;quot; Animation = &amp;quot;..animation, 100, 315 )&lt;br /&gt;
end )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Client_ped_functions}}&lt;/div&gt;</summary>
		<author><name>X86dev</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Changes_in_1.3.4&amp;diff=37088</id>
		<title>Changes in 1.3.4</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Changes_in_1.3.4&amp;diff=37088"/>
		<updated>2013-09-12T06:59:24Z</updated>

		<summary type="html">&lt;p&gt;X86dev: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Changelogs}}&lt;br /&gt;
&lt;br /&gt;
== Main Additions / Changes ==&lt;br /&gt;
* Added &amp;quot;shared&amp;quot; export type in meta.xml&lt;br /&gt;
* Added Lua source encryption option&lt;br /&gt;
* Added the ability to cancel onClientKey&lt;br /&gt;
* Added escape to onClientKey (can't be cancelled twice in a row)&lt;br /&gt;
* Added SettingHUDMatchAspectRatio, SettingAspectRatio to dxGetStatus&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Client ===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== New Functions ====&lt;br /&gt;
* Added [[playSFX]]&lt;br /&gt;
* Added [[playSFX3D]]&lt;br /&gt;
* Added [[getSFXStatus]]&lt;br /&gt;
* Added [[setHeliBladeCollisionsEnabled]]&lt;br /&gt;
* Added [[getHeliBladeCollisionsEnabled]]&lt;br /&gt;
* Added [[getEventHandlers]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== New Events ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Changes / Bug Fixes ====&lt;br /&gt;
* Fixed vehicle upgrades&lt;br /&gt;
* Fixed warpPedIntoVehicle causing desync when two players try to enter at the same time via vehicle_enter and warpPedIntoVehicle&lt;br /&gt;
* Fixed map editor crash&lt;br /&gt;
* Fixed debug filename for compiled scripts&lt;br /&gt;
* Fixed applying weapon mods may remove your weapon&lt;br /&gt;
* Fixed crash when streaming in tec-9 with a replaced weapon model&lt;br /&gt;
* Fixed console(F8) input focus begin lost sometimes&lt;br /&gt;
* Fixed building removal crashing after loading/unloading a model 16 times&lt;br /&gt;
* Fixed projectile-type weapons messing up ammo count&lt;br /&gt;
* Fixed guiCreateFont fails each second time resource is started&lt;br /&gt;
* Fixed client ammo desync when using giveWeapon sometimes&lt;br /&gt;
* Fixed guiLabelGetTextExtent not working with unicode&lt;br /&gt;
* Fixed onColShapeHit isn't triggered for towed vehicles server side&lt;br /&gt;
* Fixed GUI scrollpanes and scrollbars don't trigger onClientMouseEnter/Leave&lt;br /&gt;
* Fixed warpPedIntoVehicle after cancelEvent() of onVehicleStartEnter causes network trouble&lt;br /&gt;
* Fixed onPedWasted not triggered, when ped died because the vehicle he was in, exploded&lt;br /&gt;
* Fixed server createColPolygon&lt;br /&gt;
* Fixed a crash when destroying an object in onClientColShapeHit / onClientElementColShapeHit&lt;br /&gt;
* Fixed lightweight sync packet being misread on the client sometimes&lt;br /&gt;
* Fixed getLatentEventHandles sometimes returning false instead of an empty table&lt;br /&gt;
* Fixed setAccountData clips the digits after the decimal point&lt;br /&gt;
* Fixed peds/players being removed from vehicles that fall through the ground&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Server ===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== New Functions ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== New Events ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Changes / Bug Fixes ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Resources ===&lt;br /&gt;
* Added sfxbrowser resource&lt;br /&gt;
* Fixed instant reload exploits for the reload resource&lt;br /&gt;
* Fixed 'Use LODs' option in the map editor resource&lt;br /&gt;
* Fixed various things in admin, acpanel, freeroam, parachute and race resources&lt;br /&gt;
&lt;br /&gt;
=== Editor ===&lt;br /&gt;
&lt;br /&gt;
==Extra information==&lt;br /&gt;
''More detailed information available on [https://bugs.multitheftauto.com/changelog_page.php Bug tracker Changelog] and Google Code repositories:&lt;br /&gt;
:* MTA:SA: from  [https://code.google.com/p/mtasa-blue/source/list?num=25&amp;amp;start=5609 r5593] to [https://code.google.com/p/mtasa-blue/source/list?num=25&amp;amp;start=5800 r5800]&lt;br /&gt;
:* Resources: [https://code.google.com/p/mtasa-resources/source/list?num=25&amp;amp;start=955 from r938 to r955]&lt;br /&gt;
:* [https://forum.mtasa.com/viewtopic.php?f=31&amp;amp;t=64990 MTASA 1.3.4 released]&lt;br /&gt;
&lt;br /&gt;
[[Category:Changelog]]&lt;br /&gt;
[[Category:Incomplete]]&lt;/div&gt;</summary>
		<author><name>X86dev</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Talk:AddAccount&amp;diff=37032</id>
		<title>Talk:AddAccount</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Talk:AddAccount&amp;diff=37032"/>
		<updated>2013-09-04T06:58:02Z</updated>

		<summary type="html">&lt;p&gt;X86dev: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== Password length limit ===&lt;br /&gt;
Password's maxlength is 30 characters. If you try more, function will return ''false'' (while '''addaccount''' command returns ''syntax error'').&lt;br /&gt;
&lt;br /&gt;
PS: I just tried to store md5 hash, but everytime it failed (hash length - 32 chars). -- [[User:Leonardo|Leonardo]] 06:08, 4 September 2013 (UTC)&lt;br /&gt;
&lt;br /&gt;
You shouldn't use a md5 hash, passwords should be sent plaintext. They are being encrypted automaticly. --[[User:X86dev|X86dev]] 06:58, 4 September 2013 (UTC)&lt;/div&gt;</summary>
		<author><name>X86dev</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Template:Client_audio_functions&amp;diff=36988</id>
		<title>Template:Client audio functions</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Template:Client_audio_functions&amp;diff=36988"/>
		<updated>2013-08-27T11:47:51Z</updated>

		<summary type="html">&lt;p&gt;X86dev: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;*[[playSoundFrontEnd]]&lt;br /&gt;
*[[getRadioChannel]]&lt;br /&gt;
*[[getRadioChannelName]]&lt;br /&gt;
*[[getSoundEffects]]&lt;br /&gt;
*[[getSoundLength]]&lt;br /&gt;
*[[getSoundMaxDistance]]&lt;br /&gt;
*[[getSoundMetaTags]]&lt;br /&gt;
*[[getSoundMinDistance]]&lt;br /&gt;
*[[getSoundPosition]]&lt;br /&gt;
*[[getSoundSpeed]]&lt;br /&gt;
*[[getSoundVolume]]&lt;br /&gt;
*[[setSoundEffectEnabled]]&lt;br /&gt;
*[[isSoundPaused]]&lt;br /&gt;
*[[playSound]]&lt;br /&gt;
*[[playSound3D]]&lt;br /&gt;
{{New feature/item|3.0134|1.3.4|5731|&lt;br /&gt;
*[[playSFX]]&lt;br /&gt;
*[[playSFX3D]]&lt;br /&gt;
}}&lt;br /&gt;
*[[setRadioChannel]]&lt;br /&gt;
*[[setSoundMaxDistance]]&lt;br /&gt;
*[[setSoundMinDistance]]&lt;br /&gt;
*[[setSoundPaused]]&lt;br /&gt;
*[[setSoundPosition]]&lt;br /&gt;
*[[setSoundSpeed]]&lt;br /&gt;
*[[setSoundVolume]]&lt;br /&gt;
*[[stopSound]]&lt;br /&gt;
*[[getSoundBPM]]&lt;br /&gt;
*[[getSoundProperties]]&lt;br /&gt;
*[[setSoundProperties]]&lt;br /&gt;
*[[getSoundFFTData]]&lt;br /&gt;
*[[getSoundWaveData]]&lt;br /&gt;
*[[getSoundLevelData]]&lt;br /&gt;
*[[setSoundPan]]&lt;br /&gt;
*[[getSoundPan]]&lt;br /&gt;
&amp;lt;noinclude&amp;gt;[[Category:Functions templates]]&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>X86dev</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=XmlSaveFile&amp;diff=36972</id>
		<title>XmlSaveFile</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=XmlSaveFile&amp;diff=36972"/>
		<updated>2013-08-26T10:41:46Z</updated>

		<summary type="html">&lt;p&gt;X86dev: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Server client function}}&lt;br /&gt;
This function saves a loaded XML file.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;bool xmlSaveFile ( xmlnode rootNode ) &amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''rootNode:''' the root [[xmlnode]] of the loaded XML file.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if save was successful, ''false'' if the XML file does not exist.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Client&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This example allows a player to use the command 'createfile' to create an .xml file.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- Creates a file named &amp;quot;new.xml&amp;quot; with root node &amp;quot;newroot&amp;quot; and childnode &amp;quot;newchild&amp;quot;.&lt;br /&gt;
function createFileHandler()&lt;br /&gt;
local RootNode = xmlCreateFile(&amp;quot;new.xml&amp;quot;,&amp;quot; newroot&amp;quot;)&lt;br /&gt;
local NewNode = xmlCreateChild(RootNode, &amp;quot;newchild&amp;quot;)&lt;br /&gt;
xmlSaveFile(RootNode)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
addCommandHandler(&amp;quot;createfile&amp;quot;, createFileHandler)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{XML_functions}}&lt;/div&gt;</summary>
		<author><name>X86dev</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetElementVisibleTo&amp;diff=36970</id>
		<title>SetElementVisibleTo</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetElementVisibleTo&amp;diff=36970"/>
		<updated>2013-08-26T07:56:12Z</updated>

		<summary type="html">&lt;p&gt;X86dev: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Server function}}&lt;br /&gt;
{{Needs_Checking|Can an element only be visible to one element (and its children) at a time? If so, do we need clearElementVisibleTo? If not, surely we need to remove the root element before using this function?|[[User:EAi|EAi]]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
This function can change an [[element]]'s [[visibility]]. This does not work with all entities - [[vehicle]]s, [[player]]s and [[object]]s are exempt. This is because these objects are required for accurate sync (they're physical objects). This function is particularly useful for changing the visibility of markers, radar blips and radar areas.&lt;br /&gt;
&lt;br /&gt;
Visibility settings of lower elements in the element tree override higher ones - if visibility for root is set to false and for a player is set to true, it will be visible to the player.&lt;br /&gt;
&lt;br /&gt;
If you want to clear all visibility settings of an object, try [[clearElementVisibleTo]]&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool setElementVisibleTo ( element theElement, element visibleTo, bool visible )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theElement:''' The element you want to control the visibility of.&lt;br /&gt;
*'''visibleTo:''' The element you wish the element to be visible or invisible to. Any child elements that are players will also be able to see the element. See [[visibility]].&lt;br /&gt;
*'''visible:''' Whether you are making it visible or invisible to the player.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the element's visibility was changed successfully, ''false'' otherwise, for example if you are trying to change the visibility of a vehicle, player or object.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
This example creates a marker and makes it only visibile to the player called 'someguy'.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- Find the player called someguy&lt;br /&gt;
local someguy = getPlayerFromName ( &amp;quot;someguy&amp;quot; )&lt;br /&gt;
-- If the player was found then&lt;br /&gt;
if ( someguy ) then&lt;br /&gt;
	-- Get the player's position into the variables x, y and z&lt;br /&gt;
	x, y, z = getElementPosition ( someguy )&lt;br /&gt;
	-- Create a marker at the player's position&lt;br /&gt;
	myMarker = createMarker ( x, y, z )&lt;br /&gt;
	-- Set marker visibility to true for someguy&lt;br /&gt;
	setElementVisibleTo ( myMarker, someguy, true )&lt;br /&gt;
	-- Then make the marker invisible to the whole dimension&lt;br /&gt;
	setElementVisibleTo ( myMarker, root, false )&lt;br /&gt;
	&lt;br /&gt;
	-- The order in which you do the visibility changes does not matter, but ideally trues should be set before falses in order to prevent a momentary flicker.&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following example shows how to make the marker visible to everyone except anotherguy&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- Find the player called someguy&lt;br /&gt;
local someguy = getPlayerFromName ( &amp;quot;someguy&amp;quot; )&lt;br /&gt;
local anotherguy = getPlayerFromName ( &amp;quot;anotherguy&amp;quot; )&lt;br /&gt;
-- If the player was found then&lt;br /&gt;
if ( someguy ) then&lt;br /&gt;
	-- Get the player's position into the variables x, y and z&lt;br /&gt;
	x, y, z = getElementPosition ( someguy )&lt;br /&gt;
	-- Create a marker at the player's position&lt;br /&gt;
	myMarker = createMarker ( x, y, z )&lt;br /&gt;
	attachElements(myMarker, someguy)&lt;br /&gt;
&lt;br /&gt;
	-- First make sure everyone is able to see the marker, this line is unnecessary in this case as root visibility is set to true by default behaviour&lt;br /&gt;
	setElementVisibleTo ( myMarker, root, true )&lt;br /&gt;
&lt;br /&gt;
	-- Then hide it from anotherguy&lt;br /&gt;
	setElementVisibleTo ( myMarker, anotherguy, false )&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Element_functions}}&lt;/div&gt;</summary>
		<author><name>X86dev</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=PlaySFX&amp;diff=36955</id>
		<title>PlaySFX</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=PlaySFX&amp;diff=36955"/>
		<updated>2013-08-22T07:05:25Z</updated>

		<summary type="html">&lt;p&gt;X86dev: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Client function}}&lt;br /&gt;
{{New feature/item|3.0134|1.3.4|5731|&lt;br /&gt;
This function plays a sound from GTA's big sound containers.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Note|There is a tool available which allows you to find bank and sound IDs easily: [[https://community.mtasa.com/index.php?p=resources&amp;amp;s=details&amp;amp;id=7549 sfxBrowser:Download]]}}&lt;br /&gt;
{{Warning|Many players use versions of GTA:SA (especially WareZ versions) which haven't any audio files in their ''AUDIO\SFX\'' folder. In case of missing audio files, this function returns ''false''|true}}&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
element playSFX ( string containerName, int bankId, int soundId [, bool looped = false ] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''containerName:''' The name of the audio container. Possible values are: &amp;quot;feet&amp;quot;, &amp;quot;genrl&amp;quot;, &amp;quot;pain_a&amp;quot;, &amp;quot;script&amp;quot;, &amp;quot;spc_ea&amp;quot;, &amp;quot;spc_fa&amp;quot;, &amp;quot;spc_ga&amp;quot;, spc_na&amp;quot;, &amp;quot;spc_pa&amp;quot;&lt;br /&gt;
*'''bankId:''' The audio bank Id&lt;br /&gt;
*'''soundId:''' The sound Id within the audio bank&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
*'''looped:''' A [[boolean]] representing whether the sound will be looped&lt;br /&gt;
&lt;br /&gt;
==Returns==&lt;br /&gt;
Returns a [[sound]] element if the sound was successfully created, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
The following example plays a firealarm sound (looped).&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
if not playSFX(&amp;quot;script&amp;quot;, 7, 1, true) then&lt;br /&gt;
    outputChatBox(&amp;quot;You have to install some missing audio files to hear the sound&amp;quot;)&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Client_audio_functions}}&lt;/div&gt;</summary>
		<author><name>X86dev</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=PlaySFX&amp;diff=36954</id>
		<title>PlaySFX</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=PlaySFX&amp;diff=36954"/>
		<updated>2013-08-22T07:05:08Z</updated>

		<summary type="html">&lt;p&gt;X86dev: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Client function}}&lt;br /&gt;
{{New feature/item|3.0134|1.3.4|5731|&lt;br /&gt;
This function plays a sound from GTA's big sound containers.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Note|There is a tool available which allows you to find bank and sound IDs easily: [[https://community.mtasa.com/index.php?p=resources&amp;amp;s=details&amp;amp;id=7549 sfxBrowser:Download]]}}&lt;br /&gt;
{{Warning|Many players use versions of GTA:SA (especially WareZ versions) which haven't any audio files in their ''AUDIO\SFX\'' folder. In case of missing audio files, this function returns ''false''|true}}&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
element playSFX ( string containerName, int bankId, int soundId [, looped = false] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''containerName:''' The name of the audio container. Possible values are: &amp;quot;feet&amp;quot;, &amp;quot;genrl&amp;quot;, &amp;quot;pain_a&amp;quot;, &amp;quot;script&amp;quot;, &amp;quot;spc_ea&amp;quot;, &amp;quot;spc_fa&amp;quot;, &amp;quot;spc_ga&amp;quot;, spc_na&amp;quot;, &amp;quot;spc_pa&amp;quot;&lt;br /&gt;
*'''bankId:''' The audio bank Id&lt;br /&gt;
*'''soundId:''' The sound Id within the audio bank&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
*'''looped:''' A [[boolean]] representing whether the sound will be looped&lt;br /&gt;
&lt;br /&gt;
==Returns==&lt;br /&gt;
Returns a [[sound]] element if the sound was successfully created, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
The following example plays a firealarm sound (looped).&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
if not playSFX(&amp;quot;script&amp;quot;, 7, 1, true) then&lt;br /&gt;
    outputChatBox(&amp;quot;You have to install some missing audio files to hear the sound&amp;quot;)&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Client_audio_functions}}&lt;/div&gt;</summary>
		<author><name>X86dev</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=PlaySFX&amp;diff=36953</id>
		<title>PlaySFX</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=PlaySFX&amp;diff=36953"/>
		<updated>2013-08-22T07:04:52Z</updated>

		<summary type="html">&lt;p&gt;X86dev: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Client function}}&lt;br /&gt;
{{New feature/item|3.0134|1.3.4|5731|&lt;br /&gt;
This function plays a sound from GTA's big sound containers.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Note|There is a tool available which allows you to find bank and sound IDs easily: [[https://community.mtasa.com/index.php?p=resources&amp;amp;s=details&amp;amp;id=7549 sfxBrowser:Download]]}}&lt;br /&gt;
{{Warning|Many players use versions of GTA:SA (especially WareZ versions) which haven't any audio files in their ''AUDIO\SFX\'' folder. In case of missing audio files, this function returns ''false''|true}}&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
sound playSFX ( string containerName, int bankId, int soundId [, looped = false] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''containerName:''' The name of the audio container. Possible values are: &amp;quot;feet&amp;quot;, &amp;quot;genrl&amp;quot;, &amp;quot;pain_a&amp;quot;, &amp;quot;script&amp;quot;, &amp;quot;spc_ea&amp;quot;, &amp;quot;spc_fa&amp;quot;, &amp;quot;spc_ga&amp;quot;, spc_na&amp;quot;, &amp;quot;spc_pa&amp;quot;&lt;br /&gt;
*'''bankId:''' The audio bank Id&lt;br /&gt;
*'''soundId:''' The sound Id within the audio bank&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
*'''looped:''' A [[boolean]] representing whether the sound will be looped&lt;br /&gt;
&lt;br /&gt;
==Returns==&lt;br /&gt;
Returns a [[sound]] element if the sound was successfully created, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
The following example plays a firealarm sound (looped).&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
if not playSFX(&amp;quot;script&amp;quot;, 7, 1, true) then&lt;br /&gt;
    outputChatBox(&amp;quot;You have to install some missing audio files to hear the sound&amp;quot;)&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Client_audio_functions}}&lt;/div&gt;</summary>
		<author><name>X86dev</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Meta.xml&amp;diff=36945</id>
		<title>Meta.xml</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Meta.xml&amp;diff=36945"/>
		<updated>2013-08-21T08:43:00Z</updated>

		<summary type="html">&lt;p&gt;X86dev: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The ''meta.xml'' file presents MTA with a set of metadata, such as the resource's name, the scripts to include, and which files to precache for sending to clients among other things. It is also the scope of &amp;quot;elements&amp;quot;. It is written in XML, which is based on HTML and is the parent of XHTML.&lt;br /&gt;
&lt;br /&gt;
=Tags=&lt;br /&gt;
XML is a textual data format which is widely used for the representation of data. MTA uses an XML-based language to describe the metadata for resources by using the tags below:&lt;br /&gt;
&lt;br /&gt;
*'''&amp;lt;info /&amp;gt;''' Information about this resource, possible parameters include (any arbitrary parameters can be used and read using [[getResourceInfo]]):&lt;br /&gt;
** '''author:''' The author of this resource&lt;br /&gt;
** '''version:''' The version of this resource&lt;br /&gt;
** '''name:''' The name of this resource&lt;br /&gt;
** '''description:''' A brief description of this resource&lt;br /&gt;
** '''type:''' The type of this resource, that can be &amp;quot;gamemode&amp;quot;, &amp;quot;script&amp;quot;, &amp;quot;map&amp;quot; or &amp;quot;misc&amp;quot;.&lt;br /&gt;
*'''&amp;lt;script /&amp;gt;''' Source code for this resource, possible parameters are:&lt;br /&gt;
** '''src:''' The file name of the source code&lt;br /&gt;
** '''type:''' The type of source code: &amp;quot;client&amp;quot;, &amp;quot;server&amp;quot; or &amp;quot;shared&amp;quot;.&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
**'''cache:''' When the script file type is &amp;quot;client&amp;quot;, this setting controls whether the file is saved on the players hard drive. Default is &amp;quot;true&amp;quot;. Using &amp;quot;false&amp;quot; will mean the file is not saved.&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
**'''validate:''' If set to &amp;quot;false&amp;quot;, compatibility checks are skipped.&lt;br /&gt;
{{New items|3.0134|1.3.4 r5731|&lt;br /&gt;
**'''shared:''' hey, todo!.&lt;br /&gt;
}}&lt;br /&gt;
*'''&amp;lt;map /&amp;gt;''' The map for a gamemode, possible parameters are:&lt;br /&gt;
**'''src:''' .map file name (can be path too eg. &amp;quot;maps/filename.map&amp;quot;)&lt;br /&gt;
**'''dimension:''' Dimension in which the map will be loaded (optional)&lt;br /&gt;
*'''&amp;lt;file /&amp;gt;''' 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)&lt;br /&gt;
**'''src:''' client-side file name (can be path too eg. &amp;quot;images/image.png&amp;quot;)&lt;br /&gt;
**'''download:''' Whether or not to be sent to the client automatically (optional). Default is &amp;quot;true&amp;quot;. Using &amp;quot;false&amp;quot; will mean they are not sent on resource start but could later be used by [[downloadFile]] (from version 1.4)&lt;br /&gt;
*'''&amp;lt;include /&amp;gt;''' Include resources that this resource will use&lt;br /&gt;
**'''resource:''' Resource name that you want to start with this resource&lt;br /&gt;
**'''minversion:''' Minimum version that '''resource''' needs to be (optional)&lt;br /&gt;
**'''maxversion:''' Maximum version that '''resource''' needs to be (optional)&lt;br /&gt;
*'''&amp;lt;config /&amp;gt;''' Config file (.xml) can be accessed by resource, possible parameters are:&lt;br /&gt;
**'''src:''' The file name of the config file&lt;br /&gt;
**'''type:''' The type of the config file: &amp;quot;client&amp;quot; or &amp;quot;server&amp;quot;&lt;br /&gt;
*'''&amp;lt;export /&amp;gt;''' This exports functions from this resource, so other resources can use them with [[call]]&lt;br /&gt;
**'''function:''' The function name&lt;br /&gt;
**'''type''' Whether function is exported server-side or client-side (valid values are: &amp;quot;server&amp;quot; and &amp;quot;client&amp;quot;)&lt;br /&gt;
**'''http:''' Can the function be called via HTTP (true/false)&lt;br /&gt;
*'''&amp;lt;html /&amp;gt;'''&lt;br /&gt;
**'''src:''' The filename for the HTTP file (can be a path)&lt;br /&gt;
**'''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)&lt;br /&gt;
**'''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)&lt;br /&gt;
*'''&amp;lt;settings&amp;gt; &amp;lt;setting name=&amp;quot;&amp;quot; value=&amp;quot;&amp;quot;/&amp;gt; &amp;lt;/settings&amp;gt;:''' Most gamemodes use [[settings system]] to let server admins to configure it how they like. For instance you could set round time and then use [[get]] and [[set]] to get the value or change it, respectively.&lt;br /&gt;
*'''&amp;lt;min_mta_version /&amp;gt;''' Minimum version requirements for this resource to run correctly. When authoring resources, the minimum version should usually be set to the current released version of MTA:SA (which at the moment is &amp;quot;{{Current Version|full}}&amp;quot;). See example for example.&lt;br /&gt;
**'''client:''' The minimum client version&lt;br /&gt;
**'''server:''' The minimum server version&lt;br /&gt;
*'''&amp;lt;aclrequest /&amp;gt;''' A list of [[Access_Control_List|ACL]] rights this resource will need.&lt;br /&gt;
{{New items|3.0132|1.3.1 r4141|&lt;br /&gt;
*'''&amp;lt;sync_map_element_data /&amp;gt;''' Controls whether map [[Element_data|element data]] such as &amp;quot;PosX&amp;quot; and &amp;quot;DoubleSided&amp;quot; are transferred to the client. This data is usually not required by most gamemodes or resources. (Map Editor and Interiors require this to be not set to false to work). When set in a gamemode meta.xml, the setting will apply to all maps loaded by that resource.&lt;br /&gt;
**'''false:''' Disable transfer of map element data. This can reduce map download times considerably.&lt;br /&gt;
**'''true:''' Enable transfer of map element data (default).&lt;br /&gt;
}}&lt;br /&gt;
{{New items|3.0140|1.4.0 r5313|&lt;br /&gt;
*'''&amp;lt;oop/&amp;gt;''' todo.&lt;br /&gt;
**'''false:''' todo.&lt;br /&gt;
**'''true:''' todo.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
Heres an example of a meta file using some of the tags mentioned:&lt;br /&gt;
{{#tag:code |&lt;br /&gt;
&amp;lt;meta&amp;gt;&lt;br /&gt;
    &amp;lt;info author=&amp;quot;Slothman&amp;quot; type=&amp;quot;gamemode&amp;quot; name=&amp;quot;Stealth&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;config src=&amp;quot;help.xml&amp;quot; type=&amp;quot;client&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;min_mta_version client=&amp;quot;{{Current Version|full}}&amp;quot; server=&amp;quot;{{Current Version|full}}&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;sync_map_element_data&amp;gt;false&amp;lt;/sync_map_element_data&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;script src=&amp;quot;stealthmain_server.lua&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;script src=&amp;quot;noiseblip.lua&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;script src=&amp;quot;mission_timer.lua&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;script src=&amp;quot;gadgets_server.lua&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;script src=&amp;quot;gadgets_client.lua&amp;quot; type=&amp;quot;client&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;script src=&amp;quot;stealthmain_client.lua&amp;quot; type=&amp;quot;client&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;script src=&amp;quot;noisebar.lua&amp;quot; type=&amp;quot;client&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;script src=&amp;quot;spycam.lua&amp;quot; type=&amp;quot;client&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;script src=&amp;quot;riemann_z_demonstration.lua&amp;quot; type=&amp;quot;client&amp;quot; cache=&amp;quot;false&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;file src=&amp;quot;riot_shield.txd&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;file src=&amp;quot;riot_shield.dff&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;file src=&amp;quot;riot_shield.col&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;file src=&amp;quot;armor.png&amp;quot; download=&amp;quot;true&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;file src=&amp;quot;camera.png&amp;quot; download=&amp;quot;false&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;file src=&amp;quot;cloak.png&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;file src=&amp;quot;goggles.png&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;file src=&amp;quot;mine.png&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;file src=&amp;quot;radar.png&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;file src=&amp;quot;shield.png&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;include resource=&amp;quot;scoreboard&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;include resource=&amp;quot;killmessages&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;include resource=&amp;quot;maplimits&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;settings&amp;gt;&lt;br /&gt;
         &amp;lt;setting name=&amp;quot;roundlimit&amp;quot; value=&amp;quot;[6]&amp;quot; /&amp;gt; &amp;lt;!-- round length in minutes --&amp;gt;&lt;br /&gt;
	 &amp;lt;setting name=&amp;quot;teamdamage&amp;quot; value=&amp;quot;[1]&amp;quot; /&amp;gt; &amp;lt;!-- 0 for team protection off, 1 for team protection on --&amp;gt;&lt;br /&gt;
	 &amp;lt;setting name=&amp;quot;teambalance&amp;quot; value=&amp;quot;[1]&amp;quot; /&amp;gt; &amp;lt;!--  difference limit of amount of players between teams --&amp;gt;&lt;br /&gt;
	 &amp;lt;setting name=&amp;quot;spazammo&amp;quot; value=&amp;quot;[25]&amp;quot; /&amp;gt; &amp;lt;!-- ammo amounts --&amp;gt;&lt;br /&gt;
	 &amp;lt;setting name=&amp;quot;m4ammo&amp;quot; value=&amp;quot;[100]&amp;quot; /&amp;gt;&lt;br /&gt;
	 &amp;lt;setting name=&amp;quot;shotgunammo&amp;quot; value=&amp;quot;[25]&amp;quot; /&amp;gt;&lt;br /&gt;
	 &amp;lt;setting name=&amp;quot;sniperammo&amp;quot; value=&amp;quot;[20]&amp;quot; /&amp;gt;&lt;br /&gt;
	 &amp;lt;setting name=&amp;quot;ak47ammo&amp;quot; value=&amp;quot;[120]&amp;quot; /&amp;gt;&lt;br /&gt;
	 &amp;lt;setting name=&amp;quot;rifleammo&amp;quot; value=&amp;quot;[40]&amp;quot; /&amp;gt;&lt;br /&gt;
	 &amp;lt;setting name=&amp;quot;deserteagleammo&amp;quot; value=&amp;quot;[45]&amp;quot; /&amp;gt;&lt;br /&gt;
	 &amp;lt;setting name=&amp;quot;pistolammo&amp;quot; value=&amp;quot;[132]&amp;quot; /&amp;gt;&lt;br /&gt;
	 &amp;lt;setting name=&amp;quot;uziammo&amp;quot; value=&amp;quot;[150]&amp;quot; /&amp;gt;&lt;br /&gt;
	 &amp;lt;setting name=&amp;quot;tec9ammo&amp;quot; value=&amp;quot;[150]&amp;quot; /&amp;gt;&lt;br /&gt;
	 &amp;lt;setting name=&amp;quot;silencedammo&amp;quot; value=&amp;quot;[65]&amp;quot; /&amp;gt;&lt;br /&gt;
	 &amp;lt;setting name=&amp;quot;grenadeammo&amp;quot; value=&amp;quot;[4]&amp;quot; /&amp;gt;&lt;br /&gt;
	 &amp;lt;setting name=&amp;quot;satchelammo&amp;quot; value=&amp;quot;[4]&amp;quot; /&amp;gt;&lt;br /&gt;
	 &amp;lt;setting name=&amp;quot;teargasammo&amp;quot; value=&amp;quot;[4]&amp;quot; /&amp;gt;&lt;br /&gt;
	 &amp;lt;setting name=&amp;quot;molatovammo&amp;quot; value=&amp;quot;[4]&amp;quot; /&amp;gt;&lt;br /&gt;
	 &amp;lt;setting name=&amp;quot;isAllowedToShoot&amp;quot; value=&amp;quot;true&amp;quot; /&amp;gt;&lt;br /&gt;
     &amp;lt;/settings&amp;gt;&lt;br /&gt;
&lt;br /&gt;
     &amp;lt;aclrequest&amp;gt;&lt;br /&gt;
	 &amp;lt;right name=&amp;quot;function.startResource&amp;quot; access=&amp;quot;true&amp;quot; /&amp;gt;&lt;br /&gt;
	 &amp;lt;right name=&amp;quot;function.stopResource&amp;quot; access=&amp;quot;true&amp;quot; /&amp;gt;&lt;br /&gt;
	 &amp;lt;right name=&amp;quot;function.setPlayerMuted&amp;quot; access=&amp;quot;true&amp;quot; /&amp;gt;&lt;br /&gt;
     &amp;lt;/aclrequest&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/meta&amp;gt;&lt;br /&gt;
|lang=&amp;quot;xml&amp;quot;}}&lt;br /&gt;
[[Category:Scripting Concepts]]&lt;br /&gt;
[[cs:Meta.xml]]&lt;br /&gt;
[[de:Meta.xml]]&lt;br /&gt;
[[es:Sobre el archivo &amp;quot;meta.xml&amp;quot;]]&lt;br /&gt;
[[it:Meta.xml]]&lt;br /&gt;
[[pl:Meta.xml]]&lt;br /&gt;
[[ru:Meta.xml]]&lt;/div&gt;</summary>
		<author><name>X86dev</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Template:Client_audio_functions&amp;diff=36944</id>
		<title>Template:Client audio functions</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Template:Client_audio_functions&amp;diff=36944"/>
		<updated>2013-08-21T08:27:57Z</updated>

		<summary type="html">&lt;p&gt;X86dev: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;*[[playSoundFrontEnd]]&lt;br /&gt;
*[[getRadioChannel]]&lt;br /&gt;
*[[getRadioChannelName]]&lt;br /&gt;
*[[getSoundEffects]]&lt;br /&gt;
*[[getSoundLength]]&lt;br /&gt;
*[[getSoundMaxDistance]]&lt;br /&gt;
*[[getSoundMetaTags]]&lt;br /&gt;
*[[getSoundMinDistance]]&lt;br /&gt;
*[[getSoundPosition]]&lt;br /&gt;
*[[getSoundSpeed]]&lt;br /&gt;
*[[getSoundVolume]]&lt;br /&gt;
*[[setSoundEffectEnabled]]&lt;br /&gt;
*[[isSoundPaused]]&lt;br /&gt;
*[[playSound]]&lt;br /&gt;
*[[playSound3D]]&lt;br /&gt;
{{New items|3.0134|1.3.4 r5731|&lt;br /&gt;
*[[playSFX]]&lt;br /&gt;
*[[playSFX3D]]&lt;br /&gt;
}}&lt;br /&gt;
*[[setRadioChannel]]&lt;br /&gt;
*[[setSoundMaxDistance]]&lt;br /&gt;
*[[setSoundMinDistance]]&lt;br /&gt;
*[[setSoundPaused]]&lt;br /&gt;
*[[setSoundPosition]]&lt;br /&gt;
*[[setSoundSpeed]]&lt;br /&gt;
*[[setSoundVolume]]&lt;br /&gt;
*[[stopSound]]&lt;br /&gt;
*[[getSoundBPM]]&lt;br /&gt;
*[[getSoundProperties]]&lt;br /&gt;
*[[setSoundProperties]]&lt;br /&gt;
*[[getSoundFFTData]]&lt;br /&gt;
*[[getSoundWaveData]]&lt;br /&gt;
*[[getSoundLevelData]]&lt;br /&gt;
*[[setSoundPan]]&lt;br /&gt;
*[[getSoundPan]]&lt;br /&gt;
&amp;lt;noinclude&amp;gt;[[Category:Functions templates]]&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>X86dev</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Meta.xml&amp;diff=36943</id>
		<title>Meta.xml</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Meta.xml&amp;diff=36943"/>
		<updated>2013-08-21T08:26:01Z</updated>

		<summary type="html">&lt;p&gt;X86dev: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The ''meta.xml'' file presents MTA with a set of metadata, such as the resource's name, the scripts to include, and which files to precache for sending to clients among other things. It is also the scope of &amp;quot;elements&amp;quot;. It is written in XML, which is based on HTML and is the parent of XHTML.&lt;br /&gt;
&lt;br /&gt;
=Tags=&lt;br /&gt;
XML is a textual data format which is widely used for the representation of data. MTA uses an XML-based language to describe the metadata for resources by using the tags below:&lt;br /&gt;
&lt;br /&gt;
*'''&amp;lt;info /&amp;gt;''' Information about this resource, possible parameters include (any arbitrary parameters can be used and read using [[getResourceInfo]]):&lt;br /&gt;
** '''author:''' The author of this resource&lt;br /&gt;
** '''version:''' The version of this resource&lt;br /&gt;
** '''name:''' The name of this resource&lt;br /&gt;
** '''description:''' A brief description of this resource&lt;br /&gt;
** '''type:''' The type of this resource, that can be &amp;quot;gamemode&amp;quot;, &amp;quot;script&amp;quot;, &amp;quot;map&amp;quot; or &amp;quot;misc&amp;quot;.&lt;br /&gt;
*'''&amp;lt;script /&amp;gt;''' Source code for this resource, possible parameters are:&lt;br /&gt;
** '''src:''' The file name of the source code&lt;br /&gt;
** '''type:''' The type of source code: &amp;quot;client&amp;quot;, &amp;quot;server&amp;quot; or &amp;quot;shared&amp;quot;.&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
**'''cache:''' When the script file type is &amp;quot;client&amp;quot;, this setting controls whether the file is saved on the players hard drive. Default is &amp;quot;true&amp;quot;. Using &amp;quot;false&amp;quot; will mean the file is not saved.&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
**'''validate:''' If set to &amp;quot;false&amp;quot;, compatibility checks are skipped.&lt;br /&gt;
**'''shared:''' hey, todo!.&lt;br /&gt;
*'''&amp;lt;map /&amp;gt;''' The map for a gamemode, possible parameters are:&lt;br /&gt;
**'''src:''' .map file name (can be path too eg. &amp;quot;maps/filename.map&amp;quot;)&lt;br /&gt;
**'''dimension:''' Dimension in which the map will be loaded (optional)&lt;br /&gt;
*'''&amp;lt;file /&amp;gt;''' 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)&lt;br /&gt;
**'''src:''' client-side file name (can be path too eg. &amp;quot;images/image.png&amp;quot;)&lt;br /&gt;
**'''download:''' Whether or not to be sent to the client automatically (optional). Default is &amp;quot;true&amp;quot;. Using &amp;quot;false&amp;quot; will mean they are not sent on resource start but could later be used by [[downloadFile]] (from version 1.4)&lt;br /&gt;
*'''&amp;lt;include /&amp;gt;''' Include resources that this resource will use&lt;br /&gt;
**'''resource:''' Resource name that you want to start with this resource&lt;br /&gt;
**'''minversion:''' Minimum version that '''resource''' needs to be (optional)&lt;br /&gt;
**'''maxversion:''' Maximum version that '''resource''' needs to be (optional)&lt;br /&gt;
*'''&amp;lt;config /&amp;gt;''' Config file (.xml) can be accessed by resource, possible parameters are:&lt;br /&gt;
**'''src:''' The file name of the config file&lt;br /&gt;
**'''type:''' The type of the config file: &amp;quot;client&amp;quot; or &amp;quot;server&amp;quot;&lt;br /&gt;
*'''&amp;lt;export /&amp;gt;''' This exports functions from this resource, so other resources can use them with [[call]]&lt;br /&gt;
**'''function:''' The function name&lt;br /&gt;
**'''type''' Whether function is exported server-side or client-side (valid values are: &amp;quot;server&amp;quot; and &amp;quot;client&amp;quot;)&lt;br /&gt;
**'''http:''' Can the function be called via HTTP (true/false)&lt;br /&gt;
*'''&amp;lt;html /&amp;gt;'''&lt;br /&gt;
**'''src:''' The filename for the HTTP file (can be a path)&lt;br /&gt;
**'''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)&lt;br /&gt;
**'''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)&lt;br /&gt;
*'''&amp;lt;settings&amp;gt; &amp;lt;setting name=&amp;quot;&amp;quot; value=&amp;quot;&amp;quot;/&amp;gt; &amp;lt;/settings&amp;gt;:''' Most gamemodes use [[settings system]] to let server admins to configure it how they like. For instance you could set round time and then use [[get]] and [[set]] to get the value or change it, respectively.&lt;br /&gt;
*'''&amp;lt;min_mta_version /&amp;gt;''' Minimum version requirements for this resource to run correctly. When authoring resources, the minimum version should usually be set to the current released version of MTA:SA (which at the moment is &amp;quot;{{Current Version|full}}&amp;quot;). See example for example.&lt;br /&gt;
**'''client:''' The minimum client version&lt;br /&gt;
**'''server:''' The minimum server version&lt;br /&gt;
*'''&amp;lt;aclrequest /&amp;gt;''' A list of [[Access_Control_List|ACL]] rights this resource will need.&lt;br /&gt;
{{New items|3.0132|1.3.1 r4141|&lt;br /&gt;
*'''&amp;lt;sync_map_element_data /&amp;gt;''' Controls whether map [[Element_data|element data]] such as &amp;quot;PosX&amp;quot; and &amp;quot;DoubleSided&amp;quot; are transferred to the client. This data is usually not required by most gamemodes or resources. (Map Editor and Interiors require this to be not set to false to work). When set in a gamemode meta.xml, the setting will apply to all maps loaded by that resource.&lt;br /&gt;
**'''false:''' Disable transfer of map element data. This can reduce map download times considerably.&lt;br /&gt;
**'''true:''' Enable transfer of map element data (default).&lt;br /&gt;
}}&lt;br /&gt;
{{New items|3.0140|1.4.0 r5313|&lt;br /&gt;
*'''&amp;lt;oop/&amp;gt;''' todo.&lt;br /&gt;
**'''false:''' todo.&lt;br /&gt;
**'''true:''' todo.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
Heres an example of a meta file using some of the tags mentioned:&lt;br /&gt;
{{#tag:code |&lt;br /&gt;
&amp;lt;meta&amp;gt;&lt;br /&gt;
    &amp;lt;info author=&amp;quot;Slothman&amp;quot; type=&amp;quot;gamemode&amp;quot; name=&amp;quot;Stealth&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;config src=&amp;quot;help.xml&amp;quot; type=&amp;quot;client&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;min_mta_version client=&amp;quot;{{Current Version|full}}&amp;quot; server=&amp;quot;{{Current Version|full}}&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;sync_map_element_data&amp;gt;false&amp;lt;/sync_map_element_data&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;script src=&amp;quot;stealthmain_server.lua&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;script src=&amp;quot;noiseblip.lua&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;script src=&amp;quot;mission_timer.lua&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;script src=&amp;quot;gadgets_server.lua&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;script src=&amp;quot;gadgets_client.lua&amp;quot; type=&amp;quot;client&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;script src=&amp;quot;stealthmain_client.lua&amp;quot; type=&amp;quot;client&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;script src=&amp;quot;noisebar.lua&amp;quot; type=&amp;quot;client&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;script src=&amp;quot;spycam.lua&amp;quot; type=&amp;quot;client&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;script src=&amp;quot;riemann_z_demonstration.lua&amp;quot; type=&amp;quot;client&amp;quot; cache=&amp;quot;false&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;file src=&amp;quot;riot_shield.txd&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;file src=&amp;quot;riot_shield.dff&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;file src=&amp;quot;riot_shield.col&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;file src=&amp;quot;armor.png&amp;quot; download=&amp;quot;true&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;file src=&amp;quot;camera.png&amp;quot; download=&amp;quot;false&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;file src=&amp;quot;cloak.png&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;file src=&amp;quot;goggles.png&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;file src=&amp;quot;mine.png&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;file src=&amp;quot;radar.png&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;file src=&amp;quot;shield.png&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;include resource=&amp;quot;scoreboard&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;include resource=&amp;quot;killmessages&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;include resource=&amp;quot;maplimits&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;settings&amp;gt;&lt;br /&gt;
         &amp;lt;setting name=&amp;quot;roundlimit&amp;quot; value=&amp;quot;[6]&amp;quot; /&amp;gt; &amp;lt;!-- round length in minutes --&amp;gt;&lt;br /&gt;
	 &amp;lt;setting name=&amp;quot;teamdamage&amp;quot; value=&amp;quot;[1]&amp;quot; /&amp;gt; &amp;lt;!-- 0 for team protection off, 1 for team protection on --&amp;gt;&lt;br /&gt;
	 &amp;lt;setting name=&amp;quot;teambalance&amp;quot; value=&amp;quot;[1]&amp;quot; /&amp;gt; &amp;lt;!--  difference limit of amount of players between teams --&amp;gt;&lt;br /&gt;
	 &amp;lt;setting name=&amp;quot;spazammo&amp;quot; value=&amp;quot;[25]&amp;quot; /&amp;gt; &amp;lt;!-- ammo amounts --&amp;gt;&lt;br /&gt;
	 &amp;lt;setting name=&amp;quot;m4ammo&amp;quot; value=&amp;quot;[100]&amp;quot; /&amp;gt;&lt;br /&gt;
	 &amp;lt;setting name=&amp;quot;shotgunammo&amp;quot; value=&amp;quot;[25]&amp;quot; /&amp;gt;&lt;br /&gt;
	 &amp;lt;setting name=&amp;quot;sniperammo&amp;quot; value=&amp;quot;[20]&amp;quot; /&amp;gt;&lt;br /&gt;
	 &amp;lt;setting name=&amp;quot;ak47ammo&amp;quot; value=&amp;quot;[120]&amp;quot; /&amp;gt;&lt;br /&gt;
	 &amp;lt;setting name=&amp;quot;rifleammo&amp;quot; value=&amp;quot;[40]&amp;quot; /&amp;gt;&lt;br /&gt;
	 &amp;lt;setting name=&amp;quot;deserteagleammo&amp;quot; value=&amp;quot;[45]&amp;quot; /&amp;gt;&lt;br /&gt;
	 &amp;lt;setting name=&amp;quot;pistolammo&amp;quot; value=&amp;quot;[132]&amp;quot; /&amp;gt;&lt;br /&gt;
	 &amp;lt;setting name=&amp;quot;uziammo&amp;quot; value=&amp;quot;[150]&amp;quot; /&amp;gt;&lt;br /&gt;
	 &amp;lt;setting name=&amp;quot;tec9ammo&amp;quot; value=&amp;quot;[150]&amp;quot; /&amp;gt;&lt;br /&gt;
	 &amp;lt;setting name=&amp;quot;silencedammo&amp;quot; value=&amp;quot;[65]&amp;quot; /&amp;gt;&lt;br /&gt;
	 &amp;lt;setting name=&amp;quot;grenadeammo&amp;quot; value=&amp;quot;[4]&amp;quot; /&amp;gt;&lt;br /&gt;
	 &amp;lt;setting name=&amp;quot;satchelammo&amp;quot; value=&amp;quot;[4]&amp;quot; /&amp;gt;&lt;br /&gt;
	 &amp;lt;setting name=&amp;quot;teargasammo&amp;quot; value=&amp;quot;[4]&amp;quot; /&amp;gt;&lt;br /&gt;
	 &amp;lt;setting name=&amp;quot;molatovammo&amp;quot; value=&amp;quot;[4]&amp;quot; /&amp;gt;&lt;br /&gt;
	 &amp;lt;setting name=&amp;quot;isAllowedToShoot&amp;quot; value=&amp;quot;true&amp;quot; /&amp;gt;&lt;br /&gt;
     &amp;lt;/settings&amp;gt;&lt;br /&gt;
&lt;br /&gt;
     &amp;lt;aclrequest&amp;gt;&lt;br /&gt;
	 &amp;lt;right name=&amp;quot;function.startResource&amp;quot; access=&amp;quot;true&amp;quot; /&amp;gt;&lt;br /&gt;
	 &amp;lt;right name=&amp;quot;function.stopResource&amp;quot; access=&amp;quot;true&amp;quot; /&amp;gt;&lt;br /&gt;
	 &amp;lt;right name=&amp;quot;function.setPlayerMuted&amp;quot; access=&amp;quot;true&amp;quot; /&amp;gt;&lt;br /&gt;
     &amp;lt;/aclrequest&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/meta&amp;gt;&lt;br /&gt;
|lang=&amp;quot;xml&amp;quot;}}&lt;br /&gt;
[[Category:Scripting Concepts]]&lt;br /&gt;
[[cs:Meta.xml]]&lt;br /&gt;
[[de:Meta.xml]]&lt;br /&gt;
[[es:Sobre el archivo &amp;quot;meta.xml&amp;quot;]]&lt;br /&gt;
[[it:Meta.xml]]&lt;br /&gt;
[[pl:Meta.xml]]&lt;br /&gt;
[[ru:Meta.xml]]&lt;/div&gt;</summary>
		<author><name>X86dev</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetCameraMatrix&amp;diff=36917</id>
		<title>SetCameraMatrix</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetCameraMatrix&amp;diff=36917"/>
		<updated>2013-08-14T08:39:41Z</updated>

		<summary type="html">&lt;p&gt;X86dev: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Server client function}}&lt;br /&gt;
This function sets the camera's position and direction. The first three arguments are the point at which the camera lies, the last three are the point the camera faces (or the point it &amp;quot;looks at&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
'''Note:''' Calling this function takes the camera's focus away from the player and sets the camera in a fixed position and rotation. The camera's focus can be brought back to the player using the [[setCameraTarget]] function.&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool setCameraMatrix ( player thePlayer, float positionX, float positionY, float positionZ [, float lookAtX, float lookAtY, float lookAtZ, float roll = 0, float fov = 70 ] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''thePlayer:''' The player whose camera is to be changed.&lt;br /&gt;
*'''positionX:''' The x coordinate of the camera's position.&lt;br /&gt;
*'''positionY:''' The y coordinate of the camera's position.&lt;br /&gt;
*'''positionZ:''' The z coordinate of the camera's position.&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments=== &lt;br /&gt;
*'''lookAtX:''' The x coordinate of the point the camera faces.&lt;br /&gt;
*'''lookAtY:''' The y coordinate of the point the camera faces.&lt;br /&gt;
*'''lookAtZ:''' The z coordinate of the point the camera faces.&lt;br /&gt;
*'''roll:''' The camera roll angle, -180 to 180. A value of 0 means the camera sits straight, positive values will turn it counter-clockwise and negative values will turn it clockwise. -180 or 180 means the camera is upside down.&lt;br /&gt;
*'''fov:''' the field of view angle, 0 to 180. The higher this value is, the more you will be able to see what is to your sides.&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section name=&amp;quot;Client&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool setCameraMatrix ( float positionX, float positionY, float positionZ [, float lookAtX, float lookAtY, float lookAtZ, float roll = 0, float fov = 70 ] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''positionX:''' The x coordinate of the camera's position.&lt;br /&gt;
*'''positionY:''' The y coordinate of the camera's position.&lt;br /&gt;
*'''positionZ:''' The z coordinate of the camera's position.&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments=== &lt;br /&gt;
*'''lookAtX:''' The x coordinate of the point the camera faces.&lt;br /&gt;
*'''lookAtY:''' The y coordinate of the point the camera faces.&lt;br /&gt;
*'''lookAtZ:''' The z coordinate of the point the camera faces.&lt;br /&gt;
*'''roll:''' The camera roll angle, -180 to 180. A value of 0 means the camera sits straight, positive values will turn it counter-clockwise and negative values will turn it clockwise. -180 or 180 means the camera is upside down.&lt;br /&gt;
*'''fov:''' the field of view angle, 0 to 180. The higher this value is, the more you will be able to see what is to your sides.&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the arguments are valid, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This code fixates the camera onto the Vinewood sign in Los Santos for any player that joins the server:&lt;br /&gt;
&amp;lt;section class=&amp;quot;server&amp;quot; name=&amp;quot;Server script&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function setCameraOnPlayerJoin()&lt;br /&gt;
     -- slowly fade the camera in to make the screen visible&lt;br /&gt;
     fadeCamera(source, true, 5)&lt;br /&gt;
     -- set the player's camera to a fixed position, looking at a fixed point&lt;br /&gt;
     setCameraMatrix(source, 1468.8785400391, -919.25317382813, 100.153465271, 1468.388671875, -918.42474365234, 99.881813049316)&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onPlayerJoin&amp;quot;, getRootElement(), setCameraOnPlayerJoin)&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Camera functions}}&lt;/div&gt;</summary>
		<author><name>X86dev</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetCameraViewMode&amp;diff=36916</id>
		<title>SetCameraViewMode</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetCameraViewMode&amp;diff=36916"/>
		<updated>2013-08-14T08:38:32Z</updated>

		<summary type="html">&lt;p&gt;X86dev: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Client function}}&lt;br /&gt;
This function allows you to set the camera's view mode if you are inside a [[vehicle]]. This indicates at what distance the camera will follow the player.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool setCameraViewMode ( int viewMode )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''viewMode''': The view mode you wish to use&lt;br /&gt;
{{Camera view modes}}&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the view was set correctly, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This example sets the camera to bumper view when the local player enters any vehicle.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addEventHandler(&amp;quot;onClientPlayerVehicleEnter&amp;quot;, getLocalPlayer(), function()&lt;br /&gt;
  setCameraViewMode(0)&lt;br /&gt;
end)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Client camera functions}}&lt;/div&gt;</summary>
		<author><name>X86dev</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetWeaponProperty&amp;diff=36862</id>
		<title>SetWeaponProperty</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetWeaponProperty&amp;diff=36862"/>
		<updated>2013-08-08T06:51:47Z</updated>

		<summary type="html">&lt;p&gt;X86dev: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Server client function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
&amp;lt;section name=&amp;quot;setWeaponProperty&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This function sets the weapon property of the specified weapons specified weapon type. See lower down the page for documentation related to weapon creation.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;bool setWeaponProperty ( int weaponID/string weaponName, string weaponSkill, string property, int/float theValue )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Required Arguments==&lt;br /&gt;
*'''weaponID:''' The ID or name of the [[Weapons|weapon]] you want to set a property of. Names can be:&lt;br /&gt;
{{Some Weapon Types}}&lt;br /&gt;
*'''weaponSkill:''' Either: &amp;quot;pro&amp;quot;, &amp;quot;std&amp;quot; or &amp;quot;poor&amp;quot;. The player must have this skill level set to have the effect.&lt;br /&gt;
*'''property:''' The property you want to set the value of:&lt;br /&gt;
** &amp;quot;weapon_range&amp;quot; - float&lt;br /&gt;
** &amp;quot;target_range&amp;quot; - float&lt;br /&gt;
** &amp;quot;accuracy&amp;quot; - float&lt;br /&gt;
** &amp;quot;damage&amp;quot; - int&lt;br /&gt;
** &amp;quot;maximum_clip_ammo&amp;quot; - int&lt;br /&gt;
** &amp;quot;move_speed&amp;quot; - float&lt;br /&gt;
** &amp;quot;flags&amp;quot; - int (specify a flag to toggle it on/off) See [[Weapon Flags]]&lt;br /&gt;
** &amp;quot;anim_loop_start&amp;quot; - float&lt;br /&gt;
** &amp;quot;anim_loop_stop&amp;quot; - float&lt;br /&gt;
** &amp;quot;anim_loop_bullet_fire&amp;quot; - float&lt;br /&gt;
** &amp;quot;anim2_loop_start&amp;quot; - float&lt;br /&gt;
** &amp;quot;anim2_loop_stop&amp;quot; - float&lt;br /&gt;
** &amp;quot;anim2_loop_bullet_fire&amp;quot; - float&lt;br /&gt;
** &amp;quot;anim_breakout_time&amp;quot; - float&lt;br /&gt;
*'''theValue:''' The value to set the property to.&lt;br /&gt;
&lt;br /&gt;
==Returns==&lt;br /&gt;
On success:&lt;br /&gt;
&lt;br /&gt;
'''bool:''' Returns true if the weapon property was successfully set&lt;br /&gt;
&lt;br /&gt;
On failure:&lt;br /&gt;
&lt;br /&gt;
'''bool:''' Returns false if the weapon property was unable to be set&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This example sets the weapon range of the M4 at poor skill level to 75&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local rangeSet = setWeaponProperty(31, &amp;quot;poor&amp;quot;, &amp;quot;weapon_range&amp;quot;, 75)&lt;br /&gt;
if (rangeSet) then&lt;br /&gt;
    outputChatBox(&amp;quot;M4 range at poor skill is set now 75!&amp;quot;)&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This example makes the silenced pistol dual wielded at pro skill level&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
setWeaponProperty(23, &amp;quot;pro&amp;quot;, &amp;quot;flags&amp;quot;, 0x000800)&lt;br /&gt;
setWeaponProperty(23, &amp;quot;pro&amp;quot;, &amp;quot;flags&amp;quot;, 0x000002)&lt;br /&gt;
setWeaponProperty(23, &amp;quot;pro&amp;quot;, &amp;quot;maximum_clip_ammo&amp;quot;, 34)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This examples doubles the range of the colt 45 hand gun&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
setWeaponProperty(22, &amp;quot;poor&amp;quot;, &amp;quot;weapon_range&amp;quot;, 70)&lt;br /&gt;
setWeaponProperty(22, &amp;quot;std&amp;quot;, &amp;quot;weapon_range&amp;quot;, 70)&lt;br /&gt;
setWeaponProperty(22, &amp;quot;pro&amp;quot;, &amp;quot;weapon_range&amp;quot;, 70)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This example makes the minigun able to fire all its ammo without the short reload time&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
setWeaponProperty(&amp;quot;minigun&amp;quot;, &amp;quot;pro&amp;quot;, &amp;quot;maximum_clip_ammo&amp;quot;, 1000)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
{{Requirements|1.3|n/a|}}&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section name=&amp;quot;setWeaponProperty&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
==Syntax (weapon creation)==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;bool setWeaponProperty ( weapon theWeapon, string strProperty, value theValue )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Required Arguments==&lt;br /&gt;
&lt;br /&gt;
* '''theWeapon:''' the weapon to change the property of.&lt;br /&gt;
* '''strProperty:''' the property to edit such as damage per hit ( &amp;quot;damage&amp;quot; ):&lt;br /&gt;
** &amp;quot;weapon_range&amp;quot; - float&lt;br /&gt;
** &amp;quot;target_range&amp;quot; - float&lt;br /&gt;
** &amp;quot;accuracy&amp;quot; - float&lt;br /&gt;
** &amp;quot;damage&amp;quot; - int&lt;br /&gt;
** &amp;quot;maximum_clip_ammo&amp;quot; - int&lt;br /&gt;
** &amp;quot;move_speed&amp;quot; - float&lt;br /&gt;
** &amp;quot;flags&amp;quot; - int (specify a flag to toggle it on/off) See [[Weapon Flags]]&lt;br /&gt;
** &amp;quot;anim_loop_start&amp;quot; - float&lt;br /&gt;
** &amp;quot;anim_loop_stop&amp;quot; - float&lt;br /&gt;
** &amp;quot;anim_loop_bullet_fire&amp;quot; - float&lt;br /&gt;
** &amp;quot;anim2_loop_start&amp;quot; - float&lt;br /&gt;
** &amp;quot;anim2_loop_stop&amp;quot; - float&lt;br /&gt;
** &amp;quot;anim2_loop_bullet_fire&amp;quot; - float&lt;br /&gt;
** &amp;quot;anim_breakout_time&amp;quot; - float&lt;br /&gt;
* '''theValue:''' whatever you wish to set it to ( different properties use different data types so damage could be an int where as accuracy is a float ).&lt;br /&gt;
&lt;br /&gt;
Sets an individual weapons property. Only a handful of useful properties are supported now and it uses the same property names as setWeaponProperty server side.&lt;br /&gt;
&lt;br /&gt;
Returns true if the property was set.&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
{{Requirements|n/a|1.3.0-9.04555|}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Weapon functions}}&lt;/div&gt;</summary>
		<author><name>X86dev</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Template:Useful_Functions&amp;diff=36784</id>
		<title>Template:Useful Functions</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Template:Useful_Functions&amp;diff=36784"/>
		<updated>2013-07-27T22:15:14Z</updated>

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

		<summary type="html">&lt;p&gt;X86dev: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Useful Function}}&lt;br /&gt;
&amp;lt;lowercasetitle&amp;gt;&amp;lt;/lowercasetitle&amp;gt;&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function can be used to get the elements within a markers collision area.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
table getElementsWithinMarker ( marker theMarker )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
* '''theMarker:''' The marker element that you want to see what's inside.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns a ''table'' containing each element that's inside the marker just like [[getElementsWithinColShape]] or ''false'' if a marker wasn't passed to the function.&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Function source&amp;quot; class=&amp;quot;both&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function getElementsWithinMarker(marker)&lt;br /&gt;
	if (not isElement(marker) or getElementType(marker) ~= &amp;quot;marker&amp;quot;) then&lt;br /&gt;
		return false&lt;br /&gt;
	end&lt;br /&gt;
	local markerColShape = getElementColShape(marker)&lt;br /&gt;
	local elements = getElementsWithinColShape(markerColShape)&lt;br /&gt;
	return elements&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Author: Arran&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Useful_Functions}}&lt;/div&gt;</summary>
		<author><name>X86dev</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetControlState&amp;diff=36730</id>
		<title>SetControlState</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetControlState&amp;diff=36730"/>
		<updated>2013-07-24T06:49:00Z</updated>

		<summary type="html">&lt;p&gt;X86dev: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Server client function}} &lt;br /&gt;
__NOTOC__ &lt;br /&gt;
Sets a state of a specified player's control, as if they pressed or released it.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;section name=&amp;quot;Server&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;bool setControlState ( player thePlayer, string control, bool state ) &amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''thePlayer:''' The player you wish to set the control state of.&lt;br /&gt;
*'''control:''' The control that you want to set the state of. See [[control names]] for a list of possible controls.&lt;br /&gt;
*'''state:''' A boolean value representing whether or not the key will be set to pressed or not.&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&amp;lt;section name=&amp;quot;Client&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;bool setControlState ( string control, bool state ) &amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''control:''' The control that you want to set the state of. See [[control names]] for a list of possible controls.&lt;br /&gt;
*'''state:''' A boolean value representing whether or not the key will be set to pressed or not.&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns 'true' if the control state was successfully set, 'false' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example==  &lt;br /&gt;
&amp;lt;section name=&amp;quot;Server&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This example will disable the use of the accelerate, brake/reverse and handbrake keys, then force the accelerate on for any player who enters a vehicle. &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function onPlayerEnterVehicle ( theVehicle, seat, jacked )&lt;br /&gt;
    toggleControl ( source, &amp;quot;accelerate&amp;quot;, false ) -- disable the accelerate key&lt;br /&gt;
    toggleControl ( source, &amp;quot;brake_reverse&amp;quot;, false ) -- disable the brake_reverse key&lt;br /&gt;
    toggleControl ( source, &amp;quot;handbrake&amp;quot;, false ) -- disable the handbrake key&lt;br /&gt;
    setControlState ( source, &amp;quot;accelerate&amp;quot;, true ) -- force the accelerate key on&lt;br /&gt;
end&lt;br /&gt;
addEventHandler ( &amp;quot;onPlayerVehicleEnter&amp;quot;, getRootElement(), onPlayerEnterVehicle )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section name=&amp;quot;Client&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This example will disable the use of the accelerate, brake/reverse and handbrake keys, then force the accelerate on for any player who enters a vehicle. &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
function onClientPlayerEnterVehicle ( theVehicle, seat, jacked )&lt;br /&gt;
    toggleControl ( &amp;quot;accelerate&amp;quot;, false ) -- disable the accelerate key&lt;br /&gt;
    toggleControl ( &amp;quot;brake_reverse&amp;quot;, false ) -- disable the brake_reverse key&lt;br /&gt;
    toggleControl ( &amp;quot;handbrake&amp;quot;, false ) -- disable the handbrake key&lt;br /&gt;
    setControlState ( &amp;quot;accelerate&amp;quot;, true ) -- force the accelerate key on&lt;br /&gt;
end&lt;br /&gt;
addEventHandler ( &amp;quot;onClientPlayerVehicleEnter&amp;quot;, getRootElement(), onClientPlayerEnterVehicle )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Input functions}}&lt;/div&gt;</summary>
		<author><name>X86dev</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=DxCreateShader&amp;diff=36727</id>
		<title>DxCreateShader</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=DxCreateShader&amp;diff=36727"/>
		<updated>2013-07-23T08:53:49Z</updated>

		<summary type="html">&lt;p&gt;X86dev: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Client function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function creates a [[shader]] element that can be used in the dxDraw functions. Successful shader creation is not guaranteed unless the [[shader|Effect File]] contains a fallback technique which will work on every PC in the universe.&lt;br /&gt;
&lt;br /&gt;
=====It is highly recommended that [[dxSetTestMode]] is used when writing and testing scripts using dxCreateShader.=====&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
element, string dxCreateShader ( string filepath [, float priority = 0, float maxDistance = 0, bool layered = false, string elementTypes = &amp;quot;world,vehicle,object,other&amp;quot; ] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''filepath:''' The filepath of the [[shader|shader  Effect File]](.fx) file&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
''All the following optional arguments are only relevant when the shader is used with [[engineApplyShaderToWorldTexture]]''&lt;br /&gt;
*'''priority:''' If more than one shader is matched to a world texture, the shader with the highest priority will be used. If there is more than one shader with the same highest priority, the most recently created shader is used.&lt;br /&gt;
*'''maxDistance:''' If non-zero, the shader will be applied to textures nearer than maxDistance only. This can speed up rendering, but (to look good) may require the shader to fade out it's own effect as the texture reaches maxDistance.&lt;br /&gt;
*'''layered:''' When set to true, the shader will be drawn in a separate render pass. Several layered shaders can be drawn on the same world texture. (To avoid [http://en.wikipedia.org/wiki/Z-fighting Z fighting] artifacts, you may have to add '''DepthBias&amp;lt;nowiki&amp;gt;=&amp;lt;/nowiki&amp;gt;-0.0002;''' to the technique pass)&lt;br /&gt;
*'''elementTypes:''' A comma seperated list of element types to restrict this shader to. Valid element types are:&lt;br /&gt;
** world - Textures in the GTA world&lt;br /&gt;
** ped - Player and ped textures&lt;br /&gt;
** vehicle - Vehicles textures&lt;br /&gt;
** object - Objects textures&lt;br /&gt;
** other - Element textures which are not peds, vehicles or objects&lt;br /&gt;
** all - Everything&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
*'''element:''' A [[shader]] element if successful, ''false'' if invalid arguments were passed to the function. '''You should always check to see if this function has returned false.'''&lt;br /&gt;
*'''string:''' The name of the technique that will be used.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addEventHandler( &amp;quot;onClientRender&amp;quot;, root,&lt;br /&gt;
    function()&lt;br /&gt;
        if myShader then&lt;br /&gt;
            dxDrawImage( 100, 350, 300, 350, myShader )&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
-- Use 'toggle' command to switch shader on and off&lt;br /&gt;
addCommandHandler( &amp;quot;toggle&amp;quot;,&lt;br /&gt;
    function()&lt;br /&gt;
        if not myShader then&lt;br /&gt;
            myShader = dxCreateShader( &amp;quot;fancything.fx&amp;quot; )  -- Create shader&lt;br /&gt;
        else        &lt;br /&gt;
            destroyElement( myShader )                    -- Destroy shader&lt;br /&gt;
            myShader = nil&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Changelog==&lt;br /&gt;
{{ChangelogHeader}}&lt;br /&gt;
{{ChangelogItem|1.3.0-9.04435|Added layered and elementTypes arguments}}&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Drawing_functions}}&lt;/div&gt;</summary>
		<author><name>X86dev</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=DxGetMaterialSize&amp;diff=36673</id>
		<title>DxGetMaterialSize</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=DxGetMaterialSize&amp;diff=36673"/>
		<updated>2013-07-15T07:05:39Z</updated>

		<summary type="html">&lt;p&gt;X86dev: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Client function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This gets the dimensions of the supplied [[material]] element.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
int, int [, int] dxGetMaterialSize ( element material )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''material :''' The material element whose size is to be gotten&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns two ''ints'' representing the width and height in pixels of the material, or false if an invalid parameter was passed to the function. &lt;br /&gt;
If the material is a volume texture, this function will return three ''ints'' representing the width, height and depth.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
myTexture = dxCreateTexture( &amp;quot;man.png&amp;quot; )&lt;br /&gt;
local width, height = dxGetMaterialSize( myTexture )&lt;br /&gt;
outputChatBox( &amp;quot;man.png is &amp;quot; .. tostring(width) .. &amp;quot; pixels wide and &amp;quot; .. tostring(height) .. &amp;quot; pixels high&amp;quot; )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Changelog==&lt;br /&gt;
{{ChangelogHeader}}&lt;br /&gt;
{{ChangelogItem|1.3.0-9.04021|Added third return value for volume textures}}&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Drawing_functions}}&lt;/div&gt;</summary>
		<author><name>X86dev</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=EngineImportTXD&amp;diff=36556</id>
		<title>EngineImportTXD</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=EngineImportTXD&amp;diff=36556"/>
		<updated>2013-07-07T10:34:12Z</updated>

		<summary type="html">&lt;p&gt;X86dev: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Client function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
{{Note box|Please note the loading order that is used in the examples as other orders can cause textures, collisions or the DFF not to load due to technical limitations}}&lt;br /&gt;
&lt;br /&gt;
This function imports (adds) a loaded RenderWare Texture Dictionary into a specific model. This is necessary in order for the DFF loader to find any new textures. Please '''call this function before loading the DFF model file''', in order to allow the DFF loading process to find the new textures. This function can also replace default GTA textures, so that it becomes possible to e.g. put custom images on existing billboards. Ped and weapon textures are also supported.&lt;br /&gt;
&lt;br /&gt;
See here for [https://wiki.multitheftauto.com/wiki/Optimize_Custom_TXD tips on reducing the size of TXD files].&lt;br /&gt;
&lt;br /&gt;
{{New feature/item|3.0132|1.3.1|5254|&lt;br /&gt;
* CJ clothing component textures can be replaced by using the ids listed on [[Clothing Component IDs|this page]]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool engineImportTXD ( txd texture, int model_id ) &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''texture:''' The [[TXD]] that was loaded with [[engineLoadTXD]]&lt;br /&gt;
*'''model_id:''' The model id to import the TXD into&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the function executed succesfully, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
&amp;lt;section name=&amp;quot;Client&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
'''Example 1:''' This example loads a combination of a custom DFF and TXD file to replace the Euros vehicle in-game. The collisions are embedded inside the DFF file.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
outputChatBox ( &amp;quot;&amp;gt; replacing the euros vehicle&amp;quot; )&lt;br /&gt;
&lt;br /&gt;
txd = engineLoadTXD ( &amp;quot;data/euros.txd&amp;quot; )&lt;br /&gt;
engineImportTXD ( txd, 587 )&lt;br /&gt;
dff = engineLoadDFF ( &amp;quot;data/euros.dff&amp;quot;, 587 )&lt;br /&gt;
engineReplaceModel ( dff, 587 )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section name=&amp;quot;Client&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
'''Example 2:''' This example loads a combination of custom DFF, TXD and COL files to replace an in-game model of a set of floors.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
outputChatBox ( &amp;quot;&amp;gt; loading floor objects&amp;quot; )&lt;br /&gt;
txd_floors = engineLoadTXD ( &amp;quot;models/office_floors.txd&amp;quot; )&lt;br /&gt;
engineImportTXD ( txd_floors, 3781 )&lt;br /&gt;
col_floors = engineLoadCOL ( &amp;quot;models/office_floors.col&amp;quot; )&lt;br /&gt;
dff_floors = engineLoadDFF ( &amp;quot;models/office_floors.dff&amp;quot;, 3781 )&lt;br /&gt;
engineReplaceCOL ( col_floors, 3781 )&lt;br /&gt;
engineReplaceModel ( dff_floors, 3781 )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{New feature|3|1.0|&lt;br /&gt;
&amp;lt;section name=&amp;quot;Client&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
'''Example 3:''' This example replaces the victim billboards in last venturas (when replacing default models you do not need to replace a dff or col)&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
outputChatBox ( &amp;quot;&amp;gt; replacing billboards&amp;quot; )&lt;br /&gt;
txd_floors = engineLoadTXD ( &amp;quot;models/vgsn_billboard.txd&amp;quot; )&lt;br /&gt;
engineImportTXD ( txd_floors, 7300 )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Engine_functions}}&lt;/div&gt;</summary>
		<author><name>X86dev</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Changes_in_1.3.3&amp;diff=36525</id>
		<title>Changes in 1.3.3</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Changes_in_1.3.3&amp;diff=36525"/>
		<updated>2013-07-03T08:11:26Z</updated>

		<summary type="html">&lt;p&gt;X86dev: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Changelogs}}&lt;br /&gt;
{{Note|TODO, still not done --[[User:X86dev|X86dev]] 08:11, 3 July 2013 (UTC)}}&lt;br /&gt;
== Main Additions / Changes ==&lt;br /&gt;
* Anti-cheat updates&lt;br /&gt;
* Optimized streamer to work better with complex maps &lt;br /&gt;
* Smoothed fonts when scaling chat box &lt;br /&gt;
* Added option to scale HUD elements correctly for widescreen&lt;br /&gt;
* Added option to disable OS and graphic driver 'tweaks', as they can interfere with MTA&lt;br /&gt;
* Better compatibility with NVidia Optimus laptops&lt;br /&gt;
* Improved server performance&lt;br /&gt;
&lt;br /&gt;
=== Client ===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== New Functions ====&lt;br /&gt;
* [[setVehiclePlateText]]&lt;br /&gt;
* [[dxSetAspectRatioAdjustmentEnabled]]&lt;br /&gt;
&lt;br /&gt;
==== New Events ====&lt;br /&gt;
* [[onClientSoundStarted]]&lt;br /&gt;
* [[onClientSoundStopped]]&lt;br /&gt;
&lt;br /&gt;
==== Changes / Bug Fixes ====&lt;br /&gt;
* Optimized streamer to work better with complex maps &lt;br /&gt;
* Smoothed fonts when scaling chat box &lt;br /&gt;
* Added option to scale HUD elements correctly for widescreen&lt;br /&gt;
* Added option to disable OS and graphic driver 'tweaks', as they can interfere with MTA&lt;br /&gt;
* Better compatibility with NVidia Optimus laptops&lt;br /&gt;
* Fixed GUI window remaining when you disconnect while starting local server&lt;br /&gt;
* Fixed GUI labels sometimes blocking input&lt;br /&gt;
* Fixed a crash on disconnect&lt;br /&gt;
&lt;br /&gt;
=== Server ===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== New Functions ====&lt;br /&gt;
* [[setVehiclePlateText]]&lt;br /&gt;
* [[getPlayerACInfo]]&lt;br /&gt;
&lt;br /&gt;
==== New Events ====&lt;br /&gt;
* ''None yet''&lt;br /&gt;
&lt;br /&gt;
==== Changes / Bug Fixes ====&lt;br /&gt;
* Fixed incorrect server side vehicle engine state when driver warped in&lt;br /&gt;
* Fixed onPlayerQuit event not being triggered on shutdown &lt;br /&gt;
* Fixed serverside toggleAllControls()&lt;br /&gt;
&amp;lt;!-- source: https://code.google.com/p/mtasa-blue/source/detail?r=5516 --&amp;gt;&lt;br /&gt;
* Improved server performance&lt;br /&gt;
** by caching player weapon range&lt;br /&gt;
** by reducing the amount of redundant data sent to the network thread&lt;br /&gt;
* Added CSimPedTaskPacket for better hit anim sync&lt;br /&gt;
* Fixed an issue with weapon ammo getting out of sync&lt;br /&gt;
* Speed up server scripts by optimizing ACL checks&lt;br /&gt;
* Added reassuring animation during periods of no input response&lt;br /&gt;
* Fixed some desyncs in unoccupied vehicle sync (engine, derailed, in-water state)&lt;br /&gt;
* Fixed Get/SetMatrix rotation order for streamed out objects&lt;br /&gt;
* Fixed Linux compile issues&lt;br /&gt;
&amp;lt;!-- source: http://bugs.multitheftauto.com/changelog_page.php --&amp;gt;&lt;br /&gt;
* Fixed stability errors (random texture swapping/assertions) after alt+tab&lt;br /&gt;
* Fixed crash in ReApplyMoveAnims&lt;br /&gt;
* Fixed setElementPosition for players vehicle causes freeze for few seconds&lt;br /&gt;
* Fixed getPedTotalAmmo sometimes returns 0 while player is aiming on Slot 8&lt;br /&gt;
* Fixed onPlayerDamage has wrong parameters if source on vehicle&lt;br /&gt;
* Fixed getVehicleSirens on a sandking (495) crashes the server immediately&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Resources ===&lt;br /&gt;
* ['''voice'''] fixed voice icon doesn't disappear for other players after the speaking have been stopped (ccw)&lt;br /&gt;
&lt;br /&gt;
=== Editor ===&lt;br /&gt;
* ''None yet''&lt;br /&gt;
&lt;br /&gt;
==Extra information==&lt;br /&gt;
''More detailed information available on [http://bugs.multitheftauto.com/changelog_page.php Bug tracker Changelog] and Google Code repositories:&lt;br /&gt;
:* MTA:SA: from  [http://code.google.com/p/mtasa-blue/source/list?num=25&amp;amp;start=4605 r4600] and [http://code.google.com/p/mtasa-blue/source/list above]&lt;br /&gt;
:* Resources: from [http://code.google.com/p/mtasa-resources/source/list?num=25&amp;amp;start=883 r875] and [http://code.google.com/p/mtasa-resources/source/list above]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Changelog]]&lt;/div&gt;</summary>
		<author><name>X86dev</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Changes_in_1.3.3&amp;diff=36524</id>
		<title>Changes in 1.3.3</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Changes_in_1.3.3&amp;diff=36524"/>
		<updated>2013-07-03T08:10:54Z</updated>

		<summary type="html">&lt;p&gt;X86dev: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Changelogs}}&lt;br /&gt;
{{Note|TODO}}&lt;br /&gt;
== Main Additions / Changes ==&lt;br /&gt;
* Anti-cheat updates&lt;br /&gt;
* Optimized streamer to work better with complex maps &lt;br /&gt;
* Smoothed fonts when scaling chat box &lt;br /&gt;
* Added option to scale HUD elements correctly for widescreen&lt;br /&gt;
* Added option to disable OS and graphic driver 'tweaks', as they can interfere with MTA&lt;br /&gt;
* Better compatibility with NVidia Optimus laptops&lt;br /&gt;
* Improved server performance&lt;br /&gt;
&lt;br /&gt;
=== Client ===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== New Functions ====&lt;br /&gt;
* [[setVehiclePlateText]]&lt;br /&gt;
* [[dxSetAspectRatioAdjustmentEnabled]]&lt;br /&gt;
&lt;br /&gt;
==== New Events ====&lt;br /&gt;
* [[onClientSoundStarted]]&lt;br /&gt;
* [[onClientSoundStopped]]&lt;br /&gt;
&lt;br /&gt;
==== Changes / Bug Fixes ====&lt;br /&gt;
* Optimized streamer to work better with complex maps &lt;br /&gt;
* Smoothed fonts when scaling chat box &lt;br /&gt;
* Added option to scale HUD elements correctly for widescreen&lt;br /&gt;
* Added option to disable OS and graphic driver 'tweaks', as they can interfere with MTA&lt;br /&gt;
* Better compatibility with NVidia Optimus laptops&lt;br /&gt;
* Fixed GUI window remaining when you disconnect while starting local server&lt;br /&gt;
* Fixed GUI labels sometimes blocking input&lt;br /&gt;
* Fixed a crash on disconnect&lt;br /&gt;
&lt;br /&gt;
=== Server ===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== New Functions ====&lt;br /&gt;
* [[setVehiclePlateText]]&lt;br /&gt;
* [[getPlayerACInfo]]&lt;br /&gt;
&lt;br /&gt;
==== New Events ====&lt;br /&gt;
* ''None yet''&lt;br /&gt;
&lt;br /&gt;
==== Changes / Bug Fixes ====&lt;br /&gt;
* Fixed incorrect server side vehicle engine state when driver warped in&lt;br /&gt;
* Fixed onPlayerQuit event not being triggered on shutdown &lt;br /&gt;
* Fixed serverside toggleAllControls()&lt;br /&gt;
&amp;lt;!-- source: https://code.google.com/p/mtasa-blue/source/detail?r=5516 --&amp;gt;&lt;br /&gt;
* Improved server performance&lt;br /&gt;
** by caching player weapon range&lt;br /&gt;
** by reducing the amount of redundant data sent to the network thread&lt;br /&gt;
* Added CSimPedTaskPacket for better hit anim sync&lt;br /&gt;
* Fixed an issue with weapon ammo getting out of sync&lt;br /&gt;
* Speed up server scripts by optimizing ACL checks&lt;br /&gt;
* Added reassuring animation during periods of no input response&lt;br /&gt;
* Fixed some desyncs in unoccupied vehicle sync (engine, derailed, in-water state)&lt;br /&gt;
* Fixed Get/SetMatrix rotation order for streamed out objects&lt;br /&gt;
* Fixed Linux compile issues&lt;br /&gt;
&amp;lt;!-- source: http://bugs.multitheftauto.com/changelog_page.php --&amp;gt;&lt;br /&gt;
* Fixed stability errors (random texture swapping/assertions) after alt+tab&lt;br /&gt;
* Fixed crash in ReApplyMoveAnims&lt;br /&gt;
* Fixed setElementPosition for players vehicle causes freeze for few seconds&lt;br /&gt;
* Fixed getPedTotalAmmo sometimes returns 0 while player is aiming on Slot 8&lt;br /&gt;
* Fixed onPlayerDamage has wrong parameters if source on vehicle&lt;br /&gt;
* Fixed getVehicleSirens on a sandking (495) crashes the server immediately&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Resources ===&lt;br /&gt;
* ['''voice'''] fixed voice icon doesn't disappear for other players after the speaking have been stopped (ccw)&lt;br /&gt;
&lt;br /&gt;
=== Editor ===&lt;br /&gt;
* ''None yet''&lt;br /&gt;
&lt;br /&gt;
==Extra information==&lt;br /&gt;
''More detailed information available on [http://bugs.multitheftauto.com/changelog_page.php Bug tracker Changelog] and Google Code repositories:&lt;br /&gt;
:* MTA:SA: from  [http://code.google.com/p/mtasa-blue/source/list?num=25&amp;amp;start=4605 r4600] and [http://code.google.com/p/mtasa-blue/source/list above]&lt;br /&gt;
:* Resources: from [http://code.google.com/p/mtasa-resources/source/list?num=25&amp;amp;start=883 r875] and [http://code.google.com/p/mtasa-resources/source/list above]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Changelog]]&lt;/div&gt;</summary>
		<author><name>X86dev</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=DxGetStatus&amp;diff=36504</id>
		<title>DxGetStatus</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=DxGetStatus&amp;diff=36504"/>
		<updated>2013-07-01T11:20:19Z</updated>

		<summary type="html">&lt;p&gt;X86dev: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Client function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function gets information about various internal datum&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
table dxGetStatus ()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns a table with the following entries:&lt;br /&gt;
* '''TestMode :''' The current dx test mode. See [[dxSetTestMode]].&lt;br /&gt;
*'''VideoCardName :''' The name of the graphics card.&lt;br /&gt;
*'''VideoCardRAM :''' The installed memory in MB of the graphics card.&lt;br /&gt;
*'''VideoCardPSVersion :''' The maximum pixel shader version of the graphics card.&lt;br /&gt;
*'''VideoMemoryFreeForMTA :''' The amount of memory in MB available for MTA to use. '''When this gets to zero, [[guiCreateFont]], [[dxCreateFont]] and [[dxCreateRenderTarget]] will fail.'''&lt;br /&gt;
*'''VideoMemoryUsedByFonts :''' The amount of graphic memory in MB used by custom fonts.&lt;br /&gt;
*'''VideoMemoryUsedByTextures :''' The amount of graphic memory in MB used by textures.&lt;br /&gt;
*'''VideoMemoryUsedByRenderTargets :''' The amount of graphic memory in MB used by render targets.&lt;br /&gt;
*'''SettingWindowed :''' The windowed setting. (true/false)&lt;br /&gt;
*'''SettingFXQuality :''' The FX Quality. (0-3)&lt;br /&gt;
*'''SettingDrawDistance :''' The draw distance setting. (0-100)&lt;br /&gt;
*'''SettingVolumetricShadows :''' The volumetric shadows setting. (true/false)&lt;br /&gt;
*'''SettingStreamingVideoMemoryForGTA :''' The usable graphics memory setting. (64-256)&lt;br /&gt;
*'''AllowScreenUpload :''' The allows screen uploads setting. (true/false)&lt;br /&gt;
*'''DepthBufferFormat:''' The format of the shader readable depth buffer, or 'unknown' if not available&lt;br /&gt;
*'''VideoCardMaxAnisotropy:''' The maximum anisotropic filtering available. (0-4 which respectively mean: off,2x,4x,8x,16x)&lt;br /&gt;
*'''SettingAnisotropicFiltering:''' The anisotropic filtering setting. (0-4 which respectively mean: off,2x,4x,8x,16x)&lt;br /&gt;
*'''SettingAntiAliasing:''' The anti-aliasing setting. (0-3 which respectively mean: off,1x,2x,3x)&lt;br /&gt;
*'''SettingHeatHaze:''' The heat haze setting. (true/false)&lt;br /&gt;
*'''SettingGrassEffect:''' The grass effect setting. (true/false)&lt;br /&gt;
*'''Setting32BitColor:''' The color depth of the screen. (false is 16bit, true is 32bit)&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addCommandHandler(&amp;quot;getinfo&amp;quot;,function()&lt;br /&gt;
    local info=dxGetStatus()&lt;br /&gt;
    for k,v in pairs(info) do&lt;br /&gt;
        outputChatBox(k..&amp;quot; : &amp;quot;..tostring(v),root,255,0,0,true)&lt;br /&gt;
    end&lt;br /&gt;
end)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Changelog==&lt;br /&gt;
{{ChangelogHeader}}&lt;br /&gt;
{{ChangelogItem|1.3.0-9.04715|Added DepthBufferFormat argument}}&lt;br /&gt;
{{ChangelogItem|1.3.0-9.04811|Added VideoCardMaxAnisotropy, SettingAnisotropicFiltering, SettingAntiAliasing,&amp;lt;br&amp;gt; SettingHeatHaze, SettingGrassEffect and Setting32BitColor arguments}}&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Drawing_functions}}&lt;/div&gt;</summary>
		<author><name>X86dev</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=ProcessLineOfSight&amp;diff=36503</id>
		<title>ProcessLineOfSight</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=ProcessLineOfSight&amp;diff=36503"/>
		<updated>2013-07-01T07:44:23Z</updated>

		<summary type="html">&lt;p&gt;X86dev: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Client function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function casts a ray between two points in the world, and tells you information about the point that was hit, if any. The two positions '''must''' be within the local player's draw distance as the collision data is not loaded outside this area, and the call will just fail as if the ray didn't hit.&lt;br /&gt;
&lt;br /&gt;
This function is relatively expensive to call, so over use of this in scripts may have a detrimental effect on performance.&lt;br /&gt;
&lt;br /&gt;
This function is useful for checking for collisions and for editor-style scripts. If you wish to find what element is positioned at a particular point on the screen, use this function combined with [[getWorldFromScreenPosition]]. If you wish to just know if something is hit, and don't care about what or where was hit, use [[isLineOfSightClear]].&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
Return values labelled for ease of reference.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool               -- hit&lt;br /&gt;
float float float  -- hitX, hitY, hitZ&lt;br /&gt;
element            -- hitElement&lt;br /&gt;
float float float  -- normalX, normalY, normalZ&lt;br /&gt;
int                -- material&lt;br /&gt;
float              -- lighting&lt;br /&gt;
int                -- piece&lt;br /&gt;
int                -- worldModelID&lt;br /&gt;
float float float  -- worldModelPositionX,Y,Z&lt;br /&gt;
float float float  -- worldModelRotationX,Y,Z&lt;br /&gt;
int                -- worldLODModelID&lt;br /&gt;
                  processLineOfSight ( float startX, float startY, float startZ, &lt;br /&gt;
                                       float endX, float endY, float endZ, &lt;br /&gt;
                                       [ bool checkBuildings = true, &lt;br /&gt;
                                       bool checkVehicles = true, &lt;br /&gt;
                                       bool checkPlayers = true, &lt;br /&gt;
                                       bool checkObjects = true, &lt;br /&gt;
                                       bool checkDummies = true, &lt;br /&gt;
                                       bool seeThroughStuff = false, &lt;br /&gt;
                                       bool ignoreSomeObjectsForCamera = false, &lt;br /&gt;
                                       bool shootThroughStuff = false, &lt;br /&gt;
                                       element ignoredElement = nil,&lt;br /&gt;
                                       bool includeWorldModelInformation = false,&lt;br /&gt;
                                       bool bIncludeCarTyres ] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''startX:''' The start ''x'' position&lt;br /&gt;
*'''startY:''' The start ''y'' position&lt;br /&gt;
*'''startZ:''' The start ''z'' position&lt;br /&gt;
*'''endX:''' The end ''x'' position&lt;br /&gt;
*'''endY:''' The end ''y'' position&lt;br /&gt;
*'''endZ:''' The end ''z'' position&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments=== &lt;br /&gt;
{{OptionalArg}} &lt;br /&gt;
*'''checkBuildings:''' Allow the line of sight to be blocked by GTA's internally placed buildings, i.e. the world map.&lt;br /&gt;
*'''checkVehicles:''' Allow the line of sight to be blocked by [[Vehicle|vehicles]].&lt;br /&gt;
*'''checkPlayers:''' Allow the line of sight to be blocked by [[Player|players]].&lt;br /&gt;
*'''checkObjects:''' Allow the line of sight to be blocked by [[Object|objects]].&lt;br /&gt;
*'''checkDummies:''' Allow the line of sight to be blocked by GTA's internal dummies.  These are not used in the current MTA version so this argument can be set to ''false''.&lt;br /&gt;
*'''seeThroughStuff:''' Allow the line of sight to be blocked by translucent game objects, e.g. glass.&lt;br /&gt;
*'''ignoreSomeObjectsForCamera:''' Allow the line of sight to pass through objects that have (K) property enabled in &amp;quot;object.dat&amp;quot; data file. (i.e. Most dynamic objects like boxes or barrels)&lt;br /&gt;
*'''shootThroughStuff:''' Allow the line of sight to be blocked by things that can be shot through&lt;br /&gt;
*'''ignoredElement:''' Allow the line of sight to pass through a certain specified element. This is usually set to the object you are tracing from so it does not interfere with the results.&lt;br /&gt;
*'''includeWorldModelInformation :''' Include the results of hitting a world model.&lt;br /&gt;
*'''bIncludeCarTyres :''' Includes car tyre hits.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
*'''hit:''' ''true'' if there is a collision, ''false'' otherwise&lt;br /&gt;
The other values are only filled if there is a collision, they contain ''nil'' otherwise&lt;br /&gt;
*'''hitX, hitY, hitZ:''' collision position&lt;br /&gt;
*'''hitElement:''' the MTA element hit if any, ''nil'' otherwise&lt;br /&gt;
*'''normalX, normalY, normalZ:''' the normal of the surface hit&lt;br /&gt;
*'''material:''' an integer representing the [[Material IDs|GTASA material ID]] of the surface hit when applicable (world, objects)&lt;br /&gt;
*'''lighting:''' a float between 0 (fully dark) and 1 (bright) representing the amount of light that the hit building surface will transfer to peds or vehicles that are in contact with it. The value can be affected by the game time of day, usually with a lower (darker) value being returned during the night.&lt;br /&gt;
*'''piece:''' an integer representing the part of the element hit if hitElement is a vehicle or a ped/player, ''0'' otherwise. &lt;br /&gt;
**For a ped/player, piece represents the body part hit:&lt;br /&gt;
{{BodyParts}}&lt;br /&gt;
**For vehicles, piece represents the vehicle part hit:&lt;br /&gt;
{{VehicleParts}}&lt;br /&gt;
*'''worldModelID:''' If includeWorldModelInformation was set to ''true'' and a world model was hit, this will contain the model ID.&lt;br /&gt;
*'''worldModelPositionX,Y,Z:''' If worldModelID is set, this will contain the world model position.&lt;br /&gt;
*'''worldModelRotationX,Y,Z:''' If worldModelID is set, this will contain the world model rotation.&lt;br /&gt;
*'''worldLODModelID:''' If worldModelID is set, this will contain the LOD model ID if applicable.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
This example shows how you can tell what position and element the camera is looking at, up to 50 units away.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local w, h = guiGetScreenSize ()&lt;br /&gt;
local tx, ty, tz = getWorldFromScreenPosition ( w/2, h/2, 50 )&lt;br /&gt;
local px, py, pz = getCameraMatrix()&lt;br /&gt;
hit, x, y, z, elementHit = processLineOfSight ( px, py, pz, tx, ty, tz )&lt;br /&gt;
if hit then&lt;br /&gt;
    outputChatBox ( &amp;quot;Looking at &amp;quot; .. x .. &amp;quot;, &amp;quot; .. y .. &amp;quot;, &amp;quot; ..  z )&lt;br /&gt;
    if elementHit then&lt;br /&gt;
        outputChatBox ( &amp;quot;Hit element &amp;quot; .. getElementType(elementHit) )&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Changelog==&lt;br /&gt;
{{ChangelogHeader}}&lt;br /&gt;
{{ChangelogItem|1.3.0-9.04273|''bIncludeCarTyres'' argument added}}&lt;br /&gt;
{{ChangelogItem|1.3.0-9.04273|''worldModelID'' return value fixed}}&lt;br /&gt;
{{ChangelogItem|1.3.0-9.04405|''lighting'' return value fixed}}&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Client world functions}}&lt;/div&gt;</summary>
		<author><name>X86dev</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Template:VehicleParts&amp;diff=36502</id>
		<title>Template:VehicleParts</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Template:VehicleParts&amp;diff=36502"/>
		<updated>2013-07-01T07:44:21Z</updated>

		<summary type="html">&lt;p&gt;X86dev: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;border:3px solid red;margin-bottom:3px;padding-left:5px;&amp;quot;&amp;gt;&amp;lt;div style=&amp;quot;float:right;padding-right:5px;font-weight:bold;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
*'''0:''' Frame&lt;br /&gt;
*'''2:''' Trunk &lt;br /&gt;
*'''3:''' Hood&lt;br /&gt;
*'''4:''' Rear&lt;br /&gt;
*'''5:''' Front left door&lt;br /&gt;
*'''6:''' Front right door&lt;br /&gt;
*'''7:''' Rear left door&lt;br /&gt;
*'''8:''' Rear right door&lt;br /&gt;
*'''13:''' Front Left tyre&lt;br /&gt;
*'''14:''' Front Right tyre&lt;br /&gt;
*'''15:''' Back Left tyre&lt;br /&gt;
*'''16:''' Back Right tyre&lt;br /&gt;
(Other potential IDs haven't been documented yet and might depend on vehicle model)&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>X86dev</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Category:Changes_in_1.3&amp;diff=36501</id>
		<title>Category:Changes in 1.3</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Category:Changes_in_1.3&amp;diff=36501"/>
		<updated>2013-07-01T07:41:33Z</updated>

		<summary type="html">&lt;p&gt;X86dev: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;''See also [[Changes in 1.3]]''&lt;br /&gt;
&lt;br /&gt;
[[Category:Changelog]]&lt;/div&gt;</summary>
		<author><name>X86dev</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Changes_in_1.3.3&amp;diff=36500</id>
		<title>Changes in 1.3.3</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Changes_in_1.3.3&amp;diff=36500"/>
		<updated>2013-07-01T07:40:18Z</updated>

		<summary type="html">&lt;p&gt;X86dev: Created page with &amp;quot;{{Changelogs}} {{Note|TODO}} == Main Additions / Changes ==  === Client ===  ----  ==== New Functions ==== * ''None yet''  ==== New Events ==== * ''None yet''  ==== Changes / Bug...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Changelogs}}&lt;br /&gt;
{{Note|TODO}}&lt;br /&gt;
== Main Additions / Changes ==&lt;br /&gt;
&lt;br /&gt;
=== Client ===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== New Functions ====&lt;br /&gt;
* ''None yet''&lt;br /&gt;
&lt;br /&gt;
==== New Events ====&lt;br /&gt;
* ''None yet''&lt;br /&gt;
&lt;br /&gt;
==== Changes / Bug Fixes ====&lt;br /&gt;
* ''None yet''&lt;br /&gt;
&lt;br /&gt;
=== Server ===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== New Functions ====&lt;br /&gt;
* ''None yet''&lt;br /&gt;
&lt;br /&gt;
==== New Events ====&lt;br /&gt;
* ''None yet''&lt;br /&gt;
&lt;br /&gt;
==== Changes / Bug Fixes ====&lt;br /&gt;
* ''None yet''&lt;br /&gt;
&lt;br /&gt;
=== Resources ===&lt;br /&gt;
* ''None yet''&lt;br /&gt;
&lt;br /&gt;
=== Editor ===&lt;br /&gt;
* ''None yet''&lt;br /&gt;
&lt;br /&gt;
==Extra information==&lt;br /&gt;
''More detailed information available on [http://bugs.multitheftauto.com/changelog_page.php Bug tracker Changelog] and Google Code repositories:&lt;br /&gt;
:* MTA:SA: from  [http://code.google.com/p/mtasa-blue/source/list?num=25&amp;amp;start=4605 r4600] and [http://code.google.com/p/mtasa-blue/source/list above]&lt;br /&gt;
:* Resources: from [http://code.google.com/p/mtasa-resources/source/list?num=25&amp;amp;start=883 r875] and [http://code.google.com/p/mtasa-resources/source/list above]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Changelog]]&lt;/div&gt;</summary>
		<author><name>X86dev</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Template:Changelogs&amp;diff=36499</id>
		<title>Template:Changelogs</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Template:Changelogs&amp;diff=36499"/>
		<updated>2013-07-01T07:40:16Z</updated>

		<summary type="html">&lt;p&gt;X86dev: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| cellpadding=&amp;quot;4&amp;quot; style=&amp;quot;border-collapse: collapse; border-width: 1px; border-style: solid; border-color: #FFF; float:right;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!width=140 style=&amp;quot;background-color: #D6DCFF; border-style: solid; border-width: 1px; border-color: #FFF; color:#00000;&amp;quot;| MTA:SA Version&lt;br /&gt;
!width=400 style=&amp;quot;white-space: nowrap; background-color: #D6DCFF; border-style: solid; border-width: 1px; border-color: #FFF;&amp;quot;| Changelogs&lt;br /&gt;
{{Changelogsrow|1.0|[[Changes in 1.0|1.0.0]] &amp;amp;bull; 1.0.1 &amp;amp;bull; 1.0.2 &amp;amp;bull; 1.0.3 &amp;amp;bull; 1.0.4}}&lt;br /&gt;
{{Changelogsrow|1.1|[[Changes in 1.1|1.1.0]] &amp;amp;bull; 1.1.1}}&lt;br /&gt;
{{Changelogsrow|1.2|[[Changes in 1.2|1.2.0]]}}&lt;br /&gt;
{{Changelogsrow|1.3|[[Changes in 1.3|1.3.0]] &amp;amp;bull; [[Changes in 1.3.1|1.3.1]] &amp;amp;bull; [[Changes in 1.3.2|1.3.2]] &amp;amp;bull; [[Changes in 1.3.3|1.3.3]]}}&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>X86dev</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=DxSetBlendMode&amp;diff=36476</id>
		<title>DxSetBlendMode</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=DxSetBlendMode&amp;diff=36476"/>
		<updated>2013-06-28T10:54:48Z</updated>

		<summary type="html">&lt;p&gt;X86dev: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Client function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function sets the current blend mode for the dxDraw functions. Changing the blend mode can increase the quality when drawing text or certain other images to a render target. As a general guide use '''modulate_add''' when drawing text to a render target, and '''add''' when drawing the render target to the screen. Don't forget to restore the default '''blend''' at the end - See the example below.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool dxSetBlendMode ( string blendMode )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''blendMode :''' The blend mode to use which can be one of:&lt;br /&gt;
**'''blend:''' The source textures are alpha blended to the screen/render target. The is the default mode for drawing and gives the results we all know and love.&lt;br /&gt;
**'''add:''' The source textures are added to the screen/render target.&lt;br /&gt;
**'''modulate_add:''' The source textures are multiplied by the alpha and then added to the screen/render target.&lt;br /&gt;
**'''overwrite :''' The source textures are overwritten. This can be useful for clearing render targets.&lt;br /&gt;
&lt;br /&gt;
==Returns==&lt;br /&gt;
Returns true if successful, or ''false'' if invalid arguments were passed to the function.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This example shows how to use '''modulate_add''' and '''add''' to avoid quality problems when using a render target:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local myRenderTarget = dxCreateRenderTarget(500, 500, true)&lt;br /&gt;
&lt;br /&gt;
--&lt;br /&gt;
-- Function to draw text to our render target texture when the 'r' key is pressed&lt;br /&gt;
--&lt;br /&gt;
function updateRenderTarget()&lt;br /&gt;
    dxSetRenderTarget(myRenderTarget, true)&lt;br /&gt;
    dxSetBlendMode(&amp;quot;modulate_add&amp;quot;)  -- Set 'modulate_add' when drawing stuff on the render target&lt;br /&gt;
&lt;br /&gt;
    dxDrawText(&amp;quot;Testing &amp;quot;..getTickCount(), 0, 0, 0, 0, tocolor(255, 255, 255, 255), 2, &amp;quot;Verdana&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
    dxSetBlendMode(&amp;quot;blend&amp;quot;)         -- Restore default blending&lt;br /&gt;
    dxSetRenderTarget()             -- Restore default render target&lt;br /&gt;
end&lt;br /&gt;
bindKey(&amp;quot;r&amp;quot;, &amp;quot;down&amp;quot;, updateRenderTarget )&lt;br /&gt;
&lt;br /&gt;
--&lt;br /&gt;
-- Display render target contents&lt;br /&gt;
--&lt;br /&gt;
addEventHandler(&amp;quot;onClientRender&amp;quot;, root,&lt;br /&gt;
    function()&lt;br /&gt;
        dxSetBlendMode(&amp;quot;add&amp;quot;)       -- Set 'add' when drawing the render target on the screen&lt;br /&gt;
        dxDrawImage(100, 200, 500, 500, myRenderTarget, -10)&lt;br /&gt;
        dxSetBlendMode(&amp;quot;blend&amp;quot;)     -- Restore default blending&lt;br /&gt;
    end&lt;br /&gt;
)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
{{Requirements|n/a|1.3.0-9.03782|}}&lt;br /&gt;
&lt;br /&gt;
==Changelog==&lt;br /&gt;
{{ChangelogHeader}}&lt;br /&gt;
{{ChangelogItem|1.3.0-9.04425|Added overwrite }}&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Drawing_functions}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Needs Example]]&lt;/div&gt;</summary>
		<author><name>X86dev</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=DxGetTexturePixels&amp;diff=36475</id>
		<title>DxGetTexturePixels</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=DxGetTexturePixels&amp;diff=36475"/>
		<updated>2013-06-28T10:54:06Z</updated>

		<summary type="html">&lt;p&gt;X86dev: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Client function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function fetches the [[Texture_pixels|pixels]] from a [[texture]] element. It can be used with a standard texture, render target or screen source.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
''Performance note:&lt;br /&gt;
*''This function is slow and not something you want to be doing once a frame.''&lt;br /&gt;
*''It is slower when reading pixels from a render target or screen source.''&lt;br /&gt;
*''And is very slow indeed if the texture format is not ''' 'argb' ''' ''&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
string dxGetTexturePixels ( [ int surfaceIndex = 0, ] element texture [, int x = 0, int y = 0, int width = 0, int height = 0 ] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''texture :''' The texture element to get the pixels from&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
*'''surfaceIndex:''' Desired slice to get if the texture is a volume texture, or desired face to get if the texture is a cube map. &amp;lt;nowiki&amp;gt;(Cube map faces: 0=+X 1=-X 2=+Y 3=-Y 4=+Z 5=-Z)&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
By default the pixels from the whole texture is returned. To get only a portion of the texture, define a rectangular area using all four of these optional arguments:&lt;br /&gt;
*'''x:''' Rectangle left position&lt;br /&gt;
*'''y:''' Rectangle top position&lt;br /&gt;
*'''width:''' Rectangle width&lt;br /&gt;
*'''height :''' Rectangle height&lt;br /&gt;
&lt;br /&gt;
==Returns==&lt;br /&gt;
Returns a ''''plain'''' format pixels string if successful, ''false'' if invalid arguments were passed to the function.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
TODO&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
{{Requirements|n/a|1.3|}}&lt;br /&gt;
&lt;br /&gt;
==Changelog==&lt;br /&gt;
{{ChangelogHeader}}&lt;br /&gt;
{{ChangelogItem|1.3.0-9.04021|Added surfaceIndex argument}}&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Drawing_functions}}&lt;br /&gt;
[[Category:Needs Example]]&lt;/div&gt;</summary>
		<author><name>X86dev</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=DxSetTexturePixels&amp;diff=36474</id>
		<title>DxSetTexturePixels</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=DxSetTexturePixels&amp;diff=36474"/>
		<updated>2013-06-28T10:53:53Z</updated>

		<summary type="html">&lt;p&gt;X86dev: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Client function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function sets the [[Texture_pixels|pixels]] of a [[texture]] element. It can be used with a standard texture, render target or screen source. Only ''''plain'''' format pixels please.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
''Performance note:&lt;br /&gt;
*''This function is slow and not something you want to be doing once a frame.''&lt;br /&gt;
*''It is very slow when setting pixels to a render target or screen source.''&lt;br /&gt;
*''And is very slow indeed if the texture format is not ''' 'argb' ''' ''&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool dxSetTexturePixels ( [ int surfaceIndex = 0, ] element texture, string pixels [, int x = 0, int y = 0, int width = 0, int height = 0 ] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''texture :''' The texture element to set the pixels of&lt;br /&gt;
*'''pixels :''' The ''''plain'''' format pixels to use&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
*'''surfaceIndex:''' Desired slice to set if the texture is a volume texture, or desired face to set if the texture is a cube map. &amp;lt;nowiki&amp;gt;(Cube map faces: 0=+X 1=-X 2=+Y 3=-Y 4=+Z 5=-Z)&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
By default the pixels are set starting at the top left corner of the texture. To set a different region, define a rectangular area using all four of these optional arguments:&lt;br /&gt;
*'''x:''' Rectangle left position&lt;br /&gt;
*'''y:''' Rectangle top position&lt;br /&gt;
*'''width:''' Rectangle width&lt;br /&gt;
*'''height :''' Rectangle height&lt;br /&gt;
&lt;br /&gt;
==Returns==&lt;br /&gt;
Returns a string if successful, ''false'' if invalid arguments were passed to the function.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
TODO&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
{{Requirements|n/a|1.3|}}&lt;br /&gt;
&lt;br /&gt;
==Changelog==&lt;br /&gt;
{{ChangelogHeader}}&lt;br /&gt;
{{ChangelogItem|1.3.0-9.04021|Added surfaceIndex argument}}&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Drawing_functions}}&lt;br /&gt;
[[Category:Needs Example]]&lt;/div&gt;</summary>
		<author><name>X86dev</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=DxGetStatus&amp;diff=36473</id>
		<title>DxGetStatus</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=DxGetStatus&amp;diff=36473"/>
		<updated>2013-06-28T10:18:13Z</updated>

		<summary type="html">&lt;p&gt;X86dev: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Client function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function gets information about various internal datum&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
table dxGetStatus ()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns a table with the following entries:&lt;br /&gt;
* '''TestMode :''' The current dx test mode. See [[dxSetTestMode]].&lt;br /&gt;
*'''VideoCardName :''' The name of the graphics card.&lt;br /&gt;
*'''VideoCardRAM :''' The installed memory in MB of the graphics card.&lt;br /&gt;
*'''VideoCardPSVersion :''' The maximum pixel shader version of the graphics card.&lt;br /&gt;
*'''VideoMemoryFreeForMTA :''' The amount of memory in MB available for MTA to use. '''When this gets to zero, [[guiCreateFont]], [[dxCreateFont]] and [[dxCreateRenderTarget]] will fail.'''&lt;br /&gt;
*'''VideoMemoryUsedByFonts :''' The amount of graphic memory in MB used by custom fonts.&lt;br /&gt;
*'''VideoMemoryUsedByTextures :''' The amount of graphic memory in MB used by textures.&lt;br /&gt;
*'''VideoMemoryUsedByRenderTargets :''' The amount of graphic memory in MB used by render targets.&lt;br /&gt;
*'''SettingWindowed :''' The windowed setting. (true/false)&lt;br /&gt;
*'''SettingFXQuality :''' The FX Quality. (0-3)&lt;br /&gt;
*'''SettingDrawDistance :''' The draw distance setting. (0-100)&lt;br /&gt;
*'''SettingVolumetricShadows :''' The volumetric shadows setting. (true/false)&lt;br /&gt;
*'''SettingStreamingVideoMemoryForGTA :''' The usable graphics memory setting. (64-256)&lt;br /&gt;
*'''AllowScreenUpload :''' The allows screen uploads setting. (true/false)&lt;br /&gt;
{{New feature/item|3.0133|1.3.2|4715|&lt;br /&gt;
*'''DepthBufferFormat:''' The format of the shader readable depth buffer, or 'unknown' if not available&lt;br /&gt;
}}&lt;br /&gt;
{{New feature/item|3.0133|1.3.2|4811|&lt;br /&gt;
*'''VideoCardMaxAnisotropy:''' The maximum anisotropic filtering available. (0-4 which respectively mean: off,2x,4x,8x,16x)&lt;br /&gt;
*'''SettingAnisotropicFiltering:''' The anisotropic filtering setting. (0-4 which respectively mean: off,2x,4x,8x,16x)&lt;br /&gt;
*'''SettingAntiAliasing:''' The anti-aliasing setting. (0-3 which respectively mean: off,1x,2x,3x)&lt;br /&gt;
*'''SettingHeatHaze:''' The heat haze setting. (true/false)&lt;br /&gt;
*'''SettingGrassEffect:''' The grass effect setting. (true/false)&lt;br /&gt;
*'''Setting32BitColor:''' The color depth of the screen. (false is 16bit, true is 32bit)&lt;br /&gt;
}}&lt;br /&gt;
==Example== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addCommandHandler(&amp;quot;getinfo&amp;quot;,function()&lt;br /&gt;
    local info=dxGetStatus()&lt;br /&gt;
    for k,v in pairs(info) do&lt;br /&gt;
        outputChatBox(k..&amp;quot; : &amp;quot;..tostring(v),root,255,0,0,true)&lt;br /&gt;
    end&lt;br /&gt;
end)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Changelog==&lt;br /&gt;
{{ChangelogHeader}}&lt;br /&gt;
{{ChangelogItem|1.3.0-9.04715|Added DepthBufferFormat argument}}&lt;br /&gt;
{{ChangelogItem|1.3.0-9.04811|Added VideoCardMaxAnisotropy, SettingAnisotropicFiltering, SettingAntiAliasing,&amp;lt;br&amp;gt; SettingHeatHaze, SettingGrassEffect and Setting32BitColor arguments}}&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Drawing_functions}}&lt;/div&gt;</summary>
		<author><name>X86dev</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Template:Client_resource_functions&amp;diff=36468</id>
		<title>Template:Client resource functions</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Template:Client_resource_functions&amp;diff=36468"/>
		<updated>2013-06-27T10:50:41Z</updated>

		<summary type="html">&lt;p&gt;X86dev: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;*[[call]]&lt;br /&gt;
{{New feature/item|3.0133|1.3.2|5340|&lt;br /&gt;
*[[fetchRemote]]&lt;br /&gt;
}}&lt;br /&gt;
*[[getResourceConfig]]&lt;br /&gt;
*[[getResourceDynamicElementRoot]]&lt;br /&gt;
*[[getResourceExportedFunctions]]&lt;br /&gt;
*[[getResourceFromName]]&lt;br /&gt;
*[[getResourceGUIElement]]&lt;br /&gt;
*[[getResourceName]]&lt;br /&gt;
*[[getResourceRootElement]]&lt;br /&gt;
*[[getThisResource]]&lt;br /&gt;
&amp;lt;noinclude&amp;gt;[[Category:Functions templates]]&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>X86dev</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=DxSetAspectRatioAdjustmentEnabled&amp;diff=36456</id>
		<title>DxSetAspectRatioAdjustmentEnabled</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=DxSetAspectRatioAdjustmentEnabled&amp;diff=36456"/>
		<updated>2013-06-26T19:26:57Z</updated>

		<summary type="html">&lt;p&gt;X86dev: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Client function}}&lt;br /&gt;
{{Needs Example}}&lt;br /&gt;
&lt;br /&gt;
{{New feature/item|3.0140|1.3.3|5547|&lt;br /&gt;
Todo. This function is default enabled for the ''customblips'' resource and does only works during these events: onClientRender, onClientPreRender and onClientHUDRender&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool dxSetAspectRatioAdjustmentEnabled ( bool bEnabled [, float fSourceRatio = 4/3 ] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''bEnabled''': Should the adjustment be enabled or disabled.&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
{{OptionalArg}}&lt;br /&gt;
* '''fSourceRatio :''' Todo.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' when the it was changed successfully, or ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
{{Requirements|n/a|1.3.3-5547}}&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- Todo&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Drawing_functions}}&lt;/div&gt;</summary>
		<author><name>X86dev</name></author>
	</entry>
</feed>