<?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=Remaked</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=Remaked"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/wiki/Special:Contributions/Remaked"/>
	<updated>2026-04-10T14:31:39Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetColPolygonHeight&amp;diff=68979</id>
		<title>SetColPolygonHeight</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetColPolygonHeight&amp;diff=68979"/>
		<updated>2021-02-15T09:21:10Z</updated>

		<summary type="html">&lt;p&gt;Remaked: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Server client function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
{{New feature/item|3.0160|1.5.8|20807|This function is used to change the height of an existing [[createColPolygon|colshape polygon]].&lt;br /&gt;
By default, a colshape polygon is infinitely tall.}}&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 setColPolygonHeight( colshape shape, float floor, float ceil )  &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
{{OOP||[[colshape]]:setHeight|}}&lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''shape:''' The [[colshape]] polygon&lt;br /&gt;
*'''floor:''' The polygon floor (lowest Z coordinate). Parse ''false'' to reset this value to 0.&lt;br /&gt;
*'''ceil:''' The polygon ceiling (highest Z coordinate). Parse ''false'' to reset this value to infinitely tall.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the polygon was changed, ''false'' if invalid arguments were passed.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This example sets every polygon colshape's max heigh to 50 units once resource starts.&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server side script&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function setPolygonsHeight()&lt;br /&gt;
    for i, v in ipairs(getElementsByType(&amp;quot;colshape&amp;quot;)) do&lt;br /&gt;
        if (getColShapeType(v) == 4) then -- if it's a polygon colshape do it otherwise don't&lt;br /&gt;
            setColPolygonHeight(v, false, 50)&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onResourceStart&amp;quot;, resourceRoot, setPolygonsHeight)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
{{Requirements|1.5.8-9.20807|1.5.8-9.20807|}}&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Collision_shape_functions}}&lt;/div&gt;</summary>
		<author><name>Remaked</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetElementBonePosition&amp;diff=68978</id>
		<title>SetElementBonePosition</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetElementBonePosition&amp;diff=68978"/>
		<updated>2021-02-15T09:14:24Z</updated>

		<summary type="html">&lt;p&gt;Remaked: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Client function}}&lt;br /&gt;
{{New feature/item|3.0160|1.5.8|20704|This function sets the position of a bone to the specified coordinates. Currently the following element types are accepted:&lt;br /&gt;
* [[Element/Player|Player]]&lt;br /&gt;
* [[Element/Ped|Ped]]&lt;br /&gt;
}}&lt;br /&gt;
{{Tip|If you want to attach an element to a bone, see [[attachElementToBone]]}}&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 setElementBonePosition ( element theElement, int bone, float x, float y, float z )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''theElement:''' the element to set the bone position on.&lt;br /&gt;
*'''bone:''' the ID of the bone to set the position of. See [[Bone IDs]]&lt;br /&gt;
*'''x:''' The x coordinate of the destination.&lt;br /&gt;
*'''y:''' The y coordinate of the destination.&lt;br /&gt;
*'''z:''' The z coordinate of the destination.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the function was successful, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This example is a command where the player should input the bone ID, x, y, z to set one of his bones' position.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function setBonePosition(cmd, ID, x, y, z)&lt;br /&gt;
    if (not ID or not x or not y or not z) then&lt;br /&gt;
        outputChatBox(&amp;quot;Syntax: '/setbonepos ID x y z'&amp;quot;, 255, 25, 25)&lt;br /&gt;
        return false&lt;br /&gt;
    end&lt;br /&gt;
    if (not tonumber(ID) or not tonumber(x) or not tonumber(y) or not tonumber(z)) then&lt;br /&gt;
        outputChatBox(&amp;quot;Command arguments should be numbers&amp;quot;, 255, 25, 25)&lt;br /&gt;
        return false&lt;br /&gt;
    end&lt;br /&gt;
    setElementBonePosition(localPlayer, ID, x, y, z)&lt;br /&gt;
    outputChatBox(&amp;quot;Bone position set successfully&amp;quot;, 0, 255, 0)&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler(&amp;quot;setbonepos&amp;quot;, setBonePosition)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Client_element_functions}}&lt;/div&gt;</summary>
		<author><name>Remaked</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=OnClientResourceFileDownload&amp;diff=68977</id>
		<title>OnClientResourceFileDownload</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=OnClientResourceFileDownload&amp;diff=68977"/>
		<updated>2021-02-15T09:06:50Z</updated>

		<summary type="html">&lt;p&gt;Remaked: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Client event}} &lt;br /&gt;
{{New feature/item|3.0160|1.5.8|20788|This event is triggered every time a resource file download is queued, finished or has failed.}}&lt;br /&gt;
&lt;br /&gt;
{{Warning|This event is '''NOT''' related to [[downloadFile]] and [[onClientFileDownloadComplete]]!|true}}&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
resource fileResource, string fileName, number fileSize, string state&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
*'''fileResource:''' resource the file belongs to&lt;br /&gt;
*'''fileName:''' relative resource file path&lt;br /&gt;
*'''fileSize:''' size of the file in bytes&lt;br /&gt;
*'''state:''' possible values: &amp;lt;code&amp;gt;&amp;quot;queued&amp;quot;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;quot;finished&amp;quot;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;quot;failed&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Source==&lt;br /&gt;
The [[event system#Event source|source]] of this event is the resource's root element.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This example will output the file's resource name/file name/size/state when downloading&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function writeMsg(resourceName, fileName, fileSize, fileState)&lt;br /&gt;
    outputChatBox(&amp;quot;Resource name: &amp;quot;..resourceName..&amp;quot;, file name: &amp;quot;..fileName..&amp;quot;, size: &amp;quot;..fileSize..&amp;quot;, state: &amp;quot;..fileState)&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onClientResourceFileDownload&amp;quot;, root, writeMsg)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
{{Requirements||1.5.8-9.20788|}}&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
===Client resource events===&lt;br /&gt;
{{Client_resource_events}}&lt;br /&gt;
===Client event functions===&lt;br /&gt;
{{Client_event_functions}}&lt;/div&gt;</summary>
		<author><name>Remaked</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetVehicleCurrentGear&amp;diff=68968</id>
		<title>GetVehicleCurrentGear</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetVehicleCurrentGear&amp;diff=68968"/>
		<updated>2021-02-14T15:09:10Z</updated>

		<summary type="html">&lt;p&gt;Remaked: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Client function}} &lt;br /&gt;
