Salut, j'ai retrouvé un vieux truc que j'avais fait. Je ne sais pas s'il est toujours à jour et s'il correspond à ta demande.
function buy(p: player, mansion: text):
set {_split::*} to {_mansion} split at " "
set {_mansion} to {_split::2}
if {equipe::%{_mansion}%::*} contains {_p}:
if {maison::%{_mansion}%} is set:
send "&c&lOUPS!&7 Cette maison a déjà été achetée." to {_p}
stop
if {_p}'s balance is equal or greater to 500:
remove 500 from balance of {_p}
set {maison::%{_mansion}%} to true
send "&a&lSUPER!&7 La maison a été achetée." to {_p}
else:
send "&c&lOUPS!&7 Vous n'avez pas assez d'argent." to {_p}
else:
send "&c&lOUPS!&7 Ce n'est pas votre maison, vous ne pouvez pas l'acheter !" to {_p}
function noPerm(p: player):
if {cooldown::%{_p}%} is not set:
send "&c&lOUPS!&7 Vous ne pouvez faire ceci dans cette zone." to {_p}
set {cooldown::%{_p}%} to 5
while {cooldown::%{_p}%} is set:
remove 1 from {cooldown::%{_p}%}
wait 1 second
if {cooldown::%{_p}%} is 0:
clear {cooldown::%{_p}%}
on break:
set {_region} to "%region at event-block%"
set {_number} to 1
loop 4 times:
if {_region} contains "%{_number}%":
if {equipe::%{_number}%::*} doesn't contain player:
noPerm(player)
cancel event
else if {maison::%{_number}%} is not set:
noPerm(player)
cancel event
add 1 to {_number}
on place:
set {_region} to "%region at event-block%"
set {_number} to 1
loop 4 times:
if {_region} contains "%{_number}%":
if {equipe::%{_number}%::*} doesn't contain player:
noPerm(player)
cancel event
add 1 to {_number}
on region enter:
send "&8[DEBUG]&7 %region%"
on sign edit:
if line 1 is "[CDS]":
if line 2 is "1", "2", "3" or "4":
set line 1 to "&6&m-------------"
set line 2 to "Maison %line 2% &8-&r 500$"
set line 3 to "&7(Clic-droit)"
set line 4 to "&6&m-------------"
on rightclick on sign:
if line 1 is "&6&m-------------":
buy(player, line 2)
command /team [<text>] [<player>]:
trigger:
if arg-1 is "1", "2", "3" or "4":
if arg-2 is set:
add arg-2 to {equipe::%arg-1%::*}
send "&a&lSUPER!&7 %arg-2% a été ajouté à l'équipe %arg-1% !"
Si l'aide que je t'ai apportée correspond à ce que tu souhaitais, merci d'aimer mon message.
Bonne journée