Guide rapide concernant l'inscription sur le site officiel du jeu. Créez ainsi votre compte joueur qui permet d'être authentifié sur les serveurs de jeu de la 4.2 !
Guide rapide concernant l'inscription sur le site officiel du jeu. Créez ainsi votre compte joueur qui permet d'être authentifié sur les serveurs de jeu de la 4.2 !
Envie de parler avec les autres membres de la communauté ? Alors venez vous connecter, vous vous sentirez moins seul !
Rejoignez-nous sur le discord Urban Terror France !
Statistiques globales et en temps réel de la totalité des serveurs d'Urban Terror. Suivez l'évolution du nombre de joueurs sur Urban Terror !
pour le slap c est pas prevus dans le plugin poweradminurt, donc en rajoutantelif sclient.maxLevel >= client.maxLevel:
if sclient.maskGroup:
client.message('^7%s ^7is a masked higher level player, can\'t kick' % client.exactName)
perso pour ne pas toucher le plugin poweradminurt je mettrais la commande paslap au superadmin et ferais un petit plugin monslap avec la commande monslap avec le bout de code ci_dessusif sclient.maxLevel >= client.maxLevel:
if sclient.maskGroup:
client.message('^7%s ^7is a masked higher level player, can\'t slap' % client.exactName)
Code : Tout sélectionner
def cmd_paslap(self, data, client, cmd=None):
"""\
<player> [<ammount>] - (multi)Slap a player.
(You can safely use the command without the 'pa' at the beginning)
"""
# this will split the player name and the message
input = self._adminPlugin.parseUserCmd(data)
if input:
# input[0] is the player id
sclient = self._adminPlugin.findClientPrompt(input[0], client)
if not sclient:
# a player matchin the name was not found, a list of closest matches will be displayed
# we can exit here and the user will retry with a more specific player
return False
else:
client.message('^7Invalid data, try !help paslap')
return False
if input[1]:
try:
x = int(input[1])
except:
client.message('^7Invalid data, try !help paslap')
return False
if x in range(1, 26):
thread.start_new_thread(self.multipunish, (x, sclient, client, 'slap'))
else:
client.message('^7Number of punishments out of range, must be 1 to 25')
else:
self.debug('Performing single slap...')
self.console.write('slap %s' % (sclient.cid))
return True
if sclient.maxLevel >= client.maxLevel:
if sclient.maskGroup:
client.message('^7%s ^7is a masked higher level player, can\'t slap' % client.exactName)
else:
self.console.say(self.getMessage('slap_denied', sclient.exactName, client.exactName, sclient.exactName))
return True
else:
sclient.slap(reason, keyword, client)
return True
euh pourquoi ?pour mettre ma protection slap (que je copie sur le kick)
Code : Tout sélectionner
if input[1]:
Code : Tout sélectionner
def cmd_paslap(self, data, client, cmd=None):
"""\
<player> [<ammount>] - (multi)Slap a player.
(You can safely use the command without the 'pa' at the beginning)
"""
# this will split the player name and the message
input = self._adminPlugin.parseUserCmd(data)
if input:
# input[0] is the player id
sclient = self._adminPlugin.findClientPrompt(input[0], client)
if not sclient:
# a player matchin the name was not found, a list of closest matches will be displayed
# we can exit here and the user will retry with a more specific player
return False
else:
client.message('^7Invalid data, try !help paslap')
return False
if sclient.maxLevel >= client.maxLevel:
if sclient.maskGroup:
client.message('^7%s ^7is a masked higher level player, can\'t slap' % client.exactName)
if input[1]:
try:
x = int(input[1])
except:
client.message('^7Invalid data, try !help paslap')
return False
if x in range(1, 6):
thread.start_new_thread(self.multipunish, (x, sclient, client, 'slap'))
else:
client.message('^7Number of punishments out of range, must be 1 to 5')
else:
self.debug('Performing single slap...')
self.console.write('slap %s' % (sclient.cid))
return True
Code : Tout sélectionner
if sclient.maxLevel >= client.maxLevel:
if sclient.maskGroup:
client.message('^7%s ^7is a masked higher level player, can\'t slap' % client.exactName)
Code : Tout sélectionner
if sclient.maxLevel >= client.maxLevel:
if sclient.maskGroup:
client.message('^7%s ^7is a masked higher level player, can\'t slap' % client.exactName)
ben.. il t a resolu ton probleme d indentationmais.. qu'a tu modifié? je ne vois qu'une ligne de différence, et les 3 lignes de # que j'avais mises sont encore en #...