Aller au contenu
  • 0

Skript pour être tp dans un role


Question

Posté(e)

Sa serais possible de métre que quand la personne est pas inviter elle ne peut pas faire /bandit ?

options:
    msgRefus: TonMessageDeRefus #Modifie-le, c'est le message à envoyé au joueur quand il refuse

command /banditinvite [<player>]:
    permission: banditinvite.sk
    trigger:
        message "&6On t'a invité pour devenir bandit." to arg 1
        message "&6/bandit pour donner ta réponse." to arg 1

command /bandit:
    permission: bandiaccept.sk
    trigger:
        wait 2 ticks
        open chest with 6 rows named "&cBandit&6Accept" to player
        wait 1 tick
        format slot 22 of player with paper named "&6Veux-tu devenir un bandit ?" to be unstealable
        format slot 30 of player with light green dye named "&a&lAccepter" to close then run [make player execute command "/§banditaccept"]
        format slot 32 of player with rose red named "&c&lRefuser" to close then run [make player execute command "/§banditrefuse"]

command /§banditaccept:
    permission: banditaccept.sk
    trigger: 
        message "&4[&cAnnonce&4] &6Tu es maintenant un bandit"
        execute console command "clear %player%"
        execute console command "lp user %player% parent set bandit"
        execute console command "tp %player% -1176 91 1881"
        execute console command "skin clear %player%" #La commande rend le joueur invisible fais gaffe
        execute console command "effect %player% clear"

command /§banditrefuse:
    permission: banditaccept.sk
    trigger:
        message "{@msgRefus}"

9 réponses à cette question

Messages recommandés

  • 0
Posté(e)

Oui, moi je passerai par une variable, genre:

command /banditinvite [<player>]:
    permission: banditinvite.sk
    trigger:
        message "&6On t'a invité pour devenir bandit." to arg 1
        message "&6/bandit pour donner ta réponse." to arg 1
        set {%arg-player%.banditinv} to 1

et dans ton banditaccept tu as:

command /§banditaccept:
    permission: banditaccept.sk
    trigger: 
    	if {%player%.banditinvited} is equal to 1:
        	message "&4[&cAnnonce&4] &6Tu es maintenant un bandit"
        	execute console command "clear %player%"
        	execute console command "lp user %player% parent set bandit"
        	execute console command "tp %player% -1176 91 1881"
        	execute console command "skin clear %player%" #La commande rend le joueur invisible fais gaffe
        	execute console command "effect %player% clear"
        else:
        	send "&cVous n'avez pas été invité" to player

et après tu peux faire pareil pour ton banditrefuse

  • 0
Posté(e)
il y a 1 minute, Kapsulon a dit :

Oui, moi je passerai par une variable, genre:


command /banditinvite [<player>]:
    permission: banditinvite.sk
    trigger:
        message "&6On t'a invité pour devenir bandit." to arg 1
        message "&6/bandit pour donner ta réponse." to arg 1
        set {%arg-player%.banditinv} to 1

et dans ton banditaccept tu as:


command /§banditaccept:
    permission: banditaccept.sk
    trigger: 
    	if {%player%.banditinvited} is equal to 1:
        	message "&4[&cAnnonce&4] &6Tu es maintenant un bandit"
        	execute console command "clear %player%"
        	execute console command "lp user %player% parent set bandit"
        	execute console command "tp %player% -1176 91 1881"
        	execute console command "skin clear %player%" #La commande rend le joueur invisible fais gaffe
        	execute console command "effect %player% clear"
        else:
        	send "&cVous n'avez pas été invité" to player

et après tu peux faire pareil pour ton banditrefuse

Je met quoi pour le bandit refuse ?

  • 0
Posté(e)
command /§banditrefuse:
    permission: banditaccept.sk
    trigger:
    	if {%player%.banditinvited} is equal to 1:
        	message "{@msgRefus}"
            set {%player%.banditinvited} to 0
        else:
        	send "&cVous n'avez pas été invité" to player

Au pire à ce point la tu aurais pu faire une demande dans la section demande de skript

  • 0
Posté(e)
Le 02/07/2019 à 13:58, Kapsulon a dit :

command /§banditrefuse:
    permission: banditaccept.sk
    trigger:
    	if {%player%.banditinvited} is equal to 1:
        	message "{@msgRefus}"
            set {%player%.banditinvited} to 0
        else:
        	send "&cVous n'avez pas été invité" to player

Au pire à ce point la tu aurais pu faire une demande dans la section demande de skript

On peut faire !bandit sans avoir recu d'invitation

 

 

Le 02/07/2019 à 13:58, Kapsulon a dit :

