How can i detect if someone shoots?

You could print a string which shows a text when the npc is shooting, then you would get the npcs location.