PlayerDead
Tip
This event is available on server-side only
This event is called when a player receives damage.
Parameter | Description |
---|---|
player | The player that received damage. |
killer | The killer entity. |
weapon | The weapon that was used. See: Weapons |
Normal event handler
Alt.OnPlayerDead += (player, killer, weapon) => {
// ...
}
Attribute event handler
Warning
Attribute event handlers only work in Scripts, or after executing Alt.RegisterEvents on a class instance.
For more info see: Create script
public class MyScript : IScript
{
[ScriptEvent(ScriptEventType.PlayerDead)]
public void OnPlayerDead(IPlayer player, IEntity killer, uint weapon)
{
// ...
}
}