Skocz do zawartości
  • 0

Permisje


wojciechsuchodol
 Udostępnij

Pytanie

Witam, potrzebuję ustawić permisję w skrypcie.

Chodzi o to, że gdy Player ma permisje do np. essentials.kit.vip - wyskakuje mu w gui, że kit jest DOSTEPNY, w innym przypadku - NIEDOSTEPNY

command /zestawy:
	trigger:
		open chest with 3 rows named "&cZestawy &4(kliknij aby wybrac)" to player
		wait 2 ticks
		format slot 0 of player with 1 of red stained glass pane named " " to be unstealable
		format slot 1 of player with 1 of red stained glass pane named " " to be unstealable
		format slot 2 of player with 1 of red stained glass pane named " " to be unstealable
		format slot 3 of player with 1 of red stained glass pane named " " to be unstealable
		format slot 4 of player with 1 of red stained glass pane named " " to be unstealable
		format slot 5 of player with 1 of red stained glass pane named " " to be unstealable
		format slot 6 of player with 1 of red stained glass pane named " " to be unstealable
		format slot 7 of player with 1 of red stained glass pane named " " to be unstealable
		format slot 8 of player with 1 of red stained glass pane named " " to be unstealable
		format slot 9 of player with 1 of red stained glass pane named " " to be unstealable
		format slot 10 of player with 1 of wooden sword named "&6Kit &7Gracz" to close then run [make player execute command "/kit gracz"]
		format slot 11 of player with 1 of red stained glass pane named " " to be unstealable
		format slot 12 of player with 1 of iron sword named "&6Kit &aVip" to close then run [make player execute command "/kit vip"]
		format slot 13 of player with 1 of steak named "&b&7ZARCIE" to close then run [make player execute command "/kit jedzenie"]
		format slot 14 of player with 1 of gold sword named "&6Kit &3SVip" to close then run [make player execute command "/kit supervip"]
		format slot 15 of player with 1 of red stained glass pane named " " to be unstealable
		format slot 16 of player with 1 of diamond sword named "&6Kit &cYouTube" to close then run [make player execute command "/kit youtube"]
		format slot 17 of player with 1 of red stained glass pane named " " to be unstealable
		format slot 18 of player with 1 of red stained glass pane named " " to be unstealable
		format slot 19 of player with 1 of red stained glass pane named " " to be unstealable
		format slot 20 of player with 1 of red stained glass pane named " " to be unstealable
		format slot 21 of player with 1 of red stained glass pane named " " to be unstealable
		format slot 22 of player with 1 of red stained glass pane named " " to be unstealable
		format slot 23 of player with 1 of red stained glass pane named " " to be unstealable
		format slot 24 of player with 1 of red stained glass pane named " " to be unstealable
		format slot 25 of player with 1 of red stained glass pane named " " to be unstealable
		format slot 26 of player with 1 of red stained glass pane named " " to be unstealable

 

Edytowane przez wojciechsuchodol
Odnośnik do komentarza
Udostępnij na innych stronach

5 odpowiedzi na to pytanie

Rekomendowane odpowiedzi

  • 0

przyklad:

if player has permission "kit.gracz":
	format slot 10 of player with 1 of wooden sword named "&6Kit &7Gracz" with lore "&aDOSTEPNY" to close then run [make player execute command "/kit gracz"]
else:
	format slot 10 of player with 1 of wooden sword named "&6Kit &7Gracz" with lore "&cNIEDOSTEPNY" to close

 

Edytowane przez Shooterowy
Odnośnik do komentarza
Udostępnij na innych stronach

  • 0
23 minuty temu, Shooterowy napisał:

przyklad:

if player has permission "kit.gracz":
	format slot 10 of player with 1 of wooden sword named "&6Kit &7Gracz" with lore "&aDOSTEPNY" to close then run [make player execute command "/kit gracz"]
else:
	format slot 10 of player with 1 of wooden sword named "&6Kit &7Gracz" with lore "&cNIEDOSTEPNY" to close

 

Nie do końca to działa, podsyłam przykład dodania, wywala błąd z "else" w bodajże 17 linijce 

