The Lab
PLAYER native

GET_PLAYER_INDEX

returns Player0 paramsbuild 1207

Returns the player index of the local player.

Signature

C
Player GET_PLAYER_INDEX(); // 0x47E385B0D957C8D4 b1207

Parameters

This native takes no parameters.

Facts

Facts about GET_PLAYER_INDEX
Name
GET_PLAYER_INDEX
Hash
0x47E385B0D957C8D4
Namespace
Returns
Player
Game build
1207

Examples

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

Lua
local player = Citizen.InvokeNative(0x47E385B0D957C8D4, -- GET_PLAYER_INDEX
  Citizen.ResultAsInteger()
)
print(player)
JavaScript
const player = Citizen.invokeNative("0x47E385B0D957C8D4", // GET_PLAYER_INDEX
  Citizen.resultAsInteger()
);
console.log(player)
C#
int player = Function.Call<int>((Hash)0x47E385B0D957C8D4); // GET_PLAYER_INDEX
All PLAYER natives

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