this addEventHandler ["AnimChanged", {
	params ["_unit", "_anim"];
	private _currentWeapon = currentWeapon _unit;
	private _allowedWeapon = ["braf_mag"];

	private _animstoadd = [
		"aidlppnemstpsraswrfldnon_ai",
		"aidlppnemstpsraswrfldnon_ai",
		"amovppnemrunslowwrfldf",
		"amovppnemrunslowwrfldb",
		"amovppnemstpsraswrfldnon"];

	private _animstoremove =  [
		"aidlpercmstpsraswrfldnon_ai",
		"aidlpknlmstpsraswrfldnon_ai",
		"amovpercmstpsraswrfldnon"];

	private _attachment1 = "sp_acc_gpmg_deploybipod";
  private _attachment2 = "sp_acc_gpmg_linkhide";
	if (_currentWeapon in _allowedWeapon) then{
		if(_anim in _animstoadd) then {
			hint format ["approved anim is %1", _anim];
			copyToClipboard _anim;
			_unit addPrimaryWeaponItem _attachment1;
			_unit addPrimaryWeaponItem _attachment2;
	  }else{
		//hint format ["new anim to add is %1", _anim];
		//copyToClipboard _anim;
			if (_anim in _animstoremove) then {
				_unit removePrimaryWeaponItem _attachment1;
				_unit removePrimaryWeaponItem _attachment2;
			}
	  };
	} else {
	 _unit spawn {
			uiSleep 0.01;
		 _unit removeEventHandler ["AnimChanged", _thisEventHandler];
	 };
	};
}];


AnimChanged

AnimDone





// player

private _animstoadd = [
	"amovpercmrunslowwrfldf_amovppnemstpsraswrfldnon_end",
	"amovpercmstpsraswrfldnon_amovppnemstpsraswrfldnon",
	"amovpknlmstpsraswrfldnon_amovppnemstpsraswrfldnon",
	"amovpknlmstpsraswrfldnon_amovppnemstpsraswrfldnon"];
private _animstoremove =  [
	"amovppnemstpsraswrfldnon_amovpknlmstpsraswrfldnon",
	"amovppnemstpsraswrfldnon_amovpercmstpsraswrfldnon"];



private _animstoadd = [
	"aidlppnemstpsraswrfldnon_ai",
	"aidlppnemstpsraswrfldnon_ai"];



private _animstoremove =  [
	"aidlpercmstpsraswrfldnon_ai",
	"aidlpknlmstpsraswrfldnon_ai"];
crouch to prone
aidlppnemstpsraswrfldnon_ai

stand to prone
aidlppnemstpsraswrfldnon_ai

prone to stand
aidlpercmstpsraswrfldnon_ai

prone to crouch
aidlpknlmstpsraswrfldnon_ai
