<?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=Timothy</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=Timothy"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/wiki/Special:Contributions/Timothy"/>
	<updated>2026-04-07T23:37:02Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetVehicleDoorOpenRatio&amp;diff=36537</id>
		<title>SetVehicleDoorOpenRatio</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetVehicleDoorOpenRatio&amp;diff=36537"/>
		<updated>2013-07-05T06:58:25Z</updated>

		<summary type="html">&lt;p&gt;Timothy: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Server client function}}&lt;br /&gt;
This function sets how much a vehicle's door is open. Doors include the boot/trunk and the bonnet of the vehicle.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool setVehicleDoorOpenRatio ( vehicle theVehicle, int door, float ratio [, int time = 0] )&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 change the door open ratio of.&lt;br /&gt;
*'''door:''' A whole number, 0 (hood), 1 (trunk), 2 (front left), 3 (front right), 4 (rear left), 5 (rear right)&lt;br /&gt;
*'''ratio:''' The ratio value, ranging from 0 (fully closed) to 1 (fully open).&lt;br /&gt;
&lt;br /&gt;
==Optional Arguments==&lt;br /&gt;
{{OptionalArg}} &lt;br /&gt;
*'''time:''' The number of milliseconds the door should take to reach the value you have specified. A value of 0 will change the door open ratio instantly.&lt;br /&gt;
&lt;br /&gt;
==Returns==&lt;br /&gt;
Returns ''true'' if the door open ratio was successfully set, ''false'' if invalid arguments are passed.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This example opens all the doors of the vehicle gradually over 2.5 seconds.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addCommandHandler ( &amp;quot;carshowoff&amp;quot;, function ( playerSource )&lt;br /&gt;
	local vehicle = getPedOccupiedVehicle ( playerSource )&lt;br /&gt;
	if vehicle then&lt;br /&gt;
		for i=0,5 do&lt;br /&gt;
			setVehicleDoorOpenRatio ( vehicle, i, 1 - getVehicleDoorOpenRatio ( vehicle, i ), 2500 )&lt;br /&gt;
		end&lt;br /&gt;
	end&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>Timothy</name></author>
	</entry>
</feed>