setVehicleWheelsRotation | Multi Theft Auto: Wiki Skip to content

setVehicleWheelsRotation

Client-side
Server-side
Shared

This page is incomplete! Help wanted!

Please finish this page using the corresponding Old Wiki article.
Go to Contribution guidelines for more information.


This function is used to manipulate the wheel rotation of a vehicle. Cars, Bikes (including BMX) and Trailers are supported.

Syntax

setVehicleWheelsRotation ( )

Code Examples

client
addEventHandler("onClientVehicleEnter", root,
function()
local theVeh = getPedOccupiedVehicle(localPlayer)
if setVehicleWheelsRotation(theVeh, 0) then
outputChatBox("SET OK")
else
outputChatBox("SET FAILED")
end
end
)
addEventHandler("onClientPreRender", root, function()
local theVeh = getPedOccupiedVehicle(localPlayer)
if theVeh then
setVehicleWheelsRotation(theVeh, 0)
-- also do it for trailer
local trailer = getVehicleTowedByVehicle(theVeh)
if trailer then
setVehicleWheelsRotation(trailer, 0)
end
end
end)

See Also

Vehicle Functions