EntityClient

setEntityLoadCollisionFlag

SET_ENTITY_LOAD_COLLISION_FLAG0x0DC7CABAB1E9B67E

The GTA V native SET_ENTITY_LOAD_COLLISION_FLAG of the ENTITY namespace, as LS:MP client scripts call it: the global function setEntityLoadCollisionFlag, in JavaScript and in Lua.

SignatureJavaScript
setEntityLoadCollisionFlag(entity: Entity, toggle: boolean, p2: any): void
SignatureLua
setEntityLoadCollisionFlag(entity: Entity, toggle: boolean, p2: any)

Usage

JavaScript
setEntityLoadCollisionFlag(entity, toggle, p2);
Lua
setEntityLoadCollisionFlag(entity, toggle, p2)

Parameters

ParameterTypeJavaScriptLua
entityEntitynumberinteger
toggleBOOLbooleanboolean
p2Anyanyany

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.

Loads collision grid for an entity spawned outside of a player's loaded area. This allows peds to execute tasks rather than sit dormant because of a lack of a physics grid.
Certainly not the main usage of this native but when set to true for a Vehicle, it will prevent the vehicle to explode if it is spawned far away from the player.

Reference

Namespace
Entity ENTITY
In the game
void SET_ENTITY_LOAD_COLLISION_FLAG(Entity entity, BOOL toggle, Any p2)
Hash
0x0DC7CABAB1E9B67E

Open in the interactive natives reference