Skocz do zawartości
  • 0

Strony w GUI


Delivetator

Pytanie

Witam, napisałby mi ktoś skrypt na gui SkQuery ze stronami (lista graczy w gui) pod spodem komenda

command /lista:
	trigger:
        set {_gui} to chest inventory with 6 rows named "&c&lLista graczy:"
		loop all players:
			set {_slot} to 0
			set slot {_slot} of {_gui} to skull of loop-value named "%loop-value%" with lore "&m------------------------" and "&cŻycie &8» &e%loop-player's health*2%" and "&fGłód &8» &e%loop-player's hunger*2%" and "&6Kasa &8» &e%loop-player's balance%" and "&dŚwiat &8» &e%loop-player's world%" and "&m------------------------"
			add 1 to {_slot}
		open {_gui} to player

 

Odnośnik do komentarza
https://skript.pl/temat/54982-strony-w-gui/
Udostępnij na innych stronach

2 odpowiedzi na to pytanie

Rekomendowane odpowiedzi

  • 0

Nie jestem pewien czy to zadziała ale spróbój:
 

command /lista:
	trigger:
		set {_gui} to chest inventory with 6 rows named "&c&lLista graczy:"
		set {_slot} to 0
		loop all players:
			set slot {_slot} of {_gui} to skull of loop-value named "%loop-value%" with lore "&m------------------------" and "&cŻycie &8» &e%loop-player's health*2%" and "&fGłód &8» &e%loop-player's hunger*2%" and "&6Kasa &8» &e%loop-player's balance%" and "&dŚwiat &8» &e%loop-player's world%" and "&m------------------------"
			add 1 to {_slot}
		open {_gui} to player

 

Odnośnik do komentarza
https://skript.pl/temat/54982-strony-w-gui/#findComment-333113
Udostępnij na innych stronach

  • 0

Ostatnio komuś robiłem, trzymaj:

options:
	guiName: Gracze Online
function getOnlinePlayers() :: players:
	loop all players where [input has permission "admin"]:
		add loop-player to {_ret::*}
	loop all players where [{_ret::*} doesn't contain input]:
		add loop-player to {_ret::*}
	return {_ret::*}
function onlinePlayers(i: integer=1) :: inventory:
	set {_x} to chest with 6 rows named "{@guiName} &7(&0%{_i}%&7)"
	#48 - poprzednia strona
	#49 - wyjscie
	#50 - nastepna strona
	set slot 48 of {_x} to gray dye named "Poprzednia Strona"
	set slot 49 of {_x} to arrow named "Wyjscie"
	set slot 50 of {_x} to lime dye named "Nastepna strona"
	set {_players::*} to getOnlinePlayers()
	set {_a} to 0
	loop {_players::*}:
		if loop-index parsed as integer is between ({_i}-1)*45 and {_i}*45:
			set slot {_a} of {_x} to skull of loop-value named "&a%loop-value%"
			add 1 to {_a}
	return {_x}
function getStrona(t: text) :: integer:
	set {_index} to {_t}
	replace all "{@guiName} (" and ")" with "" in {_index}
	set {_index} to {_index} parsed as integer
	return {_index}
on inventory click:
	if name of player's inventory contains "{@guiName}":
		cancel event
		if clicked slot is 48:
			set {_index} to getStrona(uncoloured name of player's current inventory)
			if {_index} <= 1:
				stop
			remove 1 from {_index}
			open onlinePlayers({_index}) to player
			stop
		if clicked slot is 49:
			close player's inventory
			stop
		if clicked slot is 50:
			set {_index} to getStrona(uncoloured name of player's current inventory)
			if {_index} > ((number of online players) / 45):
				stop
			add 1 to {_index}
			open onlinePlayers({_index}) to player
command /online:
	trigger:
		open onlinePlayers() to player

 

Odnośnik do komentarza
https://skript.pl/temat/54982-strony-w-gui/#findComment-333115
Udostępnij na innych stronach

Dołącz do dyskusji

Możesz dodać zawartość już teraz a zarejestrować się później. Jeśli posiadasz już konto, zaloguj się aby dodać zawartość za jego pomocą.

Nieaktywny
Odpowiedz na pytanie...

×   Wklejono zawartość z formatowaniem.   Usuń formatowanie

  Dozwolonych jest tylko 75 emoji.

×   Odnośnik został automatycznie osadzony.   Przywróć wyświetlanie jako odnośnik

×   Przywrócono poprzednią zawartość.   Wyczyść edytor

×   Nie możesz bezpośrednio wkleić grafiki. Dodaj lub załącz grafiki z adresu URL.

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

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