ULX Commands Use

Hello,
I was wondering if there was a way where whenever you type a command such as “!ban lemon”, it disappears and does the action?
Thank you.

garrysmod/data/ulx/config.txt

Find the line that says



ulx logEcho 1


And make it



ulx logEcho 0


Thanks Google

Add this to lua/autorun/client


local function OnPlayerChat( ply, strText, bTeamOnly, bPlayerIsDead ) 
    if strText[1] == "!" then 
        return true 
    end
end
hook.Add( "OnPlayerChat", "testhook", OnPlayerChat )

Any text messages w/ “!” at the beginning will be hidden but the command will still go through.
This is a catch-all method of doing it. You can add a check to see if its a ULX command instead of simply hiding all messages that have ‘!’.

I believe we still display the message for most chat commands by default to prevent any conflicts with other addons that use chat commands.

As I posted here, there is a one-liner change to ULib that can hide all commands by default, or you can dig through the code and hide individual commands if you like.

I’d suggest using the console instead. You could also use xgui.

-snip-