Skocz do zawartości
  • 0

ActionBar i BossBar


MaxTheFuck

Pytanie

Potrzebuje 2 skryptów

skrypt na komende

/actionbar tekst ON/OFF wyswietla tekst na actionbar dopóki nie wpiszemy komendy /actionbar tekst off

i to samo z bossbarem

/bossbar tekst on/off  wyswietla tekst na bossbar dopóki nie wpiszemy komendy /bossbar tekst off

Edytowane przez CountingDogs
Odnośnik do komentarza
https://skript.pl/temat/42492-actionbar-i-bossbar/
Udostępnij na innych stronach

8 odpowiedzi na to pytanie

Rekomendowane odpowiedzi

  • 0
command /actionbar [<text>] [<text>]:
	permission: actionbar
	trigger:
		if arg is not "on" of "off":
			send "&7Poprawne uzycie: &a/actionbar <on/off> <tekst>"
			stop
		if arg is "off":
			clear {actionbar}
			send action bar "" to all players
			send "&7Wylaczono"
			stop
		set {actionbar} to colored arg
		while {actionbar} is set:
			send action bar {actionbar} to all players
			wait second
command /bossbar [<text>] [<text>]:
	permission: bossbar
	trigger:
		if arg is not "on" of "off":
			send "&7Poprawne uzycie: &a/bossbar <on/off> <tekst>"
			stop
		if arg is "off":
			clear {bossbar}
			send action bar "" to all players
			send "&7Wylaczono"
			stop
		set {bossbar} to colored arg
		create bossbar titled {bossbar} and id "bossbar" for all players with progress 100 with colors red
		while {bossbar} is set:
			wait second
		remove bossbar "bossbar"

do bossbara wymagany skRayFall a do actionbara skript minumum w wersji 2.3

Odnośnik do komentarza
https://skript.pl/temat/42492-actionbar-i-bossbar/#findComment-266393
Udostępnij na innych stronach

  • 0
2 godziny temu, xAxee napisał:





command /actionbar [<text>] [<text>]:
	permission: actionbar
	trigger:
		if arg is not "on" of "off":
			send "&7Poprawne uzycie: &a/actionbar <on/off> <tekst>"
			stop
		if arg is "off":
			clear {actionbar}
			send action bar "" to all players
			send "&7Wylaczono"
			stop
		set {actionbar} to colored arg
		while {actionbar} is set:
			send action bar {actionbar} to all players
			wait second
command /bossbar [<text>] [<text>]:
	permission: bossbar
	trigger:
		if arg is not "on" of "off":
			send "&7Poprawne uzycie: &a/bossbar <on/off> <tekst>"
			stop
		if arg is "off":
			clear {bossbar}
			send action bar "" to all players
			send "&7Wylaczono"
			stop
		set {bossbar} to colored arg
		create bossbar titled {bossbar} and id "bossbar" for all players with progress 100 with colors red
		while {bossbar} is set:
			wait second
		remove bossbar "bossbar"

do bossbara wymagany skRayFall a do actionbara skript minumum w wersji 2.3

 

 

Takie blędy.

Spoiler