&lt;br /&gt;
Gets the specified vehicle's current gear.&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 getVehicleCurrentGear ( vehicle theVehicle )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theVehicle:''' the vehicle to get the gear of&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns the gear if successful, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
&amp;lt;section name=&amp;quot;Client&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
Example of a program that outputs the current gear to the lower, center of the screen&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function makeGearGui( )&lt;br /&gt;
	local sx, sy = guiGetScreenSize()&lt;br /&gt;
	local wx = 50&lt;br /&gt;
	local wy = 50&lt;br /&gt;
	gearLabel = guiCreateLabel(((sx / 2) - wx), (sy - wy), wx, wy, &amp;quot;5&amp;quot;, false)&lt;br /&gt;
end&lt;br /&gt;
makeGearGui()&lt;br /&gt;
&lt;br /&gt;
function onRender()&lt;br /&gt;
	g_vehicle = getPedOccupiedVehicle(localPlayer)&lt;br /&gt;
	if g_vehicle then&lt;br /&gt;
		g_curGear = tostring(getVehicleCurrentGear(g_vehicle))&lt;br /&gt;
		guiSetText(gearLabel, g_curGear)&lt;br /&gt;
	else&lt;br /&gt;
		guiSetText(gearLabel, &amp;quot;&amp;quot;)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onClientRender&amp;quot;, root, onRender)&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>Remaked</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=AddColPolygonPoint&amp;diff=68599</id>
		<title>AddColPolygonPoint</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=AddColPolygonPoint&amp;diff=68599"/>
		<updated>2021-02-04T02:50:59Z</updated>

		<summary type="html">&lt;p&gt;Remaked: /* Returns */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Server client function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
{{New feature/item|3.0158|1.5.7|20397|This function is used to add a new point to an existing [[createColPolygon|colshape polygon]].}}&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 addColPolygonPoint ( colshape shape, float fX, float fY [, int index = 0 ] )  &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
{{OOP||[[colshape]]:addPoint||removeColPolygonPoint|}}&lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''shape:''' The [[colshape]] polygon you wish add a point to.&lt;br /&gt;
*'''fX:''' The X position of the new bound point.&lt;br /&gt;
*'''fY:''' The Y position of the new bound point.&lt;br /&gt;
&lt;br /&gt;
==Optional Arguments==&lt;br /&gt;
{{OptionalArg}}&lt;br /&gt;
*'''index:''' The index where the new point will be inserted in the polygon. The points are indexed in order, with 1 being the first bound point. Passing 0 will insert the point as the last one in the polygon.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the polygon was changed, ''false'' if invalid arguments were passed.&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 examples adds a point to an existing polygon shape by a command.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local shape = createColPolygon(2, 2, 5, 5, 6, 6, 8, 8) -- Somewhere in the map&lt;br /&gt;
function addPointToPolygon(plr, cmd, fX, fY, index)&lt;br /&gt;
    if (not fX or not fY) then&lt;br /&gt;
        outputChatBox(&amp;quot;Correct syntax: /addpoint &amp;lt;fX fY&amp;gt;&amp;quot;, plr, 255, 25, 25)&lt;br /&gt;
        return false&lt;br /&gt;
    end&lt;br /&gt;
    if (not index or index == 0) then&lt;br /&gt;
        addColPolygonPoint(shape, fX, fY)&lt;br /&gt;
    else&lt;br /&gt;
        addColPolygonPoint(shape, fX, fY, index)&lt;br /&gt;
    end&lt;br /&gt;
    outputChatBox(&amp;quot;Point added&amp;quot;, plr, 0, 255, 0)&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler(&amp;quot;addpoint&amp;quot;, addPointToPolygon)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
{{Requirements|1.5.7-9.20397|1.5.7-9.20397|}}&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Collision_shape_functions}}&lt;/div&gt;</summary>
		<author><name>Remaked</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=AddColPolygonPoint&amp;diff=68598</id>
		<title>AddColPolygonPoint</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=AddColPolygonPoint&amp;diff=68598"/>
		<updated>2021-02-04T02:49:27Z</updated>

		<summary type="html">&lt;p&gt;Remaked: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Server client function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
{{New feature/item|3.0158|1.5.7|20397|This function is used to add a new point to an existing [[createColPolygon|colshape polygon]].}}&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 addColPolygonPoint ( colshape shape, float fX, float fY [, int index = 0 ] )  &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
{{OOP||[[colshape]]:addPoint||removeColPolygonPoint|}}&lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''shape:''' The [[colshape]] polygon you wish add a point to.&lt;br /&gt;
*'''fX:''' The X position of the new bound point.&lt;br /&gt;
*'''fY:''' The Y position of the new bound point.&lt;br /&gt;
&lt;br /&gt;
==Optional Arguments==&lt;br /&gt;
{{OptionalArg}}&lt;br /&gt;
*'''index:''' The index where the new point will be inserted in the polygon. The points are indexed in order, with 1 being the first bound point. Passing 0 will insert the point as the last one in the polygon.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the polygon was changed, ''false'' if invalid arguments were passed.&lt;br /&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 examples adds a point to an existing polygon shape by a command.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local shape = createColPolygon(2, 2, 5, 5, 6, 6, 8, 8) -- Somewhere in the map&lt;br /&gt;
function addPointToPolygon(plr, cmd, fX, fY, index)&lt;br /&gt;
    if (not fX or not fY) then&lt;br /&gt;
        outputChatBox(&amp;quot;Correct syntax: /addpoint &amp;lt;fX fY&amp;gt;&amp;quot;, plr, 255, 25, 25)&lt;br /&gt;
        return false&lt;br /&gt;
    end&lt;br /&gt;
    if (not index or index == 0) then&lt;br /&gt;
        addColPolygonPoint(shape, fX, fY)&lt;br /&gt;
    else&lt;br /&gt;
        addColPolygonPoint(shape, fX, fY, index)&lt;br /&gt;
    end&lt;br /&gt;
    outputChatBox(&amp;quot;Point added&amp;quot;, plr, 0, 255, 0)&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler(&amp;quot;addpoint&amp;quot;, addPointToPolygon)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
{{Requirements|1.5.7-9.20397|1.5.7-9.20397|}}&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Collision_shape_functions}}&lt;/div&gt;</summary>
		<author><name>Remaked</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetVehicleDummyPosition&amp;diff=68597</id>
		<title>GetVehicleDummyPosition</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetVehicleDummyPosition&amp;diff=68597"/>
		<updated>2021-02-04T02:36:56Z</updated>

		<summary type="html">&lt;p&gt;Remaked: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Client function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
