GET_ACTIVE_PLAYERS
Returns all player indices for 'active' physical players known to the client.
Signature
object GET_ACTIVE_PLAYERS();Returns object — An object containing a list of player indices.
Description
Returns all player indices for 'active' physical players known to the client. The data returned adheres to the following layout:
[127, 42, 13, 37]Usage
local retval = GetActivePlayers()
-- always works, by hash
local retval = Citizen.InvokeNative(0xcf143fb9, Citizen.ResultAsObject2(msgpack.unpack))JavaScript and C#
const retval = GetActivePlayers();
// by hash
const retval = Citizen.invokeNative('0xcf143fb9', Citizen.returnResultAnyway(), Citizen.resultAsObject2());Function.Call((Hash)0xcf143fb9);Sources
Something wrong or missing? Contribute a verified note — corrections ship through pull requests.