Pivity

rookie question

Last read Never
#1

Hey there gmodstore ;D

so im trying to find a way to hide chat commands from chat

for example if an player types in chat

!help

it will run the command !help but wont show it up in the public chat

i found this code in the web

https://pastebin.com/8BsPD40i

its dose hide the command but the command not working /=

any ideas how can i fix it?

#2

All that code does is hide the command.

return ""

simply means the client is returning "" or in otherwords, nothing.

If you need a command to run when you do !help or something, you need to make it yourself, or go to the jobs section.

Agree x 1
#3

thanks for the replay

i do know what the code dose

it did worked for my in previous gmod version or darkrp

because right now the code is broken for some reason

i do have an addon with the command !help

but when someone types the !help in chat it dose hide the command but wont run the command for some reason

and it did work on previous gmod version.

#4

The command you have is most likely searching for the string "!help". So in this case, the hide command is returning before the other command itself does. This means that your !help command cannot run as its trying to find "!help" whereas this command is returning nothing/"". Remove this script, go to your other help command, and put

return ""

after (under) the command is ran.


bad example:

if string.find(text) == "!help" then
run command
return ""
end
Friendly x 1
#5

oh cool now its working :D

thanks for the help!

Friendly x 1
#6

There's no harm in returning false instead of "" right?

#7

I think returning "" hides the message on DarkRP. It does the same thing as return false on other gamemodes.

Informative x 2Agree x 1
Users viewing this thread
Nobody