Difference between revisions of "DCS func getAvailableSlots"

From DCS World Wiki - Hoggitworld.com
(Created page with "{{Template:DCS_server_funcs |fName= getAvailableSlots |vNum= 2.5.0 |par1= DCS |par2= |par3= |par4= |desc= Returns a table of slots available...")
 
 
Line 20: Line 20:
  
  
|reqType1=  
+
|reqType1= number/string
  
|reqName1=  
+
|reqName1= coaId
  
 
|reqType2=  
 
|reqType2=  

Latest revision as of 07:45, 28 September 2020


Envrioment: Server
Function: getAvailableSlots Added with: 2.5.0
Member Of: DCS
Syntax: table DCS.getAvailableSlots(number/string coaId )
Description: Returns a table of slots available to a given coalition.


Return Value: table
Return Example: array of {unitId, type, role, callsign, groupName, country}
Examples:
Related Functions: Control API: setPause, getPause, stopMission, exitProcess, isMultiplayer, isServer, getModelTime, getRealTime, getMissionOptions, getAvailableCoalitions, getAvailableSlots, getCurrentMission, getMissionName, getMissionFilename, getMissionResult, getUnitProperty, getUnitType, getUnitTypeAttribute, writeDebriefing, setUserCallbacks, makeScreenShot
Notes: The "unitId" variable is actually the slotID. For all single seat aircraft this will not make a difference, however multicrew aircraft will appear differently. Specially in this format: unitID_seatID.

For example the unit id of 23 for a L-39 would appear as two entries. 23 and 23_1