TTT Death Notifier
Ive seen something like this before, havn't found anything with the search button.
I essentially just want something to notify me in chat when someone in the game dies. *I do not care if it shows who or what killed them.
This is what I have, if I am doing something wrong please lead me in the right direction.
Whats wrong: When I run it as a console command, it gives me "attempt to call a string value".
I essentially just want something to notify me in chat when someone in the game dies. *I do not care if it shows who or what killed them.
This is what I have, if I am doing something wrong please lead me in the right direction.
Whats wrong: When I run it as a console command, it gives me "attempt to call a string value".
Code:
function DeathNotifier()
for _, v in pairs(player.GetAll()) do
if not ( v:Alive() ) then
chat.AddText(v:GetName() "has died.")
end
end
end
hook.Add( "PlayerDeath", "DeathNotifier", DeathNotifier )
concommand.Add("DeathNotifier", DeathNotifier)