Skocz do zawartości
  • 0

Problem z 2 argumentami


Pytanie

command /gamemode <text> <player>:
		description: Changes the player to a specific game mode
		usage: /gm <survival:creative:adventure> [player]
		permission: essentials.gamemode, essentials.*
		permission message: &4You don't have acces to that command.
		executable by: players
		aliases: /gm
		trigger:
				if arg 2 is "%player%":
						if arg 1 is "0":
								set the player's gamemode to survival
								send "&6Set game mode &rsurvival &6for &4%player%&6."
								stop
						if arg 1 is "1":
								set the player's gamemode to creative
								send "&6Set game mode &rcreative &6for &4%player%&6."
								stop
						if arg 1 is "2":
								set the player's gamemode to adventure
								send "&6Set game mode &radventure &6for &4%player%&6."
								stop
						if arg 1 is "survival":
								set the player's gamemode to survival
								send "&6Set game mode &rsurvival &6for &4%player%&6."
								stop
						if arg 1 is "creative":
								set the player's gamemode to creative
								send "&6Set game mode &rcreative &6for &4%player%&6."
								stop
						if arg 1 is "adventure":
								set the player's gamemode to adventure
								send "&6Set game mode &radventure &6for &4%player%&6."
								stop
				else:
						if arg 1 is "0":
								set the player's gamemode to survival
								send "&6Set game mode &rsurvival &6for &4%player%&6."
								stop
						if arg 1 is "1":
								set the player's gamemode to creative
								send "&6Set game mode &rcreative &6for &4%player%&6."
								stop
						if arg 1 is "2":
								set the player's gamemode to adventure
								send "&6Set game mode &radventure &6for &4%player%&6."
								stop
						if arg 1 is "survival":
								set the player's gamemode to survival
								send "&6Set game mode &rsurvival &6for &4%player%&6."
								stop
						if arg 1 is "creative":
								set the player's gamemode to creative
								send "&6Set game mode &rcreative &6for &4%player%&6."
								stop
						if arg 1 is "adventure":
								set the player's gamemode to adventure
								send "&6Set game mode &radventure &6for &4%player%&6."
								stop

Problem jest taki że ja chce zrobić aby po wpisaniu /gm 1 nadano osobie która to wpisała gm'a a jak wpisze /gm 1 Nick to nadaje tej osobie co podalem nick.

Edytowane przez userMacieG
Odnośnik do komentarza
https://skript.pl/temat/9599-problem-z-2-argumentami/
Udostępnij na innych stronach

9 odpowiedzi na to pytanie

Rekomendowane odpowiedzi

  • 0
Cytuj

Problem jest taki że ja chce zrobić aby po wpisaniu /gm 1 nadano osobie która to wpisała gm'a a jak wpisze /gm 1 Nick to nadaje tej osobie co podalem nick.

Cytuj

Mi chodzi oto że jak nie wpisze argumentu czyli nicku gracza to zaraz wykonać komendę /gm 1 wyskakuje mi informacja jak używać tej komendy.

Chyba sam nie wiesz co Ci jest potrzebne.

Odnośnik do komentarza
https://skript.pl/temat/9599-problem-z-2-argumentami/#findComment-72828
Udostępnij na innych stronach

  • 0

Widze że slepy. 

Problem jest taki że ja chce zrobić aby po wpisaniu /gm 1 nadano osobie która to wpisała gm'a a jak wpisze /gm 1 Nick to nadaje tej osobie co podalem nick.

Pisze /gm 1 wyskakuje komunikat jak używać tej komendy zaraz mi nadać gm'a.

Pisze /gm 1 Nick (np: userMacieG) nadaje tej osobie (w tym przykładzie mi) gm'a.

Odnośnik do komentarza
https://skript.pl/temat/9599-problem-z-2-argumentami/#findComment-72829
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ę...