# VEHICLE::GET_VEHICLE_TRAILER_VEHICLE

- **Hash:** `0xCF867A239EC30741`
- **Namespace:** VEHICLE
- **Runtime name (Lua/JS):** `GetVehicleTrailerVehicle`
- **Side:** client (game native)
- **Name status:** official
- **Documentation:** described
- **Since game build:** 1207
- **URL:** https://natives.borderlinerp.com/natives/VEHICLE/GET_VEHICLE_TRAILER_VEHICLE

## Signature

```c
BOOL GET_VEHICLE_TRAILER_VEHICLE(Vehicle vehicle, Vehicle* trailer);
```

## Parameters

- `vehicle` (`Vehicle`)
- `trailer` (`Vehicle*`)

## Returns

`BOOL`

## Description

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

## Usage

### Lua

```lua
local retval, trailer = GetVehicleTrailerVehicle(vehicle, trailer)

-- always available, by hash
local retval, trailer = Citizen.InvokeNative(0xCF867A239EC30741, vehicle, Citizen.PointerValueIntInitialized(trailer), Citizen.ReturnResultAnyway())
```

### JavaScript

```js
const [retval, trailer] = GetVehicleTrailerVehicle(vehicle, trailer);

// by hash
const [retval, trailer] = Citizen.invokeNative('0xCF867A239EC30741', vehicle, Citizen.pointerValueIntInitialized(trailer), Citizen.returnResultAnyway());
```

### C#

```csharp
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.*
