Ulysses

General => Off-Topic => Topic started by: Jason1337 on April 11, 2014, 10:11:27 PM

Title: New chats
Post by: Jason1337 on April 11, 2014, 10:11:27 PM
I have searched google for pages, but I cannot seem to find a code or way to add new chats in Garry's mod. All I see are chat prefixes.
All I want is an admin chat that will be activated by "/a" and it will look like this =               (admin chat) <name> <text>
And so that these groups "Moderator, Admin , Trusted Admin, Trial Mod, etc.) To be able to perform and see the text


And an admin advert activated by "/aadvert" and it will look like this = (admin advert) <name> <text>
And so that these groups "Moderator, Admin , Trusted Admin, Trial Mod, etc.) To be able to perform the command, and ALL groups to SEE the text
Title: Re: New chats
Post by: JamminR on April 11, 2014, 10:19:55 PM
Jason, I'm a bit confused.
ULX includes the ability to set different groups, admin and superadmin are already included by default, to do what you're asking.
Admin chat - To speak 'among themselves' using "@ text" in chat or "ulx asay text" in console.
To give other groups than superadmin and admin ability, give them "ulx asay" and "ulx seeasay"

For adverts, you probably want csay or tsay.

You should really check out your console's "ulx help" command. It shows all that can be done.
Category: Chat
   o ulx asay {message} - Send a message to currently connected admins. (say: @)
   o ulx csay {message} - Send a message to everyone in the middle of their screen. (say: @@@)
   o ulx psay <player> {message} - Send a private message to target. (say: !p)
   o ulx tsay {message} - Send a message to everyone in the chat box. (say: @@)
Title: Re: New chats
Post by: Neku on April 12, 2014, 12:33:50 AM
Jammi, I think he's talking RP commands.
Title: Re: New chats
Post by: Jason1337 on April 12, 2014, 06:28:18 AM
All asay does is say "To admins: <text>" Is there a way to duplicate this command , change the shortcut, (say use /a) and make it say (Admin Chat)<admin><text>

If you guys are still confused as what I am asking, I basically want to know if I can duplicate a ulx command and modify it (change color, and what it says).

Basically if some Admin on Duty needs to check a base, all they need to do is "/aadvert base check"

Sorry in advance of the confusing words, I don't know how else to really explain this. I will edit my first post with screenshots if it will help.
Title: Re: New chats
Post by: JamminR on April 12, 2014, 07:57:40 AM
I've moved this to OffTopic because
1) ULX, basically already does what you're asking, your just asking to have it done differently (therefore, not a ULX help question)
2) You don't seem to be asking how it can be done in code, only can it be done (therefore, not quite a developers corner question)

Yes, all you ask can be done using lua.
I personally don't see the reason for changing a, c or tsay in ULX.

There are many code discussions in the release thread for chat tags.
Though chat tags isn't quite the same as what you want, the code used/discussed there would be best learning/starting point.
Compare it to ULX's own asay, csay and tsay command code, and you get the best mix of how it's done. (Though, you'd have to write your own '/' command parser)