Advertisement
Guest User

Untitled

a guest
Dec 13th, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.76 KB | None | 0 0
  1. ["airdrop_objects", {
  2. params ["_spawn", "_dz", "_final", "_objects"];
  3. systemChat "Airdropping";
  4. private _planeClassname = "CUP_B_C130J_USMC";
  5. private _spawnMark = _spawn;
  6. private _dropMark = _dz;
  7. private _finalMark = _final;
  8. private _objects = _objects;
  9. private _spawnPos = getMarkerPos _spawnMark;
  10. private _planeHeight = 200;
  11. private _plane = createVehicle [_planeClassname, [_spawnPos select 0, _spawnPos select 1, _planeHeight], [], 0, "FLY"];
  12. _plane setDir ((getPos _plane) getDir (getMarkerPos _dropMark));
  13. _plane setVelocityModelSpace [0, 200, 0];
  14. _plane setVehicleAmmo 0;
  15. private _group = createGroup west;
  16. private _pilot = _group createUnit ["B_Helipilot_F", [0, 0, 0], [], 0, "NONE"];
  17. _pilot moveInDriver _plane;
  18. _pilot disableAI "AUTOCOMBAT";
  19. _pilot disableAI "AUTOTARGET";
  20. _pilot disableAI "TARGET";
  21. [_plane, _dropMark, _finalMark, 1, [_objects, true], _planeHeight, 0.3, 0.3333] execVM "paradrop.sqf";
  22. systemChat "Done Airdropping";
  23. }] call CBA_fnc_addEventHandler;
  24.  
  25. private _createAction = {
  26. params["_name", "_spawn", "_dz", "_final", "_objects"];
  27. private _action = ["airdrop" + str(random 100), _name, "", { systemChat "airdropBegin"; [_spawn, _dz, _final, _objects] call CBA_fnc_serverEvent; systemChat "airdropGoing"; }, {true}] call ace_interact_menu_fnc_createAction;
  28. [["ACE_ZeusActions"], _action] call ace_interact_menu_fnc_addActionToZeus;
  29. };
  30.  
  31. if (hasInterface) then {
  32. ["name1", "spawn_marker_1", "dz_marker_1", "final_marker_1", [objectVariableName1, objectVariableName2, etc]] call _createAction;
  33. ["name2", "spawn_marker_2", "dz_marker_2", "final_marker_2", [objectVariableName3, objectVariableName4, etc]] call _createAction;
  34. // ...
  35. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement