detachEntity
DETACH_ENTITY0x961AC54BF0613F5DThe GTA V native DETACH_ENTITY of the ENTITY namespace, as LS:MP client scripts call it: the global function detachEntity, in JavaScript and in Lua.
detachEntity(entity: Entity, dynamic: boolean, collision: boolean): voiddetachEntity(entity: Entity, dynamic: boolean, collision: boolean)Usage
JavaScript
detachEntity(entity, dynamic, collision);Lua
detachEntity(entity, dynamic, collision)Parameters
| Parameter | Type | JavaScript | Lua |
|---|---|---|---|
entity | Entity | number | integer |
dynamic | BOOL | boolean | boolean |
collision | BOOL | boolean | boolean |
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.
If collision is set to true, both entities won't collide with the other until the distance between them is above 4 meters.
Set dynamic to true to keep velocity after dettaching
Reference
- Namespace
- Entity ENTITY
- In the game
void DETACH_ENTITY(Entity entity, BOOL dynamic, BOOL collision)- Hash
0x961AC54BF0613F5D