<?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=DezZolation</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=DezZolation"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/wiki/Special:Contributions/DezZolation"/>
	<updated>2026-05-12T16:20:19Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetVehicleModelDummyPosition&amp;diff=64041</id>
		<title>GetVehicleModelDummyPosition</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetVehicleModelDummyPosition&amp;diff=64041"/>
		<updated>2019-09-02T10:00:28Z</updated>

		<summary type="html">&lt;p&gt;DezZolation: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Client function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
{{New feature/item|3.0155|1.5.6|14406|&lt;br /&gt;
This function gets position of the dummies contained in a vehicle model.&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 getVehicleModelDummyPosition ( int modelID, string dummy )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{OOP||[[Vehicle]].getVehicleModelDummyPosition||setVehicleModelDummyPosition }}&lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
* '''modelID''': The model ID which you want to apply the change to&lt;br /&gt;
* '''dummy''': The dummy whose position you want to get&lt;br /&gt;
&lt;br /&gt;
==Allowed dummies==&lt;br /&gt;
* '''light_front_main:''' Primary front lights position.&lt;br /&gt;
* '''light_rear_main:''' Primary rear lights position.&lt;br /&gt;
* '''light_front_second:''' Secondary front lights position.&lt;br /&gt;
* '''light_rear_second:''' Secondary rear lights position.&lt;br /&gt;
* '''seat_front:''' Front seat position.&lt;br /&gt;
* '''seat_rear:''' Rear seat position.&lt;br /&gt;
* '''exhaust:''' Exhaust fumes start position.&lt;br /&gt;
* '''engine:''' Engine smoke start position.&lt;br /&gt;
* '''gas_cap:''' Vehicle gas cap position (shooting it will explode vehicle)&lt;br /&gt;
* '''trailer_attach:''' Point at which trailers will be attached to vehicle.&lt;br /&gt;
* '''hand_rest:''' Point at which the steer of a bike is held.&lt;br /&gt;
* '''exhaust_second:''' Secondary exhaust position (for example in NRG-500)&lt;br /&gt;
* '''wing_airtrail:''' Point from which air trail will show in airplanes, visible while in sharp turns.&lt;br /&gt;
* '''veh_gun:''' Vehicle gun position (ex. Rustler)&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns the position of given dummy if everything went fine, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
Given example will draw rectangle over every dummy in vehicle player is currently sitting it.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local dummies = {&lt;br /&gt;
	&amp;quot;light_front_main&amp;quot;,&lt;br /&gt;
	&amp;quot;light_rear_main&amp;quot;,&lt;br /&gt;
	&amp;quot;light_front_second&amp;quot;,&lt;br /&gt;
	&amp;quot;light_rear_second&amp;quot;,&lt;br /&gt;
	&amp;quot;seat_front&amp;quot;,&lt;br /&gt;
	&amp;quot;seat_rear&amp;quot;,&lt;br /&gt;
	&amp;quot;exhaust&amp;quot;,&lt;br /&gt;
	&amp;quot;engine&amp;quot;,&lt;br /&gt;
	&amp;quot;gas_cap&amp;quot;,&lt;br /&gt;
	&amp;quot;trailer_attach&amp;quot;,&lt;br /&gt;
	&amp;quot;hand_rest&amp;quot;,&lt;br /&gt;
	&amp;quot;exhaust_second&amp;quot;,&lt;br /&gt;
	&amp;quot;wing_airtrail&amp;quot;,&lt;br /&gt;
	&amp;quot;veh_gun&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
function draw()&lt;br /&gt;
	local veh = getPedOccupiedVehicle( localPlayer )&lt;br /&gt;
	if not veh then return end&lt;br /&gt;
&lt;br /&gt;
	local mat = getElementMatrix(veh)&lt;br /&gt;
	local vx,vy,vz = getMatrixPosition(mat)&lt;br /&gt;
	local fx,fy,fz = getMatrixForward(mat)&lt;br /&gt;
	local lx,ly,lz = getMatrixLeft(mat)&lt;br /&gt;
	local ux,uy,uz = getMatrixUp(mat)&lt;br /&gt;
	local model = getElementModel(veh)&lt;br /&gt;
&lt;br /&gt;
	for i,dum in ipairs(dummies) do&lt;br /&gt;
		local v = {getVehicleModelDummyPosition(model, dum)}&lt;br /&gt;
		if v[1] ~= 0 or v[2] ~= 0 or v[3] ~= 0 then&lt;br /&gt;
			local px,py,pz = vx,vy,vz&lt;br /&gt;
			px = px+fx*v[2]+lx*v[1]+ux*v[3]&lt;br /&gt;
			py = py+fy*v[2]+ly*v[1]+uy*v[3]&lt;br /&gt;
			pz = pz+fz*v[2]+lz*v[1]+uz*v[3]&lt;br /&gt;
&lt;br /&gt;
			local sx,sy = getScreenFromWorldPosition( px,py,pz,0,false )&lt;br /&gt;
			if sx then&lt;br /&gt;
				dxDrawRectangle( sx-10, sy-10, 20, 20, v[4] )&lt;br /&gt;
				dxDrawText(i-1, sx-5,sy-5,20,20,tocolor( 0,0,0 ))&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onClientRender&amp;quot;, root, draw)&lt;br /&gt;
&lt;br /&gt;
-- Utility functions, not related to main functionality&lt;br /&gt;
function getElementMatrix(element)&lt;br /&gt;
    local rx, ry, rz = getElementRotation(element, &amp;quot;ZXY&amp;quot;)&lt;br /&gt;
    rx, ry, rz = math.rad(rx), math.rad(ry), math.rad(rz)&lt;br /&gt;
    local matrix = {}&lt;br /&gt;
    matrix[1] = {}&lt;br /&gt;
    matrix[1][1] = math.cos(rz)*math.cos(ry) - math.sin(rz)*math.sin(rx)*math.sin(ry)&lt;br /&gt;
    matrix[1][2] = math.cos(ry)*math.sin(rz) + math.cos(rz)*math.sin(rx)*math.sin(ry)&lt;br /&gt;
    matrix[1][3] = -math.cos(rx)*math.sin(ry)&lt;br /&gt;
    matrix[1][4] = 1&lt;br /&gt;
&lt;br /&gt;
    matrix[2] = {}&lt;br /&gt;
    matrix[2][1] = -math.cos(rx)*math.sin(rz)&lt;br /&gt;
    matrix[2][2] = math.cos(rz)*math.cos(rx)&lt;br /&gt;
    matrix[2][3] = math.sin(rx)&lt;br /&gt;
    matrix[2][4] = 1&lt;br /&gt;
&lt;br /&gt;
    matrix[3] = {}&lt;br /&gt;
    matrix[3][1] = math.cos(rz)*math.sin(ry) + math.cos(ry)*math.sin(rz)*math.sin(rx)&lt;br /&gt;
    matrix[3][2] = math.sin(rz)*math.sin(ry) - math.cos(rz)*math.cos(ry)*math.sin(rx)&lt;br /&gt;
    matrix[3][3] = math.cos(rx)*math.cos(ry)&lt;br /&gt;
    matrix[3][4] = 1&lt;br /&gt;
&lt;br /&gt;
    matrix[4] = {}&lt;br /&gt;
    matrix[4][1], matrix[4][2], matrix[4][3] = getElementPosition(element)&lt;br /&gt;
    matrix[4][4] = 1&lt;br /&gt;
&lt;br /&gt;
    return matrix&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function getMatrixLeft(m)&lt;br /&gt;
    return m[1][1], m[1][2], m[1][3]&lt;br /&gt;
end&lt;br /&gt;
function getMatrixForward(m)&lt;br /&gt;
    return m[2][1], m[2][2], m[2][3]&lt;br /&gt;
end&lt;br /&gt;
function getMatrixUp(m)&lt;br /&gt;
    return m[3][1], m[3][2], m[3][3]&lt;br /&gt;
end&lt;br /&gt;
function getMatrixPosition(m)&lt;br /&gt;
    return m[4][1], m[4][2], m[4][3]&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Client_vehicle_functions}}&lt;/div&gt;</summary>
		<author><name>DezZolation</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetVehicleModelDummyPosition&amp;diff=64040</id>
		<title>SetVehicleModelDummyPosition</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetVehicleModelDummyPosition&amp;diff=64040"/>
		<updated>2019-09-02T09:58:34Z</updated>

		<summary type="html">&lt;p&gt;DezZolation: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Client function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
{{New feature/item|3.0157|1.5.6|14403|&lt;br /&gt;
This function sets the position of the dummies contained in a vehicle model. Use [[setVehicleComponentPosition]] to adjust the vehicle component positions.&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 setVehicleModelDummyPosition ( int modelID, string dummy, float x, float y, float z )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{OOP||[[Vehicle]].setVehicleModelDummyPosition||getVehicleModelDummyPosition }}&lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
* '''modelID''': The model ID which you want to apply the change to&lt;br /&gt;
* '''dummy''': The dummy whose position you want to change&lt;br /&gt;
* '''posX''', '''posY''', '''posZ''': The desired position&lt;br /&gt;
&lt;br /&gt;
==Allowed dummies==&lt;br /&gt;
* '''light_front_main:''' Primary front lights position.&lt;br /&gt;
* '''light_rear_main:''' Primary rear lights position.&lt;br /&gt;
* '''light_front_second:''' Secondary front lights position.&lt;br /&gt;
* '''light_rear_second:''' Secondary rear lights position.&lt;br /&gt;
* '''seat_front:''' Front seat position.&lt;br /&gt;
* '''seat_rear:''' Rear seat position.&lt;br /&gt;
* '''exhaust:''' Exhaust fumes start position.&lt;br /&gt;
* '''engine:''' Engine smoke start position.&lt;br /&gt;
* '''gas_cap:''' Vehicle gas cap position (shooting it will explode vehicle)&lt;br /&gt;
* '''trailer_attach:''' Point at which trailers will be attached to vehicle.&lt;br /&gt;
* '''hand_rest:''' Point at which the steer of a bike is held.&lt;br /&gt;
* '''exhaust_second:''' Secondary exhaust position (for example in NRG-500)&lt;br /&gt;
* '''wing_airtrail:''' Point from which air trail will show in airplanes, visible while in sharp turns.&lt;br /&gt;
* '''veh_gun:''' Vehicle gun position (ex. Rustler)&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if everything went fine, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
Given example will move all the dummies in vehicle that player is sitting in up and down, after he uses /move command.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local dummies = {&lt;br /&gt;
	&amp;quot;light_front_main&amp;quot;,&lt;br /&gt;
	&amp;quot;light_rear_main&amp;quot;,&lt;br /&gt;
	&amp;quot;light_front_second&amp;quot;,&lt;br /&gt;
	&amp;quot;light_rear_second&amp;quot;,&lt;br /&gt;
	&amp;quot;seat_front&amp;quot;,&lt;br /&gt;
	&amp;quot;seat_rear&amp;quot;,&lt;br /&gt;
	&amp;quot;exhaust&amp;quot;,&lt;br /&gt;
	&amp;quot;engine&amp;quot;,&lt;br /&gt;
	&amp;quot;gas_cap&amp;quot;,&lt;br /&gt;
	&amp;quot;trailer_attach&amp;quot;,&lt;br /&gt;
	&amp;quot;hand_rest&amp;quot;,&lt;br /&gt;
	&amp;quot;exhaust_second&amp;quot;,&lt;br /&gt;
	&amp;quot;wing_airtrail&amp;quot;,&lt;br /&gt;
	&amp;quot;veh_gun&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
local cache = {}&lt;br /&gt;
&lt;br /&gt;
function move()&lt;br /&gt;
	local veh = getPedOccupiedVehicle( localPlayer )&lt;br /&gt;
	if not veh then return end&lt;br /&gt;
&lt;br /&gt;
	local model = getElementModel(veh)&lt;br /&gt;
&lt;br /&gt;
	for i,dum in ipairs(dummies) do&lt;br /&gt;
		setVehicleModelDummyPosition(model, dum, cache[dum][1], cache[dum][2], cache[dum][3] + math.sin(getTickCount()/1500))&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
addCommandHandler( &amp;quot;move&amp;quot;, function()&lt;br /&gt;
	local veh = getPedOccupiedVehicle( localPlayer )&lt;br /&gt;
	if not veh then return end&lt;br /&gt;
	local model = getElementModel(veh)&lt;br /&gt;
&lt;br /&gt;
	for i,dum in ipairs(dummies) do&lt;br /&gt;
		local v = {getVehicleModelDummyPosition(model, dum)}&lt;br /&gt;
		cache[dum] = v&lt;br /&gt;
	end&lt;br /&gt;
	addEventHandler(&amp;quot;onClientRender&amp;quot;, root, move)&lt;br /&gt;
end)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Client_vehicle_functions}}&lt;/div&gt;</summary>
		<author><name>DezZolation</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetVehicleModelDummyPosition&amp;diff=64039</id>
		<title>SetVehicleModelDummyPosition</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetVehicleModelDummyPosition&amp;diff=64039"/>
		<updated>2019-09-02T09:46:16Z</updated>

		<summary type="html">&lt;p&gt;DezZolation: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Client function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
{{New feature/item|3.0157|1.5.6|14403|&lt;br /&gt;
This function sets the position of the dummies contained in a vehicle model. Use [[setVehicleComponentPosition]] to adjust the vehicle component positions.&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 setVehicleModelDummyPosition ( int modelID, string dummy, float x, float y, float z )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{OOP||[[Vehicle]].setVehicleModelDummyPosition||getVehicleModelDummyPosition }}&lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
* '''modelID''': The model ID which you want to apply the change to&lt;br /&gt;
* '''dummy''': The dummy whose position you want to change&lt;br /&gt;
* '''posX''', '''posY''', '''posZ''': The desired position&lt;br /&gt;
&lt;br /&gt;
==Allowed dummies==&lt;br /&gt;
* '''light_front_main:''' Primary front lights position.&lt;br /&gt;
* '''light_rear_main:''' Primary rear lights position.&lt;br /&gt;
* '''light_front_second:''' Secondary front lights position.&lt;br /&gt;
* '''light_rear_second:''' Secondary rear lights position.&lt;br /&gt;
* '''seat_front:''' Front seat position.&lt;br /&gt;
* '''seat_rear:''' Rear seat position.&lt;br /&gt;
* '''exhaust:''' Exhaust fumes start position.&lt;br /&gt;
* '''engine:''' Engine smoke start position.&lt;br /&gt;
* '''gas_cap:''' Vehicle gas cap position (shooting it will explode vehicle)&lt;br /&gt;
* '''trailer_attach:''' Point at which trailers will be attached to vehicle.&lt;br /&gt;
* '''hand_rest:''' (?)Hand rest position.&lt;br /&gt;
* '''exhaust_second:''' Secondary exhaust position (for example in NRG-500)&lt;br /&gt;
* '''wing_airtrail:''' Point from which air trail will show in airplanes, visible while in sharp turns.&lt;br /&gt;
* '''veh_gun:''' Vehicle gun position (ex. Rustler)&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if everything went fine, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
Given example will move all the dummies in vehicle that player is sitting in up and down, after he uses /move command.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local dummies = {&lt;br /&gt;
	&amp;quot;light_front_main&amp;quot;,&lt;br /&gt;
	&amp;quot;light_rear_main&amp;quot;,&lt;br /&gt;
	&amp;quot;light_front_second&amp;quot;,&lt;br /&gt;
	&amp;quot;light_rear_second&amp;quot;,&lt;br /&gt;
	&amp;quot;seat_front&amp;quot;,&lt;br /&gt;
	&amp;quot;seat_rear&amp;quot;,&lt;br /&gt;
	&amp;quot;exhaust&amp;quot;,&lt;br /&gt;
	&amp;quot;engine&amp;quot;,&lt;br /&gt;
	&amp;quot;gas_cap&amp;quot;,&lt;br /&gt;
	&amp;quot;trailer_attach&amp;quot;,&lt;br /&gt;
	&amp;quot;hand_rest&amp;quot;,&lt;br /&gt;
	&amp;quot;exhaust_second&amp;quot;,&lt;br /&gt;
	&amp;quot;wing_airtrail&amp;quot;,&lt;br /&gt;
	&amp;quot;veh_gun&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
local cache = {}&lt;br /&gt;
&lt;br /&gt;
function move()&lt;br /&gt;
	local veh = getPedOccupiedVehicle( localPlayer )&lt;br /&gt;
	if not veh then return end&lt;br /&gt;
&lt;br /&gt;
	local model = getElementModel(veh)&lt;br /&gt;
&lt;br /&gt;
	for i,dum in ipairs(dummies) do&lt;br /&gt;
		setVehicleModelDummyPosition(model, dum, cache[dum][1], cache[dum][2], cache[dum][3] + math.sin(getTickCount()/1500))&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
addCommandHandler( &amp;quot;move&amp;quot;, function()&lt;br /&gt;
	local veh = getPedOccupiedVehicle( localPlayer )&lt;br /&gt;
	if not veh then return end&lt;br /&gt;
	local model = getElementModel(veh)&lt;br /&gt;
&lt;br /&gt;
	for i,dum in ipairs(dummies) do&lt;br /&gt;
		local v = {getVehicleModelDummyPosition(model, dum)}&lt;br /&gt;
		cache[dum] = v&lt;br /&gt;
	end&lt;br /&gt;
	addEventHandler(&amp;quot;onClientRender&amp;quot;, root, move)&lt;br /&gt;
end)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Client_vehicle_functions}}&lt;/div&gt;</summary>
		<author><name>DezZolation</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetVehicleModelDummyPosition&amp;diff=64038</id>
		<title>GetVehicleModelDummyPosition</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetVehicleModelDummyPosition&amp;diff=64038"/>
		<updated>2019-09-02T09:45:46Z</updated>

		<summary type="html">&lt;p&gt;DezZolation: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Client function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
{{New feature/item|3.0155|1.5.6|14406|&lt;br /&gt;
This function gets position of the dummies contained in a vehicle model.&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 getVehicleModelDummyPosition ( int modelID, string dummy )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{OOP||[[Vehicle]].getVehicleModelDummyPosition||setVehicleModelDummyPosition }}&lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
* '''modelID''': The model ID which you want to apply the change to&lt;br /&gt;
* '''dummy''': The dummy whose position you want to get&lt;br /&gt;
&lt;br /&gt;
==Allowed dummies==&lt;br /&gt;
* '''light_front_main:''' Primary front lights position.&lt;br /&gt;
* '''light_rear_main:''' Primary rear lights position.&lt;br /&gt;
* '''light_front_second:''' Secondary front lights position.&lt;br /&gt;
* '''light_rear_second:''' Secondary rear lights position.&lt;br /&gt;
* '''seat_front:''' Front seat position.&lt;br /&gt;
* '''seat_rear:''' Rear seat position.&lt;br /&gt;
* '''exhaust:''' Exhaust fumes start position.&lt;br /&gt;
* '''engine:''' Engine smoke start position.&lt;br /&gt;
* '''gas_cap:''' Vehicle gas cap position (shooting it will explode vehicle)&lt;br /&gt;
* '''trailer_attach:''' Point at which trailers will be attached to vehicle.&lt;br /&gt;
* '''hand_rest:''' (?)Hand rest position.&lt;br /&gt;
* '''exhaust_second:''' Secondary exhaust position (for example in NRG-500)&lt;br /&gt;
* '''wing_airtrail:''' Point from which air trail will show in airplanes, visible while in sharp turns.&lt;br /&gt;
* '''veh_gun:''' Vehicle gun position (ex. Rustler)&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns the position of given dummy if everything went fine, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
Given example will draw rectangle over every dummy in vehicle player is currently sitting it.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local dummies = {&lt;br /&gt;
	&amp;quot;light_front_main&amp;quot;,&lt;br /&gt;
	&amp;quot;light_rear_main&amp;quot;,&lt;br /&gt;
	&amp;quot;light_front_second&amp;quot;,&lt;br /&gt;
	&amp;quot;light_rear_second&amp;quot;,&lt;br /&gt;
	&amp;quot;seat_front&amp;quot;,&lt;br /&gt;
	&amp;quot;seat_rear&amp;quot;,&lt;br /&gt;
	&amp;quot;exhaust&amp;quot;,&lt;br /&gt;
	&amp;quot;engine&amp;quot;,&lt;br /&gt;
	&amp;quot;gas_cap&amp;quot;,&lt;br /&gt;
	&amp;quot;trailer_attach&amp;quot;,&lt;br /&gt;
	&amp;quot;hand_rest&amp;quot;,&lt;br /&gt;
	&amp;quot;exhaust_second&amp;quot;,&lt;br /&gt;
	&amp;quot;wing_airtrail&amp;quot;,&lt;br /&gt;
	&amp;quot;veh_gun&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
function draw()&lt;br /&gt;
	local veh = getPedOccupiedVehicle( localPlayer )&lt;br /&gt;
	if not veh then return end&lt;br /&gt;
&lt;br /&gt;
	local mat = getElementMatrix(veh)&lt;br /&gt;
	local vx,vy,vz = getMatrixPosition(mat)&lt;br /&gt;
	local fx,fy,fz = getMatrixForward(mat)&lt;br /&gt;
	local lx,ly,lz = getMatrixLeft(mat)&lt;br /&gt;
	local ux,uy,uz = getMatrixUp(mat)&lt;br /&gt;
	local model = getElementModel(veh)&lt;br /&gt;
&lt;br /&gt;
	for i,dum in ipairs(dummies) do&lt;br /&gt;
		local v = {getVehicleModelDummyPosition(model, dum)}&lt;br /&gt;
		if v[1] ~= 0 or v[2] ~= 0 or v[3] ~= 0 then&lt;br /&gt;
			local px,py,pz = vx,vy,vz&lt;br /&gt;
			px = px+fx*v[2]+lx*v[1]+ux*v[3]&lt;br /&gt;
			py = py+fy*v[2]+ly*v[1]+uy*v[3]&lt;br /&gt;
			pz = pz+fz*v[2]+lz*v[1]+uz*v[3]&lt;br /&gt;
&lt;br /&gt;
			local sx,sy = getScreenFromWorldPosition( px,py,pz,0,false )&lt;br /&gt;
			if sx then&lt;br /&gt;
				dxDrawRectangle( sx-10, sy-10, 20, 20, v[4] )&lt;br /&gt;
				dxDrawText(i-1, sx-5,sy-5,20,20,tocolor( 0,0,0 ))&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onClientRender&amp;quot;, root, draw)&lt;br /&gt;
&lt;br /&gt;
-- Utility functions, not related to main functionality&lt;br /&gt;
function getElementMatrix(element)&lt;br /&gt;
    local rx, ry, rz = getElementRotation(element, &amp;quot;ZXY&amp;quot;)&lt;br /&gt;
    rx, ry, rz = math.rad(rx), math.rad(ry), math.rad(rz)&lt;br /&gt;
    local matrix = {}&lt;br /&gt;
    matrix[1] = {}&lt;br /&gt;
    matrix[1][1] = math.cos(rz)*math.cos(ry) - math.sin(rz)*math.sin(rx)*math.sin(ry)&lt;br /&gt;
    matrix[1][2] = math.cos(ry)*math.sin(rz) + math.cos(rz)*math.sin(rx)*math.sin(ry)&lt;br /&gt;
    matrix[1][3] = -math.cos(rx)*math.sin(ry)&lt;br /&gt;
    matrix[1][4] = 1&lt;br /&gt;
&lt;br /&gt;
    matrix[2] = {}&lt;br /&gt;
    matrix[2][1] = -math.cos(rx)*math.sin(rz)&lt;br /&gt;
    matrix[2][2] = math.cos(rz)*math.cos(rx)&lt;br /&gt;
    matrix[2][3] = math.sin(rx)&lt;br /&gt;
    matrix[2][4] = 1&lt;br /&gt;
&lt;br /&gt;
    matrix[3] = {}&lt;br /&gt;
    matrix[3][1] = math.cos(rz)*math.sin(ry) + math.cos(ry)*math.sin(rz)*math.sin(rx)&lt;br /&gt;
    matrix[3][2] = math.sin(rz)*math.sin(ry) - math.cos(rz)*math.cos(ry)*math.sin(rx)&lt;br /&gt;
    matrix[3][3] = math.cos(rx)*math.cos(ry)&lt;br /&gt;
    matrix[3][4] = 1&lt;br /&gt;
&lt;br /&gt;
    matrix[4] = {}&lt;br /&gt;
    matrix[4][1], matrix[4][2], matrix[4][3] = getElementPosition(element)&lt;br /&gt;
    matrix[4][4] = 1&lt;br /&gt;
&lt;br /&gt;
    return matrix&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function getMatrixLeft(m)&lt;br /&gt;
    return m[1][1], m[1][2], m[1][3]&lt;br /&gt;
end&lt;br /&gt;
function getMatrixForward(m)&lt;br /&gt;
    return m[2][1], m[2][2], m[2][3]&lt;br /&gt;
end&lt;br /&gt;
function getMatrixUp(m)&lt;br /&gt;
    return m[3][1], m[3][2], m[3][3]&lt;br /&gt;
end&lt;br /&gt;
function getMatrixPosition(m)&lt;br /&gt;
    return m[4][1], m[4][2], m[4][3]&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Client_vehicle_functions}}&lt;/div&gt;</summary>
		<author><name>DezZolation</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=OnClientWeaponFire&amp;diff=62456</id>
		<title>OnClientWeaponFire</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=OnClientWeaponFire&amp;diff=62456"/>
		<updated>2019-04-12T17:30:20Z</updated>

		<summary type="html">&lt;p&gt;DezZolation: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Client event}}&lt;br /&gt;
