Ulysses
Ulysses Stuff => General Chat & Help and Support => Topic started by: Mindless on February 05, 2013, 12:14:16 PM
-
How do I make it so when a admin types @@ <msg> it shows up as like ex:
Light Green - (ADMIN) xxx: <msg>
-
*Probably* a very simple code change :P I don't have time to look it up at the moment, but I'll make a note and reply within the next couple days, assuming someone doesn't beat me to it!
-
*Probably* a very simple code change :P I don't have time to look it up at the moment, but I'll make a note and reply within the next couple days, assuming someone doesn't beat me to it!
Alright, thanks so much!
-
*Several weeks later* Wow, I fail at having free time.
If you open up ulx/lua/ulx/modules/sh/chat.lua, and go to line 44, you can replace this line:
ULib.tsay( _, message )
with this:
ULib.tsayColor( _, false, Color(120,255,120), "(ADMIN)", calling_ply:IsValid() and calling_ply:Nick() or "Console", ": ", message )
Some things to note:
-This is entirely untested, it might explod!
-That color of green I picked probably looks terrible-- you may want to change it
-If you want it to display the name of the group the player is in rather than ADMIN, then replace:
"(ADMIN)"
with:
"(", string.upper( ply:GetUserGroup() ), ")"
-
The Code you pasted works 100% Thanks you -Gmod13