I don't think you get what I mean. Your script colors the users name in the join text based on what team they're on. In sandbox modes and such, you can set team colors through the xgui, so this works natively. With TTT, it takes over the team commands, because everyone is designated one of 2 teams when joining (innocent or spectator). The work around for many codes has been to get the name of each individual group, and specify a color per team. I'll show you what I tried that didn't work.
function player_connect( data )
local name1 = data:ReadString()
if ply:IsUserGroup("superadmin") then
nickteamcolour1 = Color(232,228,5)
elseif ply:IsUserGroup("admin") then
nickteamcolour1 = Color(22,128,5)
nickteamcolour1 = team.GetColor(data:ReadShort())
chat.AddText( Color( 151, 211, 255 ), "Console", Color( 255, 255, 255 ), ": ", nickteamcolour1, name1, Color( 255, 255, 255 ), " has joined the server." )
That way I can set up what color to make the name, as per group. The only problem is, it won't recongnize "ply" and I'm still too new to really know why/how to fix it.