VehicleClient1 output

getVehicleTrailerVehicle

GET_VEHICLE_TRAILER_VEHICLE0x1CDD6BADC297830D

The GTA V native GET_VEHICLE_TRAILER_VEHICLE of the VEHICLE namespace, as LS:MP client scripts call it: the global function getVehicleTrailerVehicle, in JavaScript and in Lua.

SignatureJavaScript
getVehicleTrailerVehicle(vehicle: Vehicle): [ok: boolean, trailer: Vehicle]
SignatureLua
getVehicleTrailerVehicle(vehicle: Vehicle): boolean, Vehicle

Usage

JavaScript
const [ok, trailer] = getVehicleTrailerVehicle(vehicle);
Lua
local ok, trailer = getVehicleTrailerVehicle(vehicle)

Parameters

ParameterTypeJavaScriptLua
vehicleVehiclenumberinteger

Returns

2 values, in this order: an array in JavaScript, multiple return values in Lua.

#ValueTypeJavaScriptLuaDescription
1okBOOLbooleanbooleanThe native’s own return value.
2trailerVehiclenumberintegeroutput

Notes

From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.

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

Reference

Namespace
Vehicle VEHICLE
In the game
BOOL GET_VEHICLE_TRAILER_VEHICLE(Vehicle vehicle, Vehicle* trailer)
Hash
0x1CDD6BADC297830D

Open in the interactive natives reference