Aller au contenu
  • 0

Problème "Inventory"


Question

Posté(e)

Bonjour,

J'ai cherché sur le forum comment faire ceci je l'ai re réalisé et cela ne fonctionne pas ...

 

ADD-ON : SkQuery

 

Mon Skript :

command /invswitch:
   permission: mystery.inv
   trigger:
       if {statut.%player%} is true:
           set {statut.%player%} to false
           send "1" to player
           set {inventoryc::%player%} to player's serialized inventory
           wait 1 second
           restore inventory of player from {inventorys::%player%}
       else:
           set {statut.%player%} to true
           send "2" to player
           set {inventorys::%player%} to player's serialized inventory
           wait 1 second
           restore inventory of player from {inventoryc::%player%}

 

Je suis Fondateur d'un serveur et j'aimerais changé entre :

-Mon inventaire survie "1"

-Mon inventaire créatif "2"

 

Cordialement

Antonin_04

17 réponses à cette question

Messages recommandés

  • 0
Posté(e)

Remplace

restore inventory of player from TaVariable

 

Par

set player's inventory's serialized contents to TaVariable

  • 0
Posté(e)

Ne fonctionne pas :

command /invswitch:
   permission: mystery.inv
   trigger:
       if {statut.%player%} is true:
           set {statut.%player%} to false
           send "1" to player
           set {inventoryc.%player%} to player's serialized inventory
           wait 1 second
           set player's inventory's serialized contents to {inventorys::%player%}
       else:
           set {statut.%player%} to true
           send "2" to player
           set {inventorys.%player%} to player's serialized inventory
           wait 1 second
           set player's inventory's serialized contents to {inventoryc::%player%}

 

Aucune erreur ...

  • 0
Posté(e)
command /invswitch:
   permission: mystery.inv
   trigger:
       if {statut.%player%} is true:
           set {statut.%player%} to false
           send "1" to player
           set {inventorys.%player%} to serialized contents of player's inventory
           wait 1 second
           set player's inventory's serialized contents to {inventorys::%player%}
       else:
           set {statut.%player%} to true
           send "2" to player
           set {inventorys.%player%} to serialized contents of player's inventory
           wait 1 second
           set player's inventory's serialized contents to {inventoryc::%player%}

  • 0
Posté(e)
Je te conseille d'utilisé les loop

C'est a dire ?

 

command /invswitch:
   permission: mystery.inv
   trigger:
       if {statut.%player%} is true:
           set {statut.%player%} to false
           send "1" to player
           set {inventorys.%player%} to serialized contents of player's inventory
           wait 1 second
           set player's inventory's serialized contents to {inventorys::%player%}
       else:
           set {statut.%player%} to true
           send "2" to player
           set {inventorys.%player%} to serialized contents of player's inventory
           wait 1 second
           set player's inventory's serialized contents to {inventoryc::%player%}

Fonctionne pas

  • 0
Posté(e)
command /invswitch:
   permission: mystery.inv
   trigger:
       if {statut.%player%} is true:
           set {statut.%player%} to false
           send "1"
           set {inventoryc.%player%} to serialized contents of player's inventory
           wait 1 second
           set player's inventory's serialized contents to {inventorys::%player%}
       else:
           set {statut.%player%} to true
           send "2"
           set {inventorys.%player%} to serialized contents of player's inventory
           wait 1 second
           set player's inventory's serialized contents to {inventoryc::%player%}

  • 0
Posté(e)

Les variables était pas identiques.

Essayent ce code :

command /invswitch:
   permission: mystery.inv
   trigger:
       if {statut.%player%} is true:
           set {statut.%player%} to false
           send "1"
           set {inventoryc::%player%} to serialized contents of player's inventory
           wait 1 second
           set player's inventory's serialized contents to {inventorys::%player%}
       else:
           set {statut.%player%} to true
           send "2"
           set {inventorys::%player%} to serialized contents of player's inventory
           wait 1 second
           set player's inventory's serialized contents to {inventoryc::%player%}

  • 0
Posté(e)

command /invswitch:
   permission: mystery.inv
   trigger:
       if {statut.%player%} is true:
           set {statut.%player%} to false
           send "1"
           set {inventoryc::%player%} to serialized contents of player's inventory
           wait 1 second
           set serialized contents of player's inventory to {inventorys::%player%}
       else:
           set {statut.%player%} to true
           send "2"
           set {inventorys::%player%} to serialized contents of player's inventory
           wait 1 second
           set serialized contents of player's inventory to {inventoryc::%player%}

Tu as des erreurs ? Et réessaye avec ce code

  • 0
Posté(e)

Tu as des erreurs dans la console ? Et ça fais quoi exactement quand tu fais la commande ? Si ça marche pas télécharge les add-ons dispo dans la signature de SwiKZiiK

[spoiler=Code]

command /invswitch:
   permission: mystery.inv
   trigger:
       if {statut.%player%} is true:
           set {statut.%player%} to false
           send "1"
           set {inventoryc::%player%} to player's inventory's serialized contents
           wait 1 second
           set player's inventory's serialized contents to {inventorys::%player%}
       else:
           set {statut.%player%} to true
           send "2"
           set {inventorys::%player%} to player's inventory's serialized contents
           wait 1 second
           set player's inventory's serialized contents to {inventoryc::%player%}

 

  • J'aime 1
  • 0
Posté(e)
Tu as des erreurs dans la console ? Et ça fais quoi exactement quand tu fais la commande ? Si ça marche pas télécharge les add-ons dispo dans la signature de SwiKZiiK

[spoiler=Code]

command /invswitch:
   permission: mystery.inv
   trigger:
       if {statut.%player%} is true:
           set {statut.%player%} to false
           send "1"
           set {inventoryc::%player%} to player's inventory's serialized contents
           wait 1 second
           set player's inventory's serialized contents to {inventorys::%player%}
       else:
           set {statut.%player%} to true
           send "2"
           set {inventorys::%player%} to player's inventory's serialized contents
           wait 1 second
           set player's inventory's serialized contents to {inventoryc::%player%}

Aucune erreur et c'est bon

  • 0
Posté(e)
Aucune erreur et c'est bon

Ok donc passe en résolu et supprime le message au dessus avant que tu te fasse signaler pour double-post (en gros tu fais plusieurs post en même temps)

×
×
  • 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.