There's a boolean for it
Here's one of my commands:
function ulx.respawn( caling_ply, target_ply )
if not target_ply:Alive() then
target_ply:Spawn()
end
end
local respawn = ulx.command( CATEGORY_NAME, "ulx respawn", ulx.respawn, "!respawn", true )
respawn:addParam{ type=ULib.cmds.PlayerArg }
respawn:defaultAccess( ULib.ACCESS_ADMIN )
respawn:help( "Respawns a player -- does not work with TTT" )
You see at the end of line 6, there's a true
That makes the command not show up in chat for others to see (it still echos)
I didn't check all of the files, but most most of the commands that come with ULX in the Utilities file don't have that section for true or false at the end of the "line 6,"
I assume this is because if there's no true or false specifically stated there, it defaults to false
Nothing to worry about, though, you can just add it on if it's not there
For example, here's the who command
function ulx.who( calling_ply )
ULib.console( calling_ply, "ID Name Group" )
local players = player.GetAll()
for _, player in ipairs( players ) do
local id = tostring( player:UserID() )
local nick = player:Nick()
local text = string.format( "%i%s %s%s ", id, string.rep( " ", 2 - id:len() ), nick, string.rep( " ", 31 - nick:len() ) )
text = text .. player:GetUserGroup()
ULib.console( calling_ply, text )
end
end
local who = ulx.command( CATEGORY_NAME, "ulx who", ulx.who )
who:defaultAccess( ULib.ACCESS_ALL )
who:help( "See information about currently online users." )
In this case we would have to add on two things
One being the chat command, and the other being the true or false
So change line 15 from
local who = ulx.command( CATEGORY_NAME, "ulx who", ulx.who )
to
local who = ulx.command( CATEGORY_NAME, "ulx who", ulx.who, "!who", true )