Tow.sqf 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. #include "../../config_macros.hpp"
  2. params[
  3. ["_this",objNull,[player]]
  4. ];
  5. if(isNull _this) exitWith {
  6. };
  7. _this addAction ["<t color='#f4e541'>Engage Tow Cable</t>",{
  8. params["_vic"];
  9. _objects= nearestObjects [player, ["Car","Tank","Air","Ship"], 20];
  10. _vex= _objects select 1;
  11. _vex attachTo [_vic, [0,-11,0]];
  12. removeAllActions _vic;
  13. _vic addAction ["<t color='#f44167'>Disengage Tow Cable</t>", {
  14. params["_vic"];
  15. _objects= nearestObjects [player, ["Car","Tank","Air","Ship"], 20];
  16. removeAllActions _vic;
  17. _vex= _objects select 1;
  18. detach _vex;
  19. _this call macro_fnc_name(warden_tow);
  20. },[1],0,true,true,""," driver _target == _this "];
  21. },[1],0,true,true,""," driver _target == _this "];
  22. _this addAction ["<t color='#f4a442'>Engage Long Tow Cable</t>",{
  23. params["_vic"];
  24. _objects= nearestObjects [player, ["Car","Tank","Air","Ship"], 20];
  25. _vex= _objects select 1;
  26. _vex attachTo [_vic, [0,-22,0]];
  27. removeAllActions _vic;
  28. _vic addAction ["<t color='#f44167'>Disengage Long Tow Cable</t>", {
  29. params["_vic"];
  30. _objects= nearestObjects [player, ["Car","Tank","Air","Ship"], 60];
  31. removeAllActions _vic;
  32. _vex= _objects select 1;
  33. detach _vex;
  34. _this call macro_fnc_name(warden_tow);
  35. },[1],0,true,true,""," driver _target == _this "];
  36. },[1],0,true,true,""," driver _target == _this "];