LAATCMonitor.sqf 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351
  1. /*
  2. LAATCMonitor.SQF
  3. Custom script for SWOP's LAAT/c cargo bird for loading and unloading objects (vehicles, turrets, crates etc) with
  4. options to customize attaching and detaching positions for specific object types
  5. JIP and MP Compatible and works alongside slingloading
  6. Written for Arma 3's Star Wars Opposition Mod by ^bdc January 2018
  7. */
  8. // Global Configuration Vars
  9. co18_BDC_LAATCMonitor_AirCargoTypes = ["swop_LAAT_cargo"]; // default: "swop_LAAT_cargo" contingent on classname change
  10. co18_BDC_LAATCMonitor_ExcludedObjects = ["B_HMG_01_A_F","O_SWOP_HoverTa_2","O_SWOP_HoverTr_2"]; // List of any classnames of objects we do NOT want to be able to pick up
  11. co18_BDC_LAATCMonitor_ReverseObjects = ["SW_AV7"]; // Object to load in 180* direction
  12. co18_BDC_LAATCMonitor_IncludeAircraft = true; // If true, parent class 'Air' will be included in scan search and loading functionality (default: false)
  13. co18_BDC_LAATCMonitor_IncludeAircraftObjects = [ // List of aircraft classes (by object classname) that will be able to be loaded (if other air are not in this list, they will be automatically excluded)
  14. "swop_LAAT","swop_LAATmk2","swop_LAATmk2_104","swop_LAATmk2_74","swop_LAATmk2_ARC","swop_LAATmk2_spec" // LAAT gunships
  15. ];
  16. co18_BDC_LAATCMonitor_ForceEmptyCrewOnly = false; // If true, LAAT cargo bird will only load vehicle objects that are empty of any player or AI crew
  17. co18_BDC_LAATCMonitor_ParachuteDropAlt = 40; // Terrain altitude, in meters, that cargo bird will automatically add a parachute to object being dropped (set to 0 to disable) (default: 40)
  18. co18_BDC_LAATCMonitor_SearchPoint = [0,-2,-6]; // back behind and lower a bit (default: [0,-2,-6]
  19. co18_BDC_LAATCMonitor_ScanRange = 7.5; // Scan range, in meters radius from the configured SearchPoint behind and under the cargo bird, that we'll look for a compatible object we can attach (default: 7.5)
  20. co18_BDC_LAATCMonitor_AttachPoint = [0,-2,-1.5]; // default: [0,-2,-1.5]
  21. co18_BDC_LAATCMonitor_SpecificAttachPoints = [ // List of specific object classes or config classes (as a list in array form) that have specific attachment points to the underside of the bird
  22. // Array structure: [["classname or type","classname","classname"],[x,y,z]],
  23. [["Republic_ATTE"],[0,-1.65,-7.75]], // Republic AT-TE turret tank monstrosity
  24. [["SW_FIELDGUN"],[0,-2.5,-6.75]], // Republic large turret - move it back a bit so the main turret isn't sticking thru the cockpit
  25. [["SW_AV7"],[0,-4,-9]], // AV7
  26. [["B_UGV_01_rcws_F"],[0,-3.65,-6.75]], // ATTE Composition
  27. [["O_JM_TX130r_1","O_JM_TX130m1r_1","O_JM_TX130m2r_1","O_JM_TX130_1","O_JM_TX130m1_1","O_JM_TX130m2_1"],[0,0,-4.0]], // Sabre tanks raised up due to short body
  28. [["Slingload_base_F","Slingload_01_Base_F"],[0,-3,-1.5]], // Cargo containers - move back and up
  29. [["swop_LAAT","swop_LAATmk2","swop_LAATmk2_104","swop_LAATmk2_74","swop_LAATmk2_ARC","swop_LAATmk2_spec"],[0,0,-4.35]] // LAAT gunships
  30. ];
  31. co18_BDC_LAATCMonitor_DetachPoint = [0,0,-3.0]; // Detach point relative to the attached point of the cargo object - Do we want to move it left/right, forward/back, or up/down any when we detach?
  32. co18_BDC_LAATCMonitor_SpecificDetachPoints = [ // List of specific objects that require a specific detachment point (such as vehicles with length turrets) relative to the attached point of that object
  33. [["Republic_ATTE"],[0,-2,-2]], // Republic AT-TE move it back some to prevent turret from sticking to LAAT cockpit body
  34. [["SW_AV7"],[0,0,-1.25]], // AV7 turret
  35. [["Slingload_base_F","Slingload_01_Base_F"],[0,0,-1.5]], // Cargo containers - lower a bit
  36. [["swop_LAAT","swop_LAATmk2","swop_LAATmk2_104","swop_LAATmk2_74","swop_LAATmk2_ARC","swop_LAATmk2_spec"],[0,0,-5.25]] // LAAT gunships
  37. ];
  38. co18_BDC_LAATCMonitor_SpecificParachuteAttachPoints = [ // Specific attach points of unloaded object to parachute per classname
  39. [["Republic_ATTE"],1.25], // Array structure: [["Classname1","Classname2",etc],-2] // Where classnames1 and 2 will attach themselves to the parachute at 2 meters above 0,0,0 relative to the chute itself
  40. [["swop_LAAT","swop_LAATmk2","swop_LAATmk2_104","swop_LAATmk2_74","swop_LAATmk2_ARC","swop_LAATmk2_spec"],3.75] // LAAT gunships
  41. ];
  42. co18_BDC_LAATCMonitor_MinimumLoadAlt = 4; // default: 4
  43. co18_BDC_LAATCMonitor_MinimumDropAlt = 5.5; // default: 5.5 to 6 - Set to 5m as absolute minimum lowest due to larger objects such as the AT-TE to prevent collisions
  44. // Attach cargo chute function
  45. co18_BDC_LAATCMonitor_AttachCargoParachuteFunc = {
  46. _Object = _this select 0;
  47. diag_log format["(LAAT/C Monitor) AttachCargoParachuteFunc spawned. Created chute for %1 %2",_Object,typeOf _Object];
  48. sleep 3.5;
  49. _Chute = createVehicle ["B_Parachute_02_F", (getPos _Object), [], 0, "FLY"];
  50. _Chute setPos (getPos _Object);
  51. _Chute setDir (getDir _Object);
  52. _Chute allowDamage false;
  53. _ZPos = -0.65;
  54. _isCrate = (_Object isKindOf "Slingload_base_F" || _Object isKindOf "ReammoBox_F" || _Object isKindOf "ReammoBox");
  55. if (!_isCrate) then {
  56. _ZPos = 1.65; // Attach object to chute higher than chute's 0,0,0 to help prevent collision with ground when landing - default attach point for larger objects
  57. };
  58. _Type = typeOf _Object;
  59. _FoundSpecific = false;
  60. {
  61. _Array = _x;
  62. _VTypes = _Array select 0;
  63. _AttachZ = _Array select 1;
  64. if (_Type in _VTypes && !_FoundSpecific) then {
  65. _ZPos = _AttachZ;
  66. _FoundSpecific = true;
  67. diag_log format["(LAAT/C Monitor) Found custom attach point for parachute: %1",_ZPos];
  68. };
  69. } forEach co18_BDC_LAATCMonitor_SpecificParachuteAttachPoints;
  70. _Object attachTo [_Chute,[0,0,_ZPos]];
  71. };
  72. // Server-side EH to manage parachuting
  73. if (isServer || isDedicated) then {
  74. "CO18_BDC_LAATCMonitor_AttachCargoParachute" addPublicVariableEventhandler {
  75. _Object = _this select 1;
  76. diag_log format["(LAAT/C Monitor) AttachCargoParachute EH called for Object %1 %2.",_Object,typeOf _Object];
  77. [_Object] spawn co18_BDC_LAATCMonitor_AttachCargoParachuteFunc;
  78. };
  79. };
  80. if (!hasInterface) exitWith {}; // Only players from here on out
  81. // Reset loading and unloading scroll actions and global vars
  82. co18_BDC_r_player_LoadViVCargo = -1;
  83. co18_BDC_r_player_UnloadViVCargo = -1;
  84. co18_BDC_r_player_CheckViVCargo = -1;
  85. co18_BDC_r_player_DisableParachute = -1;
  86. co18_BDC_r_player_EnableParachute = -1;
  87. co18_BDC_r_player_nearestViVObject = objNull;
  88. _MonitorPlayerAircraft = {
  89. diag_log format["(LAAT/C Monitor) Starting monitor loop."];
  90. while {true} do {
  91. // Vehicles work-around
  92. if (alive player && (vehicle player != player)) then {
  93. _Vehicle = vehicle player;
  94. _VehType = typeOf _Vehicle;
  95. _isDriver = false;
  96. if (driver _Vehicle == player) then { _isDriver = true; };
  97. if (!alive _Vehicle) then { _isDriver = false; };
  98. // LAAT Cargo bird ViV loading of objects
  99. if (_isDriver && (_VehType in co18_BDC_LAATCMonitor_AirCargoTypes)) then {
  100. // Gather altitude and speed
  101. _vAlt = round ((getposATL _Vehicle) select 2);
  102. _vSpeed = round(speed _Vehicle);
  103. // See if there's any actual ViV cargo loaded in (from Zeus or editor presumably)
  104. _ViVCargoArray = getVehicleCargo _Vehicle;
  105. if (count _ViVCargoArray > 0) then {
  106. _ViVObj = _ViVCargoArray select 0;
  107. _Vehicle setVariable ["VehViVCargo",_ViVObj,true]; // Convert to our system so we can unload it our way
  108. };
  109. // Flag to DISABLE ViV cargo loading
  110. _isEnabled = false;
  111. _isEnabled = _Vehicle getVariable ["ViVCargoEnabled",false];
  112. if (_isEnabled) then { // Only runs once per live vehicle once first pilot enters
  113. //_Vehicle enableVehicleCargo true;
  114. _Vehicle setVariable ["ViVCargoEnabled",false,true];
  115. diag_log format["Cargo bird %1 %2 ViV cargo loading disabled.",_Vehicle,typeOf _Vehicle];
  116. };
  117. // Check and Unload cargo
  118. //_VehViVCargo = getVehicleCargo _Vehicle;
  119. _VehViVCargo = _Vehicle getVariable ["VehViVCargo",objNull];
  120. _ParachuteDropDisabled = _Vehicle getVariable ["CargoParachuteDisabled",false];
  121. // Disable/enable automatic cargo parachute
  122. if (co18_BDC_LAATCMonitor_ParachuteDropAlt > 0) then {
  123. if (_ParachuteDropDisabled) then {
  124. if (co18_BDC_r_player_EnableParachute < 0) then {
  125. co18_BDC_r_player_EnableParachute = player addAction ["Enable Parachute for Cargo Drop", {
  126. (vehicle player) setVariable ["CargoParachuteDisabled",false,true];
  127. hint format["Automatic parachute for cargo drop enabled. Cargo will automatically drop with attached parachute when dropped from altitudes of %1 meters and above.",co18_BDC_LAATCMonitor_ParachuteDropAlt];
  128. player removeAction co18_BDC_r_player_EnableParachute;
  129. co18_BDC_r_player_EnableParachute = -1;
  130. }];
  131. };
  132. } else {
  133. if (co18_BDC_r_player_DisableParachute < 0) then {
  134. co18_BDC_r_player_DisableParachute = player addAction ["Disable Parachute for Cargo Drop", {
  135. (vehicle player) setVariable ["CargoParachuteDisabled",true,true];
  136. hint "Automatic parachute for cargo drop disabled.";
  137. player removeAction co18_BDC_r_player_DisableParachute;
  138. co18_BDC_r_player_DisableParachute = -1;
  139. }];
  140. };
  141. };
  142. };
  143. if !(isNull _VehViVCargo) then {
  144. // Check ViV loaded cargo
  145. if (co18_BDC_r_player_CheckViVCargo < 0) then {
  146. _ObjTxt = getText (configFile >> "CfgVehicles" >> typeOf _VehViVCargo >> "displayName");
  147. _FStr = format["Analyze Attached Cargo %1",_ObjTxt];
  148. co18_BDC_r_player_CheckViVCargo = player addAction [_FStr, {
  149. _Vehicle = vehicle player;
  150. _VehViVCargo = _Vehicle getVariable ["VehViVCargo",objNull];
  151. s_player_HintCtr = 40;
  152. _ObjTxt = getText (configFile >> "CfgVehicles" >> typeOf _VehViVCargo >> "displayName");
  153. _Fuel = round(fuel _VehViVCargo);
  154. _FuelTxt = round(_Fuel * 100);
  155. _Damage = getDammage _VehViVCargo;
  156. _DamageTxt = round (_Damage / 100);
  157. _CrewNum = count (crew _VehViVCargo);
  158. hint format["Attached Cargo:\n%1\n\nFuel: %2 percent\nDamage: %3 percent\nCrew Number: %4",_ObjTxt,_FuelTxt,_DamageTxt,_CrewNum];
  159. player removeAction co18_BDC_r_player_CheckViVCargo;
  160. co18_BDC_r_player_CheckViVCargo = -1;
  161. }];
  162. };
  163. // Unload
  164. if (_vAlt >= co18_BDC_LAATCMonitor_MinimumDropAlt) then {
  165. if (co18_BDC_r_player_UnloadViVCargo < 0) then {
  166. _ObjTxt = getText (configFile >> "CfgVehicles" >> typeOf _VehViVCargo >> "displayName");
  167. _FStr = format["Unload %1",_ObjTxt];
  168. /*
  169. if (_vAlt >= co18_BDC_LAATCMonitor_ParachuteDropAlt && (co18_BDC_LAATCMonitor_ParachuteDropAlt > 15)) then { // absolute minimum 15 meters
  170. _FStr = format["Unload %1 (Parachute)",_ObjTxt];
  171. }; */
  172. co18_BDC_r_player_UnloadViVCargo = player addAction [_FStr, {
  173. _Vehicle = vehicle player;
  174. _VehViVCargo = _Vehicle getVariable ["VehViVCargo",objNull];
  175. s_player_HintCtr = 30;
  176. _ObjTxt = getText (configFile >> "CfgVehicles" >> typeOf _VehViVCargo >> "displayName");
  177. private["_DetachPoint"];
  178. _DetachPoint = _VehViVCargo modelToWorld co18_BDC_LAATCMonitor_DetachPoint; // default
  179. _Vehicle allowDamage false;
  180. // Find our detachment point
  181. _FoundDetachPt = false;
  182. {
  183. _Selection = _x;
  184. _ClassArray = _Selection select 0;
  185. _PosArray = _Selection select 1;
  186. {
  187. _ClassStr = _x;
  188. if (typeOf _VehViVCargo == _ClassStr || _VehViVCargo isKindOf _ClassStr && !_FoundDetachPt) then {
  189. _DetachPoint = _VehViVCargo modelToWorld _PosArray;
  190. _FoundDetachPt = true;
  191. };
  192. } forEach _ClassArray;
  193. } forEach co18_BDC_LAATCMonitor_SpecificDetachPoints;
  194. detach _VehViVCargo;
  195. _VehViVCargo setPos _DetachPoint; // Move to detach point
  196. _VehViVCargo allowDamage false; // Temp invulnerability for our attached object
  197. _VehViVCargo enableRopeAttach true;
  198. // Attach parachute?
  199. _vAlt = round ((getposATL _Vehicle) select 2);
  200. _ParachuteDropDisabled = _Vehicle getVariable ["CargoParachuteDisabled",false];
  201. hint format["Unloading %1...",_ObjTxt];
  202. if ((_vAlt >= co18_BDC_LAATCMonitor_ParachuteDropAlt) && (co18_BDC_LAATCMonitor_ParachuteDropAlt > 15) && !_ParachuteDropDisabled) then { // Ping server to create and attach chute
  203. if (isServer) then {
  204. [_VehViVCargo] spawn co18_BDC_LAATCMonitor_AttachCargoParachuteFunc;
  205. } else {
  206. CO18_BDC_LAATCMonitor_AttachCargoParachute = _VehViVCargo;
  207. publicVariableServer "CO18_BDC_LAATCMonitor_AttachCargoParachute";
  208. };
  209. hint format["Unloading %1 with parachute...",_ObjTxt];
  210. };
  211. // Brief sleep before making cargo bird vulnerable
  212. sleep 0.5;
  213. _Vehicle allowDamage true;
  214. _Vehicle setVariable ["VehViVCargo",objNull,true]; // reset our cargo variable
  215. // Set specific position here?
  216. player removeAction co18_BDC_r_player_LoadViVCargo;
  217. co18_BDC_r_player_LoadViVCargo = -1;
  218. player removeAction co18_BDC_r_player_UnloadViVCargo;
  219. co18_BDC_r_player_UnloadViVCargo = -1;
  220. player removeAction co18_BDC_r_player_CheckViVCargo;
  221. co18_BDC_r_player_CheckViVCargo = -1;
  222. r_nearestViVObject = objNull;
  223. sleep 4; // Disallow further actions for 5 seconds after unloading
  224. _VehViVCargo allowDamage true;
  225. }];
  226. };
  227. } else {
  228. player removeAction co18_BDC_r_player_UnloadViVCargo;
  229. co18_BDC_r_player_UnloadViVCargo = -1;
  230. };
  231. };
  232. // Search for nearestObjects to load cargo
  233. _ScanPoint = _Vehicle modelToWorld co18_BDC_LAATCMonitor_SearchPoint;
  234. _nearestObjects = [];
  235. if (isNull _VehViVCargo) then {
  236. _nearestObjects = nearestObjects [_ScanPoint, ["LandVehicle","Slingload_base_F","ReammoBox_F","ReammoBox","StaticWeapon","StaticCannon","StaticMGWeapon","Air"], co18_BDC_LAATCMonitor_ScanRange];
  237. // Remove attached object if it's popping up in our nearestObjects scan - Also remove any that are in the excluded list - Remove dead objects as well
  238. if (count _nearestObjects > 0) then {
  239. {
  240. if ((_Vehicle == _x) || _VehViVCargo == _x || (typeOf _x in co18_BDC_LAATCMonitor_ExcludedObjects) || (!alive _x) || (_x == player)) then {
  241. _nearestObjects = _nearestObjects - [_x];
  242. };
  243. // Empty crew only?
  244. if (co18_BDC_LAATCMonitor_ForceEmptyCrewOnly && (count (crew _x) > 0)) then {
  245. _nearestObjects = _nearestObjects - [_x];
  246. };
  247. // Exclude any non-specified aircraft
  248. if ((_x isKindOf "Air" && !co18_BDC_LAATCMonitor_IncludeAircraft) || (_x isKindOf "Air" && !(typeOf _x in co18_BDC_LAATCMonitor_IncludeAircraftObjects))) then {
  249. _nearestObjects = _nearestObjects - [_x];
  250. };
  251. } forEach _nearestObjects;
  252. };
  253. };
  254. if (count _nearestObjects == 0) then {
  255. player removeAction co18_BDC_r_player_LoadViVCargo;
  256. co18_BDC_r_player_LoadViVCargo = -1;
  257. };
  258. if (count _nearestObjects > 0) then {
  259. co18_BDC_r_player_nearestViVObject = _nearestObjects select 0;
  260. _TypeNO = typeOf co18_BDC_r_player_nearestViVObject;
  261. if ((co18_BDC_r_player_nearestViVObject != _VehViVCargo) && (co18_BDC_r_player_nearestViVObject isKindOf "StaticCannon" || co18_BDC_r_player_nearestViVObject isKindOf "StaticMGWeapon" || co18_BDC_r_player_nearestViVObject isKindOf "Car" || co18_BDC_r_player_nearestViVObject isKindOf "Tank" || co18_BDC_r_player_nearestViVObject isKindOf "ReammoBox" || co18_BDC_r_player_nearestViVObject isKindOf "ReammoBox_F" || co18_BDC_r_player_nearestViVObject isKindOf "Slingload_base_F" || (co18_BDC_r_player_nearestViVObject isKindOf "Air" && co18_BDC_LAATCMonitor_IncludeAircraft)) && (_vSpeed <= 15) && (_vAlt >= co18_BDC_LAATCMonitor_MinimumLoadAlt)) then {
  262. _Txt = getText (configFile >> "CfgVehicles" >> _TypeNO >> "displayName");
  263. _FStr = format["Load %1",_Txt];
  264. if (co18_BDC_r_player_LoadViVCargo < 0) then {
  265. co18_BDC_r_player_LoadViVCargo = player addAction [_FStr, {
  266. _Vehicle = vehicle player;
  267. _Txt = getText (configFile >> "CfgVehicles" >> (typeOf co18_BDC_r_player_nearestViVObject) >> "displayName");
  268. s_player_HintCtr = 30;
  269. hint format["%1 has been loaded.",_Txt];
  270. _Vehicle setVariable ["VehViVCargo",co18_BDC_r_player_nearestViVObject,true];
  271. co18_BDC_r_player_nearestViVObject enableRopeAttach false;
  272. // Find attachment point
  273. private["_AttachPoint"];
  274. _AttachPoint = co18_BDC_LAATCMonitor_AttachPoint; // default
  275. _FoundSpecific = false;
  276. {
  277. _Selection = _x;
  278. _ClassArray = _Selection select 0;
  279. _PosArray = _Selection select 1;
  280. {
  281. _ClassStr = _x;
  282. if ((co18_BDC_r_player_nearestViVObject isKindOf _ClassStr || typeOf co18_BDC_r_player_nearestViVObject == _ClassStr) && !_FoundSpecific) then {
  283. _FoundSpecific = true;
  284. _AttachPoint = _PosArray;
  285. };
  286. } forEach _ClassArray;
  287. } forEach co18_BDC_LAATCMonitor_SpecificAttachPoints;
  288. co18_BDC_r_player_nearestViVObject attachTo [_Vehicle, _AttachPoint];
  289. // Reverse direction
  290. if (typeOf co18_BDC_r_player_nearestViVObject in co18_BDC_LAATCMonitor_ReverseObjects) then {
  291. _VDir = getDir _Vehicle;
  292. _ReverseDir = _VDir + 180;
  293. co18_BDC_r_player_nearestViVObject setDir _ReverseDir;
  294. };
  295. player removeAction co18_BDC_r_player_LoadViVCargo;
  296. co18_BDC_r_player_LoadViVCargo = -1;
  297. co18_BDC_r_player_nearestViVObject = objNull;
  298. player removeAction co18_BDC_r_player_UnloadViVCargo;
  299. co18_BDC_r_player_UnloadViVCargo = -1;
  300. }];
  301. };
  302. } else {
  303. player removeAction co18_BDC_r_player_LoadViVCargo;
  304. co18_BDC_r_player_LoadViVCargo = -1;
  305. co18_BDC_r_player_nearestViVObject = objNull;
  306. };
  307. };
  308. } else {
  309. player removeAction co18_BDC_r_player_LoadViVCargo;
  310. co18_BDC_r_player_LoadViVCargo = -1;
  311. player removeAction co18_BDC_r_player_UnloadViVCargo;
  312. co18_BDC_r_player_UnloadViVCargo = -1;
  313. player removeAction co18_BDC_r_player_CheckViVCargo;
  314. co18_BDC_r_player_CheckViVCargo = -1;
  315. co18_BDC_r_player_nearestViVObject = objNull;
  316. };
  317. } else {
  318. /*
  319. // If vehicle is dead and we have cargo attached, destroy it too
  320. _VehViVCargo = (vehicle player) getVariable ["VehViVCargo",objNull];
  321. if (!alive _Vehicle && !(isNull _VehViVCargo)) then {
  322. detach _VehViVCargo;
  323. _VehViVCargo setDamage 1;
  324. }; */
  325. player removeAction co18_BDC_r_player_LoadViVCargo;
  326. co18_BDC_r_player_LoadViVCargo = -1;
  327. player removeAction co18_BDC_r_player_UnloadViVCargo;
  328. co18_BDC_r_player_UnloadViVCargo = -1;
  329. player removeAction co18_BDC_r_player_CheckViVCargo;
  330. co18_BDC_r_player_CheckViVCargo = -1;
  331. co18_BDC_r_player_nearestViVObject = objNull;
  332. player removeAction co18_BDC_r_player_EnableParachute;
  333. co18_BDC_r_player_EnableParachute = -1;
  334. player removeAction co18_BDC_r_player_DisableParachute;
  335. co18_BDC_r_player_DisableParachute = -1;
  336. };
  337. sleep 1;
  338. };
  339. };
  340. [] spawn _MonitorPlayerAircraft;
  341. diag_log format["(LAAT/C Monitor) Script running."];