getVehicleWheelStates
Shared
Returns the state of a vehicle's four wheels.
int|false getVehicleWheelStates(vehicle vehicle)
Parameters
| Name | Type | Description |
|---|---|---|
| vehicle | vehicle | The vehicle. |
Returns
Four numbers, in the order front left, rear left, front right and rear right (0 inflated, 1 flat, 2 fallen off, 3 drawn but without collision), or false if they could not be read.
Example
addCommandHandler("rodas", function(player)
local vehicle = getPedOccupiedVehicle(player)
if not vehicle then return end
local frontLeft, rearLeft, frontRight, rearRight = getVehicleWheelStates(vehicle)
outputDebugString(frontLeft .. " " .. rearLeft .. " " .. frontRight .. " " .. rearRight)
end)