GET_PED_INDEX_FROM_ENTITY_INDEX
Casts an entity handle to a ped handle.
Signature
Ped GET_PED_INDEX_FROM_ENTITY_INDEX(Entity entity); // 0x0F16D042BD640EA3 b1207Parameters
| # | Name | Type |
|---|---|---|
| 1 | entity | Entity |
Facts
| 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.
local ped = Citizen.InvokeNative(0x0F16D042BD640EA3, -- GET_PED_INDEX_FROM_ENTITY_INDEX
PlayerPedId(), -- Entity entity
Citizen.ResultAsInteger()
)
print(ped)const ped = Citizen.invokeNative("0x0F16D042BD640EA3", // GET_PED_INDEX_FROM_ENTITY_INDEX
PlayerPedId(), // Entity entity
Citizen.resultAsInteger()
);
console.log(ped)int ped = Function.Call<int>((Hash)0x0F16D042BD640EA3, // GET_PED_INDEX_FROM_ENTITY_INDEX
API.PlayerPedId() // Entity entity
);Related ENTITY natives
- GET_OBJECT_INDEX_FROM_ENTITY_INDEX
- GET_VEHICLE_INDEX_FROM_ENTITY_INDEX
- GET_ENTITY_BONE_INDEX_BY_NAME
- GET_OFFSET_FROM_ENTITY_GIVEN_WORLD_COORDS
- GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS
- _GET_CARRIABLE_FROM_ENTITY
- _GET_LAST_ENTITY_TO_DAMAGE_ENTITY
- GET_CARRIABLE_ENTITY_STATE
- GET_ENTITY_ALPHA
- GET_ENTITY_ATTACHED_TO
- GET_ENTITY_COLLISION_DISABLED
- GET_ENTITY_COORDS
Facts compiled from community research (alloc8or/rdr3-nativedb-data, femga/rdr3_discoveries); descriptions and examples by The Lab.