networkGetHostPlayerIndex
NETWORK_GET_HOST_PLAYER_INDEX0x8251FB94DC4FDFC8The GTA V native NETWORK_GET_HOST_PLAYER_INDEX of the NETWORK namespace, as LS:MP client scripts call it: the global function networkGetHostPlayerIndex, in JavaScript and in Lua.
networkGetHostPlayerIndex(): PlayernetworkGetHostPlayerIndex(): PlayerUsage
JavaScript
const player = networkGetHostPlayerIndex();Lua
local player = networkGetHostPlayerIndex()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.
Reference
- Namespace
- Network NETWORK
- In the game
Player NETWORK_GET_HOST_PLAYER_INDEX()- Hash
0x8251FB94DC4FDFC8- Introduced
- Game build 2612 legacy numbering
- Formerly
_NETWORK_GET_HOST