RedM Natives

DELETE_ENTITY

Deletes the specified entity, then sets the handle pointed to by the pointer to NULL.

Hash0x4CD38C78BD19A497
Runtime nameDeleteEntity
NamespaceENTITY
SideClient
NameOfficial
Docs
Since build1207
GTA V hash0xAE3CBE5BF394C9C9

Signature

void DELETE_ENTITY(Entity* entity);

Parameters

NameTypeDescription
entityEntity*—

Returns void

Description

Deletes the specified entity, then sets the handle pointed to by the pointer to NULL.

Usage

Lua
local entity = DeleteEntity(entity)

-- always works, by hash
local entity = Citizen.InvokeNative(0x4CD38C78BD19A497, Citizen.PointerValueIntInitialized(entity))
JavaScript and C#
JavaScript
const entity = DeleteEntity(entity);

// by hash
const entity = Citizen.invokeNative('0x4CD38C78BD19A497', Citizen.pointerValueIntInitialized(entity));
C#
var entity = new OutputArgument();
Function.Call((Hash)0x4CD38C78BD19A497, entity);
// entity.GetResult<int>()
  • The last argument is an in/out pointer: pass its initial value, and the updated value is returned after the result.

Sources

alloc8or RDR3 NativeDB

Something wrong or missing? Contribute a verified note — corrections ship through pull requests.