__NOTOC__ &lt;br /&gt;
This event triggers when a [[Element/Weapon|custom weapon]] fires a shot.&lt;br /&gt;
{{Note|This event is '''ONLY''' for custom weapons that were created with [[createWeapon]], for regular weapons use [[onClientPlayerWeaponFire]].}}&lt;br /&gt;
{{Note|This event is only triggered for custom weapons that are streamed in}}&lt;br /&gt;
==Parameters== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
element hitElement, float posX,  float posY, float posZ, float normalX, float normalY, float normalZ, int materialType, float lighting, int pieceHit&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
*'''hitElement:''' the element that was hit&lt;br /&gt;
*'''posX:''' the position it will hit&lt;br /&gt;
*'''posY:''' the position it will hit&lt;br /&gt;
*'''posZ:''' the position it will hit&lt;br /&gt;
*'''normalX:''' the normal it hit ( see processLineOfSight )&lt;br /&gt;
*'''normalY:''' the normal it hit ( see processLineOfSight )&lt;br /&gt;
*'''normalZ:''' the normal it hit ( see processLineOfSight )&lt;br /&gt;
*'''materialType:''' the material type it hit ( see processLineOfSight )&lt;br /&gt;
*'''lighting:''' the lighting of the entity it hit ( see processLineOfSight )&lt;br /&gt;
*'''pieceHit:''' the piece of the entity it hit ( see processLineOfSight )&lt;br /&gt;
&lt;br /&gt;
==Source==&lt;br /&gt;
The [[event system#Event source|source]] of this event is the weapon that was fired.&lt;br /&gt;
&lt;br /&gt;
==Cancel Effect==&lt;br /&gt;
If this event was [[Event system#Canceling|canceled]], then the weapon will not fire.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
This example prevents player damage from custom weapons.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function noDamageToPlayersFromCustomWeapons(target)&lt;br /&gt;
    if target == localPlayer then&lt;br /&gt;
        cancelEvent() -- If the weapon hit the player, cancel the shot&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onClientWeaponFire&amp;quot;, root, noDamageToPlayersFromCustomWeapons)&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
===Client event functions===&lt;br /&gt;
{{Client_event_functions}}&lt;br /&gt;
&lt;br /&gt;
[[hu:onClientWeaponFire]]&lt;/div&gt;</summary>
		<author><name>DezZolation</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GuiGridListGetColumnWidth&amp;diff=62455</id>
		<title>GuiGridListGetColumnWidth</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GuiGridListGetColumnWidth&amp;diff=62455"/>
		<updated>2019-04-10T20:06:29Z</updated>

		<summary type="html">&lt;p&gt;DezZolation: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Client function}}&lt;br /&gt;
__NOTOC__ &lt;br /&gt;
This allows you to get the width of an existing column in a gridlist.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
float guiGridListGetColumnWidth ( element gridList, int columnIndex, bool relative )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{OOP||[[Element/GUI/Gridlist|GuiGridList]]:getColumnWidth}}&lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''gridList:''' The grid list you want to add a column to&lt;br /&gt;
*'''columnIndex:''' Column ID of the Get size&lt;br /&gt;
*'''relative:''' A boolean defining whether '''width''' measurements will be relative to the Gridlist size, or absolute pixels.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns the width of the gridlist column, ''false'' if bad arguments were given.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;grid = guiCreateGridList(313, 354, 162, 100, false)&lt;br /&gt;
c = guiGridListAddColumn(grid, &amp;quot;test&amp;quot;,0.5)&lt;br /&gt;
&lt;br /&gt;
addCommandHandler(&amp;quot;With&amp;quot;,function()&lt;br /&gt;
With = guiGridListGetColumnWidth(grid ,c, true)&lt;br /&gt;
outputChatBox(&amp;quot;Column Width = &amp;quot;..With)&lt;br /&gt;
end&lt;br /&gt;
)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{GUI functions}}&lt;br /&gt;
{{GUI_events}}&lt;/div&gt;</summary>
		<author><name>DezZolation</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=PlaySound3D&amp;diff=62446</id>
		<title>PlaySound3D</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=PlaySound3D&amp;diff=62446"/>
		<updated>2019-04-05T08:39:56Z</updated>

		<summary type="html">&lt;p&gt;DezZolation: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Client function}}&lt;br /&gt;
Creates a [[sound]] [[element]] in the GTA world and plays it immediately after creation for the local player. [[setElementPosition]] can be used to move the [[sound]] element around after it has been created. Remember to use [[setElementDimension]] after creating the sound to play it outside of dimension 0.&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
{{Note|&lt;br /&gt;
*The only supported audio formats are MP3, WAV, OGG, RIFF, MOD, XM, IT and S3M.&lt;br /&gt;
*For performance reasons, when using playSound3D for effects that will be played lots (i.e. weapon fire), it is recommend that you convert your audio file to a one channel (mono) WAV with sample rate of 22050 Hz or less. Also consider adding a limit on how often the effect can be played e.g. once every 50ms.}}&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;element playSound3D ( string soundURL, float x, float y, float z, [ bool looped = false, bool throttled = true ] )&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
{{OOP||[[Sound|Sound3D]]}}&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''soundPath:''' the [[filepath]] to the sound file you want to play. (Sound file has to be predefined in the [[meta.xml]] file with &amp;lt;file /&amp;gt; tag. And also can use url instead of [[filepath]] )&lt;br /&gt;
*'''soundURL:''' the URL. (In this version the file does not has to be predefined in the [[meta.xml]] )&lt;br /&gt;
*'''x:''' a [[float]]ing point number representing the X coordinate on the map.&lt;br /&gt;
*'''y:''' a [[float]]ing point number representing the Y coordinate on the map.&lt;br /&gt;
*'''z:''' a [[float]]ing point number representing the Z coordinate on the map.&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments=== &lt;br /&gt;
{{OptionalArg}} &lt;br /&gt;
*'''looped:''' a [[boolean]] representing whether the sound will be looped. To loop the sound, use ''true''.&lt;br /&gt;
{{New feature/item|3.0150|1.5||&lt;br /&gt;
*'''throttled:''' a [[boolean]] representing whether the sound will be throttled (i.e. given reduced download bandwidth). To throttle the sound, use ''true''.&lt;br /&gt;
}}&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;
This example creates a looping sound within a pizza shop. The pizza shop is in san fierro near pier 69&lt;br /&gt;
&amp;lt;section name=&amp;quot;Example&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;
function onResourceStart()&lt;br /&gt;
	local sound = playSound3D(&amp;quot;sounds/song.mp3&amp;quot;, 373.14, -125.21, 1001, true) &lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onClientResourceStart&amp;quot;, resourceRoot, onResourceStart)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
