Aller au contenu

Messages recommandés

Posté(e)

bonjour je cherche un skript de tempban ma tantative :

command /tempban [<player>] <text=temp> <text=raison>:
   usage : &cErreur &8» &cFaites /tempban <joueurs> <temp> <raison>
   trigger:
       if {grade.%player%} is "admin" or "admindev" or "adminbuilder" or "modo":
           kick arg 1 due to "&6[Crazygames] &cVous avez été bannis temporairement pendant %arg 2% minutes raison : %arg 3%"
           ban arg 1 due to "&6[Crazygames] &cVous avez été bannis temporairement pendant %arg 2% minutes raison : %arg 3%"
           add arg 1 to {ban.joueursban ::*}
           set {ban.tempban.%arg 1%.temp} to arg 2
           set {ban.tempban.%arg 1%} to true
every 1 minute:
   loop all players:
       if {ban.tempban.%loop-player%} is true:
           remove 1 from {ban.tempban.%loop-player%.temp}
           if {ban.tempban.%loop-player%.temp} is 0:
               unban loop-players
               remove loop-players from {ban.joueursban ::*}
               set {ban.tempban.%loop-players%} to false       

command /resetban:
   trigger:
       set {ban.tempban.%player%.temp} to 0

Posté(e)

Re,

 

J'ai pris un bout de code du Skript BanInfo pour en faire un TempBan, voilà le code :

 

command /tempban [<offline player>] [<time span>]:
   usage: &c/tempban <player> <time>
   trigger:
       if player has permission "tempban.use":
           if arg 1 is not set:
               send "&cErreur : La bonne commande est /Tempban [Pseudo] [Temps]" to player
           else if arg 2 is not set:
               send "&cErreur : La bonne commande est /Tempban [Pseudo] [Temps]" to player
           else:
               set {_player} to arg 1
               if {_player} is player:
                   if {tempban.time:%{_player}%} is not set:
                       message "&cVous avez été banni temporairement !"
                       set {tempban.time::%{_player}%} to arg 2
                       set {tempban.timestamp::%{_player}%} to now
                       kick {_player} due to "&6Tu es banni pendant &b%arg 2% &6minutes"
                   if {tempban.time::%{_player}%} is set:
                       message "&cCe joueur est maintenant banni !"
               if "%{_player}%" is offline player:
                   if {tempban.time:%{_player}%} is not set:
                       message "Vous avez été banni temporairement !"
                       set {tempban.time::%{_player}%} to arg 2
                       set {tempban.timestamp::%{_player}%} to now
                   if {tempban.time::%{_player}%} is set:
                       message "&cCe joueur est maintenant banni !"

               if {numbertempban.%arg 1%} is not set:
                   set {numbertempban.%arg 1%} to 1
               else:
                   add 1 to {numbertempban.%arg 1%}
               add arg 2 to {tempbantime.%arg 1%::*}

on join:
   if {tempban.time::%player%} is set:
       set {_tempban} to  difference between now and {tempban.timestamp::%player%}
       reduce {_tempban} by {tempban.time::%player%}
       if difference between now and {tempban.timestamp::%player%} is bigger than {tempban.time::%player%}:
           clear {tempban.time::%player%}
           clear {tempban.timestamp::%player%}
           set {banned.%player%} to false
           unban player
       if difference between now and {tempban.timestamp::%player%} is smaller than {tempban.time::%player%}:
           set {tempban.%player%} to true
           kick player due to "&cErreur : Vous avez été banni temporairement !" 

  • Triste 1
×
×
  • Créer...

Information importante

Nous avons placé des cookies sur votre appareil pour aider à améliorer ce site. Vous pouvez choisir d’ajuster vos paramètres de cookie, sinon nous supposerons que vous êtes d’accord pour continuer.