command /zestawy:
	trigger:
		open chest with 3 rows named "&cZestawy &4(kliknij aby wybrac)" to player
		wait 2 ticks
		format slot 0 of player with 1 of red stained glass pane named " " to be unstealable
		format slot 1 of player with 1 of red stained glass pane named " " to be unstealable
		format slot 2 of player with 1 of red stained glass pane named " " to be unstealable
		format slot 3 of player with 1 of red stained glass pane named " " to be unstealable
		format slot 4 of player with 1 of red stained glass pane named " " to be unstealable
		format slot 5 of player with 1 of red stained glass pane named " " to be unstealable
		format slot 6 of player with 1 of red stained glass pane named " " to be unstealable
		format slot 7 of player with 1 of red stained glass pane named " " to be unstealable
		format slot 8 of player with 1 of red stained glass pane named " " to be unstealable
		format slot 9 of player with 1 of red stained glass pane named " " to be unstealable
	if player has permission "essentials.kit.gracz":
		format slot 10 of player with 1 of wooden sword named "&6Kit &7Gracz" with lore "&8»&a&lDOSTEPNY" to close then run [make player execute command "/kit gracz"]
	else:
		format slot 10 of player with 1 of wooden sword named "&6Kit &7Gracz" with lore "&8»&c&lNIEDOSTEPNY" to close 
		format slot 11 of player with 1 of red stained glass pane named " " to be unstealable
		format slot 12 of player with 1 of iron sword named "&6Kit &aVip" to close then run [make player execute command "/kit vip"]
		format slot 13 of player with 1 of steak named "&b&7ZARCIE" to close then run [make player execute command "/kit jedzenie"]
		format slot 14 of player with 1 of gold sword named "&6Kit &3SVip" to close then run [make player execute command "/kit supervip"]
		format slot 15 of player with 1 of red stained glass pane named " " to be unstealable
		format slot 16 of player with 1 of diamond sword named "&6Kit &cYouTube" to close then run [make player execute command "/kit youtube"]
		format slot 17 of player with 1 of red stained glass pane named " " to be unstealable
		format slot 18 of player with 1 of red stained glass pane named " " to be unstealable
		format slot 19 of player with 1 of red stained glass pane named " " to be unstealable
		format slot 20 of player with 1 of red stained glass pane named " " to be unstealable
		format slot 21 of player with 1 of red stained glass pane named " " to be unstealable
		format slot 22 of player with 1 of red stained glass pane named " " to be unstealable
		format slot 23 of player with 1 of red stained glass pane named " " to be unstealable
		format slot 24 of player with 1 of red stained glass pane named " " to be unstealable
		format slot 25 of player with 1 of red stained glass pane named " " to be unstealable
		format slot 26 of player with 1 of red stained glass pane named " " to be unstealable

 

Odnośnik do komentarza
Udostępnij na innych stronach

  • 0
13 minut temu, Shooterowy napisał:

Wyrównaj te uprawnienia z reszta kodu..

Mógłbyś napisać mi ten skrypt? Mniej więcej chciałbym by wyglądał on tak (wiadomości)

command /zestawy:
	trigger:
		open chest with 3 rows named "&cZestawy &4(kliknij aby wybrac)" to player
		wait 2 ticks
		format slot 0 of player with 1 of red stained glass pane named " " to be unstealable
		format slot 1 of player with 1 of red stained glass pane named " " to be unstealable
		format slot 2 of player with 1 of red stained glass pane named " " to be unstealable
		format slot 3 of player with 1 of red stained glass pane named " " to be unstealable
		format slot 4 of player with 1 of red stained glass pane named " " to be unstealable
		format slot 5 of player with 1 of red stained glass pane named " " to be unstealable
		format slot 6 of player with 1 of red stained glass pane named " " to be unstealable
		format slot 7 of player with 1 of red stained glass pane named " " to be unstealable
		format slot 8 of player with 1 of red stained glass pane named " " to be unstealable
		format slot 9 of player with 1 of red stained glass pane named " " to be unstealable
		if player has permission "essentials.kit.gracz":
		format slot 10 of player with 1 of wooden sword named "&6Kit &7Gracz" with lore "&8»&a&lDOSTEPNY" to close then run [make player execute command "/kit gracz"]
	else:
		format slot 10 of player with 1 of wooden sword named "&6Kit &7Gracz" with lore "&8»&c&lNIEDOSTEPNY" to close 
		format slot 11 of player with 1 of red stained glass pane named " " to be unstealable
		
		if player has permission "essentials.kit.vip":
		format slot 12 of player with 1 of iron sword named "&6Kit &aVip" with lore "&8»&a&lDOSTEPNY" to close then run [make player execute command "/kit vip"]
	else:
		format slot 12 of player with 1 of iron sword named "&6Kit &aVIP" with lore "&8»&c&lNIEDOSTEPNY" to close 
		
		if player has permission "essentials.kit.jedzenie":
		format slot 13 of player with 1 of steak named "&7ZARCIE" with lore "&8»&a&lDOSTEPNY" to close then run [make player execute command "/kit jedzenie"]
	else:
		format slot 13 of player with 1 of steak named "&7ZARCIE" with lore "&8»&c&lNIEDOSTEPNY" to close 
		
		if player has permission "essentials.kit.supervip":
		format slot 14 of player with 1 of gold sword named "&6Kit &3SVip" with lore "&8»&a&lDOSTEPNY" to close then run [make player execute command "/kit supervip"]
	else:
		format slot 14 of player with 1 of gold sword named "&6Kit &3SVip" with lore "&8»&c&lNIEDOSTEPNY" to close
		
		format slot 15 of player with 1 of red stained glass pane named " " to be unstealable
		
		if player has permission "essentials.kit.youtube":
		format slot 16 of player with 1 of diamond sword named "&6Kit &cYouTube" with lore "&8»&a&lDOSTEPNY" to close then run [make player execute command "/kit youtube"]
	else:
		format slot 16 of player with 1 of diamond sword named "&6Kit &cYouTube" with lore "&8»&c&lNIEDOSTEPNY" to close 
		format slot 17 of player with 1 of red stained glass pane named " " to be unstealable
		format slot 18 of player with 1 of red stained glass pane named " " to be unstealable
		format slot 19 of player with 1 of red stained glass pane named " " to be unstealable
		format slot 20 of player with 1 of red stained glass pane named " " to be unstealable
		format slot 21 of player with 1 of red stained glass pane named " " to be unstealable
		format slot 22 of player with 1 of red stained glass pane named " " to be unstealable
		format slot 23 of player with 1 of red stained glass pane named " " to be unstealable
		format slot 24 of player with 1 of red stained glass pane named " " to be unstealable
		format slot 25 of player with 1 of red stained glass pane named " " to be unstealable
		format slot 26 of player with 1 of red stained glass pane named " " to be unstealable
		

 