This example play internet radio in groove street.&lt;br /&gt;
&amp;lt;section name=&amp;quot;Example 2&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;
addEventHandler( 'onClientResourceStart', resourceRoot,&lt;br /&gt;
	function( )&lt;br /&gt;
		local uSound = playSound3D( 'http://193.34.51.25:80', 2498, -1659, 12 ) &lt;br /&gt;
		setSoundMaxDistance( uSound, 100 )&lt;br /&gt;
	end&lt;br /&gt;
)&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_audio_functions}}&lt;br /&gt;
[[HU:playSound3D]]&lt;br /&gt;
[[AR:playSound3D]]&lt;br /&gt;
[[DE:playSound3D]]&lt;br /&gt;
[[RU:playSound3D]]&lt;/div&gt;</summary>
		<author><name>DezZolation</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Vehicle_variants&amp;diff=62444</id>
		<title>Vehicle variants</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Vehicle_variants&amp;diff=62444"/>
		<updated>2019-04-03T22:20:56Z</updated>

		<summary type="html">&lt;p&gt;DezZolation: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Custom Variants ==&lt;br /&gt;
With the introduction of vehicle variants we now have the ability to add custom variants using custom models. Variants can be anything from different adverts to additional parts of the model..&lt;br /&gt;
[[Image:Infernus.png|200px|thumb|left|Custom Infernus Variant]]&lt;br /&gt;
&lt;br /&gt;
==How to Add Variants==&lt;br /&gt;
Adding variants requires modifying your DFF by adding a part of the model you wish to be a variant and naming it extra1, extra2, extra3, extra4 or extra5 then setting it's parent to the chassis_dummy this tells GTA it has variant information and after this your variant will work in MTA.&lt;br /&gt;
&lt;br /&gt;
==Spawning Custom Variants==&lt;br /&gt;
Spawning custom variants is more complicated as we do not know the variants are there so the random variant spawner (TM) will not spawn the added variant.&lt;br /&gt;
&lt;br /&gt;
A way around this is to implicitly specify which variant you require in createVehicle this will bypass our random variant spawner (TM) and allow you to spawn it.&lt;br /&gt;
&lt;br /&gt;
Any invalid variant will show up as the default model with no variation.&lt;br /&gt;
 &lt;br /&gt;
