Skocz do zawartości
  • 0

Czat Administratorski i moderatorski


Norberto

Pytanie

9 odpowiedzi na to pytanie

Rekomendowane odpowiedzi

  • 0
3 minuty temu, Norberto napisał:

Skrypt działa i to bardzo dobrze. Tylko chciałbym aby były 2 komendy na osobne czaty. 

Najprościej to zrobić tak:

command /adminchat [<text>]:
	trigger:
  		if player has permission "chat.admin":
  			loop all players:
  				if loop-player has permission "chat.admin-odbierz":
  					send "&a[ADMIN] &7| &2%player%&7: %coloured arg 1%"
  		else:
			send "&cNie masz uprawnien."
  
command /modchat [<text>]:
	trigger:
  		if player has permission "chat.mod":
  			loop all players:
  				if loop-player has permission "chat.mod-odbierz":
  					send "&a[MOD] &7| &2%player%&7: %coloured arg 1%"
  		else:
			send "&cNie masz uprawnien."

Wysyłanie wiadomości:

chat.admin, chat.mod

Odbieranie:

chat.admin-odbierz, chat.mod-odbierz.

Edytowane przez KrejzolekPRO
Odnośnik do komentarza
Udostępnij na innych stronach

  • 0

Z komendy może korzystać moderator jak i administrator , ale to działa tak.
 

Komende wykonuję;                                                                                                                                                                                                                       

  • Moderator ( lub osoba z perm-mod ):
    - Włącza się chat AC MOD dla Moderatorów
  • Administrator ( lub osoba z perm-admin ):
    - Włącza się chat AC dla Administratorów


Więc nie widzę sensu oddzielania komendy ;P

Odnośnik do komentarza
Udostępnij na innych stronach

  • 0
20 godzin temu, KrejzolekPRO napisał:

Najprościej to zrobić tak:


command /adminchat [<text>]:
	trigger:
  		if player has permission "chat.admin":
  			loop all players:
  				if loop-player has permission "chat.admin-odbierz":
  					send "&a[ADMIN] &7| &2%player%&7: %coloured arg 1%"
  		else:
			send "&cNie masz uprawnien."
  
command /modchat [<text>]:
	trigger:
  		if player has permission "chat.mod":
  			loop all players:
  				if loop-player has permission "chat.mod-odbierz":
  					send "&a[MOD] &7| &2%player%&7: %coloured arg 1%"
  		else:
			send "&cNie masz uprawnien."

 

[15:34:16 ERROR]: indentation error: expected 2 tabs, but found '__->->' [-> = tab, _ = space, ? = other whitespace] (czat.sk, line 3: if player has permission "chat.admin":')
[15:34:16 ERROR]: indentation error: expected 2 tabs, but found '__->->->' [-> = tab, _ = space, ? = other whitespace] (czat.sk, line 4: loop all players:')
[15:34:16 ERROR]: indentation error: expected 2 tabs, but found '__->->->->' [-> = tab, _ = space, ? = other whitespace] (czat.sk, line 5: if loop-player has permission "chat.admin-odbierz":')
[15:34:16 ERROR]: indentation error: expected 2 tabs, but found '__->->->->->' [-> = tab, _ = space, ? = other whitespace] (czat.sk, line 6: send "&a[ADMIN] &7| &2%player%&7: %coloured arg 1%"')
[15:34:16 ERROR]: indentation error: expected 2 tabs, but found '__->->' [-> = tab, _ = space, ? = other whitespace] (czat.sk, line 7: else:')
[15:34:16 ERROR]: indentation error: expected 2 tabs, but found 3 tabs (czat.sk, line 8: send "&cNie masz uprawnien."')
[15:34:16 WARN]: Empty configuration section! You might want to indent one or more of the subsequent lines to make them belong to this section or remove the colon at the end of the line if you don't want this line to start a section. (czat.sk, line 2: trigger:')
[15:34:16 ERROR]: indentation error: expected 2 tabs, but found '__->->' [-> = tab, _ = space, ? = other whitespace] (czat.sk, line 12: if player has permission "chat.mod":')
[15:34:16 ERROR]: indentation error: expected 2 tabs, but found '__->->->' [-> = tab, _ = space, ? = other whitespace] (czat.sk, line 13: loop all players:')
[15:34:16 ERROR]: indentation error: expected 2 tabs, but found '__->->->->' [-> = tab, _ = space, ? = other whitespace] (czat.sk, line 14: if loop-player has permission "chat.mod-odbierz":')
[15:34:16 ERROR]: indentation error: expected 2 tabs, but found '__->->->->->' [-> = tab, _ = space, ? = other whitespace] (czat.sk, line 15: send "&a[MOD] &7| &2%player%&7: %coloured arg 1%"')
[15:34:16 ERROR]: indentation error: expected 2 tabs, but found '__->->' [-> = tab, _ = space, ? = other whitespace] (czat.sk, line 16: else:')
[15:34:16 ERROR]: indentation error: expected 2 tabs, but found 3 tabs (czat.sk, line 17: send "&cNie masz uprawnien."')

 

Troche errorów, wiem że mogę sobie sam to wytabować. Ale czas mi zbytnio nie pozwala.

 

Może ktoś mi to w pastebin wysłać bo nie chce mieć błędów z tabami. 

//Łączę ~Myszak

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ę...