NETWORK_GET_PLAYER_INDEX
Converts between player and participant indices for the calling network script and returns the resulting index.
Signature
int NETWORK_GET_PLAYER_INDEX(Player player); // 0x24FB80D107371267 b1207Parameters
| # | Name | Type |
|---|---|---|
| 1 | player | Player |
Facts
| Name | NETWORK_GET_PLAYER_INDEX |
|---|---|
| Hash | 0x24FB80D107371267 |
| Namespace | |
| Returns | int |
| Game build | 1207 |
Examples
Calls by hash work in every RedM runtime. Replace the placeholder arguments with your own values.
local result = Citizen.InvokeNative(0x24FB80D107371267, -- NETWORK_GET_PLAYER_INDEX
PlayerId(), -- Player player
Citizen.ResultAsInteger()
)
print(result)const result = Citizen.invokeNative("0x24FB80D107371267", // NETWORK_GET_PLAYER_INDEX
PlayerId(), // Player player
Citizen.resultAsInteger()
);
console.log(result)int result = Function.Call<int>((Hash)0x24FB80D107371267, // NETWORK_GET_PLAYER_INDEX
API.PlayerId() // Player player
);Related NETWORK natives
- NETWORK_GET_PLAYER_INDEX_FROM_PED
- NETWORK_GET_PLAYER_FROM_GAMER_HANDLE
- NETWORK_GET_PARTICIPANT_INDEX
- NETWORK_GET_DESTROYER_OF_NETWORK_ID
- NETWORK_GET_ENTITY_FROM_NETWORK_ID
- NETWORK_GET_ENTITY_KILLER_OF_PLAYER
- NETWORK_GET_NETWORK_ID_FROM_ENTITY
- NETWORK_GET_NETWORK_ID_FROM_ROPE_ID
- NETWORK_GET_ROPE_ID_FROM_NETWORK_ID
- NETWORK_GET_THIS_SCRIPT_IS_NETWORK_SCRIPT
- _NETWORK_GET_PLAYER_OWNER_OF_NETWORK_ID
- NETWORK_IS_PLAYER_INDEX_VALID
Facts compiled from community research (alloc8or/rdr3-nativedb-data, femga/rdr3_discoveries); descriptions and examples by The Lab.