ULX Group colors halp

I’m using the latest version of ULX for TTT and i Can’t figure out how to change colors it’s currently Yellow for admins/owners and white for normal players how would i go about changing this?

In sb_row,

find


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

Now, if you want owner to be red for an example, add owner = Color(255, 0, 0, 255). Here is what it would look like:


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

Then you can do something like:


function GM:TTTScoreboardColorForPlayer(ply)
   if not IsValid(ply) then return namecolor.default end

   if ply:IsUserGroup("owner") and GetGlobalBool("ttt_highlight_admins", true) then
      return namecolor.owner
   end
   return namecolor.default
end

All I did was just copy the TTT scoreboard stuff and did some editing.

This will output the ingame name to be red if they are in the owner group.

Sorry if I explained it wrong or weirdly.

EDIT: Also, this method requires you every update to re-do it. So I don’t really recommend it.