Skocz do zawartości
  • 0

Prefixy w gui


KrisSx
 Udostępnij

Pytanie

Hej, napisze mi ktos skrypt na menu z prefixami?

Po wpisaniu komendy /prefixy otwiera sie gui z 27 prefixami do wyboru, kazdy jest w tym menu jako szare szklo (jesli gracz nie ma permisji prefix.1 to wtedy pierwsze szklo jest szare itd tak do 27), ale jest gracz ma ta permisje to to szklo jest zielone i po kliknieciu ustawia mu wybrany prefix (nazwa szkla - prefix)

Prefixy nadawane komenda /pex user nick prefix "prefix"

To chyba proste do napisania, ale mi sie cos myli wszystko i jakos nie idzie a tez czasu malo :/

 

aha, nie trzeba wymyslac prefixow, sam potem sb ustawie, wiec wystarczy nazywac szklo "prefix1", "prefix2" itd

Odnośnik do komentarza
Udostępnij na innych stronach

2 odpowiedzi na to pytanie

Rekomendowane odpowiedzi

  • 0
options:
	chestName: Predixy
	file: "../../Prefix/prefixs.yml"
	
	zieloneSzklo: green glass
	szareSzklo: gray glass
on script load:
	if yaml value "prefix.1" from {@file} is not set:
		loop 27 times:
			set {_r} to random element out of "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "a", "b", "c", "d", "e" and "f"
			set yaml value "prefix.%loop-number%" from {@file} to "&%{_r}%Ustaw_Prefix_%loop-number%"
command /prefixy [<text>]:
	trigger:
		set {_x} to chest with 3 rows named "{@chestName}"
		loop 27 times:
			set {_name} to yaml value "prefix.%loop-number%" from {@file}
			if player has permission "prefix.%loop-number%":
				set slot (loop-number)-1 of {_x} to {@zieloneSzklo} named "%coloured {_name}%"
			else:
				set slot (loop-number)-1 of {_x} to {@szareSzklo} named "%coloured {_name}%"
		open {_x} to player
on inventory click:
	if inventory name of player's current inventory is "{@chestName}":
		set {_slot} to clicked slot
		if {_slot} is smaller than 0:
			stop
		cancel event
		if player's current inventory's slot {_slot} is {@zieloneSzklo}:
			set {_prefix} to coloured name of player's current inventory's slot {_slot}
			execute console command "pex user %player% prefix %{_prefix}%"
			close player's inventory
			send "Ustawiles sobie prefix: %{_prefix}%"
			stop
		else:
			send "Nie masz tego prefixu."
			stop

Daj no mnie coś trudniejszego xD 

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ę...