Besoin d'aide Skript

Amalangin

Bucheron
28 Mars 2016
1
0
12
25
Bonjour, j'ai un petit soucis avec un skript que j'ai fait, c'est un skript de récolte donc il fonctionne bien mais le soucis c'est que quand on quitte l'inventaire de récolte, la récolte continue et ne se stoppe pas et donc le joueur peut spam plusieurs récolte en même temps...
Quelqu'un pourrait possiblement m'aidé, je suis bloqué xD
Merci d'avance ^^

Code :
on rightclick on 17:
open chest with 1 row named "&9Récolte..." to player
wait 3 tick
set {recolte.%player%} to true
{recolte.%player%} is true
make gui slot 0 of player with 160:5 named "&a10%%" to nothing
wait 1 second
{recolte.%player%} is true
make gui slot 1 of player with 160:5 named "&a20%%" to nothing
wait 1 second
{recolte.%player%} is true
make gui slot 2 of player with 160:5 named "&a30%%" to nothing
wait 1 second
{recolte.%player%} is true
make gui slot 3 of player with 160:1 named "&640%%" to nothing
wait 1 second
{recolte.%player%} is true
make gui slot 4 of player with 160:1 named "&650%%" to nothing
wait 1 second
recolte.%player%} is true
make gui slot 5 of player with 160:1 named "&660%%" to nothing
wait 1 second
{recolte.%player%} is true
make gui slot 6 of player with 160:14 named "&c70%%" to nothing
wait 1 second
{recolte.%player%} is true
make gui slot 7 of player with 160:14 named "&c80%%" to nothing
wait 1 second
{recolte.%player%} is true
make gui slot 8 of player with 160:14 named "&c90%%" to nothing
wait 1 second
close player's inventory
give 1 5 to player
delete {recolte.%player%}
 

Shelk

Massacreur de Mouton
15 Septembre 2018
40
2
23
Code:
on inventory close:
    if {tavariable.%player%} is true:
        delete {tavariable.%player%}