VehicleClient

setCargobobPickupMagnetActive

SET_CARGOBOB_PICKUP_MAGNET_ACTIVE0x9A665550F8DA349B

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

SignatureJavaScript
setCargobobPickupMagnetActive(cargobob: Vehicle, isActive: boolean): void
SignatureLua
setCargobobPickupMagnetActive(cargobob: Vehicle, isActive: boolean)

Usage

JavaScript
setCargobobPickupMagnetActive(cargobob, isActive);
Lua
setCargobobPickupMagnetActive(cargobob, isActive)

Parameters

ParameterTypeJavaScriptLua
cargobobVehiclenumberinteger
isActiveBOOLbooleanboolean

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.

Won't attract or magnetize to any helicopters or planes of course, but that's common sense.

Reference

Namespace
Vehicle VEHICLE
In the game
void SET_CARGOBOB_PICKUP_MAGNET_ACTIVE(Vehicle cargobob, BOOL isActive)
Hash
0x9A665550F8DA349B
Formerly
_CARGOBOB_MAGNET_GRAB_VEHICLE _SET_CARGOBOB_PICKUP_MAGNET_ACTIVE

Open in the interactive natives reference