==GTA Variants==&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;width: auto; table-layout: fixed;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Vehicle Name&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Vehicle ID&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; class=&amp;quot;unsortable&amp;quot; | Variants&lt;br /&gt;
|-&lt;br /&gt;
| Ambulance&lt;br /&gt;
| 416&lt;br /&gt;
| Numbers: 0 = 37, 1 = 71&lt;br /&gt;
|-&lt;br /&gt;
| Trailer 1&lt;br /&gt;
| 435&lt;br /&gt;
| Side Ads: 0 = Cok-o-Pops, 1 = Munky Juice, 2 = Hinterland, 3 = Zip, 4 = RS Haul, 5 = Ranch&lt;br /&gt;
|-&lt;br /&gt;
| Trailer 2&lt;br /&gt;
| 450&lt;br /&gt;
| Contents: 0 = Filled with gravel/coal/stone&lt;br /&gt;
|-&lt;br /&gt;
| Bagboxb&lt;br /&gt;
| 607&lt;br /&gt;
| Contents: 0,1,2 = Various distributions of loose baggage&lt;br /&gt;
|-&lt;br /&gt;
| Baggage&lt;br /&gt;
| 485&lt;br /&gt;
| Rear Cargo Items: 0 = Earmuffs, 1 = Small Case, 2 = Large Case&lt;br /&gt;
|-&lt;br /&gt;
| Barracks&lt;br /&gt;
| 433&lt;br /&gt;
| Bed Covering: 0 = Opaque Fabric, 1 = Camo Netting&lt;br /&gt;
|-&lt;br /&gt;
| Benson&lt;br /&gt;
| 499&lt;br /&gt;
| Side Ads: 0 = Shady Industries, 1 = LSD, 2 = The Uphill Gardener, 3 = Discount Furniture&lt;br /&gt;
|-&lt;br /&gt;
| BF-400&lt;br /&gt;
| 581&lt;br /&gt;
| Exhausts: 0 = Single Type1, 1 = Single Type2, 2 = Dual Type3 - Fairings (with Windshields): 3 = Half-size, 4 = Full-size&lt;br /&gt;
|-&lt;br /&gt;
| BF Injection&lt;br /&gt;
| 424&lt;br /&gt;
| Body: 0 = Side Panels&lt;br /&gt;
|-&lt;br /&gt;
| Bloodring Banger&lt;br /&gt;
| 504&lt;br /&gt;
| Numbers/Roof Color: 0 = 328/White, 1 = 464/Check, 2 = 172/Check, 3 = 100/White, 4 = 284/White, 5 = 505/Check&lt;br /&gt;
|-&lt;br /&gt;
| Bobcat&lt;br /&gt;
| 422&lt;br /&gt;
| Bed Items: 0 = Spare Tire, 1 = Sprunk Cans&lt;br /&gt;
|-&lt;br /&gt;
| Burrito&lt;br /&gt;
| 482&lt;br /&gt;
| Roof Items: 0 = Roof Lights + Spoiler&lt;br /&gt;
|-&lt;br /&gt;
| Caddy&lt;br /&gt;
| 457&lt;br /&gt;
| Rear Cargo (Driver Side): 0 = Golfbag1, 1 = Satchel1, 2 = Golfbag2, Rear Cargo (Pass Side): 3 = Satchel2, 4 = Golfbag3, 5 = Golfbag4&lt;br /&gt;
|-&lt;br /&gt;
| Camper&lt;br /&gt;
| 483&lt;br /&gt;
| 0 = Open Curtains &amp;amp; Second Bench Seat, 1 = Open Roof Vent, Closed Curtains, Bed in Back, Peace Sign&lt;br /&gt;
|-&lt;br /&gt;
| Cheetah&lt;br /&gt;
| 415&lt;br /&gt;
| Side Mirrors: 0 = Single, Placed High, 1 = Dual, Placed Normally&lt;br /&gt;
|-&lt;br /&gt;
| Coach&lt;br /&gt;
| 437&lt;br /&gt;
| Name on Side: 0 = Big O Tours, 1 = Bikini Line&lt;br /&gt;
|-&lt;br /&gt;
| Coastguard&lt;br /&gt;
| 472&lt;br /&gt;
| Various Items 0 = Items all Over, 1 = Items Grouped in Back, 2 = Items all Over + 2 Oars in Front&lt;br /&gt;
|-&lt;br /&gt;
| FCR-900&lt;br /&gt;
| 521&lt;br /&gt;
| Exhausts: 0 = Single Type1, 1 = Dual Type1, 2 = Dual Type2, Fairings (with Windshields): 3 = Half-size, 4 = Full-size&lt;br /&gt;
|-&lt;br /&gt;
| Fire Truck&lt;br /&gt;
| 407&lt;br /&gt;
| Numbers: 0 = 64, 1 = 16, 2 = 47&lt;br /&gt;
|-&lt;br /&gt;
| Flatbed&lt;br /&gt;
| 455&lt;br /&gt;
| Numbers: 0 = 64, 1 = 16, 2 = 47&lt;br /&gt;
|-&lt;br /&gt;
| Hotknife&lt;br /&gt;
| 434&lt;br /&gt;
| 0 = Partial Engine Cover&lt;br /&gt;
|-&lt;br /&gt;
| Hotring Racer 2&lt;br /&gt;
| 502&lt;br /&gt;
| Numbers: 0 = 82, 1 = 26, 2 = 65, 3 = 07, 4 = 36, 5 = 60&lt;br /&gt;
|-&lt;br /&gt;
| Hotring Racer 3&lt;br /&gt;
| 503&lt;br /&gt;
| Numbers: 0 = 96, 1 = 67, 2 = 73, 3 = 52, 4 = 45, 5 = 14&lt;br /&gt;
|-&lt;br /&gt;
| Kart&lt;br /&gt;
| 571&lt;br /&gt;
| Body Panels: 0 = Both Sides, 1 = Steering Column&lt;br /&gt;
|-&lt;br /&gt;
| Launch&lt;br /&gt;
| 595&lt;br /&gt;
| Roofs: 0 = Over passenger section, 1 = Over driver section&lt;br /&gt;
|-&lt;br /&gt;
| Marquis&lt;br /&gt;
| 484&lt;br /&gt;
| 0 = Windshield over Cabin Entrance&lt;br /&gt;
|-&lt;br /&gt;
| Mesa&lt;br /&gt;
| 500&lt;br /&gt;
| 0 = Roof Over Back, 1 = Roll Bar in Back&lt;br /&gt;
|-&lt;br /&gt;
| Monster 2&lt;br /&gt;
| 556&lt;br /&gt;
| 0 = Roof Spoiler, 1 = Roof Lights, 2 = Roll Bar with Lights&lt;br /&gt;
|-&lt;br /&gt;
| Monster 3&lt;br /&gt;
| 557&lt;br /&gt;
| 0 = Couldn't Determine 1 = Roof Lights&lt;br /&gt;
|-&lt;br /&gt;
| Mr. Whoopee&lt;br /&gt;
| 423&lt;br /&gt;
| Rear Sign: 0 = Cherry Popping Good, 1 = Slow Children Ahead&lt;br /&gt;
|-&lt;br /&gt;
| Mule&lt;br /&gt;
| 414&lt;br /&gt;
| Side Ads: 0 = Toy Corner, 1 = Binco, 2 = Semi, 3 = Shafted Appliances&lt;br /&gt;
|-&lt;br /&gt;
| NRG-500&lt;br /&gt;
| 522&lt;br /&gt;
| Exhausts: 0 = Single Pair1, 1 = Single Pair2, 2 = Dual Pair2 - Fairings (with Windshields): 3 = Smooth, 4 = With Side Cutouts&lt;br /&gt;
|-&lt;br /&gt;
| Patriot&lt;br /&gt;
| 470&lt;br /&gt;
| Cargo Area 0 = Low Cover, 1 = Roof/High Cover, 2 = Roll Bar&lt;br /&gt;
|-&lt;br /&gt;
| Perennial&lt;br /&gt;
| 404&lt;br /&gt;
| Cargo Area 0 = Low Cover, 1 = Roof/High Cover, 2 = Roll Bar&lt;br /&gt;
|-&lt;br /&gt;
| Picador&lt;br /&gt;
| 600&lt;br /&gt;
| Items in Bed: 0 = Planks, 1 = Sprunk Cans&lt;br /&gt;
|-&lt;br /&gt;
| Pony&lt;br /&gt;
| 413&lt;br /&gt;
| 0 = Sound System in Back&lt;br /&gt;
|-&lt;br /&gt;
| Reefer&lt;br /&gt;
| 453&lt;br /&gt;
| Items in Back: 0 = Boxes of Fish, 1 = Bench&lt;br /&gt;
|-&lt;br /&gt;
| Romero&lt;br /&gt;
| 442&lt;br /&gt;
| Coffins: 0 = Brown Style1, 1 = Black Style2, 2 = Brown Style3&lt;br /&gt;
|-&lt;br /&gt;
| Rumpo&lt;br /&gt;
| 440&lt;br /&gt;
| Side Ads: 0 = Cok-o-Pops, 1 = Harry Plums, 2 = Dick Goblin's, 3 = Final Build, 4 = Transfender, 5 = Wheel Arch Angels&lt;br /&gt;
|-&lt;br /&gt;
| Sadler&lt;br /&gt;
| 543&lt;br /&gt;
| Items in Bed: 0 = Two Propane Tanks &amp;amp; Crate, 1 = Two Barrels, 2 = Sprunk Cans, 3 = Open Crates, 4+ = Empty bed&lt;br /&gt;
|-&lt;br /&gt;
| Damaged Sadler&lt;br /&gt;
| 605&lt;br /&gt;
| Items in Bed: 0 = Two Propane Tanks &amp;amp; Crate, 1 = Two Barrels, 2 = Sprunk Cans, 3 = Open Crates, 4+ = Empty bed&lt;br /&gt;
|-&lt;br /&gt;
| Securicar&lt;br /&gt;
| 428&lt;br /&gt;
| Side Logo: 0 = Chuff, 1 = Lock&amp;amp;Load&lt;br /&gt;
|-&lt;br /&gt;
| Slamvan&lt;br /&gt;
| 535&lt;br /&gt;
| Steering Wheel: 0 = Normal, 1 = Chain (Default has none!)&lt;br /&gt;
|-&lt;br /&gt;
| Stallion&lt;br /&gt;
| 439&lt;br /&gt;
| Roof: 0 = Hardtop, 1 = Softtop (up), 2 = Softtop (folded)&lt;br /&gt;
|-&lt;br /&gt;
| Super GT&lt;br /&gt;
| 506&lt;br /&gt;
| 0 = Full Roof&lt;br /&gt;
|-&lt;br /&gt;
| S.W.A.T.&lt;br /&gt;
| 601&lt;br /&gt;
| Number: 0 = 1, 1 = 9, 2 = 6, 3 = 7&lt;br /&gt;
|-&lt;br /&gt;
| Berkley's RC Van&lt;br /&gt;
| 459&lt;br /&gt;
| 0 = Boxes of Toys in Back&lt;br /&gt;
|-&lt;br /&gt;
| Tram&lt;br /&gt;
| 449&lt;br /&gt;
| 0,1,2,3 = (4 defined extras, but I don't know what they are)&lt;br /&gt;
|-&lt;br /&gt;
| Trashmaster&lt;br /&gt;
| 408&lt;br /&gt;
| 0 = Some bits of trash sticking out of the back&lt;br /&gt;
|-&lt;br /&gt;
| Tug&lt;br /&gt;
| 583&lt;br /&gt;
| Case in Back: 0 = Red Case, 1 = Green Case&lt;br /&gt;
|-&lt;br /&gt;
| Utility Van&lt;br /&gt;
| 552&lt;br /&gt;
| 0 = Cones, Barrel in back + Cone lying on passenger side rail, 1 = Cones, Barrel in back + Cone lying on driver side rail&lt;br /&gt;
|-&lt;br /&gt;
| Walton&lt;br /&gt;
| 478&lt;br /&gt;
| Items in Bed: 0 = Two Propane Tanks, 1 = Open Crates, 2 = Propane Tank and Barrel&lt;br /&gt;
|-&lt;br /&gt;
| Windsor&lt;br /&gt;
| 555&lt;br /&gt;
| 0 = Roof, 1 = No Roof&lt;br /&gt;
|-&lt;br /&gt;
| Yankee&lt;br /&gt;
| 456&lt;br /&gt;
| Side Ads: 0 = Big Gas, 1 = RS Haul, 2 = Star Balls, 3 = Flower Power&lt;br /&gt;
|-&lt;br /&gt;
| ZR-350&lt;br /&gt;
| 477&lt;br /&gt;
| 0 = Rear Spoiler&lt;br /&gt;
|- class=&amp;quot;sortbottom&amp;quot;&lt;br /&gt;
! Vehicle Name&lt;br /&gt;
! Vehicle ID&lt;br /&gt;
! Variants&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Above table serialized in Lua:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local vehicleModelVariants={&lt;br /&gt;
  [404]={0,1,2},&lt;br /&gt;
  [407]={0,1,2},&lt;br /&gt;
  [408]={0},&lt;br /&gt;
  [413]={0},&lt;br /&gt;
  [414]={0,1,2,3},&lt;br /&gt;
  [415]={0,1},&lt;br /&gt;
  [416]={0,1},&lt;br /&gt;
  [422]={0,1},&lt;br /&gt;
  [423]={0,1},&lt;br /&gt;
  [424]={0},&lt;br /&gt;
  [428]={0,1},&lt;br /&gt;
  [433]={0,1},                                                                                                                                         &lt;br /&gt;
  [434]={0},                                                                                                                                           &lt;br /&gt;
  [435]={0,1,2,3,4,5},                                                                                                                                 &lt;br /&gt;
  [437]={0,1},                                                                                                                                         &lt;br /&gt;
  [439]={0,1,2},                                                                                                                                       &lt;br /&gt;
  [440]={0,1,2,3,4,5},                                                                                                                                 &lt;br /&gt;
  [442]={0,1,2},                                                                                                                                       &lt;br /&gt;
  [449]={0,1,2,3,4},                                                                                                                                   &lt;br /&gt;
  [450]={0},                                                                                                                                           &lt;br /&gt;
  [453]={0,1},                                                                                                                                         &lt;br /&gt;
  [455]={0,1,2},                                                                                                                                       &lt;br /&gt;
  [456]={0,1,2,3},                                                                                                                                     &lt;br /&gt;
  [457]={0,1,2,3,4,5},                                                                                                                                 &lt;br /&gt;
  [459]={0},                                                                                                                                           &lt;br /&gt;
  [470]={0,1,2},                                                                                                                                       &lt;br /&gt;
  [472]={0,1,2},                                                                                                                                       &lt;br /&gt;
  [477]={0},                                                                                                                                           &lt;br /&gt;
  [478]={0,1,2},                                                                                                                                       &lt;br /&gt;
  [482]={0},                                                                                                                                           &lt;br /&gt;
  [483]={0,1},                                                                                                                                         &lt;br /&gt;
  [484]={0},                                                                                                                                           &lt;br /&gt;
  [485]={0,1,2},                                                                                                                                       &lt;br /&gt;
  [499]={0,1,2,3},                                                                                                                                     &lt;br /&gt;
  [500]={0,1},                                                                                                                                         &lt;br /&gt;
  [502]={0,1,2,3,4,5},                                                                                                                                 &lt;br /&gt;
  [503]={0,1,2,3,4,5},                                                                                                                                 &lt;br /&gt;
  [504]={0,1,2,3,4,5},                                                                                                                                 &lt;br /&gt;
  [506]={0},                                                                                                                                           &lt;br /&gt;
  [521]={0,1,2,3,4},                                                                                                                                   &lt;br /&gt;
  [522]={0,1,2,3,4},                                                                                                                                   &lt;br /&gt;
  [535]={0,1},  &lt;br /&gt;
  [543]={0,1,2,3,4},                                                                                                                                       &lt;br /&gt;
  [552]={0,1},                                                                                                                                         &lt;br /&gt;
  [555]={0,1},                                                                                                                                         &lt;br /&gt;
  [556]={0,1,2},                                                                                                                                       &lt;br /&gt;
  [557]={0,1},                                                                                                                                         &lt;br /&gt;
  [571]={0,1},                                                                                                                                         &lt;br /&gt;
  [581]={0,1,2,3,4},                                                                                                                                   &lt;br /&gt;
  [583]={0,1},                                                                                                                                         &lt;br /&gt;
  [595]={0,1},                                                                                                                                         &lt;br /&gt;
  [600]={0,1},                                                                                                                                         &lt;br /&gt;
  [601]={0,1,2,3},                                                                                                                                     &lt;br /&gt;
  [605]={0,1,2,3,4},                                                                                                                                     &lt;br /&gt;
  [607]={0,1,2},                                                                                                                                       &lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:ID Lists]]&lt;br /&gt;
