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.
[code]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[/code]
Jordi.
For steam name
[CODE]
ct:Add(ply:Name().." killed "..attacker:Name().. " innocent bystander ")
[/CODE]
For player name
[CODE]
ct:Add(ply:GetBystanderName().." killed "..attacker:GetBystanderName().. " innocent bystander ")
[/CODE]
I don't know if GetBystanderName() is a real thing, but apparently to that code it is
Really thanks it works...
Sorry, you need to Log In to post a reply to this thread.