GET_PLAYER_INDEX
Returns the same as PLAYER_ID and NETWORK_PLAYER_ID_TO_INT
Hash
0x47E385B0D957C8D4Runtime name
GetPlayerIndexNamespacePLAYER
SideClient
NameOfficial
Docs
Since build1207
GTA V hash
0xA5EDC40EF369B48DSignature
Player GET_PLAYER_INDEX();Returns Player
Description
Returns the same as PLAYER_ID and NETWORK_PLAYER_ID_TO_INT
Usage
local retval = GetPlayerIndex()
-- always works, by hash
local retval = Citizen.InvokeNative(0x47E385B0D957C8D4, Citizen.ResultAsInteger())JavaScript and C#
const retval = GetPlayerIndex();
// by hash
const retval = Citizen.invokeNative('0x47E385B0D957C8D4', Citizen.returnResultAnyway(), Citizen.resultAsInteger());int retval = Function.Call<int>((Hash)0x47E385B0D957C8D4);Sources
Something wrong or missing? Contribute a verified note — corrections ship through pull requests.