&lt;br /&gt;
[[hu:Vehicle variants]]&lt;br /&gt;
[[ru:Vehicle variants]]&lt;br /&gt;
[[de:Fahrzeug Varianten]]&lt;/div&gt;</summary>
		<author><name>DezZolation</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetVehicleColor&amp;diff=62439</id>
		<title>GetVehicleColor</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetVehicleColor&amp;diff=62439"/>
		<updated>2019-04-01T21:51:06Z</updated>

		<summary type="html">&lt;p&gt;DezZolation: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Server client function}}&lt;br /&gt;
This function returns the color of the specified vehicle. A vehicle can have up to four colors.&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, int, int, int, int, int, int, int, int, int = getVehicleColor ( vehicle theVehicle, bool bRGB )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
{{OOP||[[vehicle]]:getColor}}&lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theVehicle:''' The [[vehicle]] that you wish to get the color of.&lt;br /&gt;
*'''bRGB :''' A boolean specifying whether to return RGB values. A setting of ''false'' will result in the function returning color ids instead.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
*Returns 12 [[int|ints]] (if bRGB is ''true'') indicating the red, green and blue components of each of the 4 vehicle colors.&lt;br /&gt;
*Returns 4 [[int|ints]] (if bRGB is ''false'') indicating the color ids of each of the 4 vehicle colors.&lt;br /&gt;
*Returns ''false'' if the vehicle doesn't exist.&lt;br /&gt;
&lt;br /&gt;
Valid color ids if bRGB is set to false:&lt;br /&gt;
{{Vehicle_colors}}&lt;br /&gt;
&amp;lt;br&amp;gt;&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 will output the 4 colors of any car that the player enters.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function playerEnterVehicle ( theVehicle, seat, jacked )&lt;br /&gt;
    -- Get the colors of the car and store them to 4 seperate variables&lt;br /&gt;
    local color1, color2, color3, color4 = getVehicleColor ( theVehicle )&lt;br /&gt;
    -- Output the four retrieved car colors into the chatbox&lt;br /&gt;
    outputChatBox ( &amp;quot;Car color 1: &amp;quot; .. color1 )&lt;br /&gt;
    outputChatBox ( &amp;quot;Car color 2: &amp;quot; .. color2 )&lt;br /&gt;
    outputChatBox ( &amp;quot;Car color 3: &amp;quot; .. color3 )&lt;br /&gt;
    outputChatBox ( &amp;quot;Car color 4: &amp;quot; .. color4 )&lt;br /&gt;
end&lt;br /&gt;
addEventHandler ( &amp;quot;onPlayerVehicleEnter&amp;quot;, getRootElement(), playerEnterVehicle )&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>DezZolation</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetVehicleColor&amp;diff=62438</id>
		<title>GetVehicleColor</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetVehicleColor&amp;diff=62438"/>
		<updated>2019-04-01T21:48:26Z</updated>

		<summary type="html">&lt;p&gt;DezZolation: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Server client function}}&lt;br /&gt;
This function returns the color of the specified vehicle. A vehicle can have up to four colors.&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, int, int, int, int, int, int, int, int, int = getVehicleColor ( vehicle theVehicle, bool bRGB )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theVehicle:''' The [[vehicle]] that you wish to get the color of.&lt;br /&gt;
*'''bRGB :''' A boolean specifying whether to return RGB values. A setting of ''false'' will result in the function returning color ids instead.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
*Returns 12 [[int|ints]] (if bRGB is ''true'') indicating the red, green and blue components of each of the 4 vehicle colors.&lt;br /&gt;
*Returns 4 [[int|ints]] (if bRGB is ''false'') indicating the color ids of each of the 4 vehicle colors.&lt;br /&gt;
*Returns ''false'' if the vehicle doesn't exist.&lt;br /&gt;
&lt;br /&gt;
Valid color ids if bRGB is set to false:&lt;br /&gt;
{{Vehicle_colors}}&lt;br /&gt;
&amp;lt;br&amp;gt;&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 will output the 4 colors of any car that the player enters.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function playerEnterVehicle ( theVehicle, seat, jacked )&lt;br /&gt;
    -- Get the colors of the car and store them to 4 seperate variables&lt;br /&gt;
    local color1, color2, color3, color4 = getVehicleColor ( theVehicle )&lt;br /&gt;
    -- Output the four retrieved car colors into the chatbox&lt;br /&gt;
    outputChatBox ( &amp;quot;Car color 1: &amp;quot; .. color1 )&lt;br /&gt;
    outputChatBox ( &amp;quot;Car color 2: &amp;quot; .. color2 )&lt;br /&gt;
    outputChatBox ( &amp;quot;Car color 3: &amp;quot; .. color3 )&lt;br /&gt;
    outputChatBox ( &amp;quot;Car color 4: &amp;quot; .. color4 )&lt;br /&gt;
