PLAYER_ID
Returns the player index of the local player.
Pair with PLAYER_PED_ID to get the local player's ped.
Signature
Player PLAYER_ID(); // 0x217E9DC48139933D b1207Parameters
This native takes no parameters.
Facts
| 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.
local player = Citizen.InvokeNative(0x217E9DC48139933D, -- PLAYER_ID
Citizen.ResultAsInteger()
)
print(player)const player = Citizen.invokeNative("0x217E9DC48139933D", // PLAYER_ID
Citizen.resultAsInteger()
);
console.log(player)int player = Function.Call<int>((Hash)0x217E9DC48139933D); // PLAYER_IDRelated PLAYER natives
- PLAYER_PED_ID
- NETWORK_PLAYER_ID_TO_INT
- _ADD_AMBIENT_PLAYER_INTERACTIVE_FOCUS_PRESET
- _ADD_AMBIENT_PLAYER_INTERACTIVE_FOCUS_PRESET_AT_COORDS
- _ADD_PLAYER_AS_FOLLOW_TARGET
- _CLEAR_PED_EAGLE_EYE_TRAILS_FOR_PLAYER
- _DISABLE_PLAYER_INTERACTIVE_FOCUS_PRESET
- _EAGLE_EYE_CAN_PLAYER_FOCUS_ON_TRACK
- _EAGLE_EYE_GET_TRACKED_PED_ID
- _FORMAT_PLAYER_NAME_STRING
- _GET_ACTIVE_HORSE_FOR_PLAYER
- _GET_AI_PLAYER_DEFENSE_MODIFIER_AGAINST_AI
Facts compiled from community research (alloc8or/rdr3-nativedb-data, femga/rdr3_discoveries); descriptions and examples by The Lab.