bonjour, peut être que ceci peut marcher :
options:
founder: Notch #pseudo du fondateur
on join:
set {connection.%player%} to true
set {connection.%player%.location} to player's location
apply blindness 2 to the player
apply slowness 2 to the player
if {players::*} doesn't contain the player:
send message "Enregistre-toi avec /register <mot de passe>." to the player
else:
send message "Connecte-toi avec /login <mot de passe>." to the player
every second:
loop all players:
if {connection.%loop-player%} is true:
teleport loop-player to {connection.%loop-player%.location}
on chat:
if {connection.%player%} is true:
cancel the event
on command:
if {connection.%player%} is true:
if {players::*} doesn't contain the player:
if the command isn't "register":
cancel the event
else:
if the command isn't "login":
cancel the event
on quit:
if {connection.%player%} is true:
remove blindness from the player
remove slowness from the player
clear {connection.%player%}
clear {connection.%player%.location}
command /register [<text>]:
executable by: players
trigger:
if {connection.%player%} isn't set:
send message "Tu t'es déjà enregistré(e)." to the player
else:
if the argument 1 isn't set:
send message "Utilise /register <mot de passe>." to the player
else:
set {password.%player%} to the argument 1
add the player to {players::*}
remove blindness from the player
remove slowness from the player
clear {connection.%player%}
clear {connection.%player%.location}
send message "Tu as été enregistré(e) avec succès." to the player
set {_founder} to "{@founder}" parsed as player
if {_founder} isn't the player:
send message "Le joueur %player% vient de s'enregistrer avec le mot de passe %argument 1%." to {_founder}
command /login [<text>]:
executable by: players
trigger:
if {connection.%player%} isn't set:
send message "Tu t'es déjà connecté(e)." to the player
else:
if the argument 1 isn't set:
send message "Utilise /login <mot de passe>." to the player
else:
if {password.%player%} isn't the argument 1:
send message "Ton mot de passe est incorrect." to the player
else:
remove blindness from the player
remove slowness from the player
clear {connection.%player%}
clear {connection.%player%.location}
send message "Tu t'es connecté(e) avec succès." to the player
Edit: je n'ai pas fait la partie pour stocker les mots de passe car je n'en ai pas les connaissances nécessaires mais peut être que le code proposé pourrait être un début ?