Bonjour,
j'ai un problème mon skrip ne tp pas les joueurs
On join:
set {_random} to a random integer between 1 and 10
options:
mini: 10
max: 14
min: 9
command /hg <text>:
permission: hg.admin
permission: &cVous n'avez pas la permission.
aliases: hungergamessadmin, hgdmin,
trigger:
if arg is "stop":
if {start} is true:
broadcast "&7[&1HG&7]&6 Le HungerGames est annulé!"
set {start} to false
set {start1} to false
clear {swn}
if arg is "scoreboard":
loop all players:
display board named "&bHungerGames" to loop-player
if arg is "setlobbyout":
set {lobbyout} to location of player
send "&6Vous avez set le lobby de sotie."
if arg is "lobbywait":
set {lobbywait} to location of player
send "&6Vous avez set le lobby d'attente."
if arg is "hgstart":
set {pasb} to true
set {start1} to true
wait 1 second
broadcast "&7[&1HG&7]&6 Le HungerGames commence dans 10 secondes!"
wait 1 second
broadcast "&7[&1HG&7]&6 Le HungerGames commence dans 9 secondes!"
wait 1 second
broadcast "&7[&1HG&7]&6 Le HungerGames commence dans 8 secondes!"
wait 1 second
broadcast "&7[&1HG&7]&6 Le HungerGames commence dans 7 secondes!"
wait 1 second
broadcast "&7[&1HG&7]&6 Le HungerGames commence dans 6 secondes!"
wait 1 second
broadcast "&7[&1HG&7]&6 Le HungerGames commence dans 5 secondes!"
wait 1 second
broadcast "&7[&1HG&7]&6 Le HungerGames commence dans 4 secondes!"
wait 1 second
broadcast "&7[&1HG&7]&6 Le HungerGames commence dans 3 secondes!"
wait 1 second
broadcast "&7[&1HG&7]&6 Le HungerGames commence dans 2 secondes!"
wait 1 second
broadcast "&7[&1HG&7]&6 Le HungerGames commence dans 1 secondes!"
wait 1 second
broadcast "&7[&1HG&7]&6 Vous allez être téléporter"
wait 1 tick
set {start1} to false
if {_random} is 1:
teleport player to {location.1}
if {_random} is 2:
teleport player to {location.2}
if {_random} is 3:
teleport player to {location.3}
if {_random} is 4:
teleport player to {location.4}
if {_random} is 5:
teleport player to {location.5}
if {_random} is 6:
teleport player to {location.6}
if {_random} is 7:
teleport player to {location.7}
if {_random} is 8:
teleport player to {location.8}
if {_random} is 9:
teleport player to {location.9}
if {_random} is 10:
teleport player to {location.10}
set {bouge} to true
wait 1 second
broadcast "&7[&1HG&7]&6 Le HungerGames commence dans 5 secondes!"
wait 1 second
broadcast "&7[&1HG&7]&6 Le HungerGames commence dans 4 secondes!"
wait 1 second
broadcast "&7[&1HG&7]&6 Le HungerGames commence dans 3 secondes!"
wait 1 second
broadcast "&7[&1HG&7]&6 Le HungerGames commence dans 2 secondes!"
wait 1 second
broadcast "&7[&1HG&7]&6 Le HungerGames commence dans 1 secondes!"
wait 1 second
broadcast "&7[&1HG&7]&6 Le HungerGames commence bonne chance"
make player execute command "/hgscoreboard"
set {pasb} to false
set {start} to true
set {bouge} to false
clear inventory of player
On Any Movement:
if {bouge} is true:
if entity is a player:
cancel event
command /hgjoueurs:
trigger:
if {pasb} is true:
broadcast "&7[&1HG&7]&6 Le HungerGames est annulé! il manque des joueurs"
set {start} to false
set {start1} to false
command /setlocation <text>:
trigger:
player has permission "admin":
set variable {location.%arg 1%} to location of player
send "&aSpawn %arg 1% set en : &b%{location.%arg 1%}%"
command /deletelocation <text>:
trigger:
player has permission "admin":
delete variable {location.%arg-1%}
send "&aSpawn %arg-1% supprimer: &b%{location.%arg-1%}%"
On join t:
make player execute command "/hgjoin"
On rightclick with bed:
execute player command "/hgleave"
On leftclick with bed:
execute player command "/hgleave"
command /hgjoin:
aliases: hgjoin
trigger:
if {start} is true:
send "&7[&1HG&7]&7 La partie a déjà commencé!"
stop
else:
if {swn} is greater than {@max}:
teleport player to {lobbyout}
send "&7[&1HG&7]&7 La partie est pleine"
stop
else:
send "&7[&1HG&7]&7 Vous avez rejoind le jeux HungerGames"
teleport player to {lobbywait}
add 1 to {swn}
make console execute command "/clear %player%"
wait 1 tick
set slot 8 of player to a bed named "&6Quitter" with lore "Cliquer pour quitter le jeux"
broadcast "&7[&1HG&7] &e%player% &7 a rejoind la partie &a%{swn}%&8/&a15"
make console execute command "/gamemode 0 %player%"
if {swn} is equal to {@mini}:
if {start1} is false:
make console execute command "/hg hgstart"
stop
if {swn} is greater than {@mini}:
if {start1} is false:
make console execute command "/hg hgstart"
stop
if {swn} is equal to {@min}:
make player execute command "/hgjoueurs"
stop
command /hgleave:
aliases: hgleave
trigger:
make console execute command "/clear %player%"
wait 1 tick
execute player command "/spawn spawn"
remove 1 from {swn}
clear {swp.%player%}
send "&7[&1HG&7]&7 Vous avez quitté le HungerGames."
broadcast "&7[&1HG&7]&7 Le joueur &e%player% &7a quitter la partie. &a%{swn}%&8/&a15"
et si quelqu'un sait comment faire pour que quand on se trouve a 9 joueurs et que
if {start1} is true
on n'arrete le décompte