Alright so i installed new chattags to the server... And it worked..But for some people sees all the text as red..I see all the text black...Some white...I just want it to be white O_O
This is my chattag code.. Please help!
[CODE]CreateClientConVar("chat_tags_color_r", 255, true, false)
CreateClientConVar("chat_tags_color_g", 255, true, false)
CreateClientConVar("chat_tags_color_b", 255, true, false)
CreateClientConVar("chat_tags_color_a", 255, true, false)
local Tags =
{
{"Owner", "[OWNER] ", Color( 0, 0, 255, 0 ) },
{"Co-owner", "[CO-OWNER] ", Color( 0, 255, 255, 0 ) },
{"Superadmin", "[SUPER-ADMIN] ", Color( 60, 12, 100, 0) },
{"admin", "[ADMIN] ", Color( 50, 205, 50, 0) },
{"Operator", "[OPERATOR] ", Color( 255, 0, 0, 0 ) },
{"VIP", "[VIP] ", Color( 0, 255, 0, 0 ) },
{"user", "[USER] ", Color( 255, 255, 255, 0 ) }
}
hook.Add("OnPlayerChat", "Tags", function(ply, strText, bTeamOnly)
if IsValid(ply) and ply:IsPlayer() then
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_g")
local B = GetConVarNumber("chat_tags_color_b")
local A = GetConVarNumber("chat_tags_color_a")
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
if !IsValid(ply) and !ply:IsPlayer() then
local ConsoleColor = Color(0, 0, 0)
chat.AddText(ConsoleColor, "Console", color_white, ": ", strText)
return true
end
end )[/CODE]
[editline]8th December 2013[/editline]
But some people*
[CODE]local chatColor = Color(255, 255, 255, 255)
local Tags = {
{"rank"="Owner", "tag"="[OWNER] ", "color"=Color( 0, 0, 255, 255 ) },
{"rank"="Co-owner", "tag"="[CO-OWNER] ", "color"=Color( 0, 255, 255, 255 ) },
{"rank"="Superadmin", "tag"="[SUPER-ADMIN] ", "color"=Color( 60, 12, 100, 255) },
{"rank"="admin", "tag"="[ADMIN] ", "color"=Color( 50, 205, 50, 255) },
{"rank"="Operator", "tag"="[OPERATOR] ", "color"=Color( 255, 0, 0, 255 ) },
{"rank"="VIP", "tag"="[VIP] ", "color"=Color( 0, 255, 0, 0 ) },
{"rank"="user", "tag"="[USER] ", "color"=Color( 255, 255, 255, 255 ) }
}
hook.Add("OnPlayerChat", "Tags", function(ply, strText, bTeamOnly)
if (IsValid(ply) and ply:IsPlayer()) then
for _,v in pairs(Tags) do
if ply:IsUserGroup(v["rank"]) then
local teamColor = team.GetColor(ply:Team())
if !bTeamOnly then
chat.AddText(v["color"], v["tag"], teamColor, ply:Nick().." ", chatColor, ": ", strText)
return true
else
chat.AddText(v["color"], v["tag"], teamColor, "(TEAM) ", ply:Nick(), chatColor, ": ", strText)
return true
end
end
end
end
if !IsValid(ply) and !ply:IsPlayer() then
local ConsoleColor = Color(0, 0, 0)
chat.AddText(ConsoleColor, "Console", chatColor, ": ", strText)
return true
end
end)[/CODE]
Should work.
Script and lua error..
unknow-lua/autorun/client/cs_ct.lua:0
PLEASE HELP
[editline]8th December 2013[/editline]
I am running a TTT server btw
[QUOTE=rojuslap;43113860]Script and lua error..unknow-lua/autorun/client/cs_ct.lua:0[/QUOTE]
Full error please. And post the file to [URL="http://pastebin.com"]http://pastebin.com[/URL]
[QUOTE=rojuslap;43113860]PLEASE HELP[/QUOTE]
*facepalm*
How do i copy that O_O
Sorry, you need to Log In to post a reply to this thread.