[16:49:50 INFO]: [Skript] Reloading HeliosApi.sk...
[16:49:50 ERROR]: 'argument(s)' cannot be used if the command has multiple arguments. Use 'argument 1', 'argument 2', etc. instead (HeliosApi.sk, line 62: if arg is not "on" of "off":')
[16:49:50 ERROR]: 'argument(s)' cannot be used if the command has multiple arguments. Use 'argument 1', 'argument 2', etc. instead (HeliosApi.sk, line 65: if arg is "off":')
[16:49:50 ERROR]: 'argument(s)' cannot be used if the command has multiple arguments. Use 'argument 1', 'argument 2', etc. instead (HeliosApi.sk, line 70: set {bossbar} to colored arg')
[16:49:51 ERROR]: Variables cannot be used here. (HeliosApi.sk, line 71: create bossbar titled {bossbar} and id "bossbar" for all players with progress 100 with colors red')
[16:49:51 ERROR]: Can't understand this condition/effect: remove bossbar "bossbar" (HeliosApi.sk, line 74: remove bossbar "bossbar"')

 
 

 

@xAxee a i posiadam skrayfall najnowsze. jedynie co to skript 2.2 mam i nie chce updatować.

wiktorm12

Połączono posty + wstawiono w odpowiednie znaczniki

Notatka dodana przez wiktorm12

Odnośnik do komentarza
https://skript.pl/temat/42492-actionbar-i-bossbar/#findComment-266409
Udostępnij na innych stronach

  • 0
8 minut temu, MaxTheFuck napisał:

@nof a da się zrobić w wersji jakoś 2.2?

tak, użytając skRayFall

command /actionbar [<text>] [<text>]:
	permission: actionbar
	trigger:
		if arg 1 is not "on" of "off":
			send "&7Poprawne uzycie: &a/actionbar <on/off> <tekst>"
			stop
		if arg 1 is "off":
			clear {actionbar}
			set action bar of all players to ""
			send "&7Wylaczono"
			stop
		set {actionbar} to colored arg 2
		while {actionbar} is set:
			set action bar of all players to {actionbar}
			wait second
command /bossbar [<text>] [<text>]:
	permission: bossbar
	trigger:
		if arg 1 is not "on" of "off":
			send "&7Poprawne uzycie: &a/bossbar <on/off> <tekst>"
			stop
		if arg 1 is "off":
			clear {bossbar}
			send action bar "" to all players
			send "&7Wylaczono"
			stop
		set {bossbar} to colored arg 2
		create bossbar titled {bossbar} and id "bossbar" for all players with progress 100 with colors red
		while {bossbar} is set:
			wait second
		remove bossbar "bossbar"

 

Edytowane przez xAxee
Odnośnik do komentarza
https://skript.pl/temat/42492-actionbar-i-bossbar/#findComment-266419
Udostępnij na innych stronach

  • 0

@xAxee posiadam skrayfall i dalej błąd:

 

Spoiler
[17:15:12 INFO]: [Skript] Reloading HeliosApi.sk...
[17:15:12 ERROR]: 'argument(s)' cannot be used if the command has multiple arguments. Use 'argument 1', 'argument 2', etc. instead (HeliosApi.sk, line 57: if arg is not "on" of "off":')
[17:15:12 ERROR]: 'argument(s)' cannot be used if the command has multiple arguments. Use 'argument 1', 'argument 2', etc. instead (HeliosApi.sk, line 60: if arg is "off":')
[17:15:12 ERROR]: 'argument(s)' cannot be used if the command has multiple arguments. Use 'argument 1', 'argument 2', etc. instead (HeliosApi.sk, line 65: set {actionbar} to colored arg')
[17:15:12 ERROR]: 'argument(s)' cannot be used if the command has multiple arguments. Use 'argument 1', 'argument 2', etc. instead (HeliosApi.sk, line 72: if arg is not "on" of "off":')
[17:15:12 ERROR]: 'argument(s)' cannot be used if the command has multiple arguments. Use 'argument 1', 'argument 2', etc. instead (HeliosApi.sk, line 75: if arg is "off":')
[17:15:12 ERROR]: 'argument(s)' cannot be used if the command has multiple arguments. Use 'argument 1', 'argument 2', etc. instead (HeliosApi.sk, line 80: set {bossbar} to colored arg')
[17:15:12 ERROR]: Variables cannot be used here. (HeliosApi.sk, line 81: create bossbar titled {bossbar} and id "bossbar" for all players with progress 100 with colors red')
[17:15:12 ERROR]: Can't understand this condition/effect: remove bossbar "bossbar" (HeliosApi.sk, line 84: remove bossbar "bossbar"')
[17:15:12 INFO]: [Skript] Encountered 8 errors while reloading HeliosApi.sk!

 

wiktorm12

Wstawiam w odpowiedni znacznik

Notatka dodana przez wiktorm12

Odnośnik do komentarza
https://skript.pl/temat/42492-actionbar-i-bossbar/#findComment-266421
Udostępnij na innych stronach

  • 0
3 minuty temu, MaxTheFuck napisał:

@xAxee posiadam skrayfall i dalej błąd:

 

  Ukryj zawartość
[17:15:12 INFO]: [Skript] Reloading HeliosApi.sk...
[17:15:12 ERROR]: 'argument(s)' cannot be used if the command has multiple arguments. Use 'argument 1', 'argument 2', etc. instead (HeliosApi.sk, line 57: if arg is not "on" of "off":')
[17:15:12 ERROR]: 'argument(s)' cannot be used if the command has multiple arguments. Use 'argument 1', 'argument 2', etc. instead (HeliosApi.sk, line 60: if arg is "off":')
[17:15:12 ERROR]: 'argument(s)' cannot be used if the command has multiple arguments. Use 'argument 1', 'argument 2', etc. instead (HeliosApi.sk, line 65: set {actionbar} to colored arg')
[17:15:12 ERROR]: 'argument(s)' cannot be used if the command has multiple arguments. Use 'argument 1', 'argument 2', etc. instead (HeliosApi.sk, line 72: if arg is not "on" of "off":')
[17:15:12 ERROR]: 'argument(s)' cannot be used if the command has multiple arguments. Use 'argument 1', 'argument 2', etc. instead (HeliosApi.sk, line 75: if arg is "off":')
[17:15:12 ERROR]: 'argument(s)' cannot be used if the command has multiple arguments. Use 'argument 1', 'argument 2', etc. instead (HeliosApi.sk, line 80: set {bossbar} to colored arg')
[17:15:12 ERROR]: Variables cannot be used here. (HeliosApi.sk, line 81: create bossbar titled {bossbar} and id "bossbar" for all players with progress 100 with colors red')
[17:15:12 ERROR]: Can't understand this condition/effect: remove bossbar "bossbar" (HeliosApi.sk, line 84: remove bossbar "bossbar"')
[17:15:12 INFO]: [Skript] Encountered 8 errors while reloading HeliosApi.sk!

 

błędy z argumentami poprawiłem w drugiej wersji (tam wyżej). Zobacz teraz.

command /actionbar [<text>] [<text>]:
	permission: actionbar
	trigger:
		if arg 1 is not "on" of "off":
			send "&7Poprawne uzycie: &a/actionbar <on/off> <tekst>"
			stop
		if arg 1 is "off":
			clear {actionbar}
			set action bar of all players to ""
			send "&7Wylaczono"
			stop
		set {actionbar} to colored arg 2
		while {actionbar} is set:
			set action bar of all players to {actionbar}
			wait second
command /bossbar [<text>] [<text>]:
	permission: bossbar
	trigger:
		if arg 1 is not "on" of "off":
			send "&7Poprawne uzycie: &a/bossbar <on/off> <tekst>"
			stop
		if arg 1 is "off":
			clear {bossbar}
  			loop all players:
  				display bossbar with "" to loop-player for 2 second
			send "&7Wylaczono"
			stop
		set {bossbar} to colored arg 2
		while {bossbar} is set:
  			loop all players:
  				display bossbar with {bossbar} to loop-player for 2 second
			wait second

 

Odnośnik do komentarza
https://skript.pl/temat/42492-actionbar-i-bossbar/#findComment-266422
Udostępnij na innych stronach

  • 0

@xAxee

[spoiler]


 
[17:30:46 INFO]: [Skript] Reloading HeliosApi.sk...
[17:30:46 ERROR]: Can't compare a text with '"on" of "off"' (HeliosApi.sk, line 57: if arg 1 is not "on" of "off":')
[17:30:46 ERROR]: Can't compare a text with '"on" of "off"' (HeliosApi.sk, line 72: if arg 1 is not "on" of "off":')
[17:30:46 ERROR]: Can't understand this condition/effect: display bossbar with "" to loop-player for 2 second (HeliosApi.sk, line 78: display bossbar with "" to loop-player for 2 second')
[17:30:46 ERROR]: Can't understand this condition/effect: display bossbar with {bossbar} to loop-player for 2 second (HeliosApi.sk, line 84: display bossbar with {bossbar} to loop-player for 2 second')
[17:30:46 INFO]: [Skript] Encountered 4 errors while reloading HeliosApi.sk! [/spoiler]
Odnośnik do komentarza
https://skript.pl/temat/42492-actionbar-i-bossbar/#findComment-266424
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ę...