Aller au contenu

Messages recommandés

Posté(e)

Version de minecraft / skript : 1.11

Type du skript : Skript execute command old player

Description du script :

Bonjour, je souhaiterais pouvoir executer des commandes si un joueur est inactive depuis 2 mois, exemple Theminecraft0408 ne s'est plus connecté depuis 2 mois la console execute:

- eco set Theminecraft0408 0

- rg remove Theminecraft0408

- ....

 

Cordialement, Theminecraft0408

 

Merci de votre aide et bonne journée.

Posté(e)

on quit:
   set {co.%uuid of player%} to now

every 1 day:
   loop all players:
       if difference between now and {co.%uuid of loop-player%} is bigger than 2 months:
           #ICI LES COMMANDES

 

On vérifie tous les jours si ça fait 2 mois, si oui, on fait les commandes

  • J'aime 1
Posté(e)
every 1 day:
  loop all players:

 

Pour ça, il faut que le serveur reste allumé 24 heures d'affilé. Sachant que la plupart des serveurs redémarrent à heure fixe et qu'il y a quelques minutes de redémarrage, le compteur se remet à 0 alors qu'il était arrivé à 23 heures 50 minutes et quelques, donc l'événement ne se produit jamais.

Aussi, tu regardes la liste des joueurs, mais c'est sans compter que ce sont les joueurs connectés. Par définition, un joueur inactif ne sera pas là pour être vérifié. En plus, tu peux être classé inactif si t'as pas connecté au moment de la vérification (qui ne se déclenchera probablement jamais comme dit au dessus).

Posté(e)

J'ai tester ceci:

on quit:
   set {co.%uuid of player%} to now

every 2 minutes:
   loop all players:
       if difference between now and {co.%uuid of loop-player%} is bigger than 1 minutes:
           make console execute command "/stop"

 

et ca ne fonctionne pas comment faire svp?

Posté(e)

on quit:
   set {co.%uuid of player%} to now
   add uuid of player to {players::*}

on connect:
   if uuid of player is in {players::*}:
       remove uuid of player from {players::*}

every 2 minutes:
   loop {players::*}:
       if difference between now and {co.%uuid of loop-player%} is bigger than 1 minutes:
           make console execute command "/stop"

 

Désolé de mes erreurs :/

Posté(e)

