allPlayers: Difference between revisions
Lou Montana (talk | contribs) m (Text replacement - "<code>([^\[]+)<\/code>" to "<sqf>$1</sqf>")  | 
				Killzone Kid (talk | contribs)  No edit summary  | 
				||
| Line 12: | Line 12: | ||
|mp=<nowiki/>  | |mp=<nowiki/>  | ||
*   | * The complete array of [[allPlayers]] may get delayed on mission start in multiplayer. Use [[BIS_fnc_listPlayers]] if you need it earlier.  | ||
* The order of players in the return array may differ from server to clients.  | * The order of players in the return array may differ from server to clients.  | ||
| Line 34: | Line 34: | ||
|x3= <sqf>private _bluNums = west countSide allPlayers;</sqf>  | |x3= <sqf>private _bluNums = west countSide allPlayers;</sqf>  | ||
|seealso= [[allCurators]] [[allGroups]] [[allDead]] [[allUnits]] [[switchableUnits]] [[playableUnits]] [[vehicles]] [[allUnitsUAV]] [[allDeadMen]] [[isPlayer]] [[playersNumber]]  | |seealso= [[allCurators]] [[allGroups]] [[allDead]] [[allUnits]] [[switchableUnits]] [[playableUnits]] [[vehicles]] [[allUnitsUAV]] [[allDeadMen]] [[isPlayer]] [[playersNumber]] [[allUsers]] [[getUserInfo]]  | ||
}}  | }}  | ||
Revision as of 07:37, 6 August 2022
Description
- Description:
 - Returns a list of all units controlled by connected clients - human players including dead players, but also Headless Clients.
Use BIS_fnc_listPlayers or see Example 1 to only get human players. - Multiplayer:
 - 
- The complete array of allPlayers may get delayed on mission start in multiplayer. Use BIS_fnc_listPlayers if you need it earlier.
 - The order of players in the return array may differ from server to clients.
 
 - Groups:
 - MultiplayerObject Detection
 
Syntax
- Syntax:
 - allPlayers
 - Return Value:
 - Array of Object
 
Examples
- Example 1:
 - Example 2:
 - Example 3:
 
Additional Information
- See also:
 - allCurators allGroups allDead allUnits switchableUnits playableUnits vehicles allUnitsUAV allDeadMen isPlayer playersNumber allUsers getUserInfo
 
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