Okay, this is what the little bastards prey on. The fact that you make yourself a target by allowing them to do this in your neighborhood. Now i am a confident and cocky sum-bitch. I personally would have laughed at them. I would have tried to disarm the gun if i thought it was possible and then i would have shot them with it.
Next time it happens, tell them to get fucked. And as stupid as it sounds, let them kick the shit out of you. The thing with most gangsters is, they dont want to shoot you. And if they do, then they have already decided before you have been approached or picked out. The important thing when facing a gun is... A. Dont resist even if they kick the shit out of you. B. Never allow yourself to be a victim. Its the old bully senario... if you let them do what they want, then they will do it. If you put up an intelligent fight they will move on to easier prey.
I suggest getting at least some form of protection. A taser works wonders. Its small, is compact and will take down anyone. It immobilizes them instantly. In most cases it will work through clothing. If you taze the guy with the gun the other two will run. When he lets go of the gun, pick it up and shoot the fleeing suspects. And if you do decide to do anything with a gun... make sure you kill them.
Get your community involved. Most of the problem is everyone is too scared to do anything.
And before you guys get all pissy and everything... i lived in brooklyn projects for a good while. And being a white guy, it was not that pleasant. The thing that i learned was that if i let those bastards do something or say something to me without a retort... then they knew they could fuck with me. I'm not saying to curse them out and tell them you'll whip the shit out of them or anything... but always stand your ground.
The way i look at it is what point is there in life if you live in fear? Use good judgment and notice all situations. when going anywhere by yourself... always have some awareness of the situation. Dont allow people to sneak up on you... walk in the light... and try to be near the public. Always have a "this is where i'll run" thought in your head.
Look into self defense classes. You would be surprised at how easy it is to disarm a weapon from anyone of any size. Ask yourself what lenghths you are willing to go to to mitigate things like this. Then become profficient in it. Always have contingencies for everything.