<?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=HomieClone</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=HomieClone"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/wiki/Special:Contributions/HomieClone"/>
	<updated>2026-04-09T22:37:15Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetVehicleWheelStates&amp;diff=21737</id>
		<title>SetVehicleWheelStates</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetVehicleWheelStates&amp;diff=21737"/>
		<updated>2009-10-15T17:20:30Z</updated>

		<summary type="html">&lt;p&gt;HomieClone: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Server client function}}&lt;br /&gt;
{{Needs Checking| In practice the argument order is vehicle, frontLeft, frontRight, backLeft, backRight. Also -1 doesn't work.}}&lt;br /&gt;
This function sets the state of wheels on the vehicle.&lt;br /&gt;
&lt;br /&gt;
Internally, no vehicles have more than 4 wheels. If they appear to, they will be duplicating other wheels.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;bool setVehicleWheelStates ( vehicle theVehicle, int frontLeft, [ int rearLeft = -1, int frontRight = -1, int rearRight = -1 ])&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Required Arguments==&lt;br /&gt;
*'''theVehicle:''' A handle to the [[vehicle]] that you wish to change the wheel states of.&lt;br /&gt;
*'''frontLeft:''' A whole number representing the wheel state (-1 for no change)&lt;br /&gt;
&lt;br /&gt;
==Optional Arguments==&lt;br /&gt;
*'''rearLeft:''' A whole number representing the wheel state (-1 for no change)&lt;br /&gt;
*'''frontRight:''' A whole number representing the wheel state (-1 for no change)&lt;br /&gt;
*'''rearRight:''' A whole number representing the wheel state (-1 for no change)&lt;br /&gt;
&lt;br /&gt;
==Wheel-State values==&lt;br /&gt;
* '''0:''' Inflated&lt;br /&gt;
* '''1:''' Flat&lt;br /&gt;
* '''2:''' Fallen off&lt;br /&gt;
* '''3:''' Collisionless&lt;br /&gt;
&lt;br /&gt;
==Returns==&lt;br /&gt;
Returns a boolean value ''true'' or ''false'' that tells you if it was successful or not.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This example displays the states of the vehicle's wheels and changes their states if any arguments were passed.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function scriptWheelStates ( thePlayer, command, newFLeft, newRLeft, newFRight, newRRight )&lt;br /&gt;
    local theVehicle = getPlayerOccupiedVehicle ( thePlayer )&lt;br /&gt;
    if ( theVehicle ) then      -- check if the player is in a car&lt;br /&gt;
        if ( newFLeft ) then    -- if there's at least one argument passed, we change the wheel states&lt;br /&gt;
            if not setVehicleWheelStates ( theVehicle, newFLeft, newRLeft, newFRight, newRRight ) then&lt;br /&gt;
                outputChatBox ( &amp;quot;Bad arguments.&amp;quot; )&lt;br /&gt;
            end&lt;br /&gt;
        end&lt;br /&gt;
        local states = { [0]=&amp;quot;inflated&amp;quot;, [1]=&amp;quot;flat&amp;quot;, [2]=&amp;quot;fallen off&amp;quot; }    -- we store the states in a table&lt;br /&gt;
        local frontLeft, frontRight, rearLeft, rearRight = getVehicleWheelStates ( theVehicle )&lt;br /&gt;
        outputChatBox ( &amp;quot;Your vehicle's wheel states:&amp;quot;, thePlayer )        -- output them in the chatbox&lt;br /&gt;
        outputChatBox ( &amp;quot;Front-Left: &amp;quot; .. states [ frontLeft ] .. &amp;quot;, Front-Right: &amp;quot; .. states [ frontRight ] ..&lt;br /&gt;
           &amp;quot;, Rear-Left: &amp;quot; .. states [ rearLeft ] .. &amp;quot;, Rear-Right: &amp;quot; .. states [ rearRight ], thePlayer )&lt;br /&gt;
    else&lt;br /&gt;
        outputChatBox ( &amp;quot;You have to be in a vehicle to use this command.&amp;quot;, thePlayer )&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler ( &amp;quot;wheelstates&amp;quot;, scriptWheelStates )&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>HomieClone</name></author>
	</entry>
</feed>