So why don't you use:
this addEventHandler [{fired},{if ((_this select 1) in ["JAM_AKM","JAM_Vz58","JAM_AK74","JAM_AKS74U","JAM_PKM","JAM_PKMFS","JAM_AKMGL","JAM_AK74GL","JAM_SVD","JAM_RPG7Launcher","JAM_SKS","JAM_RPD","JAM_CAVS_RPG7Launcher","JAM_RPDFS","JAM_PKMFS"]) then {loud = true} }]
and in the init.sqs file put
loud = false
?
If you want the variable and the message then use:
this addEventHandler [{fired},{if ((_this select 1) in ["JAM_AKM","JAM_Vz58","JAM_AK74","JAM_AKS74U","JAM_PKM","JAM_PKMFS","JAM_AKMGL","JAM_AK74GL","JAM_SVD","JAM_RPG7Launcher","JAM_SKS","JAM_RPD","JAM_CAVS_RPG7Launcher","JAM_RPDFS","JAM_PKMFS"]) then {hint format ["%1 fired an unsilenced weapon",_this select 0];loud = true} }]