NETWORK_GET_NUM_CONNECTED_PLAYERS
Returns the amount of players connected in the current session.
Hash
0xA4A79DD2D9600654Runtime name
NetworkGetNumConnectedPlayersNamespaceNETWORK
SideClient
NameOfficial
Docs
Since build1207
GTA V hash
0xA4A79DD2D9600654Signature
int NETWORK_GET_NUM_CONNECTED_PLAYERS();Returns int
Description
Returns the amount of players connected in the current session. Only works when connected to a session/server.
Usage
local retval = NetworkGetNumConnectedPlayers()
-- always works, by hash
local retval = Citizen.InvokeNative(0xA4A79DD2D9600654, Citizen.ResultAsInteger())JavaScript and C#
const retval = NetworkGetNumConnectedPlayers();
// by hash
const retval = Citizen.invokeNative('0xA4A79DD2D9600654', Citizen.returnResultAnyway(), Citizen.resultAsInteger());int retval = Function.Call<int>((Hash)0xA4A79DD2D9600654);Sources
Something wrong or missing? Contribute a verified note — corrections ship through pull requests.