Murder gamemode Problems with lua bystander kill

i have a small problem with this i am really new on lua coding and such so i came here to ask

if a bystanders kills a bystander i also want to see the name of who the bystander killed like “garry killed playername innocent bystander”.

Can you please help me with that.


if IsValid(attacker) && attacker:IsPlayer() then
			if attacker:GetMurderer() then
				-- self:SendMessageAll("The murderer has struck again")
			elseif attacker != ply then
				if self.ShowBystanderTKs:GetBool() then
					local ct = ChatText()
					local col = attacker:GetPlayerColor()
					ct:Add(attacker:Nick() .. ", " .. attacker:GetBystanderName(), Color(col.x * 255, col.y * 255, col.z * 255))
					ct:Add(" killed an innocent bystander ")
					ct:SendAll()
				end

Jordi.

For steam name



ct:Add(ply:Name().." killed "..attacker:Name().. " innocent bystander ")


For player name



ct:Add(ply:GetBystanderName().." killed "..attacker:GetBystanderName().. " innocent bystander ")


I don’t know if GetBystanderName() is a real thing, but apparently to that code it is

Really thanks it works…