# CFX::GET_ENTITY_POPULATION_TYPE

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

## Signature

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

## Parameters

- `entity` (`Entity`) — the entity to obtain the population type from

## Returns

`int` — Returns the population type ID, defined by the below enumeration:```cpp
enum ePopulationType
{
	POPTYPE_UNKNOWN = 0,
	POPTYPE_RANDOM_PERMANENT,
	POPTYPE_RANDOM_PARKED,
	POPTYPE_RANDOM_PATROL,
	POPTYPE_RANDOM_SCENARIO,
	POPTYPE_RANDOM_AMBIENT,
	POPTYPE_PERMANENT,
	POPTYPE_MISSION,
	POPTYPE_REPLAY,
	POPTYPE_CACHE,
	POPTYPE_TOOL
};
```

## Description

*Source: Cfx.re native reference*

This native gets an entity's population type.

## Usage

### Lua

```lua
local retval = GetEntityPopulationType(entity)

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

### JavaScript

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

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

### C#

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

*Sources: Cfx.re native reference.*
