Hello, I didn't quite understand the last answer, so I'd have to re-post this, sorry :l
This is the code I have:
--Chat Tags by Tyguy
CreateClientConVar("chat_tags_color_r", 255, true, false)
CreateClientConVar("chat_tags_color_g", 0, true, false)
CreateClientConVar("chat_tags_color_b", 0, true, false)
CreateClientConVar("chat_tags_color_a", 255, true, false)
local Tags =
{
--Group --Tag --Color
{"admin", "[Admin] ", Color(0, 0, 255, 255) },
{"superadmin", "[SuperAdmin] ", Color(255, 255, 40, 255) },
{"owner", "[Owner] ", Color(0, 255, 255, 100) },
{"moderator", "[Mod] ", Color(75, 255, 75) },
{"co-owner", "[Co-Owner] ", Color(255, 80, 0, 145) },
{"developer", "[Dev] ", Color(0, 255, 255, 255) },
{"trial-mod", "[T-Mod] ", Color(0, 180, 180, 180) },
{"VIP", "(VIP) ", Color(255, 225, 0, 255) }
}
hook.Add("OnPlayerChat", "Tags", function(ply, strText, bTeamOnly)
for k,v in pairs(Tags) do
if ply:IsUserGroup(v[1]) then
local R = GetConVarNumber("chat_tags_color_r")
local G = GetConVarNumber("chat_tags_color_r")
local B = GetConVarNumber("chat_tags_color_r")
local A = GetConVarNumber("chat_tags_color_r")
local nickteam = team.GetColor(ply:Team())
if !bTeamOnly then
chat.AddText(v[3], v[2], nickteam, ply:Nick(), color_white, ": ", Color(R, G, B, A), strText)
return true
else
chat.AddText(v[3], v[2], nickteam, "(TEAM) ", ply:Nick(), color_white, ": ", Color(R, G, B, A), strText)
return true
end
end
end
end )
And I want too bind function fade to this
function Fade( a, b, frac, alpha )
local res, me
res = Color( 0, 255, 0, alpha )
me = ( 1 - frac )
res.r = ( a.r * me ) + ( b.r * frac )
res.g = ( a.g * me ) + ( b.g * frac )
res.b = ( a.b * me ) + ( b.b * frac )
return res
end
So that the VIP and Owner tag fades from black to their original color, now I'm pretty new to this, so I have no idea how that would work.
[QUOTE=KevinMLG1337;48255231]Hello, I didn't quite understand the last answer, so I'd have to re-post this, sorry :l
This is the code I have:
-snip-
And I want too bind function fade to this
function Fade( a, b, frac, alpha )
local res, me
res = Color( 0, 255, 0, alpha )
me = ( 1 - frac )
res.r = ( a.r * me ) + ( b.r * frac )
res.g = ( a.g * me ) + ( b.g * frac )
res.b = ( a.b * me ) + ( b.b * frac )
return res
end
So that the VIP and Owner tag fades from black to their original color, now I'm pretty new to this, so I have no idea how that would work.[/QUOTE]
I think you would need a custom chatbox.
thanks for using my addon, unfortunately, you'd need a custom chatbox. i'm probably going to make one soon.
Thanks :) Is there anyway I can do this too the scoreboard? @tyguy
[QUOTE=KevinMLG1337;48255665]Thanks :) Is there anyway I can do this too the scoreboard? @tyguy[/QUOTE]
custom scoreboard required
I do have a custom one.
[QUOTE=KevinMLG1337;48255700]I do have a custom one.[/QUOTE]
Which one?
I have an addon called "beast-easy-sb" where you can edit text etc easily in, and I have mr. gash's scorebaord, which I have edited a fair bit. (with colors etc)
Sorry, you need to Log In to post a reply to this thread.