Stretcher.sqf 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. // created by Rexi screw other units we are the only ones with a working stretcher.
  2. Medicalbox=
  3. {
  4. params["_obj"];
  5. _obj addAction ["<t color='#00FF00'>Pickup Stretcher Beacon</t>", {
  6. params["_this","_user"];
  7. _user addAction ["<t color='#00FF00'>Call for Medivac droid</t>", {
  8. params["_obj"];
  9. _veh = "B_Quadbike_01_F" createVehicle position player;
  10. [_veh] remoteExecCall ["disableCollisionWith", 0, player];
  11. _veh lockDriver true;
  12. _veh allowdamage false;
  13. clearItemCargoGlobal _veh;
  14. [_veh,[0,""]] remoteExec ["setObjectTexture",0];
  15. [_veh,[1,""]] remoteExec ["setObjectTexture",0];
  16. _veh3 = "cwa_Stretcher" createVehicle position player;
  17. _veh2 = "SWOP_Rebel_Dio_Droid" createVehicle position player;
  18. [_veh2] remoteExecCall ["disableCollisionWith", 0, player];
  19. _veh2 enableSimulation false;
  20. _veh attachTo [_veh2, [0,0.45,0.2] ];
  21. _veh setdir 180;
  22. _veh3 attachTo [_veh2, [0,1.2,-0.4] ];
  23. _veh addAction ["<t color='#00FF00'>Become Stretcher Bearer</t>", {
  24. params["_this","_user"];
  25. _user addAction ["<t color='#0000FF'>Transport Mode</t>",{
  26. _vex= nearestObject [player, "SWOP_Rebel_Dio_Droid"];
  27. _vex attachTo [player, [0,3,0.5],"Pelvis"];
  28. _vex setdir 180;
  29. },[1],0,false,true,"","_target == _this"];
  30. _user addAction ["<t color='#0000FF'>Park</t>", {
  31. _stretcher = nearestObject [player, "SWOP_Rebel_Dio_Droid"];
  32. detach _stretcher;
  33. },[1],0,false,true,"","_target == _this"];
  34. }];
  35. _veh addAction ["<t color='#0000FF'>Repack Stretcher</t>",
  36. {
  37. params["_obj"];
  38. _delobj1 = nearestObject [player, "B_Quadbike_01_F"];
  39. deleteVehicle _delobj1;
  40. _delobj2 = nearestObject [player, "cwa_Stretcher"];
  41. deleteVehicle _delobj2;
  42. _delobj3 = nearestObject [player, "SWOP_Rebel_Dio_Droid"];
  43. deleteVehicle _delobj3;
  44. }];
  45. },[1],0,false,true,"","_target == _this"];
  46. }];
  47. };
  48. ["medammobox", "init",medicalbox, true, [], true] call CBA_fnc_addClassEventHandler;