The Lab
VEHICLE native

GET_VEHICLE_TRAILER_VEHICLE

returns BOOL2 paramsbuild 1207

Writes the trailer attached to vehicle into trailer, returning true if there is one.

Signature

C
BOOL GET_VEHICLE_TRAILER_VEHICLE(Vehicle vehicle, Vehicle* trailer); // 0xCF867A239EC30741 b1207

Parameters

#NameType
1vehicleVehicle
2trailerVehicle* (out pointer)

Facts

Facts about GET_VEHICLE_TRAILER_VEHICLE
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.

Lua
local result, trailer = Citizen.InvokeNative(0xCF867A239EC30741, -- GET_VEHICLE_TRAILER_VEHICLE
  0, -- Vehicle vehicle
  Citizen.PointerValueInt(), -- Vehicle* trailer
  Citizen.ReturnResultAnyway()
)
if result then
  -- ...
end
JavaScript
const [result, trailer] = Citizen.invokeNative("0xCF867A239EC30741", // GET_VEHICLE_TRAILER_VEHICLE
  0, // Vehicle vehicle
  Citizen.pointerValueInt(), // Vehicle* trailer
  Citizen.returnResultAnyway()
);
if (result) {
  // ...
}
C#
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>();
All VEHICLE natives

Facts compiled from community research (alloc8or/rdr3-nativedb-data, femga/rdr3_discoveries); descriptions and examples by The Lab.