end&lt;br /&gt;
addEventHandler ( &amp;quot;onPlayerVehicleEnter&amp;quot;, getRootElement(), playerEnterVehicle )&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>DezZolation</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetElementAngularVelocity&amp;diff=62437</id>
		<title>GetElementAngularVelocity</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetElementAngularVelocity&amp;diff=62437"/>
		<updated>2019-03-31T20:29:32Z</updated>

		<summary type="html">&lt;p&gt;DezZolation: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Server client function}}&lt;br /&gt;
{{New feature/item|3.0156|1.5.5|14165|Gets the current angular velocity of a specified, supported 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;
float rx, float ry, float rz getElementAngularVelocity ( element theElement )           &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
{{OOP||[[element]]:getAngularVelocity|angularVelocity|setElementAngularVelocity}}&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theElement:''' The [[element]] to retrieve the angular velocity from. Can be either a [[player]], [[ped]], [[object]], [[vehicle]] or a [[Element/Weapon|custom weapon]]. '''Server side supports only vehicles currently.'''&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns three floats describing the x, y and z rotation&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;getangularvelocity&amp;quot;, function(player)&lt;br /&gt;
    --retrieve angular velocity of the player&lt;br /&gt;
    local avx, avy, avz = getElementAngularVelocity(player)&lt;br /&gt;
    outputChatBox(&amp;quot;Your current angular velocity is: X: &amp;quot;..avx..&amp;quot; Y: &amp;quot;..avy..&amp;quot; Z: &amp;quot;..avz, player, 0, 255, 0, false)&lt;br /&gt;
end)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
{{Requirements|1.5.5-9.14060|1.5.5-9.14060|}}&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Element functions}}&lt;/div&gt;</summary>
		<author><name>DezZolation</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=DxDrawMaterialSectionLine3D&amp;diff=62436</id>
		<title>DxDrawMaterialSectionLine3D</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=DxDrawMaterialSectionLine3D&amp;diff=62436"/>
		<updated>2019-03-27T21:58:48Z</updated>

		<summary type="html">&lt;p&gt;DezZolation: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Client function}} &lt;br /&gt;
This function draws a textured 3D line between two points in the 3D world - rendered for one frame.  This should be used in conjunction with [[onClientPreRender]] in order to display continuously.&lt;br /&gt;
&lt;br /&gt;
The 3D line with a large width value effectively becomes a rectangle, so it it possible to construct basic shapes such as boxes with several large width lines and the appropriate values for 'faceToward'.&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 dxDrawMaterialSectionLine3D ( float startX, float startY, float startZ, float endX, float endY, float endZ,&lt;br /&gt;
                                   float u, float v, float usize, float vsize, element material, float width,&lt;br /&gt;
                                 [ int color = white, [ bool postGUI = false, ] float faceTowardX, float faceTowardY, float faceTowardZ ] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
* '''startX/Y/Z:''' The start position of the 3D line, representing a coordinate in the GTA world.&lt;br /&gt;
* '''endX/Y/Z:''' The end position of the 3D line, representing a coordinate in the GTA world.&lt;br /&gt;
*'''u:''' the absolute X coordinate of the top left corner of the section &lt;br /&gt;
*'''v:''' the absolute Y coordinate of the top left corner of the section &lt;br /&gt;
*'''usize:''' the absolute width of the section&lt;br /&gt;
*'''vsize:''' the absolute height of the section&lt;br /&gt;
* '''material:''' A [[material]] to draw the line with.&lt;br /&gt;
* '''width:''' The width/thickness of the line in GTA world units. (This is 1/75th of the width used in dxDrawLine3D)&lt;br /&gt;
&lt;br /&gt;
==Optional Arguments==&lt;br /&gt;
* '''color:''' An integer of the hex color, produced using [[tocolor]] or 0xAARRGGBB (AA = alpha, RR = red, GG = green, BB = blue).&lt;br /&gt;
{{New items|5.0155|1.5.5-9.11998|&lt;br /&gt;
* '''postGUI''': A bool representing whether the line should be drawn on top of or behind any ingame GUI.&lt;br /&gt;
}}&lt;br /&gt;
* '''faceTowardX/Y/Z:''' The direction the front of the line should face towards. If this is not set, the front of the line always faces toward the camera.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns a ''true'' if the operation was successful, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
This example draws corona like effects near the player&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
coronaTexture = dxCreateTexture(&amp;quot;corona.png&amp;quot;)&lt;br /&gt;
red = tocolor(255,0,0)&lt;br /&gt;
green = tocolor(0,255,0)&lt;br /&gt;
blue = tocolor(0,0,255)&lt;br /&gt;
&lt;br /&gt;
addEventHandler(&amp;quot;onClientPreRender&amp;quot;,root,&lt;br /&gt;
    function()&lt;br /&gt;
        local x,y,z = getElementPosition(localPlayer)&lt;br /&gt;
&lt;br /&gt;
        dxSetBlendMode(&amp;quot;add&amp;quot;)   -- Add blend mode looks best for corona effects&lt;br /&gt;
        drawCorona( x+2, y+2, z+1, 1, red )&lt;br /&gt;
        drawCorona( x+1, y+3, z+2, 1, green )&lt;br /&gt;
        drawCorona( x-1, y+2, z+3, 1, blue )&lt;br /&gt;
        dxSetBlendMode(&amp;quot;blend&amp;quot;) -- Restore default&lt;br /&gt;
    end&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
-- Draw the corona texture&lt;br /&gt;
function drawCorona( x, y, z, size, color )&lt;br /&gt;
    dxDrawMaterialSectionLine3D ( x, y, z+size,&lt;br /&gt;
                                  x, y, z-size,&lt;br /&gt;
                                  0,0,1,1, coronaTexture, size, color)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
{{Requirements|n/a|1.3.0-9.03931|}}&lt;br /&gt;
&lt;br /&gt;
==Changelog==&lt;br /&gt;
{{ChangelogHeader}}&lt;br /&gt;
{{ChangelogItem|1.5.5-9.11998|Added postGUI argument}}&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Drawing_functions}}&lt;br /&gt;
&lt;br /&gt;
[[hu:dxDrawMaterialSectionLine3D]]&lt;/div&gt;</summary>
		<author><name>DezZolation</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=DxDrawCircle&amp;diff=62434</id>
		<title>DxDrawCircle</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=DxDrawCircle&amp;diff=62434"/>
		<updated>2019-03-26T20:32:46Z</updated>

		<summary type="html">&lt;p&gt;DezZolation: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Client Function}}&lt;br /&gt;
&amp;lt;lowercasetitle/&amp;gt;&lt;br /&gt;
__NOTOC__&lt;br /&gt;
{{New feature/item|3.0156|1.5.5|13977|This function draws a circle shape on the screen - rendered for '''one''' frame.  This should be used in conjunction with [[onClientRender]] in order to be display continuously.}}&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;bool dxDrawCircle ( float posX, float posY, float radius [, float startAngle = 0.0, float stopAngle = 360.0, int theColor = white,&lt;br /&gt;
                    int theCenterColor = theColor, int segments = 32, int ratio = 1, bool postGUI = false ] )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
[[Image:DxDrawCircle_Saml1er.png|thumb|An example of how dxDrawCircle function works in practice.]]&lt;br /&gt;
&lt;br /&gt;
* '''posX''': An integer representing the '''absolute''' X position of the circle center, represented by pixels on the screen.&lt;br /&gt;
* '''posY''': An integer representing the '''absolute''' Y position of the circle center, represented by pixels on the screen.&lt;br /&gt;
* '''radius''': An integer representing the radius scale of the circle that is being drawn.&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
{{OptionalArg}}&lt;br /&gt;
* '''startAngle''': An integer representing the angle of the first point of the circle.&lt;br /&gt;
* '''stopAngle''': An integer representing the angle of the last point of the circle.&lt;br /&gt;
* '''theColor''': An integer of the hex color, produced using [[tocolor]] or 0xAARRGGBB (AA = alpha, RR = red, GG = green, BB = blue).&lt;br /&gt;
* '''theCenterColor''': An integer of the hex color, produced using [[tocolor]] or 0xAARRGGBB (AA = alpha, RR = red, GG = green, BB = blue).&lt;br /&gt;
* '''segments''': An integer ranging from 3-1024 representing how many triangles are used to form the circle, more segments = smoother circle. Note: using lots of segments may cause lag.&lt;br /&gt;
* '''ratio''': Ratio between width and height, e.g: 2 would mean that the width of the circle is 2 times the height.&lt;br /&gt;
* '''postGUI''': A bool representing whether the circle should be drawn on top of or behind any ingame GUI (rendered by CEGUI).&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the creation of the 2D circle was successful, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This function draws a rectangle with rounded corners.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function dxDrawRoundedRectangle(x, y, rx, ry, color, radius)&lt;br /&gt;
    rx = rx - radius * 2&lt;br /&gt;
    ry = ry - radius * 2&lt;br /&gt;
    x = x + radius&lt;br /&gt;
    y = y + radius&lt;br /&gt;
&lt;br /&gt;
    if (rx &amp;gt;= 0) and (ry &amp;gt;= 0) then&lt;br /&gt;
        dxDrawRectangle(x, y, rx, ry, color)&lt;br /&gt;
        dxDrawRectangle(x, y - radius, rx, radius, color)&lt;br /&gt;
        dxDrawRectangle(x, y + ry, rx, radius, color)&lt;br /&gt;
        dxDrawRectangle(x - radius, y, radius, ry, color)&lt;br /&gt;
        dxDrawRectangle(x + rx, y, radius, ry, color)&lt;br /&gt;
&lt;br /&gt;
        dxDrawCircle(x, y, radius, 180, 270, color, color, 7)&lt;br /&gt;
        dxDrawCircle(x + rx, y, radius, 270, 360, color, color, 7)&lt;br /&gt;
        dxDrawCircle(x + rx, y + ry, radius, 0, 90, color, color, 7)&lt;br /&gt;
        dxDrawCircle(x, y + ry, radius, 90, 180, color, color, 7)&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
dxDrawRoundedRectangle(350, 50, 100, 100, tocolor(0, 255, 0, 255), 20)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Drawing_functions}}&lt;br /&gt;
&lt;br /&gt;
[[hu:dxDrawCircle]]&lt;/div&gt;</summary>
		<author><name>DezZolation</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetSearchLightStartRadius&amp;diff=62384</id>
		<title>SetSearchLightStartRadius</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetSearchLightStartRadius&amp;diff=62384"/>
		<updated>2019-03-20T11:12:29Z</updated>

		<summary type="html">&lt;p&gt;DezZolation: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Client function}}&lt;br /&gt;
&lt;br /&gt;
This function sets the start radius of a [[Element/Searchlight|searchlight]] 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;
bool setSearchLightStartRadius ( searchlight theSearchlight, float startRadius )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{OOP||[[Element/Searchlight|searchLight]]:setStartRadius|startRadius|getSearchLightStartRadius}}&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''theSearchLight''': the searchlight to modify the property of.&lt;br /&gt;
*'''startRadius''': the radius of the searchlight's light cone in its beginning.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
If every argument is correct, this function returns ''true''. If not, it will return ''false'' plus an error message.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This example creates a skywalker light on top of Los Santos' skyscraper and turns it on/off every second by setting it's ending radius and starting radius to 0.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
skywalkerLight = createSearchLight (1544, -1353.5, 330, 1528, -1347, 360, 0.2, 3, false)&lt;br /&gt;
&lt;br /&gt;
setTimer (function ()	&lt;br /&gt;
	if not off then&lt;br /&gt;
		setSearchLightStartRadius (skywalkerLight, 0)&lt;br /&gt;
		setSearchLightEndRadius (skywalkerLight, 0)&lt;br /&gt;
		off = true&lt;br /&gt;
	else&lt;br /&gt;
		setSearchLightStartRadius (skywalkerLight, 0.2)&lt;br /&gt;
		setSearchLightEndRadius (skywalkerLight, 3)&lt;br /&gt;
		off = false&lt;br /&gt;
	end&lt;br /&gt;
end, 1000, 0)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
{{Client_searchlight_functions}}&lt;/div&gt;</summary>
		<author><name>DezZolation</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetSearchLightStartPosition&amp;diff=62383</id>
		<title>SetSearchLightStartPosition</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetSearchLightStartPosition&amp;diff=62383"/>
		<updated>2019-03-20T11:12:21Z</updated>

		<summary type="html">&lt;p&gt;DezZolation: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Client function}}&lt;br /&gt;
