GM/AddDeathNotice

From Garry's Mod
(Difference between revisions)
Jump to: navigation, search
(Created page with "{{Hook |Name=AddDeathNotice |Parent=GM |Description=Adds an death notice entry |Realm=Client }} {{Arg |type=string |name=victim |desc=The name of the victim }} {{Arg ...")
 
m (Bug)
 
(12 intermediate revisions by 6 users not shown)
Line 1: Line 1:
 
{{Hook
 
{{Hook
|Name=AddDeathNotice
+
|Description=Adds a death notice entry.
|Parent=GM
+
 
|Description=Adds an death notice entry
+
{{Bug|Pull=1380|Issue=2611|You cannot use {{LibraryFunction|hook|Add}} on this hook yet.}}
 
|Realm=Client
 
|Realm=Client
 +
|Predicted=No
 +
|File=gamemodes/base/gamemode/cl_deathnotice.lua
 +
|Line=127
 
}}
 
}}
 
{{Arg
 
{{Arg
 
|type=string
 
|type=string
|name=victim
+
|name=attacker
|desc=The name of the victim
+
|desc=The name of the attacker
 
}}
 
}}
 
{{Arg
 
{{Arg
 
|type=number
 
|type=number
|name=victimsTeam
+
|name=attackerTeam
|desc=The team of the victim
+
|desc=The team of the attacker
 
}}
 
}}
 
{{Arg
 
{{Arg
 
|type=string
 
|type=string
 
|name=inflictor
 
|name=inflictor
|desc=Name of the killicon to use
+
|desc=Class name of the entity inflicting the damage
 
}}
 
}}
 
{{Arg
 
{{Arg
 
|type=string
 
|type=string
|name=attacker
+
|name=victim
|desc=Name of the attacker
+
|desc=Name of the victim
 
}}
 
}}
 
{{Arg
 
{{Arg
 
|type=number
 
|type=number
|name=attackersTeam
+
|name=victimTeam
|desc=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