1
0

Added documentation for HOOK_KILLED

This commit is contained in:
Nounours Heureux 2015-06-09 17:37:59 +02:00
parent d79f601d5a
commit ee28d71839
2 changed files with 23 additions and 1 deletions

View File

@ -2683,7 +2683,7 @@ Parser:close();
},
}, -- AdditionalInfo
}, -- lxp
sqlite3 =
{
Desc = [[

View File

@ -0,0 +1,22 @@
return
{
HOOK_KILLED =
{
CalledWhen = "A player or a mob died.",
DefaultFnName = "OnKilled",
Desc = [[
This hook is called whenever player or a mob dies. It can be used to change the death message.
]]
Params =
{
{ Name = "Victim", Type = "{{cEntity}}", Notes = "The player or mob that died" },
{ Name = "TDI", Type = "{{TakeDamageInfo}}", Notes = "Informations about the death" },
{ Name = "DeathMessage", Type = "string", Notes = "The default death message. An empty string if the victim is not a player" },
},
Returns = [[
The function may return two values. The first value is a boolean specifying whether other plugins should be called. If it is true, the other plugins won't get notified of the death. If it is false, the other plugins will get notified.</p>
<p>The second value is a string containing the death message. If the victim is a player, this death message is broadcasted instead of the default death message. If it is empty, no death message is broadcasted. If it is nil, the message is left unchanged. If the victim is not a player, the death message is never broadcasted.</p>
<p>In either case, the victim is dead.
]],
}, -- HOOK_KILLED
}