Aller au contenu
  • 0

Aider moi, Skript de GUI


Question

Posté(e)

Voici mon Skript de GUI avec un systeme de langue :

 

[spoiler=Mon Skript]

#Give des Items
#la variable player.lang.%player% definis la langue du joueur: 1=English | 0=Français | variable non set = Français (premiere connexion)
on join :
   if {player.lang.%player%} is 1
       set slot 4 of player's inventory to nether star named "&6&lMain Menu &7(Right Click)"
       set slot 8 of player's inventory to banner named "&6&lChange Language (Currently English)"
   else
       set slot 4 of player's inventory to nether star named "&6&lMenu &7(Clique droit)"
       set slot 8 of player's inventory to banner named "&6&lChanger la Langue (Actuellement Français)"

#Il y as un cooldown (5coal qui disparaisent progrésivement chaque seconde) ,pour l'instant je dis que c'est anti-lag mais a terme je rajouterais un grade(VIP) pour passer ce cooldown


#Menu + Cooldown
on rightclick with a nether star :
   if {player.lang.%player%} is 1
       wait 1 tick
       open chest with 1 rows named "&6Cooldown Anti-Lag"
       wait 2 tick                                                                        #----- EN
       format slot 0 with barrier named "&6Cancel countdown" and lore "You will not enter in the menu" to close
       format slot 6 with coal named "&2Couldownn No-Lag" with lore "5 seconds left" to be unstealable
       format slot 5 with coal named "&2Couldownn No-Lag" with lore "5 seconds left" to be unstealable
       format slot 4 with coal named "&2Couldownn No-Lag" with lore "5 seconds left" to be unstealable
       format slot 3 with coal named "&2Couldownn No-Lag" with lore "5 seconds left" to be unstealable
       format slot 2 with coal named "&2Couldownn No-Lag" with lore "5 seconds left" to be unstealable
       wait 1 seconds                                                                    #---- EN
       open chest with 1 rows named "&6Cooldown Anti-Lag"
       format slot 0 with barrier named "&6Cancel countdown" and lore "You will not enter in the menu" to close
       format slot 6 with coal named "&2Couldownn No-Lag" with lore "4 seconds left" to be unstealable
       format slot 5 with coal named "&2Couldownn No-Lag" with lore "4 seconds left" to be unstealable
       format slot 4 with coal named "&2Couldownn No-Lag" with lore "4 seconds left" to be unstealable
       format slot 3 with coal named "&2Couldownn No-Lag" with lore "4 seconds left" to be unstealable
       wait 1 seconds                                                                    #--- EN
       open chest with 1 rows named "&6Cooldown Anti-Lag"
       format slot 0 with barrier named "&6Cancel countdown" and lore "You will not enter in the menu" to close
       format slot 5 with coal named "&2Couldownn No-Lag" with lore "3 seconds left" to be unstealable
       format slot 4 with coal named "&2Couldownn No-Lag" with lore "3 seconds left" to be unstealable
       format slot 3 with coal named "&2Couldownn No-Lag" with lore "3 seconds left" to be unstealable
       wait 1 seconds                                                                    #-- EN
       open chest with 1 rows named "&6Cooldown Anti-Lag"
       format slot 0 with barrier named "&6Cancel countdown" and lore "You will not enter in the menu" to close
       format slot 5 with coal named "&2Couldownn No-Lag" with lore "2 seconds left" to be unstealable
       format slot 4 with coal named "&2Couldownn No-Lag" with lore "2 seconds left" to be unstealable
       wait 1 seconds                                                                    #- EN
       open chest with 1 rows named "&6Cooldown Anti-Lag"
       format slot 0 with barrier named "&6Cancel countdown" and lore "You will not enter in the menu" to close
       format slot 4 with coal named "&2Couldownn No-Lag" with lore "1 second left" to be unstealable
       wait 1 seconds
       open chest with 1 rowd named "Main Menu"
       wait 2 tick
       format slot 0 with barrier named "&6Quit Menu" to close
       wait 1 seconds
       format slot 0 with clock named "&6Go to the menu" to run [execute console command "say %player% Currently unavailable"]
   else :
       wait 1 tick
       open chest with 1 rows named "&6Cooldown Anti-Lag"
       wait 2 tick                                                                        #----- FR
       format slot 0 with barrier named "&6Annuler le compte a rebours" and lore "Vous n'accederez pas au menu" to close
       format slot 6 with coal named "&2Couldownn No-Lag" with lore "5 secondes restantes" to be unstealable
       format slot 5 with coal named "&2Couldownn No-Lag" with lore "5 secondes restantes" to be unstealable
       format slot 4 with coal named "&2Couldownn No-Lag" with lore "5 secondes restantes" to be unstealable
       format slot 3 with coal named "&2Couldownn No-Lag" with lore "5 secondes restantes" to be unstealable
       format slot 2 with coal named "&2Couldownn No-Lag" with lore "5 secondes restantes" to be unstealable
       wait 1 seconds                                                                    #---- FR
       open chest with 1 rows named "&6Couldown Anti-Lag"
       format slot 0 with barrier named "&6Annuler le compte a rebours" and lore "Vous n'accederez pas au menu" to close
       format slot 6 with coal named "&2Couldownn No-Lag" with lore "4 secondes restantes" to be unstealable
       format slot 5 with coal named "&2Couldownn No-Lag" with lore "4 secondes restantes" to be unstealable
       format slot 4 with coal named "&2Couldownn No-Lag" with lore "4 secondes restantes" to be unstealable
       format slot 3 with coal named "&2Couldownn No-Lag" with lore "4 secondes restantes" to be unstealable
       wait 1 seconds                                                                    #--- FR
       open chest with 1 rows named "&6Couldown Anti-Lag"
       format slot 0 with barrier named "&6Annuler le compte a rebours" and lore "Vous n'accederez pas au menu" to close
       format slot 5 with coal named "&2Couldownn No-Lag" with lore "3 secondes restantes" to be unstealable
       format slot 4 with coal named "&2Couldownn No-Lag" with lore "3 secondes restantes" to be unstealable
       format slot 3 with coal named "&2Couldownn No-Lag" with lore "3 secondes restantes" to be unstealable
       wait 1 seconds                                                                    #-- FR
       open chest with 1 rows named "&6Couldown Anti-Lag"
       format slot 0 with barrier named "&6Annuler le compte a rebours" and lore "Vous n'accederez pas au menu" to close
       format slot 5 with coal named "&2Couldownn No-Lag" with lore "2 secondes restantes" to be unstealable
       format slot 4 with coal named "&2Couldownn No-Lag" with lore "2 secondes restantes" to be unstealable
       wait 1 seconds                                                                    #- EN
       open chest with 1 rows named "&6Couldown Anti-Lag"
       format slot 0 with barrier named "&6Annuler le compte a rebours" and lore "Vous n'accederez pas au menu" to close
       format slot 4 with coal named "&2Couldownn No-Lag" with lore "1 secondes restantes" to be unstealable
       wait 1 seconds
       open chest with 1 rowd named "Main Menu"
       wait 2 tick
       format slot 0 with barrier named "&6Quit Menu" to close
       wait 1 seconds
       format slot 0 with clock named "&6Acceder au menu" to run [execute console command "say %player% Actuellement Indisponible]



#Gestion de la langue du serveur 
on rightclick with a banner :
   if {player.lang.%player%} is 0 or not set
       set {player.lang.%player%} to 1
       execute console command "kick %player% Language changer avec succés (FR). Veuillez vous reconnecter pour terminer le proccesus."
on rightclick with a banner :
   if {player.lang.%player%} is 0 or not set
       set {player.lang.%player%} to 1
       execute console command "kick %player% Language change with success (EN). Please log in again to complete the process."




#Ptit Bonus
on rightclick with a brick :
   execute console command "skript reload scripts"

 

 

Pouvez vous m'aider

PS : ce skript nécessite WildSkript

9 réponses à cette question

Messages recommandés

  • 0
Posté(e)
Voici mon Skript de GUI avec un systeme de langue :

 

[spoiler=Mon Skript]

#Give des Items
#la variable player.lang.%player% definis la langue du joueur: 1=English | 0=Français | variable non set = Français (premiere connexion)
on join :
   if {player.lang.%player%} is 1
       set slot 4 of player's inventory to nether star named "&6&lMain Menu &7(Right Click)"
       set slot 8 of player's inventory to banner named "&6&lChange Language (Currently English)"
   else
       set slot 4 of player's inventory to nether star named "&6&lMenu &7(Clique droit)"
       set slot 8 of player's inventory to banner named "&6&lChanger la Langue (Actuellement Français)"

#Il y as un cooldown (5coal qui disparaisent progrésivement chaque seconde) ,pour l'instant je dis que c'est anti-lag mais a terme je rajouterais un grade(VIP) pour passer ce cooldown


#Menu + Cooldown
on rightclick with a nether star :
   if {player.lang.%player%} is 1
       wait 1 tick
       open chest with 1 rows named "&6Cooldown Anti-Lag"
       wait 2 tick                                                                        #----- EN
       format slot 0 with barrier named "&6Cancel countdown" and lore "You will not enter in the menu" to close
       format slot 6 with coal named "&2Couldownn No-Lag" with lore "5 seconds left" to be unstealable
       format slot 5 with coal named "&2Couldownn No-Lag" with lore "5 seconds left" to be unstealable
       format slot 4 with coal named "&2Couldownn No-Lag" with lore "5 seconds left" to be unstealable
       format slot 3 with coal named "&2Couldownn No-Lag" with lore "5 seconds left" to be unstealable
       format slot 2 with coal named "&2Couldownn No-Lag" with lore "5 seconds left" to be unstealable
       wait 1 seconds                                                                    #---- EN
       open chest with 1 rows named "&6Cooldown Anti-Lag"
       format slot 0 with barrier named "&6Cancel countdown" and lore "You will not enter in the menu" to close
       format slot 6 with coal named "&2Couldownn No-Lag" with lore "4 seconds left" to be unstealable
       format slot 5 with coal named "&2Couldownn No-Lag" with lore "4 seconds left" to be unstealable
       format slot 4 with coal named "&2Couldownn No-Lag" with lore "4 seconds left" to be unstealable
       format slot 3 with coal named "&2Couldownn No-Lag" with lore "4 seconds left" to be unstealable
       wait 1 seconds                                                                    #--- EN
       open chest with 1 rows named "&6Cooldown Anti-Lag"
       format slot 0 with barrier named "&6Cancel countdown" and lore "You will not enter in the menu" to close
       format slot 5 with coal named "&2Couldownn No-Lag" with lore "3 seconds left" to be unstealable
       format slot 4 with coal named "&2Couldownn No-Lag" with lore "3 seconds left" to be unstealable
       format slot 3 with coal named "&2Couldownn No-Lag" with lore "3 seconds left" to be unstealable
       wait 1 seconds                                                                    #-- EN
       open chest with 1 rows named "&6Cooldown Anti-Lag"
       format slot 0 with barrier named "&6Cancel countdown" and lore "You will not enter in the menu" to close
       format slot 5 with coal named "&2Couldownn No-Lag" with lore "2 seconds left" to be unstealable
       format slot 4 with coal named "&2Couldownn No-Lag" with lore "2 seconds left" to be unstealable
       wait 1 seconds                                                                    #- EN
       open chest with 1 rows named "&6Cooldown Anti-Lag"
       format slot 0 with barrier named "&6Cancel countdown" and lore "You will not enter in the menu" to close
       format slot 4 with coal named "&2Couldownn No-Lag" with lore "1 second left" to be unstealable
       wait 1 seconds
       open chest with 1 rowd named "Main Menu"
       wait 2 tick
       format slot 0 with barrier named "&6Quit Menu" to close
       wait 1 seconds
       format slot 0 with clock named "&6Go to the menu" to run [execute console command "say %player% Currently unavailable"]
   else :
       wait 1 tick
       open chest with 1 rows named "&6Cooldown Anti-Lag"
       wait 2 tick                                                                        #----- FR
       format slot 0 with barrier named "&6Annuler le compte a rebours" and lore "Vous n'accederez pas au menu" to close
       format slot 6 with coal named "&2Couldownn No-Lag" with lore "5 secondes restantes" to be unstealable
       format slot 5 with coal named "&2Couldownn No-Lag" with lore "5 secondes restantes" to be unstealable
       format slot 4 with coal named "&2Couldownn No-Lag" with lore "5 secondes restantes" to be unstealable
       format slot 3 with coal named "&2Couldownn No-Lag" with lore "5 secondes restantes" to be unstealable
       format slot 2 with coal named "&2Couldownn No-Lag" with lore "5 secondes restantes" to be unstealable
       wait 1 seconds                                                                    #---- FR
       open chest with 1 rows named "&6Couldown Anti-Lag"
       format slot 0 with barrier named "&6Annuler le compte a rebours" and lore "Vous n'accederez pas au menu" to close
       format slot 6 with coal named "&2Couldownn No-Lag" with lore "4 secondes restantes" to be unstealable
       format slot 5 with coal named "&2Couldownn No-Lag" with lore "4 secondes restantes" to be unstealable
       format slot 4 with coal named "&2Couldownn No-Lag" with lore "4 secondes restantes" to be unstealable
       format slot 3 with coal named "&2Couldownn No-Lag" with lore "4 secondes restantes" to be unstealable
       wait 1 seconds                                                                    #--- FR
       open chest with 1 rows named "&6Couldown Anti-Lag"
       format slot 0 with barrier named "&6Annuler le compte a rebours" and lore "Vous n'accederez pas au menu" to close
       format slot 5 with coal named "&2Couldownn No-Lag" with lore "3 secondes restantes" to be unstealable
       format slot 4 with coal named "&2Couldownn No-Lag" with lore "3 secondes restantes" to be unstealable
       format slot 3 with coal named "&2Couldownn No-Lag" with lore "3 secondes restantes" to be unstealable
       wait 1 seconds                                                                    #-- FR
       open chest with 1 rows named "&6Couldown Anti-Lag"
       format slot 0 with barrier named "&6Annuler le compte a rebours" and lore "Vous n'accederez pas au menu" to close
       format slot 5 with coal named "&2Couldownn No-Lag" with lore "2 secondes restantes" to be unstealable
       format slot 4 with coal named "&2Couldownn No-Lag" with lore "2 secondes restantes" to be unstealable
       wait 1 seconds                                                                    #- EN
       open chest with 1 rows named "&6Couldown Anti-Lag"
       format slot 0 with barrier named "&6Annuler le compte a rebours" and lore "Vous n'accederez pas au menu" to close
       format slot 4 with coal named "&2Couldownn No-Lag" with lore "1 secondes restantes" to be unstealable
       wait 1 seconds
       open chest with 1 rowd named "Main Menu"
       wait 2 tick
       format slot 0 with barrier named "&6Quit Menu" to close
       wait 1 seconds
       format slot 0 with clock named "&6Acceder au menu" to run [execute console command "say %player% Actuellement Indisponible]



#Gestion de la langue du serveur
on rightclick with a banner :
   if {player.lang.%player%} is 0 or not set
       set {player.lang.%player%} to 1
       execute console command "kick %player% Language changer avec succés (FR). Veuillez vous reconnecter pour terminer le proccesus."
on rightclick with a banner :
   if {player.lang.%player%} is 0 or not set
       set {player.lang.%player%} to 1
       execute console command "kick %player% Language change with success (EN). Please log in again to complete the process."




#Ptit Bonus
on rightclick with a brick :
   execute console command "skript reload scripts"

 

 

Pouvez vous m'aider

PS : ce skript nécessite WildSkript

 

Où est le problème ? Je n'ai pas compris ta demande d'aide.

  • 0
Posté(e)

if {player.lang.%player%} is 0 or not set = Impossible en skript (N'est pas reconnu)

Tu as oublier tous les : après les IF s,

Et pourquoi utiliser des chiffres pour la détection de la langue au lieu d'utiliser directement un string ? (Pas de mauvais jeu de mot merci :rolleyes:)

  • 0
Posté(e)
Pourquoi ne pas utiliser directement un string?

[spoiler=Réponse]C Quoi? (Je suis debutant(voir PS))

 

Merci a vous deux, je vais tester

 

Est ce quequelqu'un sait comment on fait pour :

 

[spoiler=Faire Ceci]set slot 8 of player's inventory to Tete de Joueur(avec une tete drapeau Englais) named "&6&lChange Language (Currently English)"

 

 

[spoiler=Ou cela]set slot 8 of player's inventory to Tete de Joueur(avec une tete drapeau Français) named "&6&lChanger la langue (Actuellement Français)"

 

 

PS: je débute en skript j'ai juste vus les 20 premiers tutos d'Oxikis

REPS: Je vais remplacer les couldown (trop couuuuul) par cooldown

  • 0
Posté(e)
String = Chaine de caractère

 

Exemple: "Je skript"

 

taper 0 pour le FR et 1 pour EN c'est plus rapide et sa change rien vus que les joueurs sur le serv ne vois pas le 0 ou 1

 

de toute facon "Français" en binaire (010001100111001001100001011011100010011001100011011000110110010101100100011010010110110000111011011000010110100101110011)

est plus long a ecrire que 0

  • 0
Posté(e)
taper 0 pour le FR et 1 pour EN c'est plus rapide et sa change rien vus que les joueurs sur le serv ne vois pas le 0 ou 1

 

de toute facon "Français" en binaire (010001100111001001100001011011100010011001100011011000110110010101100100011010010110110000111011011000010110100101110011)

est plus long a ecrire que 0

Je parlais pas du mot français en binaire o_O

Je disais juste que dans les if s pour vérifier la langue du joueur,

A la place de if .... is 0: ou 1

Tu aurais pu faire if .... is "french": ou english ou german ou spanish etc...

 

Sa serais mieux pour ce repéré dans le code,

Après c'est juste un conseil :eek:

  • 0
Posté(e)

Le binaire etait une blague(nule mais une blague)

 

sinon tu sais pas comment faire pour faire cette commande

set slot 8 of player's inventory to Tete de Joueur(avec une tete drapeau Englais) named "&6&lChange Language (Currently English)"

  • 0
Posté(e)
Le binaire etait une blague(nule mais une blague)

 

sinon tu sais pas comment faire pour faire cette commande

set slot 8 of player's inventory to Tete de Joueur(avec une tete drapeau Englais) named "&6&lChange Language (Currently English)"

 

Heu la tu me donne un item qui ce place dans le slot du joueur,

Tu veux que sa fais quoi quand on clique dessus?

  • 0
Posté(e)

Je veux savoir comment on fait pour giver cette tete

apres tu reprend le meme bout de code que le give pour le "if rightclick with a .............."

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