Global Aircraft Access
These APIs let you control the AI aircraft and take over multiplayer/aI aircraft control.
XPLM_USER_AIRCRAFT
define
The user's aircraft is always index 0.
#define XPLM_USER_AIRCRAFT 0
XPLM_USER_AIRCRAFT -- 0
XPLMCountAircraft
function
This function returns the number of aircraft X-Plane is capable of having, as well as the number of aircraft that are currently active. These numbers count the user's aircraft. It can also return the plugin that is currently controlling aircraft. In X-Plane 7, this routine reflects the number of aircraft the user has enabled in the rendering options window.
XPLMCountAircraft(
outTotalAircraft, -- int
outActiveAircraft, -- int
outController -- XPLMPluginID
)
XPLMGetNthAircraftModel
function
This function returns the aircraft model for the Nth aircraft. Indices are zero based, with zero being the user's aircraft. The file name should be at least 256 chars in length; the path should be at least 512 chars in length.
XPLMGetNthAircraftModel(
inIndex, -- int
outFileName, -- char
outPath -- char
)