&lt;br /&gt;
{{New feature/item|3.0160|1.5.8|20797|&lt;br /&gt;
This function returns the position of the dummy for the given vehicle.}}&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
float, float, float getVehicleDummyPosition ( vehicle theVehicle, string dummy )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{OOP||[[vehicle]]:getDummyPosition||setVehicleDummyPosition}}&lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theVehicle:''' The [[vehicle]] you want to get the dummy positions from&lt;br /&gt;
*'''dummy:''' The dummy whose position you want to get&lt;br /&gt;
&lt;br /&gt;
==Allowed dummies==&lt;br /&gt;
{{VehicleDummies}}&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns three floats indicating the position ''x'', ''y'' and ''z'' of the vehicle's dummy. It returns ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
This is a command to get the position of the player's vehicle dummy position specified as an argument.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function getDummyPosition(cmd, dummy)&lt;br /&gt;
    if (not dummy) then&lt;br /&gt;
        return false&lt;br /&gt;
    end&lt;br /&gt;
    local veh = getPedOccupiedVehicle(localPlayer)&lt;br /&gt;
    if (not veh) then&lt;br /&gt;
        outputChatBox(&amp;quot;You should be in a vehicle to use this command&amp;quot;, 255, 25, 25)&lt;br /&gt;
        return false&lt;br /&gt;
    end&lt;br /&gt;
    local x, y, z = getVehicleDummyPosition(veh, dummy)&lt;br /&gt;
    outputChatBox(&amp;quot;X: &amp;quot;..x..&amp;quot;, Y: &amp;quot;..y..&amp;quot;, Z: &amp;quot;..z, 0, 255, 0)&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler(&amp;quot;getdummy&amp;quot;, getDummyPosition)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
{{Requirements||1.5.8-9.20797|}}&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Client vehicle functions}}&lt;/div&gt;</summary>
		<author><name>Remaked</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=OnPedVehicleEnter&amp;diff=68596</id>
		<title>OnPedVehicleEnter</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=OnPedVehicleEnter&amp;diff=68596"/>
		<updated>2021-02-04T02:18:48Z</updated>

		<summary type="html">&lt;p&gt;Remaked: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Server event}}&lt;br /&gt;
{{New feature/item|3.0160|1.5.8|20740|This event is triggered when a ped enters a vehicle.}}&lt;br /&gt;
&lt;br /&gt;
==Parameters== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
vehicle theVehicle, int seat, ped jacked&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
*'''theVehicle''': a [[vehicle]] element representing the vehicle that was entered.&lt;br /&gt;
*'''seat''': an [[int]] representing the seat in which the ped is entering.&lt;br /&gt;
*'''jacked''': a [[player]] or [[ped]] element representing who has been jacked.&lt;br /&gt;
&lt;br /&gt;
==Source==&lt;br /&gt;
The [[event system#Event source|source]] of this event is the [[ped]] that entered the vehicle.&lt;br /&gt;
&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;
Sending a message to every player when ped has entered to a vehicle&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function sendMessage(theVehicle, seat)&lt;br /&gt;
   local vehicleName = getVehicleName(theVehicle) -- Get name of the vehicle&lt;br /&gt;
   if seat==0 then -- if the ped is a driver&lt;br /&gt;
      outputChatBox(&amp;quot;Ped is now a driver of &amp;quot;..vehicleName, root)&lt;br /&gt;
   else -- if not&lt;br /&gt;
      outputChatBox(&amp;quot;Ped has entered to &amp;quot;..vehicleName, root)&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onPedVehicleEnter&amp;quot;, root, sendMessage)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
{{See also/Server event|Ped events}}&lt;/div&gt;</summary>
		<author><name>Remaked</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=OnPedVehicleExit&amp;diff=68595</id>
		<title>OnPedVehicleExit</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=OnPedVehicleExit&amp;diff=68595"/>
		<updated>2021-02-04T02:16:50Z</updated>

		<summary type="html">&lt;p&gt;Remaked: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Server event}}&lt;br /&gt;
{{New feature/item|3.0160|1.5.8|20740|This event is triggered when a ped leaves a vehicle.}}&lt;br /&gt;
&lt;br /&gt;
==Parameters== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
vehicle theVehicle, int seat, ped jacker, bool forcedByScript&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
*'''theVehicle''': a [[vehicle]] element representing the vehicle in which the ped exited from.&lt;br /&gt;
*'''seat''': an [[int]] representing the seat in which the ped was before exiting.&lt;br /&gt;
*'''jacker''': a [[player]] or [[ped]] element representing who jacked the driver.&lt;br /&gt;
*'''forcedByScript:''' a [[boolean]] representing whether the exit was forced using [[removePedFromVehicle]] or by the ped.&lt;br /&gt;
&lt;br /&gt;
==Source==&lt;br /&gt;
The [[event system#Event source|source]] of this event is the [[ped]] that left the vehicle.&lt;br /&gt;
&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;
Destroy the vehicle when ped has been jacked and kick the jacker if exists&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function destroyVehicle(theVehicle, seat, jacker, forcedByScript)&lt;br /&gt;
   if seat==0 then -- If ped was a driver&lt;br /&gt;
      if forcedByScript then&lt;br /&gt;
         destroyElement(theVehicle) -- If the exit was forced using removePedFromVehicle then destroy the vehicle&lt;br /&gt;
      elseif jacker then&lt;br /&gt;
         kickPlayer(jacker)&lt;br /&gt;
         destroyElement(theVehicle)&lt;br /&gt;
      end&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onPedVehicleExit&amp;quot;, root, destroyVehicle)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
{{See also/Server event|Ped events}}&lt;/div&gt;</summary>
		<author><name>Remaked</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetElementBonePosition&amp;diff=68041</id>
		<title>GetElementBonePosition</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetElementBonePosition&amp;diff=68041"/>
		<updated>2020-12-14T12:27:46Z</updated>

		<summary type="html">&lt;p&gt;Remaked: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Client function}}&lt;br /&gt;
{{New feature/item|3.0160|1.5.8|20704|Returns the 3D world coordinates of a specific bone of a given [[element]]. Currently the following element types are accepted:&lt;br /&gt;
* [[Element/Player|Player]]&lt;br /&gt;
* [[Element/Ped|Ped]]&lt;br /&gt;
}}&lt;br /&gt;
{{Tip|If you want to attach an element to a bone, see [[attachElementToBone]]}}&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 getElementBonePosition ( element theElement, int bone )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''theElement:''' the element to get the bone position on.&lt;br /&gt;
*'''bone:''' the ID of the bone to get the position of. See [[Bone IDs]]&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns the x, y, z world position of the bone.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This example outputs the x, y, z world position of the local player bone specified through a command.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function getBonePosition(cmd, ID)&lt;br /&gt;
    if (not ID) then&lt;br /&gt;
        outputChatBox(&amp;quot;You didn't insert an ID&amp;quot;, 255, 0, 0)&lt;br /&gt;
        return false&lt;br /&gt;
    end&lt;br /&gt;
    local x, y, z = getElementBonePosition(localPlayer, ID)&lt;br /&gt;
    outputChatBox(&amp;quot;The bone position is: &amp;quot;..x..&amp;quot;, &amp;quot;..y..&amp;quot;, &amp;quot;..z)&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler(&amp;quot;getboneposition&amp;quot;, getBonePosition)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Client_element_functions}}&lt;/div&gt;</summary>
		<author><name>Remaked</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetVehicleRespawnPosition&amp;diff=68040</id>
		<title>GetVehicleRespawnPosition</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetVehicleRespawnPosition&amp;diff=68040"/>
		<updated>2020-12-14T12:09:04Z</updated>

		<summary type="html">&lt;p&gt;Remaked: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Server function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
{{New feature/item|3.0156|1.5.5|14053|This function retrieves the respawn coordinates of a [[vehicle]].}}&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
float, float, float getVehicleRespawnPosition ( element theVehicle )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{OOP||[[vehicle]]:getRespawnPosition|respawnPosition|setVehicleRespawnPosition}}&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''theVehicle:''' The [[vehicle]] which you'd like to retrieve the respawn coordinates of.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns three [[float|floats]] indicating the respawn coordinates of the [[vehicle]], ''x'', ''y'' and ''z'' respectively.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This example outputs the player's current vehicle respawn position.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function getRespawnPosition(plr)&lt;br /&gt;
    if (not plr) then&lt;br /&gt;
        return false&lt;br /&gt;
    end&lt;br /&gt;
    local veh = getPedOccupiedVehicle(plr)&lt;br /&gt;
    if (not veh) then&lt;br /&gt;
        return false&lt;br /&gt;
    end&lt;br /&gt;
    local x, y, z = getVehicleRespawnPosition(veh)&lt;br /&gt;
    return x, y, z&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Vehicle_functions}}&lt;/div&gt;</summary>
		<author><name>Remaked</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=OnClientPedVehicleExit&amp;diff=68039</id>
		<title>OnClientPedVehicleExit</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=OnClientPedVehicleExit&amp;diff=68039"/>
		<updated>2020-12-14T11:55:39Z</updated>

		<summary type="html">&lt;p&gt;Remaked: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Client event}}&lt;br /&gt;
__NOTOC__ &lt;br /&gt;
{{New feature/item|3.0160|1.5.8|20740|This event is fired when a [[ped]] has exited a [[vehicle]].}}&lt;br /&gt;
&lt;br /&gt;
==Parameters== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
vehicle theVehicle, int seat&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
*'''theVehicle:''' the vehicle that the ped exited.&lt;br /&gt;
*'''seat:''' the number of the seat that the ped was sitting on.&lt;br /&gt;
&lt;br /&gt;
==Source==&lt;br /&gt;
The source of this event is the [[ped]] that exited the vehicle.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
This example will immediately delete any vehicle a ped exits if the vehicle's health is below 500.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function deleteVehicleOnExit(theVehicle, seat)&lt;br /&gt;
    local vehHealth = getElementHealth(theVehicle)&lt;br /&gt;
    if (vehHealth &amp;lt; 500) then&lt;br /&gt;
        destroyElement(theVehicle)&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onClientPedVehicleExit&amp;quot;, root, deleteVehicleOnExit)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
&lt;br /&gt;
===Client ped events===&lt;br /&gt;
{{Client_ped_events}}&lt;br /&gt;
===Client ped functions===&lt;br /&gt;
{{Client_ped_functions}}&lt;/div&gt;</summary>
		<author><name>Remaked</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=OnClientPedVehicleExit&amp;diff=67968</id>
		<title>OnClientPedVehicleExit</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=OnClientPedVehicleExit&amp;diff=67968"/>
		<updated>2020-12-08T20:18:18Z</updated>

		<summary type="html">&lt;p&gt;Remaked: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Client event}}&lt;br /&gt;
__NOTOC__ &lt;br /&gt;
{{New feature/item|3.0160|1.5.8|20740|This event is fired when a [[ped]] has exited a [[vehicle]].}}&lt;br /&gt;
&lt;br /&gt;
==Parameters== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
vehicle theVehicle, int seat&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
*'''theVehicle:''' the vehicle that the ped exited.&lt;br /&gt;
*'''seat:''' the number of the seat that the ped was sitting on.&lt;br /&gt;
&lt;br /&gt;
==Source==&lt;br /&gt;
The source of this event is the [[ped]] that exited the vehicle.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
This example will immediately blow any vehicle a ped exits if the vehicle's health is below 500.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function blowVehicleOnExit(theVehicle, seat)&lt;br /&gt;
    local vehHealth = getElementHealth(theVehicle)&lt;br /&gt;
    if (vehHealth &amp;lt; 500) then&lt;br /&gt;
        blowVehicle(theVehicle)&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onClientPedVehicleExit&amp;quot;, root, blowVehicleOnExit)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
&lt;br /&gt;
===Client ped events===&lt;br /&gt;
{{Client_ped_events}}&lt;br /&gt;
===Client ped functions===&lt;br /&gt;
{{Client_ped_functions}}&lt;/div&gt;</summary>
		<author><name>Remaked</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=OnClientPedVehicleEnter&amp;diff=67967</id>
		<title>OnClientPedVehicleEnter</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=OnClientPedVehicleEnter&amp;diff=67967"/>
		<updated>2020-12-08T20:06:40Z</updated>

		<summary type="html">&lt;p&gt;Remaked: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Client event}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
{{New feature/item|3.0160|1.5.8|20740|This event is fired when a [[ped]] has entered a [[vehicle]].}}&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
vehicle theVehicle, int seat&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
*'''theVehicle:''' the [[vehicle]] that the ped entered&lt;br /&gt;
*'''seat:''' the seat that the ped now is on. Driver's seat = 0, higher numbers are passenger seats.&lt;br /&gt;
&lt;br /&gt;
==Source==&lt;br /&gt;
The [[event system#Event source|source]] of this event is the [[ped]] that entered the vehicle.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This example outputs a text when a ped enters a bike as a driver.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function detectVehicleEnterByPed(theVehicle, seat)&lt;br /&gt;
    if (getVehicleType(theVehicle) == &amp;quot;Bike&amp;quot; and seat == 0) then&lt;br /&gt;
        outputChatBox(&amp;quot;A ped has entered a bike as a driver!&amp;quot;, 0, 255, 0)&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onClientPedVehicleEnter&amp;quot;, root, detectVehicleEnterByPed)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
&lt;br /&gt;
===Client ped events===&lt;br /&gt;
{{Client_ped_events}}&lt;br /&gt;
===Client ped functions===&lt;br /&gt;
{{Client_ped_functions}}&lt;/div&gt;</summary>
		<author><name>Remaked</name></author>
	</entry>
</feed>