DISCLAIMER: Remember that whatever kind of firearms you use in a production, always inform local law enforcement about what you are doing. No movie is worth the price of someone getting hurt or killed due to a prop weapon being mistaken for a real one.
When I decided to produce my short film Middle of Nowhere, one of the biggest issues was the gun used in the story. Not only is it wielded by the character of Carrie, but the script refers to her exiting the car "gun blazing". This presented a major problem: how do I get a hold of a gun that I can discharge (many times if retakes were needed) without causing the police to show up and halt production?
After deciding not to go with a real blank-firing gun due to expense, I discovered the next best thing, which is almost better than the real thing: Airsoft. Airsoft is a sport similar to paint-balling where participants fire tiny plastic BBs at each other using very realistic looking guns. The plastic versions can be had very cheaply, while the very authentic metal versions can cost quite a bit. All will work as non-firing props, but there is a certain kind that works especially well for a movie.
These are known as "gas blow back" (GBB) models that when charged with a type of propane called "green gas", have actions that blow back like real semi-automatics. They are virtually silent, and don't have to fire BBs to operate. Due to federal law, they all come with orange-tipped barrels that need to be painted or removed (alcohol worked for me), but when that's done they look great.
Of course, when using Airsoft guns on a shoot, there is no muzzle flash or ejected shell casings. I was shooting at night, and figured most people wouldn't notice the lack of brass, but the flash was very important for obvious reasons. When shooting, my actress suggested that she take the cue from the gun and flip her wrist to simulate the gun kicking. This became very important when I took the footage into post-production.
Muzzle flashes can be added in post using several methods, but I prefer the easiest: dedicated software. EffectsLab Lite is a program designed with the action filmmaker in mind, with one of its primary functions being to import footage needing gun effects. It lets you pick from a variety of looks (the prop I used, a Beretta 9mm, was actually a preset) and settings so you can make each flash unique. The best part is each of your effects can be manipulated in 3-D space, making them look like they are really pointed in whatever direction your prop is pointing.
Knowing where to add each effect was easy with the a GBB Airsoft gun. Place the flash in the frame directly preceding the slide getting tossed back. That coupled with the actor mimicking the gun's kickback makes everything look great.
The only step left was to render and re-import the footage back into the editor to tweak. This involved not color correcting the muzzle flash frames (which make it look like Carrie's face is illuminated by the flash for a split second), and adding a cool sound effect. My favorite free source for sound bites is FindSounds, an excellent search engine on the web. It gives you a ton of choices, and I found a great, loud bang for my gun.
Whatever your script calls for is readily available in the Airsoft market. It will take more work than the real thing, but the results can be just as good and give you infinitely more control and saved money that you can implement elsewhere in your budget.