Skocz do zawartości
  • 0

Problem z wydarzeniem on command


Pytanie

Czesc. Mam problem ze skryptem a mianowicie wyskakuje mi jeden błąd.

'/register [<text>] [<text>]' is not a text (skrypt.sk, line 2.)

kod:

on first join:
on command /register [<text>] [<text>]:
	trigger:
		execute console command "/pex user %player% add essentials.item"
		execute console command "/pex user %player% add nocheatplus.*"
		if player has permission "essentials.item":
		execute player command "/demo2"
		execute player command "/excalibur"
		execute player command "/wlocznia"
		execute player command "/topor"
		execute console command "/pex user %player% remove essentials.item"
		execute console command "/pex user %player% remove nocheatplus.*"

Co mam poprawić? ;/

Odnośnik do komentarza
https://skript.pl/temat/11114-problem-z-wydarzeniem-on-command/
Udostępnij na innych stronach

13 odpowiedzi na to pytanie

Rekomendowane odpowiedzi

  • 0
on first join:
on command /register [<text>] [<text>]:
	trigger:
		if arg 1 is "daj":
			execute console command "/pex user %player% add essentials.item"
  			execute console command "/pex user %player% add nocheatplus.*"
		if arg 2 is "daj1":
			if player has permission "essentials.item":
				execute player command "/demo2"
				execute player command "/excalibur"
				execute player command "/wlocznia"
				execute player command "/topor"
				execute console command "/pex user %player% remove essentials.item"
				execute console command "/pex user %player% remove nocheatplus.*"

Raczej tak :P

 

liczę na "+" :P

Odnośnik do komentarza
https://skript.pl/temat/11114-problem-z-wydarzeniem-on-command/#findComment-80717
Udostępnij na innych stronach

  • 0
24 minut temu, HaX1oR napisał:

on first join:
on command /register [<text>] [<text>]:
	trigger:
		if arg 1 is "daj":
			execute console command "/pex user %player% add essentials.item"
  			execute console command "/pex user %player% add nocheatplus.*"
		if arg 2 is "daj1":
			if player has permission "essentials.item":
				execute player command "/demo2"
				execute player command "/excalibur"
				execute player command "/wlocznia"
				execute player command "/topor"
				execute console command "/pex user %player% remove essentials.item"
				execute console command "/pex user %player% remove nocheatplus.*"

Raczej tak :P

 

liczę na "+" :P

Nie. było przy dawaniu permisjii nocheatplus.* blad przy tabowaniu, poprawiłem i nadal to z register text..

 

Edytowane przez LuxCode
Przestarzaly Skript. Zainstalowalem nowego i zadzialalo dzieki :D
Odnośnik do komentarza
https://skript.pl/temat/11114-problem-z-wydarzeniem-on-command/#findComment-80718
Udostępnij na innych stronach

  • 0
1 godzinę temu, LuxCode napisał:

wooo, jak authme jej uzywa..

Powinieneś napisać, że masz ten plugin z tą komendą, a nie myślisz, że ktoś może się domyśli, a może nie...

on command:
	if command constain "/register ":
		execute console command "/pex user %player% add essentials.item"
		execute console command "/pex user %player% add nocheatplus.*"
		if player has permission "essentials.item":
		execute player command "/demo2"
		execute player command "/excalibur"
		execute player command "/wlocznia"
		execute player command "/topor"
		execute console command "/pex user %player% remove essentials.item"
		execute console command "/pex user %player% remove nocheatplus.*"

Może działa, może nie. Może będzie się bugować, może nie. Znaczy, na pewno się będzie bugować, bo nawet jeżeli wpiszesz samo /register to event się wykona. Dalej radź sobie sam, nie dość, że stara się pomóc, to jeszcze taka wredna odpowiedź, poziom @Norbiiego widzę.

//Nie ma to jak porównywać mnie do kogoś, nie znając mnie. Robisz to tylko dlatego, że mnie nie lubisz.. Ogarnij się. ~ Norbi

//Wystarczy, że od ponad roku przebywam z Tobą w jednym "pomieszczeniu". Nie zabronisz mi tego, @Norbi. ~ KOG

//Ps, nie widzę powodu, abyś mógł od tak edytować mój post, ponieważ odniosłem się do twojego nicku, dlatego nie rób tego więcej. ~KOG

Odnośnik do komentarza
https://skript.pl/temat/11114-problem-z-wydarzeniem-on-command/#findComment-80743
Udostępnij na innych stronach

  • 0
4 minuty temu, KingOfGri' Maw napisał:

on command: if command constain "/register ": execute console command "/pex user %player% add essentials.item" execute console command "/pex user %player% add nocheatplus.*" if player has permission "essentials.item": execute player command "/demo2" execute player command "/excalibur" execute player command "/wlocznia" execute player command "/topor" execute console command "/pex user %player% remove essentials.item" execute console command "/pex user %player% remove nocheatplus.*"

can't understand this condition: 'command constain "/register " (skrypt.sk, line 2: if command constain "/register ":')

Odnośnik do komentarza
https://skript.pl/temat/11114-problem-z-wydarzeniem-on-command/#findComment-80745
Udostępnij na innych stronach

  • 0

1. Nie możesz używać 2 eventów w jednym, więc on first join i on command nie będą ze sobą działały
2. on command jest używane, gdy chcemy "operować" komendą (czyli np dodać coś, gdy ją wykonujemy)
3. jeżeli w tym skrypcie chcesz wykonać coś na zasadzie, że po zarejestrowaniu się, wykona dane komendy, to musiałbyś użyć AuthMe SkAddon.
4. jeżeli natomiast chcesz stworzyć taką komendę, to zamiast on command użyj command, zdefiniujesz wtedy nową komendę.

Tu masz kod, w którym po wykonaniu komendy /register wykona się to, co jest wpisane w kodzie:

Spoiler

on command /register:
	execute console command "/pex user %player% add essentials.item"
	execute console command "/pex user %player% add nocheatplus.*"
	if player has permission "essentials.item":
		execute player command "/demo2"
		execute player command "/excalibur"
		execute player command "/wlocznia"
		execute player command "/topor"
		execute console command "/pex user %player% remove essentials.item"
		execute console command "/pex user %player% remove nocheatplus.*"

Tu masz kod, w którym tworzysz komendę /register:

Spoiler

command /register [<text>] [<text>]:
	trigger:
		execute console command "/pex user %player% add essentials.item"
		execute console command "/pex user %player% add nocheatplus.*"
		if player has permission "essentials.item":
			execute player command "/demo2"
			execute player command "/excalibur"
			execute player command "/wlocznia"
			execute player command "/topor"
			execute console command "/pex user %player% remove essentials.item"
			execute console command "/pex user %player% remove nocheatplus.*"
Odnośnik do komentarza
https://skript.pl/temat/11114-problem-z-wydarzeniem-on-command/#findComment-80758
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ę...