getNumberOfPlayers
GET_NUMBER_OF_PLAYERS0x407C7F91DDB46C16The GTA V native GET_NUMBER_OF_PLAYERS of the PLAYER namespace, as LS:MP client scripts call it: the global function getNumberOfPlayers, in JavaScript and in Lua.
getNumberOfPlayers(): numbergetNumberOfPlayers(): integerUsage
JavaScript
const result = getNumberOfPlayers();Lua
local result = getNumberOfPlayers()Parameters
None.
Returns
int JavaScript number, Lua integerNotes
From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.
Gets the number of players in the current session.
If not multiplayer, always returns 1.
Reference
- Namespace
- Player PLAYER
- In the game
int GET_NUMBER_OF_PLAYERS()- Hash
0x407C7F91DDB46C16