getPlayerIndex
GET_PLAYER_INDEX0xA5EDC40EF369B48DThe GTA V native GET_PLAYER_INDEX of the PLAYER namespace, as LS:MP client scripts call it: the global function getPlayerIndex, in JavaScript and in Lua.
getPlayerIndex(): PlayergetPlayerIndex(): PlayerUsage
JavaScript
const player = getPlayerIndex();Lua
local player = getPlayerIndex()Parameters
None.
Returns
Player JavaScript number, Lua integerThe game's own player index: a local slot, as playerId() returns it. Not an LS:MP playerId.
Notes
From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.
Returns the same as playerId and networkPlayerIdToInt
Reference
- Namespace
- Player PLAYER
- In the game
Player GET_PLAYER_INDEX()- Hash
0xA5EDC40EF369B48D