<?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=Chestm007</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=Chestm007"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/wiki/Special:Contributions/Chestm007"/>
	<updated>2026-05-18T00:52:38Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetVehicleCurrentGear&amp;diff=23852</id>
		<title>GetVehicleCurrentGear</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetVehicleCurrentGear&amp;diff=23852"/>
		<updated>2010-07-03T08:37:26Z</updated>

		<summary type="html">&lt;p&gt;Chestm007: Created page with '__NOTOC__  {{Client function}}   Gets the specified vehicle's current gear.  ==Syntax== &amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt; int getVehicleCurrentGear ( vehicle theVehicle ) &amp;lt;/syntaxhighlight&amp;gt;  ===Required Argume…'&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;
&lt;br /&gt;
g_player = getLocalPlayer()&lt;br /&gt;
g_root = getRootElement()&lt;br /&gt;
&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;
&lt;br /&gt;
function onRender()&lt;br /&gt;
	g_vehicle = getPedOccupiedVehicle(g_player)&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;
&lt;br /&gt;
makeGearGui()&lt;br /&gt;
addEventHandler(&amp;quot;onClientRender&amp;quot;,g_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>Chestm007</name></author>
	</entry>
</feed>