I have the following code:
Syntax: Select all
from commands.say import SayCommand
from players.helpers import index_from_playerinfo
from messages import SayText2
@SayCommand("flashtop")
def saycommand_flashtop(playerinfo, teamonly, command):
"""
Gets called whenever a player types 'flashtop' in the chat.
"""
SayText2(message="command: {0}, {1}".format(command[0], command[1]).send(index_from_playerinfo(playerinfo))
Code: Select all
flashtop 4
=> say, flashtop 4