In client side - yes. It doesn't work for shotguns and melee.
Is there really an event function for on player getting shot?You need to sync the health in the server's code. Take the onPlayerShot client side function (or whatever it was) send a `damage` packet to the server and then sync the health manually. That's kinda the only way.