Author Topic: Hide command chat text  (Read 2619 times)

0 Members and 1 Guest are viewing this topic.

Offline Havoc404

  • Newbie
  • *
  • Posts: 2
  • Karma: 0
Hide command chat text
« on: September 15, 2014, 08:26:34 PM »
I'm working on a custom ulx command and want to hide your message when you type the command in chat (so that when you type the command in people don't see you doing it). I don't want to disable echoes because I want it specifically for this command. I've looked at ulx asay (which doesn't show in chat when you use it) and the only difference I've seen is in ulx.command

local asay = ulx.command( CATEGORY_NAME, "ulx asay", ulx.asay, "@", true, true )
I'm guessing that the true, true is what hides it in chat? However this isn't working on my command and I can't find any documentation on ulx.command

To reiterate I'm not looking to hide what the echo like <admin> slapped <target> but rather the !slap <target> which shows in chat
« Last Edit: September 15, 2014, 08:30:45 PM by Havoc404 »

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Hide command chat text
« Reply #1 on: September 16, 2014, 07:09:14 AM »
The lines of your code showing how you're setting up the command object would go far in helping us (the community) help you.
ULX isn't fully documented because it relies on ULib, which is documented pretty well.
The specific area of function that ULX uses in this instance is cmds.addCommand

As you asked, yes, one of the two booleans allows hiding the actual say from appearing.
The other, allows no space after it (which, asay allows "@hello", where if the last true were omitted, you'd have to use "@ hello"
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline Havoc404

  • Newbie
  • *
  • Posts: 2
  • Karma: 0
Re: Hide command chat text
« Reply #2 on: September 16, 2014, 12:18:01 PM »
Thanks for the help. Fixed now.