VehicleClientNot in this build

getVehicleMaxDriveGearCount

_GET_VEHICLE_MAX_DRIVE_GEAR_COUNT0x24910C3D66BA770D

The GTA V native _GET_VEHICLE_MAX_DRIVE_GEAR_COUNT of the VEHICLE namespace, as LS:MP client scripts call it: the global function getVehicleMaxDriveGearCount, in JavaScript and in Lua.

SignatureJavaScript
getVehicleMaxDriveGearCount(vehicle: Vehicle): number
SignatureLua
getVehicleMaxDriveGearCount(vehicle: Vehicle): integer
⚠
Not in this game build

The global exists, but the native is not part of the game build LS:MP runs: calling it does nothing and returns undefined in JavaScript, nil in Lua. It never throws. See Coverage.

Usage

JavaScript
const result = getVehicleMaxDriveGearCount(vehicle);
Lua
local result = getVehicleMaxDriveGearCount(vehicle)

Parameters

ParameterTypeJavaScriptLua
vehicleVehiclenumberinteger

Returns

int JavaScript number, Lua integer

Reference

Namespace
Vehicle VEHICLE
In the game
int _GET_VEHICLE_MAX_DRIVE_GEAR_COUNT(Vehicle vehicle)
Hash
0x24910C3D66BA770D
Introduced
Game build 3095 legacy numbering

Open in the interactive natives reference