GM/AddDeathNotice

From Garry's Mod
(Difference between revisions)
Jump to: navigation, search
(Added example.)
Line 1: Line 1:
 
{{Hook
 
{{Hook
 
|Description=Adds a death notice entry.
 
|Description=Adds a death notice entry.
 +
 +
{{Note|You cannot use {{LibraryFunction|hook|Add}} on this hook yet.}}
 
|Realm=Client
 
|Realm=Client
 
|Predicted=No
 
|Predicted=No

Revision as of 20:49, 24 December 2017

 GM:AddDeathNotice( )

Contents

Description

Adds a death notice entry.

NOTE

You cannot use hook.Add on this hook yet.

Arguments

string attacker

The name of the attacker

Arguments

number attackerTeam

The team of the attacker

Arguments

string inflictor

Class name of the entity inflicting the damage

Arguments

string victim

Name of the victim

Arguments

number victimTeam

Team of the victim

Examples

Example

Shows a suicide death notice in Sandbox.

local ply = Entity(1)
GAMEMODE:AddDeathNotice( ply:GetName(), ply:Team(), nil, ply:GetName(), ply:Team() )

Output:

suidcide death notice.jpg
Personal tools
Navigation