put_stretcher_in_backpack.sqf 507 B

123456789101112131415161718192021222324
  1. #include "../../config_macros.hpp"
  2. params [
  3. ["_unit",player],
  4. ["_obj",objNull,[player]],
  5. ["_item",MACRO_QUOTE(macro_new_weapon(Stretcher,Item)),["string"]]
  6. ];
  7. hint format ["%1 --- %2 --- %3",_unit,_obj,_item];
  8. if (isNull _obj) exitWith {
  9. hint "Big Sad an error happened, F."
  10. };
  11. _can_add =_unit canAddItemToBackpack _item;
  12. if(_can_add) then {
  13. _unit addItemToBackpack _item;
  14. deleteVehicle _obj;
  15. hint "Stretcher returned to backpack.";
  16. }else{
  17. hint "You need more space, Stretcher can't fit.";
  18. };