RedM Natives

GET_VEHICLE_TYPE_RAW

Returns the model type of the vehicle as defined by:

Hash0xDE73BC10
Runtime nameGetVehicleTypeRaw
NamespaceCFX
SideClient
NameOfficial
Docs

Signature

int GET_VEHICLE_TYPE_RAW(Vehicle vehicle);

Parameters

NameTypeDescription
vehicleVehicle

The vehicle's entity handle.

Returns int — Returns the vehicles model type

Description

Cfx.re native reference

Returns the model type of the vehicle as defined by:

enum VehicleType
{
	VEHICLE_TYPE_NONE = -1,
	VEHICLE_TYPE_CAR = 0,
	VEHICLE_TYPE_PLANE = 1,
	VEHICLE_TYPE_TRAILER = 2,
	VEHICLE_TYPE_QUADBIKE = 3,
	VEHICLE_TYPE_DRAFT = 4,
	VEHICLE_TYPE_SUBMARINECAR = 5,
	VEHICLE_TYPE_AMPHIBIOUS_AUTOMOBILE = 6,
	VEHICLE_TYPE_AMPHIBIOUS_QUADBIKE = 7,
	VEHICLE_TYPE_HELI = 8,
	VEHICLE_TYPE_BLIMP = 9,
	VEHICLE_TYPE_AUTOGYRO = 10,
	VEHICLE_TYPE_BIKE = 11,
	VEHICLE_TYPE_BICYCLE = 12,
	VEHICLE_TYPE_BOAT = 13,
	VEHICLE_TYPE_TRAIN = 14,
	VEHICLE_TYPE_SUBMARINE = 15,
};

Usage

Lua
local retval = GetVehicleTypeRaw(vehicle)

-- always works, by hash
local retval = Citizen.InvokeNative(0xde73bc10, vehicle, Citizen.ResultAsInteger())
JavaScript and C#
JavaScript
const retval = GetVehicleTypeRaw(vehicle);

// by hash
const retval = Citizen.invokeNative('0xde73bc10', vehicle, Citizen.returnResultAnyway(), Citizen.resultAsInteger());
C#
int retval = Function.Call<int>((Hash)0xde73bc10, vehicle);

Sources

Cfx.re native reference

Something wrong or missing? Contribute a verified note — corrections ship through pull requests.