ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Shared functions
  3. getVehicleWheelStates

Function

getVehicleWheelStates

Server and clientVehiclesIdentical to MTA:SA

Returns the state of a vehicle's four wheels in order: front left, rear left, front right, rear right (0 inflated, 1 flat, 2 fallen off).

Syntax

int, int, int, int getVehicleWheelStates(vehicle vehicle)

Arguments

vehiclevehicle
The vehicle.

Returns

Four wheel states.

Example

addCommandHandler("kola", function(player)
    local vehicle = getPedOccupiedVehicle(player)
    if not vehicle then return end
    local fl, rl, fr, rr = getVehicleWheelStates(vehicle)
    outputChatBox(("Kola: %d %d %d %d"):format(fl, rl, fr, rr), player)
end)

See also