M MY Multiplayer: Wiki
Side
Kind

getVehicleWheelOffset

Shared

Returns the offset of a vehicle's wheels.

vec3|table|false getVehicleWheelOffset(vehicle vehicle [, int|string|table wheels = "all"])

Parameters

NameTypeDescription
vehiclevehicleThe vehicle.
wheelsint|string|tableWhich wheels: a number (0 front left, 1 rear left, 2 front right, 3 rear right, 4 onwards the extra wheels, -1 all), the wheel's name (wheel_lf, wheel_lr, wheel_rf, wheel_rr or an extra wheel such as wheel_lm1), a group (all, front_wheels, rear_wheels, left_wheels, right_wheels) or a table of these. All of them by default.default "all"

Returns

The offset as an x, y, z vector (x outward, y forward, z up). A single value when wheels is one number or name outside a table; otherwise a table keyed by wheel name. false if the vehicle lacks any of the wheels asked for.

Example

local vehicle = getPedOccupiedVehicle(localPlayer)
if vehicle then
    local offset = getVehicleWheelOffset(vehicle, "wheel_rr")
    outputDebugString(tostring(offset))
end

See also