Skocz do zawartości
  • 0

tłumaczenie komendy #2


Pytanie

Witam mam kolejny problem do rozwiązania. Wgrałem plugin z działkami na server. Przetłumaczyłem komendy i działały. Wyjątkiem były komendy które potrzebują jeszcze jednego argumentu pianego. Zobaczyłem poradnik na YouTubie ale był on w 100% dobry. Dlatego pytam tutaj. Mój skrypt wygląda tak: 

command /dzialka [<text>] [<text>]:
    trigger:
        if arg 1 is "dom":
            execute player command "ps home"
        if arg 1 is "polacz":
            execute player command "ps merge"
        if arg 1 is "sell":
            execute player command "ps sell"
        if arg 2 is set:
            execute player command "ps sell %argument 2%"
        if arg 1 is "dodaj":
            execute player command "ps add"
        if arg 1 is "wyrzuc":
            execute player command "ps remove"
        if arg 1 is "wlasciciel":
            execute player command "ps addowner"
        if arg 1 is "usunwlasciciel":
            execute player command "ps removeowner"
        if arg 1 is "wynajem":
            execute player command "ps rent"
        if arg 1 is "kup":
            execute player command "ps buy"
        if arg 1 is "ukryj":
            execute player command "ps hide"
        if arg 1 is "pokaz":
            execute player command "ps unhide"
        if arg 1 is "ustawdom":
            execute player command "ps sethome"
        if arg 1 is "granica":
            execute player command "ps view"
        if arg 1 is "usun":
            execute player command "ps unclaim"
        if arg 1 is "lista":
            execute player command "ps list"
        if arg 1 is "nazwa":
            execute player command "ps name"
        if arg 2 is set:
            execute player command "ps name %argument 2%"

 

Jak wpisuję w minecraftcie /dzialka sprzedaj <cena> to działają mi dwie komendy. Jeżeli wpiszę /dzialka <jakieś losowe litery> <cena> to też działa. :( Skrypt miał działać tak:

/dzialka sprzedaj <cena> - /ps sell <cena>

/dzialka nazwa <nazwa> - /ps name <nazwa>

Byłbym bardzo wdzięczny, gdyby mi ktoś pomógł, bo sam sobie nie poradzę.

Odnośnik do komentarza
https://skript.pl/temat/54587-t%C5%82umaczenie-komendy-2/
Udostępnij na innych stronach

2 odpowiedzi na to pytanie

Rekomendowane odpowiedzi

  • 0
command /dzialka [<text>] [<text>]:
	trigger:
		if arg 1 is "dom":
			execute player command "ps home"
		else if arg 1 is "polacz":
			execute player command "ps merge"
		else if arg 1 is "sprzedaj":
			if arg 2 is set:
				execute player command "ps sell %argument 2%"
			else:
				execute player command "ps sell"
		else if arg 1 is "dodaj":
			execute player command "ps add"
		else if arg 1 is "wyrzuc":
			execute player command "ps remove"
		else if arg 1 is "wlasciciel":
			execute player command "ps addowner"
		else if arg 1 is "usunwlasciciel":
			execute player command "ps removeowner"
		else if arg 1 is "wynajem":
			execute player command "ps rent"
		else if arg 1 is "kup":
			execute player command "ps buy"
		else if arg 1 is "ukryj":
			execute player command "ps hide"
		else if arg 1 is "pokaz":
			execute player command "ps unhide"
		else if arg 1 is "ustawdom":
			execute player command "ps sethome"
		else if arg 1 is "granica":
			execute player command "ps view"
		else if arg 1 is "usun":
			execute player command "ps unclaim"
		else if arg 1 is "lista":
			execute player command "ps list"
		else if arg 1 is "nazwa":
			if arg 2 is set:
				execute player command "ps name %argument 2%"
			else:
				execute player command "ps name"
		else:
			execute player command "ps help"

 

Odnośnik do komentarza
https://skript.pl/temat/54587-t%C5%82umaczenie-komendy-2/#findComment-330929
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ę...