I have no found any working chat tags, only some which were outdated and did not work.
I really need this for my server. Any help would be appreciated.
I have some, but they break chat for spectators.
I'll just leave this here if you want to use it.
[lua]local ranks = {
["rankhere"] = Color(255,255,255),
}
if (SERVER) then
AddCSLuaFile("chat.lua")
function CustomChat_ChatMessage(ply, msg, rank, r, g, b)
umsg.Start("CustomChat_ChatMsg")
umsg.Entity(ply)
umsg.String(msg)
umsg.String(rank)
umsg.Short(r)
umsg.Short(g)
umsg.Short(b)
umsg.End()
end
function CustomChat_Checker(ply, text, teamonly)
local group = ply:GetUserGroup()
local color = ranks[group]
local ISALIVE = (ply:Health() <= 0 or not ply:Alive())
local txtcheck = string.sub(text,1,1)
if txtcheck == "/" then
return text
else
return "", CustomChat_ChatMessage(ply, text, "["..string.upper(string.sub(group,1,1))..string.sub(group,2).."]", color.r, color.g, color.b)
end
end
hook.Add("PlayerSay", "WordCheck", CustomChat_Checker)
else
usermessage.Hook("CustomChat_ChatMsg", function(um)
local ply = um:ReadEntity()
local msg = um:ReadString()
local rank = um:ReadString()
local r = um:ReadShort()
local g = um:ReadShort()
local b = um:ReadShort()
chat.AddText(Color(r, g, b), rank, team.GetColor(ply:Team()), " "..ply:Nick(), Color(255,255,255), ": "..msg)
end)
end[/lua]
I've tried fixing it, but everything I've tried hasn't worked.
I'm terrible at coding. So this was ideal, works great thanks!
Whoo. Necro post!
These always work:
[url]http://www.mediafire.com/?sxt34u9wa113wek[/url]
because this script may be a bit confusing, I'll explain this a bit:
[lua]
local Tags =
{
--Group --Tag --Color
{"admin", "ADMIN", Color(0, 0, 255, 255) },
{"superadmin", "SUPERADMIN", Color(255, 0, 0, 255) },
{"owner", "OWNER", Color(0, 255, 0, 255) }
}
[/lua]
Here is the only code you will need to touch. as an example, the name "admin" lowercase
[lua]
{"admin", "ADMIN", Color(0, 0, 255, 255) },
[/lua]
is the group name. So if you make a group in ulib/xgui/ttt that's what the first name of it has to be.
The second line that say's "ADMIN" uppercase is the name you can change to anything you want, because this will be the thing that will say "[aGFSDGSDSDFGHSDF]"
The last line that say's color, this will be the thing you can use to color the team name
"[aGFSDGSDSDFGHSDF]" ect...
You [B][I][U]MUST[/U][/I][/B]
Put a "," at the end unless it is the last one
[lua]
{"admin", "ADMIN", Color(0, 0, 255, 255) },
{"superadmin", "SUPERADMIN", Color(255, 0, 0, 255) },
{"owner", "OWNER", Color(0, 255, 0, 255) }
{"mod", "MOD", Color(51,205,0,255)}
[/lua]
[B][I][U]WOULD NOT[/U][/I][/B] work
But this:
[lua]
{"admin", "ADMIN", Color(0, 0, 255, 255) },
{"superadmin", "SUPERADMIN", Color(255, 0, 0, 255) },
{"owner", "OWNER", Color(0, 255, 0, 255) },
{"mod", "MOD", Color(51,205,0,255)}
[/lua]
Would.
[B][I][U]DISCLAIMER[/U][/I][/B]
I did not create or own this addon, ([U][I]Tyguy[/I][/U] did!) i am mearly passing it on with my own download link (couldn't find original)
[QUOTE=LewisUK;40712633]These always work:
[url]http://www.mediafire.com/?sxt34u9wa113wek[/url]
because this script may be a bit confusing, I'll explain this a bit:
[lua]
local Tags =
{
--Group --Tag --Color
{"admin", "ADMIN", Color(0, 0, 255, 255) },
{"superadmin", "SUPERADMIN", Color(255, 0, 0, 255) },
{"owner", "OWNER", Color(0, 255, 0, 255) }
}
[/lua]
Here is the only code you will need to touch. as an example, the name "admin" lowercase
[;ua]
{"admin", "ADMIN", Color(0, 0, 255, 255) },
[/lua]
is the group name. So if you make a group in ulib/xgui/ttt that's what the first name of it has to be.
The second line that say's "ADMIN" uppercase is the name you can change to anything you want, because this will be the thing that will say "[aGFSDGSDSDFGHSDF]"
The last line that say's color, this will be the thing you can use to color the team name
"[aGFSDGSDSDFGHSDF]" ect...
You [B][I][U]MUST[/U][/I][/B]
Put a "," at the end unless it is the last one
[lua]
{"admin", "ADMIN", Color(0, 0, 255, 255) },
{"superadmin", "SUPERADMIN", Color(255, 0, 0, 255) },
{"owner", "OWNER", Color(0, 255, 0, 255) }
{"mod", "MOD", Color(51,205,0,255)}
[/lua]
[B][I][U]WOULD NOT[/U][/I][/B] work
But this:
[lua]
{"admin", "ADMIN", Color(0, 0, 255, 255) },
{"superadmin", "SUPERADMIN", Color(255, 0, 0, 255) },
{"owner", "OWNER", Color(0, 255, 0, 255) },
{"mod", "MOD", Color(51,205,0,255)}
[/lua]
Would.
[B][I][U]DISCLAIMER[/U][/I][/B]
I did not create or own this addon, i am mearly passing it on with my own download link (couldn't find original)[/QUOTE]
Couldn't have explained it better myself. I made the addon.
[QUOTE=tyguy;40713790]Couldn't have explained it better myself. I made the addon.[/QUOTE]
Haha, i use a fair bit of your stuff! (Reporter and tags!) Keep up the amazing work :)
[QUOTE=LewisUK;40713833]Haha, i use a fair bit of your stuff! (Reporter and tags!) Keep up the amazing work :)[/QUOTE]
It's comments like this that motivate me, thank you :)
[QUOTE=tyguy;40713885]It's comments like this that motivate me, thank you :)[/QUOTE]
Btw, i edited my post to say that it is your addon
[QUOTE=LewisUK;40713912]Btw, i edited my post to say that it is your addon[/QUOTE]
appreciated
How do you change the players text who have tags text back to white?
The red chat text is kind of annoying.
[QUOTE=NaRyan;40716349]How do you change the players text who have tags text back to white?
The red chat text is kind of annoying.[/QUOTE]
At the top of the file (config thing) there should be a set colour(not 100%) im not on my computer, however at the top, look for a chat_color_tags_b, chat_colpr_tags_r.. Etc.. Set it all to 255 (i can get a fully working example in about 10 hours)
[editline]20th May 2013[/editline]
Sorry for terrible spelling
Got to set all 3 to 255 for white (3 0 is black)
However it seems to set and remember the 1st colour settings or the settings you change it to client side.
As even if it is set to show white and it does shows white text.
if you use chat_tags_color_g 255 to make the text green, then the text will always be green when you rejoin the server.
And probably on any server you join that is running this addon.
That's one bug with the addon that I can't fix - the concommand value exchanging.
I made this addon a long time ago, but I still have no idea how I would do that it would show what the admin has and not the player. Apologies for this.
-snip wrong thread-
[Lua]
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)
[/lua]
At the top of cs_ct.lua Will give you white text
I have been getting the error below a few times.
[code][ERROR] addons/chat tags - team update/lua/autorun/client/cs_ct.lua:17: attempt to call method 'IsUserGroup' (a nil value)
1. fn - addons/chat tags - team update/lua/autorun/client/cs_ct.lua:17
2. unknown - addons/ulib/lua/ulib/shared/hook.lua:183[/code]
I only get it printed 2 or 3 times in console when I join.
[url=http://puu.sh/335ZZ/0f23b7b9e8.png]Yet at times it can spam the server console for ages.[/url]
Incase anybody was woundering, I figured out how to make the test white, you need to change the values in this code from (R, G, B, A) to (255, 255, 255, 255) on both lines
[QUOTE]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
[/QUOTE]
So it should look like this:
[QUOTE]if !bTeamOnly then
chat.AddText(v[3], v[2], nickteam, ply:Nick(), color_white, ": ", Color(255, 255, 255, 255), strText)
return true
else
chat.AddText(v[3], v[2], nickteam, "(TEAM) ", ply:Nick(), color_white, ": ", Color(255, 255, 255, 255), strText)
return true
[/QUOTE]
[QUOTE=freaqzz;40993162]Incase anybody was woundering, I figured out how to make the test white, you need to change the values in this code from (R, G, B, A) to (255, 255, 255, 255) on both lines
So it should look like this:[/QUOTE]
[QUOTE=LewisUK;40721876][Lua]
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)
[/lua]
At the top of cs_ct.lua Will give you white text[/QUOTE]
[QUOTE=mib999;41004167][/QUOTE]
I tried that, It didn't work, but when I did it my way it did work.
Sorry, you need to Log In to post a reply to this thread.