Simple "earplugs" action to add to your mission's init.sqf
Code:
if (!isDedicated) then {
   player addAction ["<t color='#66FF66'>Headphones</t> <t color='#3399FF'>ON</t>",{1 fadeSound 0.05; (_this select 0) addHeadgear "H_Cap_headphones";},nil,1,true,true,"","_this in _target AND soundVolume > 0.5"];
 player addAction ["<t color='#66FF66'>Headphones</t> <t color='#FF3300'>OFF</t>",{1 fadeSound 1; (_this select 0) addHeadgear "H_Cap_oli_hs";},nil,1,true,true,"","_this in _target AND soundVolume < 0.5"];
};