Witam, ostatnio starałem się nauczyć pisać skrypty, lecz przy mojej pierwszej takiej samodzielnej pracy, wyświetliły się problemy.
Jeżeli ktoś mógłby nałożyć korektę na kod, i przy okazji wyjaśnić co zrobiłem źle, to byłbym bardzo wdzięczny.
command /chat [<text>]:
trigger:
if arg 1 is set:
if player has permission "command.chat" or "command.chat.use":
if arg 1 is "clear":
loop 120 times:
broadcast " "
broadcast "&aChat zostal wyczyszczony przez &f%player%"
stop
else:
send "&aPoprawne uzycie: &f/chat clear/on/off"
if arg 1 is set:
if player has permission "command.chat" or "command.chat.use":
if arg 1 is {on}:
if {off} is true:
set {off} to false
broadcast "&aChat zostal wlaczony przez &f%player%"
stop
else:
send "&cChat nie jest wylaczony!"
if arg 1 is set:
if player has permission "command.chat" or "command.chat.use":
if arg 1 is {off}:
broadcast "&cChat zostal wylaczony przez &f%player%"
stop
on chat:
if player doesn't have permission "chat.off.use" or "chat.off":
cancel event
send "&cChat jest obecnie wylaczony."
stop
EDIT: Przepraszam najmocniej, zapomniałem dodać komunikat z /sk reload.
[11:03:34] [main/INFO]: [CHAT] [Skript] Reloading chatskrypt.sk...
[11:03:34] [main/INFO]: [CHAT] 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. (chatskrypt.sk, line 23: if arg 1 is {off}:')
[11:03:34] [main/INFO]: [CHAT] [Skript] Successfully reloaded chatskrypt.sk.
Pytanie
f4varis 1
Witam, ostatnio starałem się nauczyć pisać skrypty, lecz przy mojej pierwszej takiej samodzielnej pracy, wyświetliły się problemy.
Jeżeli ktoś mógłby nałożyć korektę na kod, i przy okazji wyjaśnić co zrobiłem źle, to byłbym bardzo wdzięczny.
EDIT: Przepraszam najmocniej, zapomniałem dodać komunikat z /sk reload.
Edytowane przez f4varis[11:03:34] [main/INFO]: [CHAT] [Skript] Reloading chatskrypt.sk...
[11:03:34] [main/INFO]: [CHAT] 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. (chatskrypt.sk, line 23: if arg 1 is {off}:')
[11:03:34] [main/INFO]: [CHAT] [Skript] Successfully reloaded chatskrypt.sk.
Odnośnik do komentarza
https://skript.pl/temat/40901-skrypt-na-chat/Udostępnij na innych stronach
5 odpowiedzi na to pytanie
Rekomendowane odpowiedzi