VehicleClient

setVehicleAutomaticallyAttaches

SET_VEHICLE_AUTOMATICALLY_ATTACHES0x8BA6F76BC53A1493

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

SignatureJavaScript
setVehicleAutomaticallyAttaches(
  vehicle: Vehicle,
  p1: boolean,
  p2: any
): Entity
SignatureLua
setVehicleAutomaticallyAttaches(
  vehicle: Vehicle,
  p1: boolean,
  p2: any
): Entity

Usage

JavaScript
const entity = setVehicleAutomaticallyAttaches(vehicle, p1, p2);
Lua
local entity = setVehicleAutomaticallyAttaches(vehicle, p1, p2)

Parameters

ParameterTypeJavaScriptLua
vehicleVehiclenumberinteger
p1BOOLbooleanboolean
p2Anyanyany

Returns

Entity JavaScript number, Lua integer

Game handle of an entity: a ped, a vehicle or an object. Not an LS:MP netId. Convert one with lsmp.getEntityFromNetId.

Reference

Namespace
Vehicle VEHICLE
In the game
Entity SET_VEHICLE_AUTOMATICALLY_ATTACHES(Vehicle vehicle, BOOL p1, Any p2)
Hash
0x8BA6F76BC53A1493

Open in the interactive natives reference