Skocz do zawartości
  • 0

problem z resetowaniem zmiennych


adek1990

Pytanie

Witam, mam problem ponieważ mam taki kod:

every 5 seconds:	{SW.number} is 1:		{SW.wygrana} is false:			{SW.mode} is 2:				loop players in world "skywars":					set {SW.wygrana} to true					broadcast "&6+&7-----------------------------------&6+" to "skywars"					broadcast "          &aWygrales(as) arene!" to "skywars"					broadcast "&6+&7-----------------------------------&6+" to "skywars"					broadcast "           &6Zdobyto lacznie 20 Monet!" to "skywars"					broadcast "&6+&7-----------------------------------&6+" to "skywars"					play level_up at loop-player with pitch 1					wait 5 seconds					teleport loop-player to {tp.spawn}					wait 5 ticks					loop players:						add 20 to {money.gracz.%loop-player-2%}						set {SW.gracz.%loop-player-2%} to false						set {SW.number} to 0						set {SW.mode} to 0						set {SW.start} to false						set {SW.wygrana} to false						execute console command "wr rebuild skywars"

ale gdy już ktoś wygra arenę to wszystko jest git ale gdy dołączam 2 raz do areny to już nie dodaje do tych zmiennych graczy i ani nie pisze ze gracz dołączył do areny ani nic czekałem 3min aby opadła bariera ale nic się nie stało

Odnośnik do komentarza
Udostępnij na innych stronach

2 odpowiedzi na to pytanie

Rekomendowane odpowiedzi

  • 0

Opadanie:

every 5 seconds:	if {SW.number} is more than 1:		if {SW.mode} is 0:			if {SW.start} is false:				loop players in world "skywars":					set {SW.start} to true					broadcast "&7{@tag} &eArena wystartuje za &c10 &esekund!" to "skywars"					wait 1 seconds					broadcast "&7{@tag} &eArena wystartuje za &c9 &esekund!" to "skywars"					wait 1 seconds					broadcast "&7{@tag} &eArena wystartuje za &c8 &esekund!" to "skywars"					wait 1 seconds					broadcast "&7{@tag} &eArena wystartuje za &c7 &esekund!" to "skywars"					wait 1 seconds					broadcast "&7{@tag} &eArena wystartuje za &c6 &esekund!" to "skywars"					wait 1 seconds					broadcast "&7{@tag} &eArena wystartuje za &c5 &esekund!" to "skywars"					wait 1 seconds					broadcast "&7{@tag} &eArena wystartuje za &c4 &esekund!" to "skywars"					wait 1 seconds					broadcast "&7{@tag} &eArena wystartuje za &c3 &esekund!" to "skywars"					wait 1 seconds					broadcast "&7{@tag} &eArena wystartuje za &c2 &esekund!" to "skywars"					wait 1 seconds					broadcast "&7{@tag} &eArena wystartuje za &c1 &esekund!" to "skywars"					wait 1 seconds					if {SW.number} is more than 1:						broadcast "&7{@tag} &bPowodzenia!" to "skywars"						execute loop-player command "/rg select 1"						wait 1 tick						execute loop-player command "//set 0"						wait 1 tick						execute loop-player command "/rg select 2"						wait 1 tick						execute loop-player command "//set 0"						wait 1 tick						execute loop-player command "/rg select 3"						wait 1 tick						execute loop-player command "//set 0"						wait 1 tick						execute loop-player command "/rg select 4"						wait 1 tick						execute loop-player command "//set 0"						wait 1 tick						execute loop-player command "/rg select 5"						wait 1 tick						execute loop-player command "//set 0"						wait 1 tick						execute loop-player command "/rg select 6"						wait 1 tick						execute loop-player command "//set 0"						wait 1 tick						execute loop-player command "/rg select 7"						wait 1 tick						execute loop-player command "//set 0"						wait 1 tick						execute loop-player command "/rg select 8"						wait 1 tick						execute loop-player command "//set 0"						set {SW.mode} to 2						stop					else:						broadcast "&7{@tag} &cNie odpowiednia ilosc graczy do startu gry!" to "skywars"						set {SW.start} to false						stop

dolaczanie:

		if arg 1 is "dolacz":			if player doesn't have permission "rush.gracz":				send "{@tag} &cBrak uprawnien!"				stop			if {SW.gracz.%player%} is true:				send "{@tag} &cJuz dolaczyles do areny"				stop			if {SW.number} is 2:				send "{@tag} &cArena jest pelna"				stop			if {SW.mode} is 2:				send "{@tag} &cArena jest w trakcie"				stop			{tp.spawn} is set:				set {SW.gracz.%player%} to true				set {SW.gracz} to true				add 1 to {SW.number}				clear inventory of player				heal the player				if {SW.number} is 1:					teleport player to {tp.1}				if {SW.number} is 2:					teleport player to {tp.2}				if {SW.number} is 3:					teleport player to {tp.3}				if {SW.number} is 4:					teleport player to {tp.4}				if {SW.number} is 5:					teleport player to {tp.5}				if {SW.number} is 6:					teleport player to {tp.6}				if {SW.number} is 7:					teleport player to {tp.7}				if {SW.number} is 8:					teleport player to {tp.8}				if {golden.apple.%player%} is true:					add 1 Enchanted Golden Apple to player's inventory				if {iron.helmet.%player%} is true:					add 1 iron helmet to player's inventory				if {klasa.lucznik1.%player%} is true:					add 1 bow named "&aLuk poziom 1" to the player					add 10 arrow named "&aszczaly" to the player					add 1 Leather helmet named "&aCzapka poziom 1" to the player					add 1 Leather boots named "&aButy poziom 1" to the player				if {klasa.lucznik2.%player%} is true:					add 1 bow named "&aLuk poziom 2" to the player					add 10 arrow named "&aszczaly" to the player					add 1 Leather helmet of protection 1 named "&aCzapka poziom 2" to the player					add 1 Leather boots of protection 1 named "&aButy poziom 2" to the player				if {klasa.lucznik3.%player%} is true:					add 1 bow of power 1 named "&aLuk poziom 3" to the player					add 15 arrow named "&aszczaly" to the player					add 1 Leather helmet of protection 2 named "&aCzapka poziom 3" to the player					add 1 Leather boots of protection 2 named "&aButy poziom 3" to the player				if {klasa.lucznik4.%player%} is true:					add 1 bow of infinity 1 named "&aLuk poziom 4" to the player					add 1 arrow named "&aszczaly" to the player					add 1 Leather helmet of protection 3 named "&aCzapka poziom 4" to the player					add 1 Leather boots of protection 3 named "&aButy poziom 4" to the player				set player's gamemode to survival				broadcast "{@tag}: &7%player% &edolaczyl! (&c%{SW.number}%&e/&c8&e)" to "skywars"				stop			else:				send "{@tag} &cSerwer nie ma stworzonego spawnu"				stop
Odnośnik do komentarza
Udostępnij na innych stronach

Nieaktywny
Ten temat został zamknięty. Brak możliwości dodania odpowiedzi.
  • Ostatnio przeglądający   0 użytkowników

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