The Lab
PLAYER native

PLAYER_ID

returns Player0 paramsbuild 1207

Returns the player index of the local player.

Pair with PLAYER_PED_ID to get the local player's ped.

Signature

C
Player PLAYER_ID(); // 0x217E9DC48139933D b1207

Parameters

This native takes no parameters.

Facts

Facts about PLAYER_ID
Name
PLAYER_ID
Hash
0x217E9DC48139933D
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(0x217E9DC48139933D, -- PLAYER_ID
  Citizen.ResultAsInteger()
)
print(player)
JavaScript
const player = Citizen.invokeNative("0x217E9DC48139933D", // PLAYER_ID
  Citizen.resultAsInteger()
);
console.log(player)
C#
int player = Function.Call<int>((Hash)0x217E9DC48139933D); // PLAYER_ID
All PLAYER natives

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