Author Topic: @@ Message  (Read 1887 times)

0 Members and 1 Guest are viewing this topic.

Offline Mindless

  • Newbie
  • *
  • Posts: 31
  • Karma: 1
@@ Message
« 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>


Offline Stickly Man!

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 1270
  • Karma: 164
  • What even IS software anymore?
    • XGUI
Re: @@ Message
« Reply #1 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!
Join our Team Ulysses community discord! https://discord.gg/gR4Uye6

Offline Mindless

  • Newbie
  • *
  • Posts: 31
  • Karma: 1
Re: @@ Message
« Reply #2 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!

Offline Stickly Man!

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 1270
  • Karma: 164
  • What even IS software anymore?
    • XGUI
Re: @@ Message
« Reply #3 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() ), ")"
Join our Team Ulysses community discord! https://discord.gg/gR4Uye6

Offline Derf

  • Newbie
  • *
  • Posts: 7
  • Karma: 0
Re: @@ Message
« Reply #4 on: August 27, 2013, 04:57:52 AM »
The Code you pasted works 100% Thanks you -Gmod13