Ulysses

Ulysses Stuff => General Chat & Help and Support => Topic started by: Chrissy on December 31, 2013, 07:18:53 AM

Title: Silent chat.
Post by: Chrissy on December 31, 2013, 07:18:53 AM
Hi,
I'm currently trying to work some commands into being silent. I can get them to do the whole
Code: [Select]
(SILENT) Chrissy ran Y on Z  thing however you can still see
Code: [Select]
Chrissy: !cexec Y ZI know !spectate already does not hide in chat, what hook is called to hide it from chat?
Thanks
Title: Re: Silent chat.
Post by: Decicus on December 31, 2013, 11:26:19 AM
How about you use the console command instead? Or the ULX menu.
Every ULX chat command also has a console command that works the same way, "!cexec" would be "ulx cexec" in console.

Or, if you really want to, use the hook PlayerSay (http://wiki.garrysmod.com/page/GM/PlayerSay) and return empty quotes, if it finds "!cexec" in the first 6 letters.


Cobalt suggested something a lot better.
Title: Re: Silent chat.
Post by: Cobalt on December 31, 2013, 12:22:55 PM
local cexec = ulx.command( CATEGORY_NAME, "ulx cexec", ulx.cexec, "!cexec", true )
Add the true to hide the chat command.
Title: Re: Silent chat.
Post by: Decicus on December 31, 2013, 12:47:27 PM
local cexec = ulx.command( CATEGORY_NAME, "ulx cexec", ulx.cexec, "!cexec", true )
Add the true to hide the chat command.

I had no idea that's a thing.
Title: Re: Silent chat.
Post by: JamminR on December 31, 2013, 11:43:48 PM
Though the ULX command setup does a bit of combo work (category setup, etc), the 'silent' boolean is explained here.
http://ulyssesmod.net/docs/files/lua/ulib/shared/commands-lua.html#cmds.TranslateCommand.cmds.TranslateCommand:instantiate (http://ulyssesmod.net/docs/files/lua/ulib/shared/commands-lua.html#cmds.TranslateCommand.cmds.TranslateCommand:instantiate)

Edit by Megiddo: Fixed link