GET_VEHICLE_TRAILER_VEHICLE
Writes the trailer attached to vehicle into trailer, returning true if there is one.
Signature
BOOL GET_VEHICLE_TRAILER_VEHICLE(Vehicle vehicle, Vehicle* trailer); // 0xCF867A239EC30741 b1207Parameters
| # | Name | Type |
|---|---|---|
| 1 | vehicle | Vehicle |
| 2 | trailer | Vehicle* (out pointer) |
Facts
| Name | GET_VEHICLE_TRAILER_VEHICLE |
|---|---|
| Hash | 0xCF867A239EC30741 |
| Namespace | |
| Returns | BOOL |
| Game build | 1207 |
Examples
Calls by hash work in every RedM runtime. Replace the placeholder arguments with your own values.
local result, trailer = Citizen.InvokeNative(0xCF867A239EC30741, -- GET_VEHICLE_TRAILER_VEHICLE
0, -- Vehicle vehicle
Citizen.PointerValueInt(), -- Vehicle* trailer
Citizen.ReturnResultAnyway()
)
if result then
-- ...
endconst [result, trailer] = Citizen.invokeNative("0xCF867A239EC30741", // GET_VEHICLE_TRAILER_VEHICLE
0, // Vehicle vehicle
Citizen.pointerValueInt(), // Vehicle* trailer
Citizen.returnResultAnyway()
);
if (result) {
// ...
}var trailerArg = new OutputArgument();
bool result = Function.Call<bool>((Hash)0xCF867A239EC30741, // GET_VEHICLE_TRAILER_VEHICLE
0, // Vehicle vehicle
trailerArg // Vehicle* trailer
);
int trailer = trailerArg.GetResult<int>();Related VEHICLE natives
- GET_VEHICLE_BODY_HEALTH
- GET_VEHICLE_DOOR_LOCK_STATUS
- GET_VEHICLE_DOORS_LOCKED_FOR_PLAYER
- GET_VEHICLE_ENGINE_HEALTH
- GET_VEHICLE_ESTIMATED_MAX_SPEED
- GET_VEHICLE_MAX_NUMBER_OF_PASSENGERS
- GET_VEHICLE_MODEL_NUMBER_OF_SEATS
- GET_VEHICLE_NUMBER_OF_PASSENGERS
- GET_VEHICLE_PETROL_TANK_HEALTH
- GET_CLOSEST_VEHICLE
- GET_DRIVER_OF_VEHICLE
- GET_LAST_DRIVEN_VEHICLE
Facts compiled from community research (alloc8or/rdr3-nativedb-data, femga/rdr3_discoveries); descriptions and examples by The Lab.