Try Native Simple Trainer, and turn on everyone ignores player. That seems to work for when the player fires a weapon, But it might not work if someone other than the player fires a weapon. Which should be rare, because the main way to get a ped to fire their weapon, would be from provoking them to do so. But if everyone ignores the player. No peds should be provoked to shoot their weapon in the first place.