# CFX::GET_ENTITY_ORPHAN_MODE

- **Hash:** `0xD16EA02F`
- **Namespace:** CFX
- **Runtime name (Lua/JS):** `GetEntityOrphanMode`
- **Side:** server (Cfx runtime native)
- **Name status:** official
- **Documentation:** described
- **URL:** https://natives.borderlinerp.com/natives/CFX/GET_ENTITY_ORPHAN_MODE

## Signature

```c
int GET_ENTITY_ORPHAN_MODE(Entity entity);
```

## Parameters

- `entity` (`Entity`) — The entity to get the orphan mode of

## Returns

`int` — Returns the entities current orphan mode, refer to enum in [SET_ENTITY_ORPHAN_MODE](#\_0x489E9162)

## Usage

### Lua

```lua
local retval = GetEntityOrphanMode(entity)

-- always available, by hash
local retval = Citizen.InvokeNative(0xd16ea02f, entity, Citizen.ResultAsInteger())
```

### JavaScript

```js
const retval = GetEntityOrphanMode(entity);

// by hash
const retval = Citizen.invokeNative('0xd16ea02f', entity, Citizen.returnResultAnyway(), Citizen.resultAsInteger());
```

### C#

```csharp
int retval = Function.Call<int>((Hash)0xd16ea02f, entity);
```

## See also

- [CFX::SET_ENTITY_ORPHAN_MODE](https://natives.borderlinerp.com/natives/CFX/SET_ENTITY_ORPHAN_MODE.md) — Sets what the server will do when the entity no longer has its original owner.

*Sources: Cfx.re native reference.*
