RedM Natives

GET_ENTITY_POPULATION_TYPE

This native gets an entity's population type.

Hash0xFC30DDFF
Runtime nameGetEntityPopulationType
NamespaceCFX
SideServer
NameOfficial
Docs

Signature

int GET_ENTITY_POPULATION_TYPE(Entity entity);

Parameters

NameTypeDescription
entityEntity

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

Cfx.re native reference

This native gets an entity's population type.

Usage

Lua
local retval = GetEntityPopulationType(entity)

-- always works, by hash
local retval = Citizen.InvokeNative(0xfc30ddff, entity, Citizen.ResultAsInteger())
JavaScript and C#
JavaScript
const retval = GetEntityPopulationType(entity);

// by hash
const retval = Citizen.invokeNative('0xfc30ddff', entity, Citizen.returnResultAnyway(), Citizen.resultAsInteger());
C#
int retval = Function.Call<int>((Hash)0xfc30ddff, entity);

Sources

Cfx.re native reference

Something wrong or missing? Contribute a verified note — corrections ship through pull requests.