Advertisement
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 "off":
- if player has permissions "mchat.off":
- if arg 2 is not empty:
- set {chat.on} to false
- broadcast "&cChat zostal wylaczony. Powod:&6 %arg 2 %"
- else:
- send "&cWpisz powod."
- else:
- send "&cNie masz permisjii!"
- if arg 1 is "on":
- if player has permissions "mchat.on":
- set {chat.on} to true
- broadcast "&bWlaczono chat!"
- 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 "&cWylaczono chat na czas %arg 2% [Sekund]"
- else:
- send "&cWpisz czas na ktory ma byc wylaczony czat"
- else:
- send "&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
- make player execute command "pex user %arg 3% add mchat.allow"
- broadcast "%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!"
- 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 "&bWlaczono 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!"
- make console execute command "pex user %{chat.player}% remove mchat.allow"
- 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 player has permission "mchat.allow":
- stop
- else:
- if {chat.on} is false:
- cancel event
- send "<light red>Pisanie wylaczone.!"
- stop
- if {chat.on} is true:
- stop
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement