Need help with plugins or servers? Join our Discord

Modding Database

Up to date with Steam · checked 29s ago· Viewing build 6723 (Sep 30 2026), not the latest

player_death

game event

Declared in game.gameevents, replacing the one in core.gameevents

Named in the code or data of server, client.

Deadworks (C#), as 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;
}

Fields

FieldTypeDeadworks propertyValve's comment
useridplayer_controller_and_pawn
UseridController CBasePlayerController?
UseridPawn CBasePlayerPawn?
user who died
entityidlong
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.
attackerplayer_controller_and_pawn
AttackerController CBasePlayerController?
AttackerPawn CBasePlayerPawn?
user ID who killed
attackernamestring
Attackername string
What type of zombie, so we don't have zombie names
attackerehandleehandle
Attackerehandle CBaseEntity?
if killer not a player, the ehandle of who killed. Again, use attacker first
weaponstring
Weapon string
weapon name killer used
headshotbool
Headshot bool
singals a headshot
attackerisbotbool
Attackerisbot bool
is the attacker a bot
victimnamestring
Victimname string
What type of zombie, so we don't have zombie names
victimisbotbool
Victimisbot bool
is the victim a bot
abortbool
Abort bool
did the victim abort
typelong
Type int
damage type
victim_xfloat
VictimX float
victim_yfloat
VictimY float
victim_zfloat
VictimZ float
bountyshort
Bounty int
dropped_goldshort
DroppedGold int
assister1controllerplayer_controller
Assister1controller CBasePlayerController?
assister2controllerplayer_controller
Assister2controller CBasePlayerController?
assister3controllerplayer_controller
Assister3controller CBasePlayerController?
assister4controllerplayer_controller
Assister4controller CBasePlayerController?
assister5controllerplayer_controller
Assister5controller CBasePlayerController?

History

  1. 6696–6745first dumped