Named in the code or data of server, client.
PlayerDeathEvent[GameEventHandler("player_death")]
public HookResult OnPlayerDeath(PlayerDeathEvent args) {
// args.UseridController, args.UseridPawn, args.Entityid, args.AttackerController,
// args.AttackerPawn, args.Attackername, args.Attackerehandle, args.Weapon, args.Headshot,
// args.Attackerisbot, args.Victimname, args.Victimisbot, args.Abort, args.Type, args.VictimX,
// args.VictimY, args.VictimZ, args.Bounty, args.DroppedGold, args.Assister1controller,
// args.Assister2controller, args.Assister3controller, args.Assister4controller,
// args.Assister5controller
return HookResult.Continue;
}| Field | Type | Deadworks property | Valve's comment |
| userid | player_controller_and_pawn | UseridController CBasePlayerController? UseridPawn CBasePlayerPawn? | user who died |
| entityid | long | Entityid int | entity ID who died, userid should be used first, to get the dead Player. Otherwise, it is not a player, so use this. |
| attacker | player_controller_and_pawn | AttackerController CBasePlayerController? AttackerPawn CBasePlayerPawn? | user ID who killed |
| attackername | string | Attackername string | What type of zombie, so we don't have zombie names |
| attackerehandle | ehandle | Attackerehandle CBaseEntity? | if killer not a player, the ehandle of who killed. Again, use attacker first |
| weapon | string | Weapon string | weapon name killer used |
| headshot | bool | Headshot bool | singals a headshot |
| attackerisbot | bool | Attackerisbot bool | is the attacker a bot |
| victimname | string | Victimname string | What type of zombie, so we don't have zombie names |
| victimisbot | bool | Victimisbot bool | is the victim a bot |
| abort | bool | Abort bool | did the victim abort |
| type | long | Type int | damage type |
| victim_x | float | VictimX float | |
| victim_y | float | VictimY float | |
| victim_z | float | VictimZ float | |
| bounty | short | Bounty int | |
| dropped_gold | short | DroppedGold int | |
| assister1controller | player_controller | Assister1controller CBasePlayerController? | |
| assister2controller | player_controller | Assister2controller CBasePlayerController? | |
| assister3controller | player_controller | Assister3controller CBasePlayerController? | |
| assister4controller | player_controller | Assister4controller CBasePlayerController? | |
| assister5controller | player_controller | Assister5controller CBasePlayerController? |