Jump to content

GetMultiCrewPlayers

From CMM Wiki
Return to CMM Command Reference
Environment: Mission Scripting
Function: GetMultiCrewPlayers
Function Description: Returns a table containing the full player information for every pilot assigned to the specified multi‑crew airframe. The function expects a Unit object; it extracts the unit’s ID and coalition, then scans the current player list for any players whose slot identifier matches that unit ID. The resulting table is sorted by slot number when more than one player is found.
File Location: cmm.DCSFunctions.lua
Syntax: CMM.GetMultiCrewPlayers( table Object )
Return Value: table
Parameters: Name Description
ObjectA Unit object representing the airframe to query.
Example: local crew = CMM.GetMultiCrewPlayers(unit); env.info("Crew count: "..tostring(#crew))
Example Description: Shows how to retrieve the list of players assigned to a specific airframe and log the number of crew members.
Related Functions:
Notes: