General > Developers Corner

Denying Echoes To Others

(1/2) > >>

WispySkies:
I run a Garry's Mod server using ULX and ULib and on it me and my friends play a lot of TTT. Ive set up a working set of commands that work and function fine, but what Im wondering is that is there a way I can keep seeing all echoes from me/others (WispySkies set the hp of NAME to 1 vice versa) but when I perform a command the !COMMAND and the "WispySkies gave NAME x credits." is not visible to anyone (including superadmins, which is me as well, possible conflict?).

Thanks for any help you guys can give!

JamminR:
This would probably better fit in developers corner, as it's not directly asking for help with ULX usage, so, I'm moving it after I post.
Our ulx.command object has additional parameters not commonly used. One of those is a boolean to hide the say command.

Our function set-up;
function ulx.command( category, command, fn, say_cmd, hide_say, nospace )

So when setting up your commands, use;
local obj = ulx.command ( "My Category", "ulx blah", my_funcnameblah, "!my_say", true )
And that will prevent your say commands from showing in chat if no other conflicts occur/chat text code returns the text.

WispySkies:
Since I just fully suck at Lua how would you implement that? I probably sound really stupid .-.

WispySkies:
One more thing as well, would I have to add that line through every function? Because I meant it for EVERY command that I do and I'd rather not mess around with the original ULX code. Is it possible to still hide the !COMMAND and "WispySkies set the HP of SOMEONE to 1" but just have a script in what I would think to be in C:/garrysmod/addons/ulx/lua/ulx/modules/sh/FILES.lua that automatically does that without changing all the other code?

Storm:
Can we do an example? I would like to know this too. So using ulx blind,


function ulx.blind( calling_ply, target_plys, amount, should_unblind )
   for i=1, #target_plys do
      local v = target_plys[ i ]
      umsg.Start( "ulx_blind", v )
         umsg.Bool( not should_unblind )
         umsg.Short( amount )
      umsg.End()
.
.
.
.

local blind = ulx.command( CATEGORY_NAME, "ulx blind", ulx.blind, "!blind")

So how would you change this so the echo never shows,even when logecho is on?

Navigation

[0] Message Index

[#] Next page

Go to full version