# ENTITY::SET_ENTITY_AS_NO_LONGER_NEEDED

- **Hash:** `0x4971D2F8162B9674`
- **Namespace:** ENTITY
- **Runtime name (Lua/JS):** `SetEntityAsNoLongerNeeded`
- **Side:** client (game native)
- **Name status:** official
- **Documentation:** described
- **Since game build:** 1207
- **URL:** https://natives.borderlinerp.com/natives/ENTITY/SET_ENTITY_AS_NO_LONGER_NEEDED

## Signature

```c
void SET_ENTITY_AS_NO_LONGER_NEEDED(Entity* entity);
```

## Parameters

- `entity` (`Entity*`)

## 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

```lua
local entity = SetEntityAsNoLongerNeeded(entity)

-- always available, by hash
local entity = Citizen.InvokeNative(0x4971D2F8162B9674, Citizen.PointerValueIntInitialized(entity))
```

### JavaScript

```js
const entity = SetEntityAsNoLongerNeeded(entity);

// by hash
const entity = Citizen.invokeNative('0x4971D2F8162B9674', Citizen.pointerValueIntInitialized(entity));
```

### C#

```csharp
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.*
