attachVehicleToTowTruck
ATTACH_VEHICLE_TO_TOW_TRUCK0x29A16F8D621C4508The GTA V native ATTACH_VEHICLE_TO_TOW_TRUCK of the VEHICLE namespace, as LS:MP client scripts call it: the global function attachVehicleToTowTruck, in JavaScript and in Lua.
attachVehicleToTowTruck(
towTruck: Vehicle,
vehicle: Vehicle,
rear: boolean,
hookOffsetX: number,
hookOffsetY: number,
hookOffsetZ: number
): voidattachVehicleToTowTruck(
towTruck: Vehicle,
vehicle: Vehicle,
rear: boolean,
hookOffsetX: number,
hookOffsetY: number,
hookOffsetZ: number
)Usage
JavaScript
attachVehicleToTowTruck(towTruck, vehicle, rear, hookOffsetX, hookOffsetY, hookOffsetZ);Lua
attachVehicleToTowTruck(towTruck, vehicle, rear, hookOffsetX, hookOffsetY, hookOffsetZ)Three consecutive numbers can be given as one vector: { x, y, z } (or [x, y, z]) in JavaScript, a Vector3 in Lua.
JavaScript · with vectors
attachVehicleToTowTruck(towTruck, vehicle, rear, hookOffset);Lua · with vectors
attachVehicleToTowTruck(towTruck, vehicle, rear, hookOffset)Parameters
| Parameter | Type | JavaScript | Lua |
|---|---|---|---|
towTruck | Vehicle | number | integer |
vehicle | Vehicle | number | integer |
rear | BOOL | boolean | boolean |
hookOffsetX | float | number | number |
hookOffsetY | float | number | number |
hookOffsetZ | float | number | number |
Returns
Nothing. In JavaScript the call evaluates to undefined.
Notes
From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.
HookOffset defines where the hook is attached. leave at 0 for default attachment.
Reference
- Namespace
- Vehicle VEHICLE
- In the game
void ATTACH_VEHICLE_TO_TOW_TRUCK(Vehicle towTruck, Vehicle vehicle, BOOL rear, float hookOffsetX, float hookOffsetY, float hookOffsetZ)- Hash
0x29A16F8D621C4508