EvoloZz
22nd February 2013, 10:54
I have tried to write a b3 command for function I got in my mod but it doesnt seem to work... B3 doesnt turn on anymore after including my plugin with it.
Here's the command:
def cmd_flames(self, data, client, cmd=None):
"""\
<player> - Give flames to a player
"""
input = self._adminPlugin.parseUserCmd(data)
if not input:
client.message('^7Invalid parameters, you must supply a player name')
return False
else:
sclient = self._adminPlugin.findClientPrompt(input[0], client)
if sclient:
self.console.setCvar('flames', '%s' % sclient.cid)
return True
The "flames" command works perfectly thru console, so the problem is in that command and i can't seem to find it... There might be just bad syntax somewhere but i never use python so i don't know the rules...
I just wrote that with my crappy experience with B3, so please help me
Here's the command:
def cmd_flames(self, data, client, cmd=None):
"""\
<player> - Give flames to a player
"""
input = self._adminPlugin.parseUserCmd(data)
if not input:
client.message('^7Invalid parameters, you must supply a player name')
return False
else:
sclient = self._adminPlugin.findClientPrompt(input[0], client)
if sclient:
self.console.setCvar('flames', '%s' % sclient.cid)
return True
The "flames" command works perfectly thru console, so the problem is in that command and i can't seem to find it... There might be just bad syntax somewhere but i never use python so i don't know the rules...
I just wrote that with my crappy experience with B3, so please help me