Garry's Mod Wiki

GM:AddDeathNotice

  any GM:AddDeathNotice( string attacker, number attackerTeam, string inflictor, string victim, number victimTeam )

Description

Adds a death notice entry.

Arguments

1 string attacker
The name of the attacker
2 number attackerTeam
The team of the attacker
3 string inflictor
Class name of the entity inflicting the damage
4 string victim
Name of the victim
5 number victimTeam
Team of the victim

Returns

1 any
true/false to prevent the notice from being shown. Do not return otherwise.

Example

Shows a suicide death notice in Sandbox.

local ply = Entity( 1 ) hook.Run( "AddDeathNotice", ply:GetName(), ply:Team(), "suicide", ply:GetName(), ply:Team() )
Output:
image.png