Scoreboard Colors TTT

Hey, with using ulx and all that, how do you make the custom colors for all the groups, like moderator, admin, etc. And make those colors show up in the scoreboard TAB menu?

Like how by default admins are yellow.

Try this. http://wiki.garrysmod.com/?title=Team.SetUp

Well, you cant change the teams, because its TTT and we only have Innocents and Traitors. And spectators.

Look at the bottom http://luabin.overvprojects.nl/?keywords=team.SetUp

  • You might get some inspiration to figure out how to make it.

Yeah that changes every single persons color. Im talking about admins/mods/etc, like how ULX makes admins yellow. I just want to add to that.

[lua]if LocalPlayer():IsAdmin() then
–Stuff to make them colour, look in ttt sourcecode for the scoreboard file.
end[/lua]

Not very hard now.

Thanks, so do you add that to here?
https://facepunch.svn.beanstalkapp.com/gmodgame/garrysmod/gamemodes/terrortown/gamemode/cl_scoreboard.lua

if you know how to use that code, then yes

[editline]24th May 2011[/editline]

wait no, you need to find where they actually make the scoreboard code

Since your working with a gamemode that’s updated a lot I would override the panel TTTScoreboard somewhere outside of the core gamemode files

Try something like…

[lua]if SERVER then
AddCSLuaFile(“scoreboardcolors.lua”)
else
function MySBColors(ply)
if ply:IsUserGroup(“blksith0”) then
return Color(255, 0, 0)
else
if ply:IsUserGroup(“blksith1”) then
return Color(0, 0, 255)
end
end
end
hook.Add(“TTTScoreboardColorForPlayer”, “MySBColors”, MySBColors)
end[/lua]