Resupply_boxes.sqf 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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 addAction ["<t color='#47FF1A'>Unlock</t>",
  7. {
  8. box = _this select 0;
  9. [box] execVM (boxesQuick+largeAmmo);
  10. [box] remoteExec ["removeAllActions"];
  11. }];
  12. };
  13. small_ammo=
  14. {
  15. params["_vic"];
  16. _vic addAction ["<t color='#47FF1A'>Unlock</t>",
  17. {
  18. box = _this select 0;
  19. [box] execVM (boxesQuick+smallAmmo);
  20. [box] remoteExec ["removeAllActions"];
  21. }];
  22. };
  23. Large_Medical=
  24. {
  25. params["_vic"];
  26. _vic addAction ["<t color='#47FF1A'>Unlock</t>",
  27. {
  28. box = _this select 0;
  29. [box] execVM (boxesQuick+largeMedical);
  30. [box] remoteExec ["removeAllActions"];
  31. }];
  32. };
  33. small_Medical=
  34. {
  35. params["_vic"];
  36. _vic addAction ["<t color='#47FF1A'>Unlock</t>",
  37. {
  38. box = _this select 0;
  39. [box] execVM (boxesQuick+smallMedical);
  40. [box] remoteExec ["removeAllActions"];
  41. }];
  42. };
  43. ["plp_ct_highsecContRed", "init",Large_Medical, true, [], true] call CBA_fnc_addClassEventHandler;
  44. ["SWOP_BoxMedium3R", "init",small_Medical, true, [], true] call CBA_fnc_addClassEventHandler;
  45. ["plp_ct_highsecContWhite", "init",Large_ammo, true, [], true] call CBA_fnc_addClassEventHandler;
  46. ["SWOP_BoxMedium3W", "init",small_ammo, true, [], true] call CBA_fnc_addClassEventHandler;