GM/AddDeathNotice

From Garry's Mod
(Difference between revisions)
Jump to: navigation, search
(Added example.)
Line 3: Line 3:
 
|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 32: Line 30:
 
|name=victimTeam
 
|name=victimTeam
 
|desc=Team of the victim
 
|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]]
 
}}
 
}}

Revision as of 14:37, 2 December 2016

 GM:AddDeathNotice( )

Contents

Description

Adds a death notice entry.

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