Colored Names (NOT RANKS) In TTT Scoreboard

SOLVED

I have all the ranks and colors setup but my only problem is thta I forgot to change the color of ‘Mod’. I do not know where this file is so if anybody could inform me please?

gamemodes/terrortown/gamemode/vgui/sb_row.lua. Starts on line 62 on a vanilla TTT install IIRC.

It’s in a different file than that. I think it was one of the cl_NAME files.

All I have there is:


local namecolor = {
   default = COLOR_WHITE,
   admin = Color(220, 180, 0, 255),
   dev = Color(100, 240, 105, 255)
};

Lua/autorun/client

[LUA]
local namecolors = {}
namecolors[ “admin” ] = Color( 255, 0, 0 )
namecolors[ “mod” ] = Color( 200, 55, 55 )

local function ScoreboardNameColors( ply )
local rank = ply:GetNWString( “usergroup” )
return namecolors[ rank ] and namecolors[ rank ] or nil
end
hook.Add ( “TTTScoreboardColorForPlayer”, “TTTSBNameColor”, ScoreboardNameColors )
[/LUA]

Thank you rejax!!!