add_remove_attached_EH.sqf 674 B

1234567891011121314151617181920212223242526
  1. #include "../../config_macros.hpp"
  2. params[
  3. ["_vic",objNull,[player]]
  4. ];
  5. if (isNull _vic) exitWith {};
  6. _vic addMPEventHandler ["MPKilled",
  7. {
  8. params ["_vic", "_killer", "_instigator", "_useEffects"];
  9. _vic call macro_fnc_name(remove_attached);
  10. //_vic setVariable ["rd501_attached_gun_object",[],true];
  11. }];
  12. //Same thing, but for single player
  13. _vic addEventHandler ["Killed",
  14. {
  15. params ["_vic", "_killer", "_instigator", "_useEffects"];
  16. _vic call macro_fnc_name(remove_attached);
  17. //_vic setVariable ["rd501_attached_gun_object",[],true];
  18. }];