Not display command in chat

All other Source.Python topics and issues.
botmaster
Junior Member
Posts: 16
Joined: Sun Sep 23, 2018 6:07 pm

Not display command in chat

Postby botmaster » Sun Sep 23, 2018 6:14 pm

I'm trying to use a SayCommand or similar without having the actual command display in chat so when a user type for example "!test" the callback runs but you don't see in chat the test: "!test". That's the way it worked in EventScripts but with Source.Python I can't find a way to stop it.
Anyone knows if it's possible?
User avatar
satoon101
Project Leader
Posts: 2697
Joined: Sat Jul 07, 2012 1:59 am

Re: Not display command in chat

Postby satoon101 » Sun Sep 23, 2018 6:23 pm

Syntax: Select all

from commands import CommandReturn
from commands.say import SayCommand

@SayCommand('!test')
def _test_command(command, index, team_only):
# stop command from showing in chat
return CommandReturn.BLOCK
Image
botmaster
Junior Member
Posts: 16
Joined: Sun Sep 23, 2018 6:07 pm

Re: Not display command in chat

Postby botmaster » Sun Sep 23, 2018 6:48 pm

Thx a lot! Will try and report

Return to “General Discussion”

Who is online

Users browsing this forum: No registered users and 19 guests