Skocz do zawartości
  • 0

Administracja online/offline w GUI


Pytanie

Skrypt na administracje online/offline w gui.

Witam, prosiłbym o napisanie skryptu na Administracje online/offline (w GUI), w administracji jest 6 osób. Coś tego typu:

(Oczywiście po najechaniu na jego głowę)

[Nick]

[Ranga] 

[Online/offline]

[Czym się zajmuje]

rozmiar GUI - 54 w wokół prosiłbym aby znajdowały się szkła z napisem serwera

Edytowane przez xNightPower_
Nieaktywny

Zmieniam tytuł na poprawny.

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

Rekomendowane odpowiedzi

  • 0
19 minut temu, LuckyEq napisał:

Skrypt na administracje online/offline w gui.

Witam, prosiłbym o napisanie skryptu na Administracje online/offline (w GUI), w administracji jest 6 osób. Coś tego typu:

(Oczywiście po najechaniu na jego głowę)

[Nick]

[Ranga] 

[Online/offline]

[Czym się zajmuje]

rozmiar GUI - 54 w wokół prosiłbym aby znajdowały się szkła z napisem serwera

Proszę.

command /administracja:
	trigger:
		set {_g} to chest inventory with 6 rows named "&c&lAdministacja"
		set slot (integers between 0 and 53) of {_g} to white stained glass pane named "&6nazwa-serwera.pl"
		set {_i} to 10
		loop 4 times:
			set slot (integers between {_i} and ({_i} + 6)) of {_g} to air
			add 3 to {_i}
		set {_skład::*} to "LuckyEq", "1", "2", "3", "4" and "5"
		set {_ranga::*} to "Właściciel", "Admin", "Admin", "Moderator", "Pomocnik" and "Pomocnik"
		set {_opis::*} to "bla bla 1", "bla bla 2", "bla bla 3", "bla bla 4", "bla bla 5" and "bla bla 6"
		loop {_skład::*}:
			set {_online} to "&aOnline" if (loop-value parsed as offline player) is online else "&cOffline"
			set slot (loop-index parsed as integer + 9) of {_g} to skull of (loop-value parsed as offline player) named loop-value with lore {_ranga::%loop-index%}, {_online} and {_opis::%loop-index%}
		open {_g} to player

Dostosuj sobie jedynie nazwy ludzi w twojej administacji, ich rangi oraz opisy. Raczej się w tym połapiesz.

Odnośnik do komentarza
https://skript.pl/temat/44966-administracja-onlineoffline-w-gui/#findComment-282694
Udostępnij na innych stronach

  • 0
options:
	nickAdmina1: 
	nickAdmina2: 
	nickAdmina3: 
	nickAdmina4: 
	nickAdmina5: 
	nickAdmina6:


command /administracja:
	trigger:
		open chest inventory with 6 rows named "&cAdministracja" to the player
		set slot (integers between 0 and 53) of player's current inventory to gray stained glass pane named "SERWER"
		set {_admin::1} to "&aonline" if ("{@nickAdmina1}" parsed as offlineplayer) is online else "&coffline"
		set {_admin::2} to "&aonline" if ("{@nickAdmina2}" parsed as offlineplayer) is online else "&coffline"
		set {_admin::3} to "&aonline" if ("{@nickAdmina3}" parsed as offlineplayer) is online else "&coffline"
		set {_admin::4} to "&aonline" if ("{@nickAdmina4}" parsed as offlineplayer) is online else "&coffline"
		set {_admin::5} to "&aonline" if ("{@nickAdmina5}" parsed as offlineplayer) is online else "&coffline"
		set {_admin::6} to "&aonline" if ("{@nickAdmina6}" parsed as offlineplayer) is online else "&coffline"
		set slot 19 of player's current inventory to ("{@nickAdmina1}" parsed as offlineplayer)'s skull with lore "Ranga: Admin" and "Status: %{_admin::1}%" and "&crobi tosty"
		set slot 20 of player's current inventory to ("{@nickAdmina2}" parsed as offlineplayer)'s skull with lore "Ranga: Admin" and "Status: %{_admin::2}%" and "&crobi tosty"
		set slot 21 of player's current inventory to ("{@nickAdmina3}" parsed as offlineplayer)'s skull with lore "Ranga: Admin" and "Status: %{_admin::3}%" and "&crobi tosty"
		set slot 22 of player's current inventory to ("{@nickAdmina4}" parsed as offlineplayer)'s skull with lore "Ranga: Admin" and "Status: %{_admin::4}%" and "&crobi tosty"
		set slot 23 of player's current inventory to ("{@nickAdmina5}" parsed as offlineplayer)'s skull with lore "Ranga: Admin" and "Status: %{_admin::5}%" and "&crobi tosty"
		set slot 24 of player's current inventory to ("{@nickAdmina6}" parsed as offlineplayer)'s skull with lore "Ranga: Admin" and "Status: %{_admin::6}%" and "&crobi tosty"
