How do I change a TTT scoreboard which derives rank colors from this:
[lua] if ply == LocalPlayer() then
surface.SetDrawColor( 200, 200, 200, math.Clamp(math.sin(RealTime() * 2) * 50, 0, 100))
surface.DrawRect(0, 0, self:GetWide(), SB_ROW_HEIGHT )
end
draw.DrawText(ply:GetNWString("usergroup"),"Info",self:GetWide()/1.45,2,color_white,TEXT_ALIGN_RIGHT)
surface.SetDrawColor(0,0,0,255)
surface.DrawOutlinedRect(0,0,self:GetWide(),self:GetTall()) [/lua]
There’s no self.cos[5] for the rank on the sv_row.lua?
To something like this so ranks are highlighted different colors:
[lua] if ply:IsUserGroup(“superadmin”) then
self.cols[6]:SetText(“Superadmin”)
self.cols[6]:SetTextColor(Color(255,230,0))
end
if ply:IsUserGroup(“admin”) then
self.cols[6]:SetText(“Admin”)
self.cols[6]:SetTextColor(Color(0,100,255))
end
if ply:IsUserGroup(“owner”) then
self.cols[6]:SetText(“Owner”)
self.cols[6]:SetTextColor(Color(213,0,21))
end
if ply:IsUserGroup(“superdonor”) then
self.cols[6]:SetText(“S.Donator”)
self.cols[6]:SetTextColor(Color(255,0,222))
end
if ply:IsUserGroup(“leadadmin”) then
self.cols[6]:SetText(“Superadmin”)
self.cols[6]:SetTextColor(Color(255,230,0))
end
if ply:IsUserGroup(“operator”) then
self.cols[6]:SetText(“Operator”)
self.cols[6]:SetTextColor(Color(255,128,0))
end
if ply:IsUserGroup(“staffmanager”) then
self.cols[6]:SetText(“Staff Manager”)
self.cols[6]:SetTextColor(Color(150,150,150))
end
if ply:IsUserGroup(“donor”) then
self.cols[6]:SetText(“Donator”)
self.cols[6]:SetTextColor(Color(127,0,255))
end
if ply:IsUserGroup(“respected”) then
self.cols[6]:SetText(“Respected”)
self.cols[6]:SetTextColor(Color(137,104,205))
end
if ply:IsUserGroup(“regular”) then
self.cols[6]:SetText(“Regular”)
self.cols[6]:SetTextColor(Color(0,255,0))
end
if ply:IsUserGroup(“moderator”) then
self.cols[6]:SetText(“Moderator”)
self.cols[6]:SetTextColor(Color(80,169,52))
end
if ply:IsUserGroup(“user”) then
self.cols[6]:SetText(“Guest”)
self.cols[6]:SetTextColor(Color(255,255,255))
end
end[/lua]