If they brought a gun, you cannot assume they won't use it. The only responsibility you have to be certain that is a bad guy.
I believe your responsibility, if you make the decision to shoot, is to have reasonable cause to believe that the guy with the gun posed an imminent threat of death, or grave bodily harm. Maybe "he has a gun, and he's a bad guy standing in front of me," is just another way of saying that, but just so that we're clear...
To be clearer-er, if someone's aiming a gun at me, or if he seems to be pointing a gun at people not posing an imminent threat to anyone, that would seem to meet that bar in most cases. Most cases.