allPlayers: Difference between revisions
Jump to navigation
Jump to search
m (Bot: Reverted to revision 104186 by killzone_kid on 2017-08-12T11:24:33Z) |
m (template:command argument fix) |
||
Line 17: | Line 17: | ||
| '''allPlayers''' |= Syntax | | '''allPlayers''' |= Syntax | ||
|p1= |= | |p1= |PARAMETER1= | ||
|p2= |= | |p2= |PARAMETER2= | ||
|p3= |= | |p3= |PARAMETER3= | ||
| [[Array]] |= | | [[Array]] |RETURNVALUE= | ||
Line 32: | Line 32: | ||
["dead", "alive"] [[select]] [[alive]] _x | ["dead", "alive"] [[select]] [[alive]] _x | ||
]; | ]; | ||
} [[forEach]] [[allPlayers]];</code>|= | } [[forEach]] [[allPlayers]];</code>|EXAMPLE1= | ||
|x2= <code>_bluNums = [[west]] [[countSide]] [[allPlayers]];</code> |= | |x2= <code>_bluNums = [[west]] [[countSide]] [[allPlayers]];</code> |= | ||
Line 41: | Line 41: | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
| [[allCurators]], [[allGroups]], [[allDead]], [[allUnits]], [[switchableUnits]], [[playableUnits]], [[vehicles]], [[allUnitsUAV]], [[allDeadMen]], [[isPlayer]], [[playersNumber]] |= | | [[allCurators]], [[allGroups]], [[allDead]], [[allUnits]], [[switchableUnits]], [[playableUnits]], [[vehicles]], [[allUnitsUAV]], [[allDeadMen]], [[isPlayer]], [[playersNumber]] |SEEALSO= | ||
| |= | | |MPBEHAVIOUR= | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
}} | }} |
Revision as of 11:28, 7 April 2019
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";
NOTES:- In player hosted game, the complete array of allPlayers may get delayed at the start. Use BIS_fnc_listPlayers if you need it earlier
- The order of players in the return array may differ from server to clients
- 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:
- allCuratorsallGroupsallDeadallUnitsswitchableUnitsplayableUnitsvehiclesallUnitsUAVallDeadMenisPlayerplayersNumber
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