addEventHandler( "onPlayerChat",root,function (message,messageType)
if messageType == 2 then
local PTeam = getPlayerTeam(source)
local PName = getPlayerName( source ):gsub ( '#%x%x%x%x%x%x', '' )
if PName then
local r,g,b = getTeamColor(PTeam)
local TeamColor = string.format("#%.2X%.2X%.2X",r,g,b)
local TeamName = getTeamName(PTeam)
outputChatBox ( "#ffff00( CoR'sTeam ) "..TeamColor.." "..TeamName.." " ..PName.. " : " ..message.." " ,root, 255, 255, 255, true )
cancelEvent()
end
end
end)