RedM Natives

SET_ENTITY_AS_NO_LONGER_NEEDED

Marks the specified entity (ped, vehicle or object) as no longer needed.

Hash0x4971D2F8162B9674
Runtime nameSetEntityAsNoLongerNeeded
NamespaceENTITY
SideClient
NameOfficial
Docs
Since build1207
GTA V hash0xB736A491E64A32CF

Signature

void SET_ENTITY_AS_NO_LONGER_NEEDED(Entity* entity);

Parameters

NameTypeDescription
entityEntity*—

Returns void

Description

Marks the specified entity (ped, vehicle or object) as no longer needed.
Entities marked as no longer needed, will be deleted as the engine sees fit.

Usage

Lua
local entity = SetEntityAsNoLongerNeeded(entity)

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

// by hash
const entity = Citizen.invokeNative('0x4971D2F8162B9674', Citizen.pointerValueIntInitialized(entity));
C#
var entity = new OutputArgument();
Function.Call((Hash)0x4971D2F8162B9674, 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.