event onPlayerDamageClient (client-side)
Available since version: 0.3.5
This event can be canceled
Note
Item id in damage description is available only when hero is killer!
Note
In case when user damages any other connected player and this event is cancelled, the server will not get notified!
This event is triggered when a player or npc is damaged by the game.
Parameters
int|null killerid, int playerid, DamageDescription description
int|nullkillerid: the id of the killer. If killerid is set tonull, it means that there was no killer. In this particular case damage source can be fall damage or scripts.intplayerid: the id of the player who was damaged.DamageDescriptiondescription: a structure containing damage information. For more information see DamageDescription