event
onPlayerHit (server-side)
This event can be canceled
This event is triggered when one player hits another player.
Parameters
int playerid, int killerid, int dmg, int dmgType
int
playerid: the id of the player who was hit.int
killerid: the id of the killer. If killerid is set to-1
, it means that there was no killer. In this particular case damage source can be fall from a tall object or scripts.int
dmg: a value representing the amount of health the player lost.int
dmgType: a flag representing the types of damage. For more information see Damage constants