Resupply_boxes.sqf 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. //Ammo Resupply Box to be dropped or carried by LAAT or vehicle
  2. //Created by Rexi
  3. large_ammo=
  4. {
  5. params["_vic"];
  6. _vic allowDamage false;
  7. _vic addEventHandler ["HandleDamage", {0}];
  8. _vic addAction ["<t color='#47FF1A'>Unlock</t>",
  9. {
  10. box = _this select 0;
  11. [box] execVM (boxesQuick+largeAmmo);
  12. [box] remoteExec ["removeAllActions"];
  13. }];
  14. };
  15. small_ammo=
  16. {
  17. params["_vic"];
  18. _vic allowDamage false;
  19. _vic addEventHandler ["HandleDamage", {0}];
  20. _vic addAction ["<t color='#47FF1A'>Unlock</t>",
  21. {
  22. box = _this select 0;
  23. [box] execVM (boxesQuick+smallAmmo);
  24. [box] remoteExec ["removeAllActions"];
  25. }];
  26. };
  27. Large_Medical=
  28. {
  29. params["_vic"];
  30. _vic allowDamage false;
  31. _vic addEventHandler ["HandleDamage", {0}];
  32. _vic addAction ["<t color='#47FF1A'>Unlock</t>",
  33. {
  34. box = _this select 0;
  35. [box] execVM (boxesQuick+largeMedical);
  36. [box] remoteExec ["removeAllActions"];
  37. }];
  38. };
  39. small_Medical=
  40. {
  41. params["_vic"];
  42. _vic allowDamage false;
  43. _vic addEventHandler ["HandleDamage", {0}];
  44. _vic addAction ["<t color='#47FF1A'>Unlock</t>",
  45. {
  46. box = _this select 0;
  47. [box] execVM (boxesQuick+smallMedical);
  48. [box] remoteExec ["removeAllActions"];
  49. }];
  50. };
  51. ["plp_ct_highsecContRed", "init",Large_Medical, true, [], true] call CBA_fnc_addClassEventHandler;
  52. ["SWOP_BoxMedium3R", "init",small_Medical, true, [], true] call CBA_fnc_addClassEventHandler;
  53. ["plp_ct_highsecContWhite", "init",Large_ammo, true, [], true] call CBA_fnc_addClassEventHandler;
  54. ["SWOP_BoxMedium3W", "init",small_ammo, true, [], true] call CBA_fnc_addClassEventHandler;