allPlayers: Difference between revisions
Jump to navigation
Jump to search
SilentSpike (talk | contribs) (Correctly remove note) |
Killzone Kid (talk | contribs) (note about hosted and timing) |
||
Line 8: | Line 8: | ||
| Returns a list of all human players including dead players. The command also returns all connected headless clients. To filter headless clients out: | | Returns a list of all human players including dead players. The command also returns all connected headless clients. To filter headless clients out: | ||
<code>_justPlayers <nowiki>=</nowiki> [[allPlayers]] - [[entities]] "HeadlessClient_F";</code> |= Description | <code>_justPlayers <nowiki>=</nowiki> [[allPlayers]] - [[entities]] "HeadlessClient_F";</code> | ||
'''NOTE:''' In player hosted game, the complete array of [[allPlayers]] may get delayed at the start. Use [[BIS_fnc_listPlayers]] if you need it earlier |= Description | |||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
Revision as of 21:25, 22 January 2016
Description
- Description:
- Returns a list of all human players including dead players. The command also returns all connected headless clients. To filter headless clients out:
_justPlayers = allPlayers - entities "HeadlessClient_F";
NOTE: In player hosted game, the complete array of allPlayers may get delayed at the start. Use BIS_fnc_listPlayers if you need it earlier - Groups:
- Uncategorised
Syntax
- Syntax:
- allPlayers
- Return Value:
- Array
Examples
- Example 1:
{ systemChat format [ "Player %1 is %2", name _x, ["dead", "alive"] select alive _x ]; } forEach allPlayers;
- Example 2:
_bluNums = west countSide allPlayers;
- Example 3:
- Find all human players if headless clients are used:
_allHCs = entities "HeadlessClient_F"; _allHPs = allPlayers - _allHCs;
Additional Information
- See also:
- allCuratorsallGroupsallDeadallUnitsswitchableUnitsplayableUnitsvehiclesallUnitsUAVallDeadMenisPlayer
Notes
-
Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note