im trying to execute kickid <userid> [reason] and basicly my problem is that it wont allow a command string
how would i do this >_>
ServerExecute() question?
I'm not sure if I understood you correctly. This doesn't work?
Syntax: Select all
from core import GameEngine
def kickid(userid, reason=''):
GameEngine.ServerCommand('kickid %s %s\n'% (userid, reason))
Ayuto wrote:I'm not sure if I understood you correctly. This doesn't work?Syntax: Select all
from core import GameEngine
def kickid(userid, reason=''):
GameEngine.ServerCommand('kickid %s %s\n'% (userid, reason))
nope that doesnt work :/
-Tuck
It works fine for me... Not sure what your issue even "could" be if it truly doesn't work.
*Edit: this is the code I used to test:
And note that the "\n" is very important, as without ending the line in \n or ; the command will not execute. That is the only thing I think you could be doing wrong for it not to work. I guess the only other thing that I think could cause it is if you are using ServerExecute instead of ServerCommand.
Satoon
*Edit: this is the code I used to test:
Syntax: Select all
from core import GameEngine
from events import Event
@Event
def player_say(GameEvent):
userid = GameEvent.GetInt('userid')
reason = 'because i said so, ok?'
GameEngine.ServerCommand('kickid %s %s\n' % (userid, reason))
And note that the "\n" is very important, as without ending the line in \n or ; the command will not execute. That is the only thing I think you could be doing wrong for it not to work. I guess the only other thing that I think could cause it is if you are using ServerExecute instead of ServerCommand.
Satoon
Return to “Plugin Development Support”
Who is online
Users browsing this forum: No registered users and 93 guests