<?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=Dnlk</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=Dnlk"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/wiki/Special:Contributions/Dnlk"/>
	<updated>2026-05-11T05:10:23Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetVehicleWheelsRotation&amp;diff=79698</id>
		<title>SetVehicleWheelsRotation</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetVehicleWheelsRotation&amp;diff=79698"/>
		<updated>2024-06-30T08:38:27Z</updated>

		<summary type="html">&lt;p&gt;Dnlk: Replaced vehicleElement with theVehicle as seen on all other vehicle related functions&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Client function}}&lt;br /&gt;
This function is used to manipulate the wheel rotation of a vehicle. Cars, Bikes (including BMX) and Trailers are supported.&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 setVehicleWheelsRotation ( vehicle theVehicle, float rotation )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
* '''theVehicle:''' the vehicle whose wheel rotation is to be set.&lt;br /&gt;
* '''rotation:''' the new wheel rotation value.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if successful, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This example sets the wheel rotation of the vehicle when the player gets into any vehicle and if there is any attached trailer.&lt;br /&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;
addEventHandler(&amp;quot;onClientVehicleEnter&amp;quot;, root,&lt;br /&gt;
    function()&lt;br /&gt;
        local theVeh = getPedOccupiedVehicle(localPlayer)&lt;br /&gt;
        if setVehicleWheelsRotation(theVeh, 0) then &lt;br /&gt;
            outputChatBox(&amp;quot;SET OK&amp;quot;)&lt;br /&gt;
        else&lt;br /&gt;
            outputChatBox(&amp;quot;SET FAILED&amp;quot;)&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
addEventHandler(&amp;quot;onClientPreRender&amp;quot;, root, function()&lt;br /&gt;
    local theVeh = getPedOccupiedVehicle(localPlayer)&lt;br /&gt;
    if theVeh then&lt;br /&gt;
        setVehicleWheelsRotation(theVeh, 0)&lt;br /&gt;
        -- also do it for trailer&lt;br /&gt;
        local trailer = getVehicleTowedByVehicle(theVeh)&lt;br /&gt;
        if trailer then&lt;br /&gt;
            setVehicleWheelsRotation(trailer, 0)&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 vehicle functions}}&lt;/div&gt;</summary>
		<author><name>Dnlk</name></author>
	</entry>
</feed>