addEventHandler("onPlayerChat",root,
function( text, type)
if type == 2 then
if ( getPlayerTeam ( source ) ) then
cancelEvent()
for i,v in ipairs ( getPlayersInTeam( getPlayerTeam ( source ) ) ) do
outputChatBox ("[TEAM] "..getPlayerName ( source ).." :#FFFFFF "..text, v, 255, 255, 255, true )
end
end
end
end)