VehicleClientNot in this build

setAllowCollisionWhenInVehicle

_SET_ALLOW_COLLISION_WHEN_IN_VEHICLE0x27D27223E8EF22ED

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

SignatureJavaScript
setAllowCollisionWhenInVehicle(vehicle: Vehicle, toggle: boolean): void
SignatureLua
setAllowCollisionWhenInVehicle(vehicle: Vehicle, toggle: boolean)
⚠
Not in this game build

The global exists, but the native is not part of the game build LS:MP runs: calling it does nothing and returns undefined in JavaScript, nil in Lua. It never throws. See Coverage.

Usage

JavaScript
setAllowCollisionWhenInVehicle(vehicle, toggle);
Lua
setAllowCollisionWhenInVehicle(vehicle, toggle)

Parameters

ParameterTypeJavaScriptLua
vehicleVehiclenumberinteger
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.

_SET_ALLOW_R* - _SET_ALLOW_V*

Reference

Namespace
Vehicle VEHICLE
In the game
void _SET_ALLOW_COLLISION_WHEN_IN_VEHICLE(Vehicle vehicle, BOOL toggle)
Hash
0x27D27223E8EF22ED
Introduced
Game build 3095 legacy numbering

Open in the interactive natives reference