[22:34:41] [pool-10-thread-4/ERROR]: [skript] There's no loop that matches 'loop-player' (worldguard.sk, line 11: if difference between now and {co.%uuid of loop-player%} is bigger than 1 minutes:')
[22:34:41] [pool-10-thread-4/ERROR]: [skript] There's no loop that matches 'loop-player' (worldguard.sk, line 11: if difference between now and {co.%uuid of loop-player%} is bigger than 1 minutes:')
[22:34:41] [pool-10-thread-4/ERROR]: [skript] There's no loop that matches 'loop-player' (worldguard.sk, line 11: if difference between now and {co.%uuid of loop-player%} is bigger than 1 minutes:')
[22:34:41] [pool-10-thread-4/ERROR]: [skript] There's no loop that matches 'loop-player' (worldguard.sk, line 11: if difference between now and {co.%uuid of loop-player%} is bigger than 1 minutes:')
[22:34:41] [pool-10-thread-4/ERROR]: [skript] There's no loop that matches 'loop-player' (worldguard.sk, line 11: if difference between now and {co.%uuid of loop-player%} is bigger than 1 minutes:')
[22:34:41] [pool-10-thread-4/ERROR]: [skript] There's no loop that matches 'loop-player' (worldguard.sk, line 11: if difference between now and {co.%uuid of loop-player%} is bigger than 1 minutes:')
[22:34:41] [pool-10-thread-4/ERROR]: [skript] There's no loop that matches 'loop-player' (worldguard.sk, line 11: if difference between now and {co.%uuid of loop-player%} is bigger than 1 minutes:')
[22:34:41] [pool-10-thread-4/ERROR]: [skript] Can't understand this expression: uuid of loop-player (worldguard.sk, line 11: if difference between now and {co.%uuid of loop-player%} is bigger than 1 minutes:')
[22:34:41] [pool-10-thread-4/ERROR]: [skript] There's no loop that matches 'loop-player' (worldguard.sk, line 11: if difference between now and {co.%uuid of loop-player%} is bigger than 1 minutes:')
[22:34:41] [pool-10-thread-4/ERROR]: [skript] There's no loop that matches 'loop-player' (worldguard.sk, line 11: if difference between now and {co.%uuid of loop-player%} is bigger than 1 minutes:')
[22:34:41] [pool-10-thread-4/ERROR]: [skript] There's no loop that matches 'loop-player' (worldguard.sk, line 11: if difference between now and {co.%uuid of loop-player%} is bigger than 1 minutes:')
[22:34:41] [pool-10-thread-4/ERROR]: [skript] There's no loop that matches 'loop-player' (worldguard.sk, line 11: if difference between now and {co.%uuid of loop-player%} is bigger than 1 minutes:')
[22:34:41] [pool-10-thread-4/ERROR]: [skript] There's no loop that matches 'loop-player' (worldguard.sk, line 11: if difference between now and {co.%uuid of loop-player%} is bigger than 1 minutes:')
[22:34:41] [pool-10-thread-4/ERROR]: [skript] There's no loop that matches 'loop-player' (worldguard.sk, line 11: if difference between now and {co.%uuid of loop-player%} is bigger than 1 minutes:')
[22:34:41] [pool-10-thread-4/ERROR]: [skript] There's no loop that matches 'loop-player' (worldguard.sk, line 11: if difference between now and {co.%uuid of loop-player%} is bigger than 1 minutes:')
[22:34:41] [pool-10-thread-4/ERROR]: [skript] There's no loop that matches 'loop-player' (worldguard.sk, line 11: if difference between now and {co.%uuid of loop-player%} is bigger than 1 minutes:')
[22:34:41] [pool-10-thread-4/ERROR]: [skript] Can't understand this expression: uuid of loop-player (worldguard.sk, line 11: if difference between now and {co.%uuid of loop-player%} is bigger than 1 minutes:')
[22:34:41] [pool-10-thread-4/ERROR]: [skript] There's no loop that matches 'loop-player' (worldguard.sk, line 11: if difference between now and {co.%uuid of loop-player%} is bigger than 1 minutes:')
[22:34:41] [pool-10-thread-4/ERROR]: [skript] There's no loop that matches 'loop-player' (worldguard.sk, line 11: if difference between now and {co.%uuid of loop-player%} is bigger than 1 minutes:')
[22:34:41] [pool-10-thread-4/ERROR]: [skript] There's no loop that matches 'loop-player' (worldguard.sk, line 11: if difference between now and {co.%uuid of loop-player%} is bigger than 1 minutes:')
[22:34:41] [pool-10-thread-4/ERROR]: [skript] There's no loop that matches 'loop-player' (worldguard.sk, line 11: if difference between now and {co.%uuid of loop-player%} is bigger than 1 minutes:')
[22:34:41] [pool-10-thread-4/ERROR]: [skript] There's no loop that matches 'loop-player' (worldguard.sk, line 11: if difference between now and {co.%uuid of loop-player%} is bigger than 1 minutes:')
[22:34:41] [pool-10-thread-4/ERROR]: [skript] There's no loop that matches 'loop-player' (worldguard.sk, line 11: if difference between now and {co.%uuid of loop-player%} is bigger than 1 minutes:')
[22:34:41] [pool-10-thread-4/ERROR]: [skript] There's no loop that matches 'loop-player' (worldguard.sk, line 11: if difference between now and {co.%uuid of loop-player%} is bigger than 1 minutes:')
[22:34:41] [pool-10-thread-4/ERROR]: [skript] There's no loop that matches 'loop-player' (worldguard.sk, line 11: if difference between now and {co.%uuid of loop-player%} is bigger than 1 minutes:')
[22:34:41] [pool-10-thread-4/ERROR]: [skript] Can't understand this expression: uuid of loop-player (worldguard.sk, line 11: if difference between now and {co.%uuid of loop-player%} is bigger than 1 minutes:')
[22:34:41] [server thread/ERROR]: [skript] can't understand this condition: 'uuid of player is in {players::*}' (worldguard.sk, line 6: if uuid of player is in {players::*}:')

 

Ca ne fonctionne toujour pas :(

Posté(e)

on quit:
   set {co.%uuid of player%} to now
   add uuid of player to {players::*}

on connect:
   if uuid of player is in {players::*}:
       remove uuid of player from {players::*}

every 2 minutes:
   loop {players::*}:
       if difference between now and {co.%uuid of loop-value%} is bigger than 1 minutes:
           make console execute command "/stop"

 

Erreur dans la boucle, my bad

  • J'aime 1
Posté(e)
on quit:
   set {co.%uuid of player%} to now
   add uuid of player to {players::*}

on connect:
   if uuid of player is in {players::*}:
       remove uuid of player from {players::*}

every 2 minutes:
   loop {players::*}:
       if difference between now and {co.%uuid of loop-value%} is bigger than 1 minutes:
           make console execute command "/stop"

 

Erreur dans la boucle, my bad

Le code marche pour moi :D logiquement ca devrais marcher pour toi :)

×
×
  • 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.