PLAYER_ID
This returns YOUR 'identity' as a Player type.
Hash
0x217E9DC48139933DRuntime name
PlayerIdNamespacePLAYER
SideClient
NameOfficial
Docs
Since build1207
GTA V hash
0x4F8644AF03D0E0D6Signature
Player PLAYER_ID();Returns Player
Description
This returns YOUR 'identity' as a Player type.
Always returns 0 in story mode.
Usage
local retval = PlayerId()
-- always works, by hash
local retval = Citizen.InvokeNative(0x217E9DC48139933D, Citizen.ResultAsInteger())JavaScript and C#
const retval = PlayerId();
// by hash
const retval = Citizen.invokeNative('0x217E9DC48139933D', Citizen.returnResultAnyway(), Citizen.resultAsInteger());int retval = Function.Call<int>((Hash)0x217E9DC48139933D);Sources
Something wrong or missing? Contribute a verified note — corrections ship through pull requests.