I'll let you figure out how to incorporate it into my code so you're at least trying to do something.
if table.HasValue(hsv_tags, ply:GetUserGroup()) then
table.insert(addchat, "<hsv>".. teamnick .."</hsv>")
table.insert(addchat, Color(50, 50, 50, 255))
table.insert(addchat, "| ")
table.insert(addchat, "<hsv>"..ply:Nick() .."</hsv>")
else
table.insert(addchat, teamcolor)
table.insert(addchat, teamnick)
table.insert(addchat, Color(50, 50, 50, 255))
table.insert(addchat, "| ")
table.insert(addchat, teamcolor)
table.insert(addchat, ply:Nick())
end
Basically, if I add "premium" at line 1 near IsUserGroup(), it would check for the group premium, and make the teamnick, so I think the tag the user has, which in this case is [Premium] , will be rainbow colored along with
..ply:Nick() ..If the player isn't premium (
else at line 6), they will just keep their regular name, without any rainbow because they are not in the premium group.
Now, if I'm correct, I should place this code into my cl_chat_apple_tag.lua file, located at addons/apple_manage_chat_tags/lua/autorun
but I have 1 problem, if I want to create another group, do I just create another
if table.HasValue below this code and do the same thing over, but then instead remove hsv_tags and remove the <hsv></hsv>, or not?