Here ill show you the problem. Its like this
[Owner] Greg: Hello
then i want it to change text and name color for admin but its still the same except the rank changes color
[Admin] Greg: Hello
See how the RANK only changes color but the text and name stays the same.
i will put my script below and if you can change it so that there is a different name and text color for each group ( except guest). TY Just make it any colors and then ill adjust it.
This is CL TAG lua file.
// Cleint Side apple :p
local Tags =
{
--Group --Tag --Color
{"admin", "Admin ", Color(220, 180, 0, 255) },
{"superadmin", "Owner ", Color(0, 0, 255, 255) },
{"operator", "Operator ", Color(173, 255, 47, 255) },
{"vip", "VIP ", Color(255, 255, 0, 255) },
{"respected", "Respected ", Color(221, 160, 221, 255) },
{"user", "Guest ", Color(255, 255, 255, 255) }
}
hook.Add("OnPlayerChat", "Tags", function(ply, strText)
for k,v in pairs(Tags) do
if ply:IsPlayer() then
if ply:IsUserGroup(v[1]) then
local nickteam = team.GetColor(ply:Team())
// ----------------------Leave This Alone----------------------------Leave this alone-----------------This will be be Name Colour-------Leave this alone-----------------This is the text colour---------
chat.AddText(Color(255, 255, 255, 255), "[", v[3], v[2], Color(255, 255, 255, 255), "] ", Color(255, 0, 0, 255), ply:Nick(), Color(255, 255, 255, 255), ": ", Color(255, 255, 0, 255), strText)
return true
end
end
end
end )
The ranks are only for the ranks but how do i add more text and name colors to each group (except guest).