&lt;br /&gt;
This function sets the start position of a [[Element/Searchlight|searchlight]] 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;
bool setSearchLightStartPosition ( searchlight theSearchLight, float startX, float startY, float startZ )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{OOP||[[Element/Searchlight|searchLight]]:setStartPosition|startPosition|getSearchLightStartPosition}}&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''theSearchLight''': the searchlight to modify the property of.&lt;br /&gt;
*'''startX''': the X coordinate where the searchlight light cone will start.&lt;br /&gt;
*'''startY''': the Y coordinate where the searchlight light cone will start.&lt;br /&gt;
*'''startZ''': the Z coordinate where the searchlight light cone will start.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
If every argument is correct, this function returns ''true''. If not, it will return ''false'' plus an error message.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This example creates a searchlight that originates in the camera position and targets the center of the map.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local searchLight = createSearchLight(0, 0, 0, 0, 0, 0, 0, 10)&lt;br /&gt;
&lt;br /&gt;
if searchLight then&lt;br /&gt;
    local function updateSearchLight()&lt;br /&gt;
        -- Set its start position to the camera position&lt;br /&gt;
        setSearchLightStartPosition(searchLight, getCameraMatrix())&lt;br /&gt;
    end&lt;br /&gt;
    addEventHandler(&amp;quot;onClientPreRender&amp;quot;, root, updateSearchLight)&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
{{Client_searchlight_functions}}&lt;/div&gt;</summary>
		<author><name>DezZolation</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetSearchLightEndRadius&amp;diff=62382</id>
		<title>SetSearchLightEndRadius</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetSearchLightEndRadius&amp;diff=62382"/>
		<updated>2019-03-20T11:12:14Z</updated>

		<summary type="html">&lt;p&gt;DezZolation: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Client function}}&lt;br /&gt;
&lt;br /&gt;
This function sets the end radius of a [[Element/Searchlight|searchlight]] 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;
bool setSearchLightEndRadius ( searchlight theSearchlight, float endRadius )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{OOP||[[Element/Searchlight|searchLight]]:setEndRadius|endRadius|getSearchLightEndRadius}}&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''theSearchLight''': the searchlight to modify the property of.&lt;br /&gt;
*'''endRadius''': the radius of the searchlight's light cone in its end.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
If every argument is correct, this function returns ''true''. If not, it will return ''false'' plus an error message.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This example creates a skywalker light on top of Los Santos' skyscraper and turns it on/off every second by setting it's ending radius and starting radius to 0.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
skywalkerLight = createSearchLight (1544, -1353.5, 330, 1528, -1347, 360, 0.2, 3, false)&lt;br /&gt;
&lt;br /&gt;
setTimer (function ()	&lt;br /&gt;
	if not off then&lt;br /&gt;
		setSearchLightStartRadius (skywalkerLight, 0)&lt;br /&gt;
		setSearchLightEndRadius (skywalkerLight, 0)&lt;br /&gt;
		off = true&lt;br /&gt;
	else&lt;br /&gt;
		setSearchLightStartRadius (skywalkerLight, 0.2)&lt;br /&gt;
		setSearchLightEndRadius (skywalkerLight, 3)&lt;br /&gt;
		off = false&lt;br /&gt;
	end&lt;br /&gt;
end, 1000, 0)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
{{Client_searchlight_functions}}&lt;/div&gt;</summary>
		<author><name>DezZolation</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetSearchLightEndPosition&amp;diff=62381</id>
		<title>SetSearchLightEndPosition</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetSearchLightEndPosition&amp;diff=62381"/>
		<updated>2019-03-20T11:12:03Z</updated>

		<summary type="html">&lt;p&gt;DezZolation: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Client 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 setSearchLightEndPosition ( searchlight theSearchLight, float endX, float endY, float endZ )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{OOP||[[Element/Searchlight|searchLight]]:setEndPosition|endPosition|getSearchLightEndPosition}}&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''theSearchLight''': the searchlight to modify the property of.&lt;br /&gt;
*'''endX''': the X coordinate where the searchlight light cone will end.&lt;br /&gt;
*'''endY''': the Y coordinate where the searchlight light cone will end.&lt;br /&gt;
*'''endZ''': the Z coordinate where the searchlight light cone will end.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
If every argument is correct, this function returns ''true''. If not, it will return ''false'' plus an error message.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This example creates a searchlight that originates in the camera position and targets to the front of it.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local searchLight = createSearchLight(0, 0, 0, 0, 0, 0, 0, 10)&lt;br /&gt;
&lt;br /&gt;
if searchLight then&lt;br /&gt;
    local function updateSearchLight()&lt;br /&gt;
        -- Get camera position and look at point&lt;br /&gt;
        local sx, sy, sz, ex, ey, ez = getCameraMatrix()&lt;br /&gt;
        -- Set searchlight's start position to the camera position, and end position to the look at point&lt;br /&gt;
        setSearchLightStartPosition(searchLight, sx, sy, sz)&lt;br /&gt;
        setSearchLightEndPosition(searchLight, ex, ey, ez)&lt;br /&gt;
    end&lt;br /&gt;
    addEventHandler(&amp;quot;onClientPreRender&amp;quot;, root, updateSearchLight)&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
{{Client_searchlight_functions}}&lt;/div&gt;</summary>
		<author><name>DezZolation</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetSearchLightStartRadius&amp;diff=62380</id>
		<title>GetSearchLightStartRadius</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetSearchLightStartRadius&amp;diff=62380"/>
		<updated>2019-03-20T11:06:02Z</updated>

		<summary type="html">&lt;p&gt;DezZolation: &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;
This function gets the start radius of a [[Element/Searchlight|searchlight]] 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;
float getSearchLightStartRadius ( searchlight theSearchLight )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{OOP||[[Element/Searchlight|searchLight]]:getStartRadius|startRadius|setSearchLightStartRadius}}&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''theSearchLight''': the searchlight to get the radius of the searchlight's light cone in its beginning. &lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
If the specified searchlight element is valid, this function will return one ''float'', which is the searchlight's start radius. If not, it will return ''false'' plus an error message.&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;
{{Client_searchlight_functions}}&lt;/div&gt;</summary>
		<author><name>DezZolation</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetSearchLightEndRadius&amp;diff=62379</id>
		<title>GetSearchLightEndRadius</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetSearchLightEndRadius&amp;diff=62379"/>
		<updated>2019-03-20T11:05:50Z</updated>

		<summary type="html">&lt;p&gt;DezZolation: &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;
This function gets the end radius of a [[Element/Searchlight|searchlight]] 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;
float getSearchLightEndRadius ( searchlight theSearchLight )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{OOP||[[Element/Searchlight|searchLight]]:getEndRadius|endRadius|setSearchLightEndRadius}}&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''theSearchLight''': the searchlight to get the radius of the searchlight's light cone in its end.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
If the specified searchlight element is valid, this function will return one ''float'', which is the searchlight's end radius. If not, it will return ''false'' plus an error message.&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;
{{Client_searchlight_functions}}&lt;/div&gt;</summary>
		<author><name>DezZolation</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetSearchLightStartPosition&amp;diff=62378</id>
		<title>GetSearchLightStartPosition</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetSearchLightStartPosition&amp;diff=62378"/>
		<updated>2019-03-20T11:05:04Z</updated>

		<summary type="html">&lt;p&gt;DezZolation: &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;
This function gets the start position of a [[Element/Searchlight|searchlight]] 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;
float, float, float getSearchLightStartPosition ( searchlight theSearchLight )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{OOP||[[Element/Searchlight|searchLight]]:getStartPosition|startPosition|setSearchLightStartPosition}}&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''theSearchLight''': the searchlight to get the position where the searchlight's light cone starts.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
If the specified searchlight element is valid, this function will return three ''float'', which are the three coordinates of searchlight's start position. If not, it will return ''false'' plus an error message.&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;
{{Client_searchlight_functions}}&lt;/div&gt;</summary>
		<author><name>DezZolation</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=CreateWater&amp;diff=62374</id>
		<title>CreateWater</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=CreateWater&amp;diff=62374"/>
		<updated>2019-03-19T09:28:47Z</updated>

		<summary type="html">&lt;p&gt;DezZolation: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Server client function}}&lt;br /&gt;