Odnośnik do komentarza
Udostępnij na innych stronach

  • 0
Spoiler
command /zestawy:
	trigger:
		open chest with 3 rows named "&cZestawy &4(kliknij aby wybrac)" to player
		wait 2 ticks
		format slot 0 of player with 1 of red stained glass pane named " " to be unstealable
		format slot 1 of player with 1 of red stained glass pane named " " to be unstealable
		format slot 2 of player with 1 of red stained glass pane named " " to be unstealable
		format slot 3 of player with 1 of red stained glass pane named " " to be unstealable
		format slot 4 of player with 1 of red stained glass pane named " " to be unstealable
		format slot 5 of player with 1 of red stained glass pane named " " to be unstealable
		format slot 6 of player with 1 of red stained glass pane named " " to be unstealable
		format slot 7 of player with 1 of red stained glass pane named " " to be unstealable
		format slot 8 of player with 1 of red stained glass pane named " " to be unstealable
		format slot 9 of player with 1 of red stained glass pane named " " to be unstealable
		if player has permission "essentials.kit.gracz":
			format slot 10 of player with 1 of wooden sword named "&6Kit &7Gracz" with lore "&8»&a&lDOSTEPNY" to close then run [make player execute command "/kit gracz"]
		else:
			format slot 10 of player with 1 of wooden sword named "&6Kit &7Gracz" with lore "&8»&c&lNIEDOSTEPNY" to close 
		format slot 11 of player with 1 of red stained glass pane named " " to be unstealable
		if player has permission "essentials.kit.vip":
			format slot 12 of player with 1 of iron sword named "&6Kit &aVip" with lore "&8»&a&lDOSTEPNY" to close then run [make player execute command "/kit vip"]
		else:
			format slot 12 of player with 1 of iron sword named "&6Kit &aVIP" with lore "&8»&c&lNIEDOSTEPNY" to close 
		if player has permission "essentials.kit.jedzenie":
			format slot 13 of player with 1 of steak named "&7ZARCIE" with lore "&8»&a&lDOSTEPNY" to close then run [make player execute command "/kit jedzenie"]
		else:
			format slot 13 of player with 1 of steak named "&7ZARCIE" with lore "&8»&c&lNIEDOSTEPNY" to close 
		if player has permission "essentials.kit.supervip":
			format slot 14 of player with 1 of gold sword named "&6Kit &3SVip" with lore "&8»&a&lDOSTEPNY" to close then run [make player execute command "/kit supervip"]
		else:
			format slot 14 of player with 1 of gold sword named "&6Kit &3SVip" with lore "&8»&c&lNIEDOSTEPNY" to close
		format slot 15 of player with 1 of red stained glass pane named " " to be unstealable
		if player has permission "essentials.kit.youtube":
			format slot 16 of player with 1 of diamond sword named "&6Kit &cYouTube" with lore "&8»&a&lDOSTEPNY" to close then run [make player execute command "/kit youtube"]
		else:
			format slot 16 of player with 1 of diamond sword named "&6Kit &cYouTube" with lore "&8»&c&lNIEDOSTEPNY" to close 
		format slot 17 of player with 1 of red stained glass pane named " " to be unstealable
		format slot 18 of player with 1 of red stained glass pane named " " to be unstealable
		format slot 19 of player with 1 of red stained glass pane named " " to be unstealable
		format slot 20 of player with 1 of red stained glass pane named " " to be unstealable
		format slot 21 of player with 1 of red stained glass pane named " " to be unstealable
		format slot 22 of player with 1 of red stained glass pane named " " to be unstealable
		format slot 23 of player with 1 of red stained glass pane named " " to be unstealable
		format slot 24 of player with 1 of red stained glass pane named " " to be unstealable
		format slot 25 of player with 1 of red stained glass pane named " " to be unstealable
		format slot 26 of player with 1 of red stained glass pane named " " to be unstealable

 

 

Odnośnik do komentarza
Udostępnij na innych stronach

Nieaktywny
Ten temat został zamknięty. Brak możliwości dodania odpowiedzi.
 Udostępnij

  • Ostatnio przeglądający   0 użytkowników

    • Brak zarejestrowanych użytkowników przeglądających tę stronę.
×
×
  • Dodaj nową pozycję...