TTT status not being set to dead when killed by world

On my server, there’s this new bug where if someone dies by the world (drowning, falling off map, killed by turret) they die, but they can still talk to alive people with text and voice chat and their name is under “Terrorists” in the scoreboard instead of “Missing in Action” or “Confirmed Dead”.

Does anyone have a fix for this?

Did you recently place any new addons onto your server?

Yes I have a lot of addons. Would you like for me to make a list of them?

Well, can you remember the last thing(s) you added before this started happening?

I installed some addons from coderhire and made some command to open webpages. Nothing really stands out though :confused:

anything that has to do with a player dying?

this happens with dodgy chat tags too IIRC

I have a killcam and some SWEPS.

[editline]31st October 2013[/editline]

What do you mean?

Well, anyway, take a look through your addons and see if you have a line that’s something this this:

		if (not) (IsValid(killer) then return end

And then change it to

		if (not) (IsValid(killer) and killer:IsPlayer()) then return end


I think I made this a bit unclear, with the not in barkets part, what I actually meant was that you need to add killer:IsPlayer()) if this line is in there

Can’t find it anywhere :confused:

This is my addons folder if it helps:


Have a look at “voicechatmeter”

Possibly either the TTT Counter, or WyoziKillCam. Those have things to do with death, but I don’t think anyone complained. I know I had this issue with a public workshop addon that said who killed who, and I switched it out to a different one. Basically, anything that is calling the hook OnPlayerDeath

Nope I disabled that addon and it’s still happening.

[editline]1st November 2013[/editline]

I’ve had those addons for a while and they were working fine before so I don’t think they’re the problem.

I went through all of my addons and it turns out this is the script that was causing the problem (it was in lua/autorun)
if ( SERVER ) then
hook.Add( “PlayerDeath”, “Message” , function( Pl, Ent, Killer )

    umsg.Start( "PlayerDeathCustom", Pl )
        umsg.Entity( Killer )
        umsg.Bool( Killer:IsTraitor() )
        umsg.Bool( Killer:IsDetective() )


usermessage.Hook( "PlayerDeathCustom" , function( um )
    local Killer = um:ReadEntity()
    local IsT = um:ReadBool()
    local IsD = um:ReadBool()
	local cwhite = Color( 255,255,255 )
	local cnick= Color( 175,175,175 )
	local cT = Color( 255,0,0)
	local cD = Color( 0,0,255)
	local cI = Color(0,255,0)
	local killer = Killer:Nick()
	if IsT then
		chat.AddText(cwhite, "You have been killed by " , cnick, Killer:Nick(), cwhite, ( (IsT or IsD) and ", a " or ", an "), ( (IsT and cT) or (IsD and cD) or
			cI), ((IsT and "Traitor!") or (IsD and "Detective!") or "Innocent!") )

Could someone help me fix this script so it doesn’t cause this bug?

before you start the usermessage make sure do if not killer:IsPlayer() then return end