Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #-----------------------#
- # My version | Dzikoysk #
- #-----------------------#
- #---------#
- # Command #
- #---------#
- command /chat [<text>] [<text>] [<text>]:
- trigger:
- if arg 1 is not empty:
- if player has permissions "mchat.pomoc":
- else:
- message "----- &3CHAT POMOC &f-----"
- message " &9/chat &c- ogolna pomoc"
- message " &9/chat off &c- wylacz czat"
- message " &9/chat off <powod> &c- wylacz czat z powodem"
- message " &9/chat on &c- wlacza chat"
- message " &9/chat temp <czas w sekundach> &c- wylacza chat czasowo"
- message " &9/chat mow <czas w sekundach> <nick> &c- Daje prawo pisania nawet gdy chat jest wylaczony"
- message " &9/chat dodaj admina <nick>"
- if arg 1 is "off":
- if player has permissions "mchat.off":
- if arg 2 is not empty:
- broadcast ""
- broadcast " &4HC-ZIELONY "
- broadcast " &7Chat zostal &awylaczony "
- broadcast " 7&Powod:&c%arg 2% "
- broadcast ""
- else:
- broadcast ""
- broadcast " &4HC-ZIELONY "
- broadcast " &7Chat zostal &awylaczony "
- broadcast ""
- else:
- send "Blad: &cNie masz permisjii!"
- if arg 1 is "on":
- if player has permissions "mchat.on":
- set {chat.on} to true
- broadcast ""
- broadcast " &4HC-ZIELONY "
- broadcast " &7Chat zostal &awlaczony "
- broadcast ""
- else:
- send "&cNie masz permisjii!"
- if arg 1 is "temp":
- if player has permissions "mchat.temp":
- if arg 2 is not empty:
- make player execute command "chattime %arg 2 %"
- set {chat.temp.allow} to true
- wait 1 tick
- set {chat.on} to false
- wait 1 tick
- broadcast ""
- broadcast " &4HC-ZIELONY "
- broadcast " &7Chat zostal &awylaczony "
- broadcast " 7&Czas:&c%arg 2% sekund "
- broadcast ""
- else:
- send "&4Blad: &cWpisz czas na ktory ma byc wylaczony czat"
- else:
- send "&4Blad: &cNie masz permisjii!"
- if arg 1 is "mow":
- if player has permissions "mchat.mow":
- if arg 2 is not empty:
- if arg 3 is not empty:
- set {chat.mow} to true
- set {chat.mow.%arg 3%} to true
- broadcast "%name of player% &adal prawo glosu &6%arg 3%&a na &6%arg 2% sekund"
- set {chat.player} to arg 3
- make player execute command "chattime2 %arg 2%"
- else:
- send "&cWpisz nick gracza"
- else:
- send "&cWpisz czas na ktory gracz ma miec mozliwosc pisania"
- else:
- send "&cNie masz permisjii!"
- if arg 1 is "dodaj":
- if arg 2 is "admina":
- if arg 3 is not empty:
- set {chat.admin.%arg 3%} to true
- else:
- send "&4Blad: &cPodaj nazwe admina"
- command /chattime <integer>:
- trigger:
- if player has permissions "mchat.temp":
- set {time} to arg 1
- set {limit} to 10000000000
- set {counter} to 0
- set {limit2} to 0
- command /chattime2 <integer>:
- trigger:
- if player has permissions "mchat.temp":
- set {time0} to arg 1
- set {limit0} to 10000000000
- set {counter0} to 0
- set {limit20} to 0
- #--------#
- # Events #
- #--------#
- Every 1 seconds:
- if {chat.temp.allow} is true:
- if {time} is not set:
- stop
- if {limit} is not set:
- stop
- add 1 to {counter}
- if {counter} is {time}:
- set {chat.on} to true
- broadcast "&aWlaczono czat!"
- set {chat.temp.allow} to false
- set {counter} to 0
- add 1 to {limit2}
- if {limit} is {limit2}:
- delete {time}
- delete {counter}
- delete {limit}
- delete {limit2}
- if {chat.mow} is true:
- if {time0} is not set:
- stop
- if {limit0} is not set:
- stop
- add 1 to {counter0}
- if {counter0} is {time0}:
- set {chat.mow} to false
- send "Skonczyl Ci sie czas" to {chat.player}
- broadcast "&cCzas &6%{chat.player}%&c skonczyl sie!"
- set {chat.mow.%{chat.player}%} to true
- clear {chat.player}
- set {counter0} to 0
- add 1 to {limit20}
- if {limit0} is {limit20}:
- delete {time0}
- delete {counter0}
- delete {limit0}
- delete {limit20}
- on chat:
- if {chat.on} is false:
- if {chat.mow.%player%} is false:
- send "&cChat jest wylaczony"
- cancel event
- stop
- if {chat.admin.%player%} is true:
- stop
- if {chat.on} is true:
- stop
Advertisement
Add Comment
Please, Sign In to add comment