if SERVER then
AddCSLuaFile("scoreboardcolors.lua") //give them some files
else
function MySBColors(ply)
if ply:IsUserGroup("admin") then //admin colours
return Color(113, 198, 113)
end
if ply:IsUserGroup("superadmin") then //then the SA
return Color(230, 19, 230)
end
if ply:IsUserGroup("vip") then //and the vip
return Color(0,178,238)
end
end //end the functions
end //end the if
hook.Add("TTTScoreboardColorForPlayer", "MySBColors", MySBColors)
Use single if/then statements or an elseif. You did else and an if in the next line, Lua takes care of this with elseif. Or you could go with what I have here and just use single if statements.
example of elseif:
if blah blah blah then
blah.blah:blah()
elseif blah blah == blah then
blah.blah:blah2()
end