VehicleClientNot in this build

getVehicleDrivetrainType

_GET_VEHICLE_DRIVETRAIN_TYPE0x1423725069EE1D14

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

SignatureJavaScript
getVehicleDrivetrainType(vehicleModel: Hash): number
SignatureLua
getVehicleDrivetrainType(vehicleModel: Hash): 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 = getVehicleDrivetrainType(vehicleModel);
Lua
local result = getVehicleDrivetrainType(vehicleModel)

Parameters

ParameterTypeJavaScriptLua
vehicleModelHashnumberinteger

Returns

int JavaScript number, Lua integer

Notes

From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.

Returns the vehicle's drivetrain type.

_GET_VEHICLE_DE* - _GET_VEHICLE_DI*

Reference

Namespace
Vehicle VEHICLE
In the game
int _GET_VEHICLE_DRIVETRAIN_TYPE(Hash vehicleModel)
Hash
0x1423725069EE1D14
Introduced
Game build 3258 legacy numbering

Open in the interactive natives reference