on inventory click:
	name of player's current inventory = "&cAdministracja"
	clicked inventory is not player's inventory
	cancel event

 

Odnośnik do komentarza
https://skript.pl/temat/44966-administracja-onlineoffline-w-gui/#findComment-282695
Udostępnij na innych stronach

  • 0
4 minuty temu, Kormic napisał:

Proszę.


command /administracja:
	trigger:
		set {_g} to chest inventory with 6 rows named "&c&lAdministacja"
		set slot (integers between 0 and 53) of {_g} to white stained glass pane named "&6nazwa-serwera.pl"
		set {_i} to 10
		loop 4 times:
			set slot (integers between {_i} and ({_i} + 6)) of {_g} to air
			add 3 to {_i}
		set {_skład::*} to "LuckyEq", "1", "2", "3", "4" and "5"
		set {_ranga::*} to "Właściciel", "Admin", "Admin", "Moderator", "Pomocnik" and "Pomocnik"
		set {_opis::*} to "bla bla 1", "bla bla 2", "bla bla 3", "bla bla 4", "bla bla 5" and "bla bla 6"
		loop {_skład::*}:
			set {_online} to "&aOnline" if (loop-value parsed as offline player) is online else "&cOffline"
			set slot (loop-index parsed as integer + 9) of {_g} to skull of (loop-value parsed as offline player) named loop-value with lore {_ranga::%loop-index%}, {_online} and {_opis::%loop-index%}
		open {_g} to player

Dostosuj sobie jedynie nazwy ludzi w twojej administacji, ich rangi oraz opisy. Raczej się w tym połapiesz.

Coś jest nie tak nie otwiera mi się gui...

Odnośnik do komentarza
https://skript.pl/temat/44966-administracja-onlineoffline-w-gui/#findComment-282696
Udostępnij na innych stronach

  • 0
1 minutę temu, LuckyEq napisał:

Coś jest nie tak nie otwiera mi się gui...

Podaj proszę:

  • wersję serwera
  • silnik serwera
  • wersję Skripta
  • listę dodatków do Skripta wraz z wersjami
  • błędy przy przeładowaniu skryptu
  • błędy w konsoli
  • twój skrypt (w jaki sposób go uzupełniłeś)
Odnośnik do komentarza
https://skript.pl/temat/44966-administracja-onlineoffline-w-gui/#findComment-282698
Udostępnij na innych stronach

  • 0
5 minut temu, Kormic napisał:

Podaj proszę:

  • wersję serwera
  • silnik serwera
  • wersję Skripta
  • listę dodatków do Skripta wraz z wersjami
  • błędy przy przeładowaniu skryptu
  • błędy w konsoli
  • twój skrypt (w jaki sposób go uzupełniłeś)

