Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if SERVER then
- AddCSLuaFile("ranksbnamecolor.lua")
- end
- local function rainbow()
- local f = 0.5
- local t = RealTime()
- local r = math.sin( f * t ) * 127 + 128
- local g = math.sin( f * t + 2 ) * 127 + 128
- local b = math.sin( f * t + 4 ) * 127 + 128
- return Color( r, g, b )
- end
- if CLIENT then
- local function colorName( ply )
- if ply:IsUserGroup("Mallard") then
- return rainbow()
- end
- if ply:IsUserGroup("server_manager") then
- return rainbow()
- end
- if ply:IsUserGroup("rootadmin") then
- return Color(252,140,217)
- end
- if ply:IsUserGroup("superadmin") then
- return Color(229,103,23)
- end
- if ply:IsUserGroup("admin") then
- return Color(0,128,0)
- end
- if ply:IsUserGroup("supporter") then
- return Color(255,255,0)
- end
- end
- hook.Add("TTTScoreboardColorForPlayer", "Color Scoreboard Names", colorName)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement