Aller au contenu
  • 0

Set {variable} to player


Question

Posté(e)

Salut , dans mon skript , j'ai un système de slots , allant de 1 à 20 . Chaque joueur est sauvegardé dans une variable . Par exemple {tnt.p1.%arg 2%} . J'essaye maintenant :

 

teleport {tnt.p1.%arg 2%} to {spawn.exemple}

Ou même :

send "message exemple" to {tnt.p1.%arg 2%}

 

Mais rien ne se passe :/ .

Voici le code pour mettre un joueur dans un slot :

 

                            if {tnt.p1.%arg 2%} is not set:
                               set {tnt.p1.%arg 2%} to "%player%"
                           if {tnt.p2.%arg 2%} is not set:
                               set {tnt.p2.%arg 2%} to "%player%"
                           if {tnt.p3.%arg 3%} is not set:
                               set {tnt.p3.%arg 2%} to "%player%"
                           if {tnt.p4.%arg 2%} is not set:
                               set {tnt.p4.%arg 2%} to "%player%"
                           if {tnt.p5.%arg 2%} is not set:
                               set {tnt.p5.%arg 2%} to "%player%"
                           if {tnt.p6.%arg 2%} is not set:
                               set {tnt.p6.%arg 2%} to "%player%"
                           if {tnt.p7.%arg 2%} is not set:
                               set {tnt.p7.%arg 2%} to "%player%"
                           if {tnt.p8.%arg 2%} is not set:
                               set {tnt.p8.%arg 2%} to "%player%"
                           if {tnt.p9.%arg 2%} is not set:
                               set {tnt.p9.%arg 2%} to "%player%"
                           if {tnt.p10.%arg 2%} is not set:
                               set {tnt.p10.%arg 2%} to "%player%"
                           if {tnt.p11.%arg 2%} is not set:
                               set {tnt.p11.%arg 2%} to "%player%"
                           if {tnt.p12.%arg 2%} is not set:
                               set {tnt.p12.%arg 2%} to "%player%"
                           if {tnt.p13.%arg 2%} is not set:
                               set {tnt.p13.%arg 2%} to "%player%"
                           if {tnt.p14.%arg 2%} is not set:
                               set {tnt.p14.%arg 2%} to "%player%"
                           if {tnt.p15.%arg 2%} is not set:
                               set {tnt.p15.%arg 2%} to "%player%"
                           if {tnt.p16.%arg 2%} is not set:
                               set {tnt.p16.%arg 2%} to "%player%"
                           if {tnt.p17.%arg 2%} is not set:
                               set {tnt.p17.%arg 2%} to "%player%"
                           if {tnt.p18.%arg 2%} is not set:
                               set {tnt.p18.%arg 2%} to "%player%"
                           if {tnt.p19.%arg 2%} is not set:
                               set {tnt.p19.%arg 2%} to "%player%"
                           if {tnt.p20.%arg 2%} is not set:
                               set {tnt.p20.%arg 2%} to "%player%"

 

J'ai essayé :

 

set {tnt.p1.%arg 2%} to "%player's name%"
set {tnt.p1.%arg 2%} to player's name
set {tnt.p1.%arg 2%} to "%player%"
set {tnt.p1.%arg 2%} to player

 

Que dois-je faire ?

 

Précisions :

Aucune erreur /sk reload all .

J'ai SkAction SkQuerry SkRayFall SkUtilities WildSkript et Umbaska .

Ma version de Skript est 2.2 .

Ma version de Spigot est 1.9 .

 

J'attend vos réponses avec impatience ! Merci d'avance .

10 réponses à cette question

Messages recommandés

  • 0
Posté(e)

{tnt.p1.%arg 2%}

 

Le %arg 2% existe bien ? tu es bien dans une commande ?

 

Donne nous tout le code de la commande stp

  • 0
Posté(e)

je vais essayer sans Umbaska , puis si sa marche pas , je vais up le topic pour me faire aider , sinon voila le code

command /tntr [<text>] [<text>] [<text>]:
  trigger:
       if arg 1 is "join":
           if arg 2 is set:
               if {tnt.game.%arg 2%} is set:
                   if {tnt.player.%arg 2%} < {tnt.max.%arg 2%}:
                       if {tnt.ingame.%player%} is not set:
                           *long code de slots donné précedemmment*

  • 0
Posté(e)

Teleport {tnt.p1.%arg 2%} to {spawn.exemple}

 

Je vois pas cette ligne dans ta commande, si elle est ailleur, il faut qu’en tu modifie le %arg 2% par autre chose. Pour pouvoir utiliser les %arg% il faut être obligatoirement dans une commande et inclure des arguments

  • 0
Posté(e)

Change le paramètre de l’arg 2 de la commande ( [(text>] par [<player>]

  • 0
Posté(e)

Oui tu peut parsed as player, et fait le, puisque la tu demande à skript de tp du text a une location et ce n’est pas possible

×
×
  • Créer...

Information importante

Nous avons placé des cookies sur votre appareil pour aider à améliorer ce site. Vous pouvez choisir d’ajuster vos paramètres de cookie, sinon nous supposerons que vous êtes d’accord pour continuer.