RedM Natives

GET_PED_INDEX_FROM_ENTITY_INDEX

Simply returns whatever is passed to it (Regardless of whether the handle is valid or not).

Hash0x0F16D042BD640EA3
Runtime nameGetPedIndexFromEntityIndex
NamespaceENTITY
SideClient
NameOfficial
Docs
Since build1207
GTA V hash0x04A2A40C73395041

Signature

Ped GET_PED_INDEX_FROM_ENTITY_INDEX(Entity entity);

Parameters

NameTypeDescription
entityEntity—

Returns Ped

Description

Simply returns whatever is passed to it (Regardless of whether the handle is valid or not).

Usage

Lua
local retval = GetPedIndexFromEntityIndex(entity)

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

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

Sources

alloc8or RDR3 NativeDB

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