getVehicleTrailerVehicle
GET_VEHICLE_TRAILER_VEHICLE0x1CDD6BADC297830DThe 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.
getVehicleTrailerVehicle(vehicle: Vehicle): [ok: boolean, trailer: Vehicle]getVehicleTrailerVehicle(vehicle: Vehicle): boolean, VehicleUsage
JavaScript
const [ok, trailer] = getVehicleTrailerVehicle(vehicle);Lua
local ok, trailer = getVehicleTrailerVehicle(vehicle)Parameters
| Parameter | Type | JavaScript | Lua |
|---|---|---|---|
vehicle | Vehicle | number | integer |
Returns
2 values, in this order: an array in JavaScript, multiple return values in Lua.
| # | Value | Type | JavaScript | Lua | Description |
|---|---|---|---|---|---|
| 1 | ok | BOOL | boolean | boolean | The native’s own return value. |
| 2 | trailer | Vehicle | number | integer | output |
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