GM/AddDeathNotice

From Garry's Mod
(Difference between revisions)
Jump to: navigation, search
(The arguments were correctly aligned.)
m (Bug)
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
{{Hook
 
{{Hook
 
|Description=Adds a death notice entry.
 
|Description=Adds a death notice entry.
 +
 +
{{Bug|Pull=1380|Issue=2611|You cannot use {{LibraryFunction|hook|Add}} on this hook yet.}}
 
|Realm=Client
 
|Realm=Client
 
|Predicted=No
 
|Predicted=No
|Name=AddDeathNotice
 
|Parent=GM
 
 
|File=gamemodes/base/gamemode/cl_deathnotice.lua
 
|File=gamemodes/base/gamemode/cl_deathnotice.lua
 
|Line=127
 
|Line=127
Line 10: Line 10:
 
{{Arg
 
{{Arg
 
|type=string
 
|type=string
|name=victim
+
|name=attacker
|desc=Name of the victim
+
|desc=The name of the attacker
 
}}
 
}}
 
{{Arg
 
{{Arg
 
|type=number
 
|type=number
|name=victimTeam
+
|name=attackerTeam
|desc=Team of the victim
+
|desc=The team of the attacker
 
}}
 
}}
 
{{Arg
 
{{Arg
Line 25: Line 25:
 
{{Arg
 
{{Arg
 
|type=string
 
|type=string
|name=attacker
+
|name=victim
|desc=The name of the attacker
+
|desc=Name of the victim
 
}}
 
}}
 
{{Arg
 
{{Arg
 
|type=number
 
|type=number
|name=attackerTeam
+
|name=victimTeam
|desc=The team of the attacker
+
|desc=Team of the victim
 +
}}
 +
{{Example
 +
|Description=Shows a suicide death notice in Sandbox.
 +
|Code=local ply = Entity(1)
 +
GAMEMODE:AddDeathNotice( ply:GetName(), ply:Team(), nil, ply:GetName(), ply:Team() )
 +
|Output=[[File:suidcide_death_notice.jpg]]
 
}}
 
}}

Latest revision as of 21:17, 26 July 2018

 GM:AddDeathNotice( )

Contents

Description

Adds a death notice entry.

BUG

You cannot use hook.Add on this hook yet.

Issue Tracker: #2611

Pull Request: #1380

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