&lt;br /&gt;
Creates an area of [[water]].&lt;br /&gt;
&lt;br /&gt;
The largest possible size of a water area is 5996&amp;amp;#0215;5996. Also be aware that the function will change all x and y coordinates you specify into even integer numbers if necessary: this is because of a limitation of San Andreas.&lt;br /&gt;
&lt;br /&gt;
You are able to give the water a shallow water effect, which practically changes the water invisible to the eye. However, all elements still work the same way as without the shallow effect - allowing swimming, diving, vehicles to sink, etc.&lt;br /&gt;
{{Note|X and Y positions will be changed to an even integer. i.e. -2, 0, 2, 4 etc.}}&lt;br /&gt;
{{Important Note|If you're working with dimensions, be sure to apply it by using [[setElementDimension]].}}&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;water createWater ( float x1, float y1, float z1, float x2, float y2, float z2, float x3, float y3, float z3 [, float x4, float y4, float z4 ] [, bool bShallow = false ] )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[[Image:WaterAreas.jpg|thumb|Example of water quadrant.|284x230px]]&lt;br /&gt;
&lt;br /&gt;
{{OOP||[[Water]]}}&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''x1, y1, z1:''' position of bottom left (south-west) corner.&lt;br /&gt;
*'''x2, y2, z2:''' position of bottom right (south-east) corner.&lt;br /&gt;
*'''x3, y3, z3:''' position of top left (north-west) corner.&lt;br /&gt;
''Note: Only 3 coords creates a triangle''&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
*'''x4, y4, z4:''' position of top right (north-east) corner.&lt;br /&gt;
*'''bShallow:''' gives the water a shallow water effect.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns a water element if successful, ''false'' otherwise. The water element can be repositioned with [[setElementPosition]] and destroyed with [[destroyElement]].&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 code for creating a water area to cover the entire San Andreas Map (flood the cities). Also, [[setWaterLevel]] is used to raise the existing rivers and lakes.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- Setting water properties.&lt;br /&gt;
height = 40&lt;br /&gt;
SizeVal = 2998&lt;br /&gt;
-- Defining variables.&lt;br /&gt;
southWest_X = -SizeVal&lt;br /&gt;
southWest_Y = -SizeVal&lt;br /&gt;
southEast_X = SizeVal&lt;br /&gt;
southEast_Y = -SizeVal&lt;br /&gt;
northWest_X = -SizeVal&lt;br /&gt;
northWest_Y = SizeVal&lt;br /&gt;
northEast_X = SizeVal&lt;br /&gt;
northEast_Y = SizeVal&lt;br /&gt;
&lt;br /&gt;
-- OnClientResourceStart function that creates the water.&lt;br /&gt;
function thaResourceStarting( )&lt;br /&gt;
    water = createWater ( southWest_X, southWest_Y, height, southEast_X, southEast_Y, height, northWest_X, northWest_Y, height, northEast_X, northEast_Y, height )&lt;br /&gt;
    setWaterLevel ( height )&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onClientResourceStart&amp;quot;, resourceRoot, thaResourceStarting)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&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;
This example creates water at the given coordinates and sets the height of the water level to 20 for when the client joins.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function thaResourceStarting( )&lt;br /&gt;
    water = createWater ( 1866, -1444, 10, 1968, -1442, 10, 1866, -1372, 10, 1968, -1370, 10 )&lt;br /&gt;
    setWaterLevel ( water, 20 )&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onClientResourceStart&amp;quot;, getResourceRootElement(getThisResource()), thaResourceStarting)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&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 fills the Easter Basin with water.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function fillDock()&lt;br /&gt;
    local water = createWater (-1715, 47, 0, -1574, 47, 0, -1715, 170, 0, -1574, 170, 0)&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onResourceStart&amp;quot;, getResourceRootElement(getThisResource()), fillDock)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Issues ==&lt;br /&gt;
{{Issues|&lt;br /&gt;
{{Issue|7542|Water functions in general do not work outside the -3000 -3000 3000 3000 bounds}}&lt;br /&gt;
{{Issue|9608|(Fixed in r13987) &amp;quot;shallow&amp;quot; argument only works client-side}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Client water functions}}&lt;/div&gt;</summary>
		<author><name>DezZolation</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetScreenFromWorldPosition&amp;diff=62373</id>
		<title>GetScreenFromWorldPosition</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetScreenFromWorldPosition&amp;diff=62373"/>
		<updated>2019-03-18T23:45:05Z</updated>

		<summary type="html">&lt;p&gt;DezZolation: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Client function}}&lt;br /&gt;
This function gets the screen position of a point in the world. This is useful for attaching 2D gui elements to parts of the world (e.g. players) or detecting if a point is on the screen (though it does not check if it is actually visible, you should use [[processLineOfSight]] for that).&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
float, float getScreenFromWorldPosition ( float x, float y, float z [, float edgeTolerance = 0.0, bool relative = true ] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''x:''' A float value indicating the x position in the world.&lt;br /&gt;
*'''y:''' A float value indicating the y position in the world.&lt;br /&gt;
*'''z:''' A float value indicating the z position in the world.&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments=== &lt;br /&gt;
{{OptionalArg}}&lt;br /&gt;
{{New feature/item|3|1.0||&lt;br /&gt;
*'''edgeTolerance:''' A [[float]] value indicating the distance the position can be off screen before the function returns false. Note: it's clamped down on both axies to the size of screen at the given axis*10&lt;br /&gt;
*'''relative:''' A [[boolean]] value that indicates if edgeTolerance is in pixels [false], or relative to the screen size [true].&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns two ''x'', ''y'' [[float]]s indicating the screen position and [[float]] distance between screen and given position if successful, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
===Example===&lt;br /&gt;
&amp;lt;section class=&amp;quot;client&amp;quot; name=&amp;quot;Client-side Script&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This example add a '3d' text at coordinates 0, 0, 0 (center of map).&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 ( getDistanceBetweenPoints3D ( 0, 0, 3, getElementPosition ( localPlayer ) ) ) &amp;lt; 50 then&lt;br /&gt;
		local coords = { getScreenFromWorldPosition ( 0, 0, 3 ) }&lt;br /&gt;
		if coords[1] and coords[2] then&lt;br /&gt;
			dxDrawText ( &amp;quot;Hello !&amp;quot;, coords[1], coords[2], coords[1], coords[2], tocolor(255,255,255), 1, &amp;quot;default-bold&amp;quot; )&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;
{{Client_world_functions}}&lt;/div&gt;</summary>
		<author><name>DezZolation</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=CreateMarker&amp;diff=62350</id>
		<title>CreateMarker</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=CreateMarker&amp;diff=62350"/>
		<updated>2019-03-17T22:51:24Z</updated>

		<summary type="html">&lt;p&gt;DezZolation: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Server client function}}&lt;br /&gt;
&lt;br /&gt;
[[Image:Mtasa_markers.png|thumb|337px|This image shows all the different marker types available using this function.]]&lt;br /&gt;
&lt;br /&gt;
This function creates a marker. A marker is a 3D model in the world that can highlight a particular point or area, often used to instruct players where to go to perform actions such as entering buildings.&lt;br /&gt;
&lt;br /&gt;
There are various limits that govern the maximum number of each type that can be visible at once. These are:&lt;br /&gt;
* Coronas: 32&lt;br /&gt;
* Checkpoints, Rings, Cylinders and Arrows combined: 32&lt;br /&gt;
&lt;br /&gt;
You are able to create as many markers as you wish (memory and element limit permitting), but the player will only be able to see the nearest ones up to the limit.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&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;&lt;br /&gt;
marker createMarker ( float x, float y, float z [, string theType = &amp;quot;checkpoint&amp;quot;, float size = 4.0, int r = 0, int g = 0, int b = 255, int a = 255, element visibleTo = getRootElement( ) ] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{OOP||Marker}}&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
* '''x''': A floating point number representing the X coordinate on the map.&lt;br /&gt;
* '''y''': A floating point number representing the Y coordinate on the map.&lt;br /&gt;
* '''z''': A floating point number representing the Z coordinate on the map.&lt;br /&gt;
&lt;br /&gt;
===Optional arguments===&lt;br /&gt;
{{OptionalArg}}&lt;br /&gt;
* '''theType''': The visual type of the marker to be created. Possible values:&lt;br /&gt;
{{Marker_types}}&lt;br /&gt;
* '''size''': The diameter of the marker to be created, in meters.&lt;br /&gt;
* '''r''': An integer number representing the amount of red to use in the colouring of the marker (0 - 255).&lt;br /&gt;
* '''g''': An integer number representing the amount of green to use in the colouring of the marker (0 - 255).&lt;br /&gt;
* '''b''': An integer number representing the amount of blue to use in the colouring of the marker (0 - 255).&lt;br /&gt;
* '''a''': An integer number representing the amount of alpha to use in the colouring of the marker (0 - 255 where 0 is transparent and 255 is opaque).&lt;br /&gt;
* '''visibleTo''': This defines which elements can see the marker. Defaults to visible to everyone. See [[visibility]].&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;&lt;br /&gt;
marker createMarker ( float x, float y, float z [, string theType = &amp;quot;checkpoint&amp;quot;, float size = 4.0, int r = 0, int g = 0, int b = 255, int a = 255 ] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{OOP||Marker}}&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
* '''x''': A floating point number representing the X coordinate on the map.&lt;br /&gt;
* '''y''': A floating point number representing the Y coordinate on the map.&lt;br /&gt;
* '''z''': A floating point number representing the Z coordinate on the map.&lt;br /&gt;
&lt;br /&gt;
===Optional arguments===&lt;br /&gt;
{{OptionalArg}}&lt;br /&gt;
* '''theType''': The visual type of the marker to be created. Possible values:&lt;br /&gt;
{{Marker_types}}&lt;br /&gt;
* '''size''': The diameter of the marker to be created, in meters.&lt;br /&gt;
* '''r''': An integer number representing the amount of red to use in the colouring of the marker (0 - 255).&lt;br /&gt;
* '''g''': An integer number representing the amount of green to use in the colouring of the marker (0 - 255).&lt;br /&gt;
* '''b''': An integer number representing the amount of blue to use in the colouring of the marker (0 - 255).&lt;br /&gt;
* '''a''': An integer number representing the amount of alpha to use in the colouring of the marker (0 - 255 where 0 is transparent and 255 is opaque).&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns the [[marker]] element that was created, or ''false'' if the arguments are incorrect.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Example 1&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This example creates a marker next to the player when they type 'createmarker':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- this function is called whenever someone types 'createmarker' in the console:&lt;br /&gt;
function consoleCreateMarker ( thePlayer, commandName )&lt;br /&gt;
   if ( thePlayer ) then&lt;br /&gt;
      local x, y, z = getElementPosition ( thePlayer ) -- get the player's position&lt;br /&gt;
      -- create a cylindrical marker next to the player:&lt;br /&gt;
      local theMarker = createMarker ( x + 2, y + 2, z, &amp;quot;cylinder&amp;quot;, 1.5, 255, 255, 0, 170 )&lt;br /&gt;
      if ( theMarker ) then -- check if the marker was created successfully&lt;br /&gt;
         outputConsole ( &amp;quot;Marker created successfully&amp;quot;, thePlayer )&lt;br /&gt;
      else&lt;br /&gt;
         outputConsole ( &amp;quot;Failed to create marker&amp;quot;, thePlayer )&lt;br /&gt;
      end&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler ( &amp;quot;createmarker&amp;quot;, consoleCreateMarker )&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;
{{Marker functions}}&lt;br /&gt;
[[ru:createMarker]]&lt;br /&gt;
[[ar:createMarker]]&lt;br /&gt;
[[pl:createMarker]]&lt;/div&gt;</summary>
		<author><name>DezZolation</name></author>
	</entry>
</feed>