Ulysses
Ulysses Stuff => General Chat & Help and Support => Topic started 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 (SILENT) Chrissy ran Y on Z
thing however you can still see
Chrissy: !cexec Y Z
I know !spectate already does not hide in chat, what hook is called to hide it from chat?
Thanks
-
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.
-
local cexec = ulx.command( CATEGORY_NAME, "ulx cexec", ulx.cexec, "!cexec", true )
Add the true to hide the chat command.
-
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.
-
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