GET_VEHICLE_TYPE
Returns the type of the passed vehicle.
Signature
char* GET_VEHICLE_TYPE(Vehicle vehicle);Parameters
| Name | Type | Description |
|---|---|---|
vehicle | Vehicle | The vehicle's entity handle. |
Returns char* — If the entity is a vehicle, the vehicle type. If it is not a vehicle, the return value will be null.
Description
Returns the type of the passed vehicle.
For client scripts, reference the more detailed GET_VEHICLE_TYPE_RAW native.
Vehicle types
- automobile
- bike
- boat
- heli
- plane
- submarine
- trailer
- train
Usage
local retval = GetVehicleType(vehicle)
-- always works, by hash
local retval = Citizen.InvokeNative(0xa273060e, vehicle, Citizen.ResultAsString())JavaScript and C#
const retval = GetVehicleType(vehicle);
// by hash
const retval = Citizen.invokeNative('0xa273060e', vehicle, Citizen.returnResultAnyway(), Citizen.resultAsString());string retval = Function.Call<string>((Hash)0xa273060e, vehicle);Sources
Something wrong or missing? Contribute a verified note — corrections ship through pull requests.