RedM Natives

GET_VEHICLE_TRAILER_VEHICLE

Gets the trailer of a vehicle and puts it into the trailer parameter.

Hash0xCF867A239EC30741
Runtime nameGetVehicleTrailerVehicle
NamespaceVEHICLE
SideClient
NameOfficial
Docs
Since build1207
GTA V hash0x1CDD6BADC297830D

Signature

BOOL GET_VEHICLE_TRAILER_VEHICLE(Vehicle vehicle, Vehicle* trailer);

Parameters

NameTypeDescription
vehicleVehicle—
trailerVehicle*—

Returns BOOL

Description

Gets the trailer of a vehicle and puts it into the trailer parameter.

Usage

Lua
local retval, trailer = GetVehicleTrailerVehicle(vehicle, trailer)

-- always works, by hash
local retval, trailer = Citizen.InvokeNative(0xCF867A239EC30741, vehicle, Citizen.PointerValueIntInitialized(trailer), Citizen.ReturnResultAnyway())
JavaScript and C#
JavaScript
const [retval, trailer] = GetVehicleTrailerVehicle(vehicle, trailer);

// by hash
const [retval, trailer] = Citizen.invokeNative('0xCF867A239EC30741', vehicle, Citizen.pointerValueIntInitialized(trailer), Citizen.returnResultAnyway());
C#
var trailer = new OutputArgument();
bool retval = Function.Call<bool>((Hash)0xCF867A239EC30741, vehicle, trailer);
// trailer.GetResult<int>()
  • The last argument is an in/out pointer: pass its initial value, and the updated value is returned after the result.

Sources

alloc8or RDR3 NativeDB

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