At this stage, the child still learns through observation and mimicking what he sees. If he had observed the behavior on TV or amongst peers play, he can then act it out. As far as knowing that it is wrong, he would base his understanding on what is being told to him. If an adult tells him that it is wrong, he may know it is wrong because an adult had told him so but rationalizing it as to why, it is unlikely that he would arrive to that conclusion on his own.
Around the age of 5 he is still learning how to discriminate b/w right and wrong and to him these are concrete terms as to where in older children and adults, they can be also viewed in symbolic terms. If he is observing others playing or sees this in video games or TV, where it is make belief and characters don't necessarily die (or he can't identify with them), he would not completely be able to grasp why the act of holding a gun to another's had is morally wrong and dangerous (deadly)