General > Developers Corner

Anyway to change rank chat tag color? Superadmin is red, so...

(1/2) > >>

Paladynne:
I've been trying to Google this for a long time now, but I can't get any addons to work.

I got the scoreboard tags to work, so my ranks are colored and have an icon, but only in the scoreboard.

Now I just need the chat tags to work: [Superadmin] Paladynne: Test.

There should be a way, right? Superadmin is red by default, so, how is that? I've tried one code in the groups.txt file, but it didn't work:


--- Code: --- {
"name" S. Admin
"color_red" 189
"color_blue" 160
"color_green" 199
}
--- End code ---

Edit: or any working addon would be appreciated. I've tried Apple chat tags, no results.

WispySkies:
I found these other 2 scripts that you put in C:/garrysmod/garrysmod/lua/autorun/
It uses your teams designated in ULX "Groups" tab which when a team name is made and the color for the team is set you get the team tag beside your name and the color of the team on your name and the tag. Although say you have 3 people in admin and 2 in superadmin and you want them all to have custom names you have to make new groups with the team assigned to them. Its tedious, but it works.

monkeymacman:
I have a chattag system that I found somewhere but I don't entirely remember where... I think it was on some forums or something and it's just a lua code that you put in lua/autorun or you can put in addons/[file name]/lua/autorun . I'll post the code I guess, it works good, but like I said, I don't remember where I found it so I can't give credit to the creator.

Edit: SEE BOTTOM

Obviously you would edit this to fit your groups and the code should be easy enough to follow. I have it in a file addons/chattags/lua/autorun/chattags.lua , but you can put it in a different addon folder name or directly into lua/autorun or wherever. Just make sure to keep the lua file as chattags.lua unless you want to change the line near the top AddCSLuaFile( "chattags.lua" ) to the right name of he file
There are many ways to set it up which should be pretty easy if you read through the code, by default it's something lik [Rank]name:message. With a little bit of changing you can easily change it to "Rank | Name:Message" which is what I personally prefer, but obviously it's up to you. I'm not sure what gamemode you're using this in but for most gamemodes it should work fine, if it's ttt you might want to either remove the (TEAM) prefix so that innocents can't prove themself inno by typing in team chat, or just use another script that blocks innocents from being able to use teamchat.

Edit: I found the post that I got it from (I take no credit in making the code). It is Here
but note: in the comments it appears that the actual original post might be Here.

Aharon Tager:
TTT blocks the use of team chat with the default chatbox, or at least did until GMod update broke that.
Also, are you moneky from BT TTT?

monkeymacman:
Yeah, Aharon, that's me. I like messing around with ulx stuff in single player.

Navigation

[0] Message Index

[#] Next page

Go to full version