Wersja - 1.8.8
Silnik - Spigot
Wersja SK - 2.1.2
Dodatki do SK (i ich wersje) :
- WildSkript - 1.6.1
- skRayFall - 1.9.20
- SkQuery - 3.21.4
Błędy konsoli:


 
[00:18:06 ERROR]: [Skript] 'chest inventory with 6 rows' is not an item type (test.sk, line 3: set {_g} to chest inventory with 6 rows named "&c&lAdministacja"')
[00:18:06 ERROR]: [Skript] 'slot <...> of {_g}' can only accept a single number, not more (test.sk, line 4: set slot (integers between 0 and 53) of {_g} to white stained glass pane named "&6nazwa-serwera.pl"')
[00:18:06 ERROR]: [Skript] 'slot <...> of {_g}' can only accept a single number, not more (test.sk, line 7: set slot (integers between {_i} and ({_i} + 6)) of {_g} to air')
Odnośnik do komentarza
https://skript.pl/temat/44966-administracja-onlineoffline-w-gui/#findComment-282701
Udostępnij na innych stronach

  • 0
40 minut temu, LuckyEq napisał:

Wersja - 1.8.8
Silnik - Spigot
Wersja SK - 2.1.2
Dodatki do SK (i ich wersje) :
- WildSkript - 1.6.1
- skRayFall - 1.9.20
- SkQuery - 3.21.4
Błędy konsoli:


 
[00:18:06 ERROR]: [Skript] 'chest inventory with 6 rows' is not an item type (test.sk, line 3: set {_g} to chest inventory with 6 rows named "&c&lAdministacja"')
[00:18:06 ERROR]: [Skript] 'slot <...> of {_g}' can only accept a single number, not more (test.sk, line 4: set slot (integers between 0 and 53) of {_g} to white stained glass pane named "&6nazwa-serwera.pl"')
[00:18:06 ERROR]: [Skript] 'slot <...> of {_g}' can only accept a single number, not more (test.sk, line 7: set slot (integers between {_i} and ({_i} + 6)) of {_g} to air')

Pobierz Skript 2.5.3 od Matocolotoe i pozbądź się WildSkript.

Zalecam również zaktualizować SkRayFall do wersji 1.9.21 oraz pobrać nowszą wersję SkQuery stąd.

Jeżeli nadal nie zadziała, spróbuj tak:

  • wyłącz serwer
  • zapisz skrypty i/lub zmienne w bezpiecznym miejscu
  • usuń folder Skript
  • włącz ponownie serwer
  • wrzuć z powrotem wcześniej zapisane skrypty i/lub zmienne
Odnośnik do komentarza
https://skript.pl/temat/44966-administracja-onlineoffline-w-gui/#findComment-282702
Udostępnij na innych stronach

  • 0
9 godzin temu, Kormic napisał:

Pobierz Skript 2.5.3 od Matocolotoe i pozbądź się WildSkript.

Zalecam również zaktualizować SkRayFall do wersji 1.9.21 oraz pobrać nowszą wersję SkQuery stąd.

Jeżeli nadal nie zadziała, spróbuj tak:

  • wyłącz serwer
  • zapisz skrypty i/lub zmienne w bezpiecznym miejscu
  • usuń folder Skript
  • włącz ponownie serwer
  • wrzuć z powrotem wcześniej zapisane skrypty i/lub zmienne

Nadal nic kompletnie pokazuje mi się jak wpisuje /sk na chacie to: /skript help i tak cały czas. zrobiłem tak jak wszystko napisałeś ale nadal nic

 

Odnośnik do komentarza
https://skript.pl/temat/44966-administracja-onlineoffline-w-gui/#findComment-282752
Udostępnij na innych stronach

  • 0
5 minut temu, LuckyEq napisał:

Nadal nic kompletnie pokazuje mi się jak wpisuje /sk na chacie to: /skript help i tak cały czas. zrobiłem tak jak wszystko napisałeś ale nadal nic

W takim razie podaj ponownie te rzeczy.

10 godzin temu, Kormic napisał:

Podaj proszę:

  • wersję serwera
  • silnik serwera
  • wersję Skripta
  • listę dodatków do Skripta wraz z wersjami
  • błędy przy przeładowaniu skryptu
  • błędy w konsoli
  • twój skrypt (w jaki sposób go uzupełniłeś)

EDIT:

Upewnij się również, że usuwałeś folder Skript już z nowym pluginem Skript.

Edytowane przez Kormic
Odnośnik do komentarza
https://skript.pl/temat/44966-administracja-onlineoffline-w-gui/#findComment-282753
Udostępnij na innych stronach

  • 0
6 minut temu, Kormic napisał:

W takim razie podaj ponownie te rzeczy.

 

Wersja - 1.8.8
Silnik - Spigot
Wersja SK - 2.5.3
Dodatki do SK (i ich wersje) :
- skRayFall - 1.9.21
- SkQuery - Najnowsza
Błędy konsoli:

[10:54:40 INFO]: [Skript] Reloading adminon.sk...
[10:54:40 ERROR]: 'chest inventory with 6 rows' is not an item type (adminon.sk, line 3: set {_g} to chest inventory with 6 rows named "&c&lAdministacja Serwera"')
[10:54:40 ERROR]: 'slot <...> of {_g}' can only accept a single number, not more (adminon.sk, line 4: set slot (integers between 0 and 53) of {_g} to white stained glass pane named "&6OWNHC.PL"')
[10:54:40 ERROR]: 'slot <...> of {_g}' can only accept a single number, not more (adminon.sk, line 7: set slot (integers between {_i} and ({_i} + 6)) of {_g} to air')
[10:54:40 ERROR]: 'set {_online} to "&aOnline" if (loop-value parsed as offline player)' is not an entity type (adminon.sk, line 13: set {_online} to "&aOnline" if (loop-value parsed as offline player) is online else "&cOffline"')
[10:54:41 ERROR]: slot can only be set to one object, not more (adminon.sk, line 14: set slot (loop-index parsed as integer + 9) of {_g} to skull of (loop-value parsed as offline player) named loop-value with lore {_ranga::%loop-index%}, {_online} and {_opis::%loop-index%}')
[10:54:41 INFO]: [Skript] Encountered 5 errors while reloading adminon.sk!
Odnośnik do komentarza
https://skript.pl/temat/44966-administracja-onlineoffline-w-gui/#findComment-282757
Udostępnij na innych stronach

  • 0
2 minuty temu, LuckyEq napisał:

Wersja - 1.8.8
Silnik - Spigot
Wersja SK - 2.5.3
Dodatki do SK (i ich wersje) :
- skRayFall - 1.9.21
- SkQuery - Najnowsza
Błędy konsoli:

[10:54:40 INFO]: [Skript] Reloading adminon.sk...
[10:54:40 ERROR]: 'chest inventory with 6 rows' is not an item type (adminon.sk, line 3: set {_g} to chest inventory with 6 rows named "&c&lAdministacja Serwera"')
[10:54:40 ERROR]: 'slot <...> of {_g}' can only accept a single number, not more (adminon.sk, line 4: set slot (integers between 0 and 53) of {_g} to white stained glass pane named "&6OWNHC.PL"')
[10:54:40 ERROR]: 'slot <...> of {_g}' can only accept a single number, not more (adminon.sk, line 7: set slot (integers between {_i} and ({_i} + 6)) of {_g} to air')
[10:54:40 ERROR]: 'set {_online} to "&aOnline" if (loop-value parsed as offline player)' is not an entity type (adminon.sk, line 13: set {_online} to "&aOnline" if (loop-value parsed as offline player) is online else "&cOffline"')
[10:54:41 ERROR]: slot can only be set to one object, not more (adminon.sk, line 14: set slot (loop-index parsed as integer + 9) of {_g} to skull of (loop-value parsed as offline player) named loop-value with lore {_ranga::%loop-index%}, {_online} and {_opis::%loop-index%}')
[10:54:41 INFO]: [Skript] Encountered 5 errors while reloading adminon.sk!

Wpisz na serwerze /ver Skript.

SkQuery nie miałeś pobierać najnowszej, a tą, którą ci podałem.

Odnośnik do komentarza
https://skript.pl/temat/44966-administracja-onlineoffline-w-gui/#findComment-282760
Udostępnij na innych stronach

  • 0
1 minutę temu, CoFFeIN04 napisał:

Czy w moim skrypcie występują błędy? Jeśli tak, to jakie?

 

Jeśli mam rozumieć w twoim skrypcie ma zawierac tam gdzie jest 1nickadmina: Mam wpisywac nicki administratorów

Odnośnik do komentarza
https://skript.pl/temat/44966-administracja-onlineoffline-w-gui/#findComment-282763
Udostępnij na innych stronach

  • 0

tak, po dwukropku wpisujesz 

options:
	nickAdmina1: karol
	nickAdmina2: gasda
	nickAdmina3: dddd222
	nickAdmina4: sadsd111
	nickAdmina5: dasd2121
	nickAdmina6: totttt123

 

Odnośnik do komentarza
https://skript.pl/temat/44966-administracja-onlineoffline-w-gui/#findComment-282764
Udostępnij na innych stronach

  • 0
7 minut temu, CoFFeIN04 napisał:

tak, po dwukropku wpisujesz 



options:
	nickAdmina1: karol
	nickAdmina2: gasda
	nickAdmina3: dddd222
	nickAdmina4: sadsd111
	nickAdmina5: dasd2121
	nickAdmina6: totttt123

 

Dałem to na przykładzie
W konsoli pojawia się:

[11:08:57 INFO]: [Skript] Reloading adminon.sk...
[11:08:57 ERROR]: 'chest inventory with 6 rows named "&cAdministracja"' is not an entity type (adminon.sk, line 11: open chest inventory with 6 rows named "&cAdministracja" to the player')
[11:08:57 ERROR]: 'player' is not an item stack (adminon.sk, line 12: set slot (integers between 0 and 53) of player's current inventory to gray stained glass pane named "SERWER"')
[11:08:57 ERROR]: 'set {_admin::1} to "&aonline" if ("karol" parsed as offlineplayer)' is not an entity type (adminon.sk, line 13: set {_admin::1} to "&aonline" if ("{@nickAdmina1}" parsed as offlineplayer) is online else "&coffline"')
[11:08:57 ERROR]: 'set {_admin::2} to "&aonline" if ("gasda" parsed as offlineplayer)' is not an entity type (adminon.sk, line 14: set {_admin::2} to "&aonline" if ("{@nickAdmina2}" parsed as offlineplayer) is online else "&coffline"')
[11:08:57 ERROR]: 'set {_admin::3} to "&aonline" if ("dddd222" parsed as offlineplayer)' is not an entity type (adminon.sk, line 15: set {_admin::3} to "&aonline" if ("{@nickAdmina3}" parsed as offlineplayer) is online else "&coffline"')
[11:08:57 ERROR]: 'set {_admin::4} to "&aonline" if ("sadsd111" parsed as offlineplayer)' is not an entity type (adminon.sk, line 16: set {_admin::4} to "&aonline" if ("{@nickAdmina4}" parsed as offlineplayer) is online else "&coffline"')
[11:08:57 ERROR]: 'set {_admin::5} to "&aonline" if ("dasd2121" parsed as offlineplayer)' is not an entity type (adminon.sk, line 17: set {_admin::5} to "&aonline" if ("{@nickAdmina5}" parsed as offlineplayer) is online else "&coffline"')
[11:08:57 ERROR]: 'set {_admin::6} to "&aonline" if ("totttt123" parsed as offlineplayer)' is not an entity type (adminon.sk, line 18: set {_admin::6} to "&aonline" if ("{@nickAdmina6}" parsed as offlineplayer) is online else "&coffline"')
[11:08:57 ERROR]: 'player's current inventory to ("karol" parsed as offlineplayer)'s skull with lore <...>' can only accept a single text, not more (adminon.sk, line 19: set slot 19 of player's current inventory to ("{@nickAdmina1}" parsed as offlineplayer)'s skull with lore "Ranga: Admin" and "Status: %{_admin::1}%" and "&crobi tosty"')
[11:08:57 ERROR]: 'player's current inventory to ("gasda" parsed as offlineplayer)'s skull with lore <...>' can only accept a single text, not more (adminon.sk, line 20: set slot 20 of player's current inventory to ("{@nickAdmina2}" parsed as offlineplayer)'s skull with lore "Ranga: Admin" and "Status: %{_admin::2}%" and "&crobi tosty"')
[11:08:58 ERROR]: 'player's current inventory to ("dddd222" parsed as offlineplayer)'s skull with lore <...>' can only accept a single text, not more (adminon.sk, line 21: set slot 21 of player's current inventory to ("{@nickAdmina3}" parsed as offlineplayer)'s skull with lore "Ranga: Admin" and "Status: %{_admin::3}%" and "&crobi tosty"')
[11:08:58 ERROR]: 'player's current inventory to ("sadsd111" parsed as offlineplayer)'s skull with lore <...>' can only accept a single text, not more (adminon.sk, line 22: set slot 22 of player's current inventory to ("{@nickAdmina4}" parsed as offlineplayer)'s skull with lore "Ranga: Admin" and "Status: %{_admin::4}%" and "&crobi tosty"')
[11:08:58 ERROR]: 'player's current inventory to ("dasd2121" parsed as offlineplayer)'s skull with lore <...>' can only accept a single text, not more (adminon.sk, line 23: set slot 23 of player's current inventory to ("{@nickAdmina5}" parsed as offlineplayer)'s skull with lore "Ranga: Admin" and "Status: %{_admin::5}%" and "&crobi tosty"')
[11:08:58 ERROR]: 'player's current inventory to ("totttt123" parsed as offlineplayer)'s skull with lore <...>' can only accept a single text, not more (adminon.sk, line 24: set slot 24 of player's current inventory to ("{@nickAdmina6}" parsed as offlineplayer)'s skull with lore "Ranga: Admin" and "Status: %{_admin::6}%" and "&crobi tosty"')
[11:08:58 ERROR]: 'player' is not an item stack (adminon.sk, line 26: name of player's current inventory = "&cAdministracja"')
[11:08:58 ERROR]: 'inventory' is not an item type (adminon.sk, line 27: clicked inventory is not player's inventory')
[11:08:58 INFO]: [Skript] Encountered 16 errors while reloading adminon.sk!
Edytowane przez LuckyEq
Odnośnik do komentarza
https://skript.pl/temat/44966-administracja-onlineoffline-w-gui/#findComment-282767
Udostępnij na innych stronach

  • 0
Teraz, LuckyEq napisał:

Dokładnie

 

W takim razie spróbuj bez dodatków do Skripta.

Następnie spróbuj jeszcze raz powtórzyć procedurę z usuwaniem folderu Skript.

Jeżeli nadal nie zadziała, pokaż błędy w konsoli.

Odnośnik do komentarza
https://skript.pl/temat/44966-administracja-onlineoffline-w-gui/#findComment-282791
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ę...