Ulysses

Ulysses Stuff => General Chat & Help and Support => Topic started by: Mindless on February 05, 2013, 12:14:16 PM

Title: @@ Message
Post 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>

Title: Re: @@ Message
Post by: Stickly Man! on February 06, 2013, 03:00:14 PM
*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!
Title: Re: @@ Message
Post by: Mindless on February 06, 2013, 10:56:18 PM
*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!
Title: Re: @@ Message
Post by: Stickly Man! on February 21, 2013, 08:02:24 AM
*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:
Code: [Select]
ULib.tsay( _, message )with this:
Code: [Select]
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:
Code: [Select]
"(ADMIN)"with:
Code: [Select]
"(", string.upper( ply:GetUserGroup() ), ")"
Title: Re: @@ Message
Post by: Derf on August 27, 2013, 04:57:52 AM
The Code you pasted works 100% Thanks you -Gmod13