Bonjour,
Mon problème est que lorsque que je souhaite réaliser une boucle permettant de faire un hologram par personne, il m'affiche uniquement un seul hologram, lorsque qu'un des deux joueurs (exemple) se déconnecte, l'hologram pour la personne qui viens de quitté a disparu c'est alors que le second hologram, celui du joueur, connecté apparaît.
command /buy <text>:
trigger:
give 1 sign named "&aInstallation" with lore "&7Système de cannabis" to player
on right click:
if name of tool of player is "&aInstallation":
if lore of tool is "&7Système de cannabis":
send "&a&m---------------------------------------------"
send " &2&n/!\ Attention /!\"
send ""
send " &aSi vous installez cette &2plante &aen dehors"
send " &ad'une zone autorisé, vous pouvez recevoir un"
send " &aadverte ou bannissement !"
send "&a&m---------------------------------------------"
wait 10 seconds
send "&aInstallation du &2système de cannabis &asur votre position.."
wait 2 seconds
set {location.weed.%uuid of player%} to location of player
send "&aVotre position: &2%{location.weed.%player%}%"
wait 1 seconds
set block at {location.weed.%uuid of player%} to a 6:1
create hologram "&aPlante de &2cannabis &ade &n%player%" at block above {location.weed.%uuid of player%} for 1 seconds
set {boucle.weed.hologram.%uuid of player%} to player
add player to {weed.list::*}
execute console command "/playsound block.glass.place block %player% %{locationofplayerx}% %{locationofplayery}% %{locationofplayerz}%"
on sneak toggle:
set {locationof.%uuid of player%x} to x coordinate of player
set {locationof.%uuid of player%y} to y coordinate of player
set {locationof.%uuid of player%z} to z coordinate of player
execute console command "/playsound entity.pig.step hostile %player% %{locationof.%uuid of player%x}% %{locationof.%uuid of player%y}% %{locationof.%uuid of player%z}%"
every 1 seconds:
loop all players:
if {boucle.weed.hologram.%uuid of loop-player%} is set:
create hologram "&aPlante de &2cannabis &ade &n%loop-player%" at block above {location.weed.%uuid of loop-player%} for 1 seconds
stop
else:
stop
command /delete:
trigger:
delete {boucle.weed.hologram.%uuid of player%}
set target block to air
Merci.