VehicleClient

setCargobobForceDontDetachVehicle

SET_CARGOBOB_FORCE_DONT_DETACH_VEHICLE0x571FEB383F629926

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

SignatureJavaScript
setCargobobForceDontDetachVehicle(cargobob: Vehicle, toggle: boolean): void
SignatureLua
setCargobobForceDontDetachVehicle(cargobob: Vehicle, toggle: boolean)

Usage

JavaScript
setCargobobForceDontDetachVehicle(cargobob, toggle);
Lua
setCargobobForceDontDetachVehicle(cargobob, toggle)

Parameters

ParameterTypeJavaScriptLua
cargobobVehiclenumberinteger
toggleBOOLbooleanboolean

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.

Stops cargobob from being able to detach the attached vehicle.

Reference

Namespace
Vehicle VEHICLE
In the game
void SET_CARGOBOB_FORCE_DONT_DETACH_VEHICLE(Vehicle cargobob, BOOL toggle)
Hash
0x571FEB383F629926
Formerly
_SET_CARGOBOB_HOOK_CAN_DETACH

Open in the interactive natives reference