GET_VEHICLE_TYPE_RAW
Returns the model type of the vehicle as defined by:
Signature
int GET_VEHICLE_TYPE_RAW(Vehicle vehicle);Parameters
| Name | Type | Description |
|---|---|---|
vehicle | Vehicle | The vehicle's entity handle. |
Returns int — Returns the vehicles model type
Description
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
local retval = GetVehicleTypeRaw(vehicle)
-- always works, by hash
local retval = Citizen.InvokeNative(0xde73bc10, vehicle, Citizen.ResultAsInteger())JavaScript and C#
const retval = GetVehicleTypeRaw(vehicle);
// by hash
const retval = Citizen.invokeNative('0xde73bc10', vehicle, Citizen.returnResultAnyway(), Citizen.resultAsInteger());int retval = Function.Call<int>((Hash)0xde73bc10, vehicle);Sources
Something wrong or missing? Contribute a verified note — corrections ship through pull requests.