{"name":"allUsers","operator":null,"title":"allUsers","type":"command","url":"https://community.bistudio.com/wiki/allUsers","revid":378526,"updated":"2026-05-04T01:56:35Z","groups":["Multiplayer","Object Detection"],"status":"ok","replaced_by":[],"games":[{"game":"arma3","name":"Arma 3","version":"2.06"}],"since":{"game":"arma3","name":"Arma 3","version":"2.06"},"arma3_since":"2.06","branch":null,"locality":{"argument":null,"effect":null,"server_exec":true},"exec":null,"description":"Returns a list of player ids of all the users on an MP server.\n\n> [!NOTE]\n> This also lists Headless Clients.","syntaxes":[{"syntax":"allUsers","since":null,"effect":null,"exec":null,"params":[],"returns":{"type":"Array of Strings","types":["Array","String"],"description":"user network IDs (see getPlayerID, getUserInfo)","text":"Array of Strings - user network IDs (see getPlayerID, getUserInfo)"},"form":"nullary","operator":null,"left":null,"right":null}],"examples":[{"text":"```sqf\nif (isServer) then\n{\n    private _allUserIDs = allUsers;\n    for \"_i\" from 0 to (count _allUserIds - 1) do\n    {\n        diag_log format [\"User #%1 ID: %2\", _i + 1, _allUserIds select _i];\n    };\n};\n```","code":["if (isServer) then\n{\n\tprivate _allUserIDs = allUsers;\n\tfor \"_i\" from 0 to (count _allUserIds - 1) do\n\t{\n\t\tdiag_log format [\"User #%1 ID: %2\", _i + 1, _allUserIds select _i];\n\t};\n};"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["getUserInfo","getPlayerID","allPlayers","allCurators","allGroups","allDead","allUnits","switchableUnits","playableUnits","vehicles","allUnitsUAV","allDeadMen","isPlayer","playersNumber"],"notes":[],"categories":["Arma 3: New Scripting Commands","Arma 3: Scripting Commands","Command Group: Multiplayer","Command Group: Object Detection","Introduced with Arma 3 version 2.06","Scripting Commands","Scripting Commands: Server Execution"]}