this is the way i do it -
player addEventHandler ["fired",{if ("_this select 1 == _x" count ["GlockS","Bizon","HK","Uzi"] == 0) then {loud = true}}]
in other words, it checks the weapon. if it's not in the array of silenced weapons then the loud variable is set to true.