command /§banditrefuse:
    permission: banditaccept.sk
    trigger:
    	if {%player%.banditinvited} is equal to 1:
        	message "{@msgRefus}"
            set {%player%.banditinvited} to 0
        else:
        	send "&cVous n'avez pas été invité" to player

Au pire à ce point la tu aurais pu faire une demande dans la section demande de skript

On peut faire !bandit sans avoir recu d'invitation et quand on est inviter on ne rejoin pas

options:
    msgRefus: TonMessageDeRefus #Modifie-le, c'est le message à envoyé au joueur quand il refuse
    msgJoinNoInvite: TonMessage #Modifie-le, c'est le message quand quelqu'un veut faire /bandit alors qu'il n'est pas invité

command /banditinvite [<player>]:
    permission: banditinvite.sk
    trigger:
        message "&6On t'a invité pour devenir bandit." to arg 1
        message "&6/bandit pour donner ta réponse." to arg 1
        set {%arg-player%.banditinv} to 1

command /bandit:
    permission: bandiaccept.sk
    trigger:
        wait 2 ticks
        open chest with 6 rows named "&cBandit&6Accept" to player
        wait 1 tick
        format slot 22 of player with paper named "&6Veux-tu devenir un bandit ?" to be unstealable
        format slot 30 of player with green dye named "&a&lAccepter" to close then run [make player execute command "/§banditaccept"]
        format slot 32 of player with rose red named "&c&lRefuser" to close then run [make player execute command "/§banditrefuse"]

command /§banditaccept:
    permission: banditaccept.sk
    trigger:
        if {%player%.banditinvited} is equal to 1:
            message "&4[&cAnnonce&4] &6Tu es maintenant un bandit"
            execute console command "clear %player%"
            execute console command "lp user %player% parent set bandit"
            execute console command "tp %player% -1176 91 1881"
            execute console command "skin clear %player%" #La commande rend le joueur invisible fais gaffe
            execute console command "effect %player% clear"
        else:
            send "&cVous n'avez pas été invité" to player

command /§banditrefuse:
    permission: banditaccept.sk
    trigger:
        if {%player%.banditinvited} is equal to 1:
            message "{@msgRefus}"
            set {%player%.banditinvited} to 0
        else:
            send "&cVous n'avez pas été invité" to player

 

  • 0
Posté(e)

options:
    msgRefus: TonMessageDeRefus #Modifie-le, c'est le message à envoyé au joueur quand il refuse
    msgJoinNoInvite: TonMessage #Modifie-le, c'est le message quand quelqu'un veut faire /bandit alors qu'il n'est pas invité

command /banditinvite [<player>]:
    permission: banditinvite.sk
    trigger:
        message "&6On t'a invité pour devenir bandit." to arg 1
        message "&6/bandit pour donner ta réponse." to arg 1
        set {%arg-player%.banditinv} to 1

command /bandit:
    permission: bandiaccept.sk
    trigger:
        wait 2 ticks
        open chest with 6 rows named "&cBandit&6Accept" to player
        wait 1 tick
        format slot 22 of player with paper named "&6Veux-tu devenir un bandit ?" to be unstealable
        format slot 30 of player with green dye named "&a&lAccepter" to close then run [make player execute command "/§banditaccept"]
        format slot 32 of player with rose red named "&c&lRefuser" to close then run [make player execute command "/§banditrefuse"]

command /§banditaccept:
    permission: banditaccept.sk
    trigger:
        if {%player%.banditinv} is equal to 1:
            message "&4[&cAnnonce&4] &6Tu es maintenant un bandit"
            execute console command "clear %player%"
            execute console command "lp user %player% parent set bandit"
            execute console command "tp %player% -1176 91 1881"
            execute console command "skin clear %player%" #La commande rend le joueur invisible fais gaffe
            execute console command "effect %player% clear"
        else:
            send "&cVous n'avez pas été invité" to player

command /§banditrefuse:
    permission: banditaccept.sk
    trigger:
        if {%player%.banditinv} is equal to 1:
            message "{@msgRefus}"
            set {%player%.banditinv}} to 0
        else:
            send "&cVous n'avez pas été invité" to player

 

Le 02/07/2019 à 14:42, Kapsulon a dit :

Je me suis trompé la ou il y a écrit: "{%player%.banditinvited}" faut mettre {%player%.banditinv}

sa veut tjr pas 😕

 

  • 0
Posté(e) (modifié)
options:
    msgRefus: TonMessageDeRefus #Modifie-le, c'est le message à envoyé au joueur quand il refuse
    msgJoinNoInvite: TonMessage #Modifie-le, c'est le message quand quelqu'un veut faire /bandit alors qu'il n'est pas invité
    msgDejaInvite: TonMessageDejaInvite #Modifie-le, c'est le message que celui qui /banditinvite reçoit quand <player> a déjà une invitation en cours
    msgDejaBandit: TonMessageDejaBandit #Modifie-le, c'est le message que celui qui /banditinvite reçoit quand <player> est déjà un bandit

