GET_ENTITY_POPULATION_TYPE
This native gets an entity's population type.
Signature
int GET_ENTITY_POPULATION_TYPE(Entity entity);Parameters
| Name | Type | Description |
|---|---|---|
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
This native gets an entity's population type.
Usage
local retval = GetEntityPopulationType(entity)
-- always works, by hash
local retval = Citizen.InvokeNative(0xfc30ddff, entity, Citizen.ResultAsInteger())JavaScript and C#
const retval = GetEntityPopulationType(entity);
// by hash
const retval = Citizen.invokeNative('0xfc30ddff', entity, Citizen.returnResultAnyway(), Citizen.resultAsInteger());int retval = Function.Call<int>((Hash)0xfc30ddff, entity);Sources
Something wrong or missing? Contribute a verified note — corrections ship through pull requests.