remove_attached.sqf 380 B

12345678910111213141516171819202122
  1. #include "../../config_macros.hpp"
  2. params[
  3. ["_vic",objNull,[player]]
  4. ];
  5. if (isNull _vic) exitWith {};
  6. _is_attached=attachedTo _vic;
  7. if(! (isNull _is_attached) ) then
  8. {
  9. _is_attached spawn macro_fnc_name(remove_attached_objects);
  10. };
  11. _attached_objectes=attachedObjects _vic;
  12. {
  13. detach _x;
  14. deleteVehicle _x;
  15. } forEach _attached_objectes;