command /banditinvite [<player>]:
    permission: banditinvite.sk
    trigger:
        if {banditinvite.%arg 1%} is not set:
            message "&6On t'a invité pour devenir bandit." to arg 1
            message "&6/bandit pour donner ta réponse." to arg 1
            set {banditinvite.%arg 1%} to 1
        else if {banditinvite.%arg 1%} is "1":
            message "{@msgDejaInvite}"
        else if {banditinvite.%arg 1%} is "2":
            message "{@msgDejaBandit}"

command /bandit:
    permission: bandiaccept.sk
    trigger:
        if {banditinvite.%player%} is not set:
            send "{@msgJoinNoInvite}"
        else:
            wait 2 ticks
            open chest with 6 rows named "&cBandit&6Accept" to player
            wait 1 tick
            format slot 22 of player with paper named "&6Veux-tu devenir un bandit ?" to be unstealable
            format slot 30 of player with light green dye named "&a&lAccepter" to close then run [make player execute command "/§banditaccept"]
            format slot 32 of player with rose red named "&c&lRefuser" to close then run [make player execute command "/§banditrefuse"]

command /§banditaccept:
    permission: banditaccept.sk
    trigger:
        set {banditinvite.%arg 1%} to 2
        message "&4[&cAnnonce&4] &6Tu es maintenant un bandit"
        execute console command "clear %player%"
        execute console command "lp user %player% parent set bandit"
        execute console command "tp %player% -1176 91 1881"
        execute console command "skin clear %player%" #La commande rend le joueur invisible fais gaffe
        execute console command "effect %player% clear"

command /§banditrefuse:
    permission: banditaccept.sk
    trigger:
        clear {banditinvite.%player%}
        message "{@msgRefus}"

Essaie ça, je ne suis pas sûre que ça marche, ça fait aussi quand quelqu'un fait /banditinvite alors que <player> à soit déjà une invitation en cours soit est déjà bandit, ça ne le ré-invite pas. Tu devrais surement modifier le nom de ton post en "Commande possible quand on y invite"

Modifié par Invité
  • 0
Posté(e) (modifié)

Bon voila c'est un skript que je viens de faire, j'ai pas pu tester mais si y'a une erreur ping moi
Addons requis: Tuske

function banditAgree(p: player):
	send "&4[&cAnnonce&4] &6Tu es maintenant un bandit" to {_p}
	execute console command "clear %{_p}%"
	execute console command "lp user %{_p}% parent set bandit"
	execute console command "tp %{_p}% -1176 91 1881"
	execute console command "skin clear %{_p}%" #La commande rend le joueur invisible fais gaffe
	execute console command "effect %{_p}% clear"
	add {_p} to {bandit::list::*}
	remove {_p} from {bandit::invited::*}


function banditRefuse(p: player):
	send "{@msgRefus}" to {_p}
	remove {_p} from {bandit::invited::*}





options:
    msgRefus: TonMessageDeRefus #Modifie-le, c'est le message à envoyé au joueur quand il refuse

command /banditinvite [<player>]:
	permission: banditinvite.sk
	trigger:
		if arg-1 is set:

			if {bandit::invited::*} doesn't contain arg-1:
				if {bandit::list::*} doesn't contain arg-1:
					add player to {bandit::invited::*}
        			message "&fTu viens d'inviter &e%arg-2%"
        			send "&e%player% &fvient de t'inviter pour devenir Bandit"
				else:
					message "&cCe joueur est déjà un bandit"	
        	else:
				message "&cCe joueur est déjà inviter"

command /bandit:
    permission: bandiaccept.sk
    trigger:
        open virutal chest inventory with size 6 named "&cBandit&6Accept" to player
        format gui slot 22 of player with paper named "&6Veux-tu devenir un bandit ?" to do nothing
        format gui slot 30 of player with light green dye named "&a&lAccepter" to close then run function banditAgree(player)
        format gui slot 32 of player with rose red named "&c&lRefuser" to close then run function banditRefuse(player)

Edit: j'ai oublier %{_p}% dans la function

Modifié par eaglezlpha
  • 0
Posté(e)

Bonsoir,

Le topic est inactif depuis plus de 7 jours. Je lock.

Si tu souhaites rouvrir le topic, merci de me contacter en message privé.

Cordialement,

Invité
Ce sujet ne peut plus recevoir de nouvelles réponses.
×
×
  • 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.