You probably managed to get your client and server out of sync with the weapon raising and lowering. As in, your client thought the weapon was raised while the server sees it as passive. Meaning when you shoot, your client SHOWS that it fires bullets but the server doesn't actually fire anything. Your ammo doesn't go down either. So even though you think you are shooting, you don't actually do anything and you don't damage anything.
So my guess: You got this glitch while shooting on a citizen. Then you switched weapons which fixes it again (Because switching your weapons puts both client and server back to passive mode) and then you tried it again on a coast guard.