getVehicleWheelScale
Shared
Returns the radius factor of a vehicle's tyres.
float|table|false getVehicleWheelScale(vehicle vehicle [, int|string|table wheels = "all"])
Parameters
| Name | Type | Description |
|---|---|---|
| vehicle | vehicle | The vehicle. |
| wheels | int|string|table | Which 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 radius factor. 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 scales = getVehicleWheelScale(vehicle, "front_wheels")
outputDebugString(scales.wheel_lf .. " / " .. scales.wheel_rf)
end