The Lab
ENTITY native

GET_PED_INDEX_FROM_ENTITY_INDEX

returns Ped1 parambuild 1207

Casts an entity handle to a ped handle.

Signature

C
Ped GET_PED_INDEX_FROM_ENTITY_INDEX(Entity entity); // 0x0F16D042BD640EA3 b1207

Parameters

#NameType
1entityEntity

Facts

Facts about GET_PED_INDEX_FROM_ENTITY_INDEX
Name
GET_PED_INDEX_FROM_ENTITY_INDEX
Hash
0x0F16D042BD640EA3
Namespace
Returns
Ped
Game build
1207

Examples

Calls by hash work in every RedM runtime. Replace the placeholder arguments with your own values.

Lua
local ped = Citizen.InvokeNative(0x0F16D042BD640EA3, -- GET_PED_INDEX_FROM_ENTITY_INDEX
  PlayerPedId(), -- Entity entity
  Citizen.ResultAsInteger()
)
print(ped)
JavaScript
const ped = Citizen.invokeNative("0x0F16D042BD640EA3", // GET_PED_INDEX_FROM_ENTITY_INDEX
  PlayerPedId(), // Entity entity
  Citizen.resultAsInteger()
);
console.log(ped)
C#
int ped = Function.Call<int>((Hash)0x0F16D042BD640EA3, // GET_PED_INDEX_FROM_ENTITY_INDEX
  API.PlayerPedId() // Entity entity
);
All ENTITY natives

Facts compiled from community research (alloc8or/rdr3-nativedb-data, femga/rdr3_discoveries); descriptions and examples by The Lab.