I didn't/don't like it when my children did/do play involving guns/killing people etc, but I use the approach that their nursery used, which makes sense to me.
Briefly, children have always played fighting/war games and it's fair to say that this is more popular amongst boys. By 'not allowing' this, we're criticising 'boy' play in favour of more sedate, playing with dolls role play that 'girls' do.
Rather than stopping it, explain that not everyone wants to be shot at in fun, so they must ask the person if they mind if they shoot them (or whatever violent play is involved - same as if they want to jump on someone.) Develop the role play aspect eg 'oh no, that really hurt, did you mean to hurt me? How do you feel if someone hurts you?' etc etc).
My dc's school also seems to encourage them to shout 'pill' rather than 'kill' during these games, which takes some of the horror out of it, I think.
Also, as they get older, you can talk about war, conflicts, the effects of families and communities etc so that they can develop their awareness and ideas more fully.
HTH.