Hi,
I want to choose team for players in plugin and I want for this disable choose team after player connect. How can I make it?
Disable choose team
Re: Disable choose team
I would like to have some info too about this. Does anyone know?
Re: Disable choose team
Flowan wrote:I would like to have some info too about this. Does anyone know?
Try this:
Syntax: Select all
from commands.client import ClientCommandFilter
from commands import CommandReturn
@ClientCommandFilter
def on_client_command(command, index):
if command[0] == "jointeam":
return CommandReturn.BLOCK
Last edited by Kill on Wed Feb 22, 2017 1:21 pm, edited 1 time in total.
Re: Disable choose team
Kill wrote:Flowan wrote:I would like to have some info too about this. Does anyone know?
Try this:Code: Select all
from commands.client import ClientCommandFilter
from commands import CommandReturn
@ClientCommandFilter
def on_client_command(command, index):
if command[0] == "jointeam":
return CommandReturn.BLOCK
Don't forget to use [python][/python].
Also, if you are only wanting to hook specific commands, just use a ClientCommand instead of a full filter:
Syntax: Select all
from commands.client import ClientCommand
from commands import CommandReturn
@ClientCommand('jointeam')
def on_join_team(command, index):
return CommandReturn.BLOCK
Re: Disable choose team
satoon101 wrote:-
Thought [ code=Python ] would do the trick, done, thanks.
- L'In20Cible
- Project Leader
- Posts: 1534
- Joined: Sat Jul 14, 2012 9:29 pm
- Location: Québec
Re: Disable choose team
Along with blocking jointeam, I think you are looking to block joingame which is responsible to send the team menu when you click "OK" on the MOTD.
Return to “General Discussion”
Who is online
Users browsing this forum: No registered users and 19 guests