Advertisement
NOF

Uhh dziala

NOF
May 26th, 2013
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 4.40 KB | None | 0 0
  1. #-----------------------#
  2. # My version | Dzikoysk #
  3. #-----------------------#
  4.  
  5. #---------#
  6. # Command #
  7. #---------#            
  8.  
  9. command /chat [<text>] [<text>] [<text>]:
  10.         trigger:
  11.                 if arg 1 is "off":
  12.                         if player has permissions "mchat.off":
  13.                                 set {chat.on} to false
  14.                                 broadcast "&cWylaczono chat!"
  15.                 if arg 1 is "on":
  16.                         if player has permissions "mchat.on":
  17.                                 set {chat.on} to true
  18.                                 broadcast "&bWlaczono chat!"
  19.                 if arg 1 is "temp":
  20.                         if player has permissions "mchat.temp":
  21.                                 if arg 2 is not empty:
  22.                                         make player execute command "chattime %arg 2%"        
  23.                                         set {chat.temp.allow} to true
  24.                                         wait 1 tick
  25.                                         set {chat.on} to false
  26.                                         wait 1 tick
  27.                                         broadcast "&cWylaczono chat na czas %arg 2% [Sekund]"
  28.                 if arg 1 is "mow":
  29.                         if player has permissions "mchat.mow":
  30.                                 if arg 2 is not empty:
  31.                                         if arg 3 is not empty:
  32.                                                 set {chat.mow} to true
  33.                                                 make player execute command "pex user %arg 3% add mchat.allow"
  34.                                                 broadcast "%player% &adal prawo glosu &6%arg 3%&a na &6%arg 2% sekund"
  35.                                                 set {chat.player} to arg 3
  36.                                                 make player execute command "chattime2 %arg 2%"
  37.  
  38.  
  39. command /chattime <integer>:
  40.         trigger:
  41.                 if player has permissions "chat.temp":
  42.                         set {time} to arg 1
  43.                         set {limit} to 10000000000
  44.                         set {counter} to 0
  45.                         set {limit2} to 0
  46.  
  47. command /chattime2 <integer>:
  48.         trigger:
  49.                 if player has permissions "chat.temp":
  50.                         set {time0} to arg 1
  51.                         set {limit0} to 10000000000
  52.                         set {counter0} to 0
  53.                         set {limit20} to 0
  54.  
  55. #--------#
  56. # Events #
  57. #--------#
  58.  
  59. Every 1 seconds:
  60.         if {chat.temp.allow} is true:
  61.                 if {time} is not set:
  62.                         stop
  63.                 if {limit} is not set:
  64.                         stop
  65.                 add 1 to {counter}
  66.                 if {counter} is {time}:
  67.                         set {chat.on} to true
  68.                         broadcast "&bWlaczono czat!"
  69.                         set {chat.temp.allow} to false
  70.                         set {counter} to 0
  71.                         add 1 to {limit2}
  72.                 if {limit} is {limit2}:
  73.                         delete {time}
  74.                         delete {counter}
  75.                         delete {limit}
  76.                         delete {limit2}
  77.         if {chat.mow} is true:
  78.                 if {time0} is not set:
  79.                         stop
  80.                 if {limit0} is not set:
  81.                         stop
  82.                 add 1 to {counter0}
  83.                 if {counter0} is {time0}:
  84.                         set {chat.mow} to false
  85.                         send "Skonczyl Ci sie czas" to {chat.player}
  86.                         broadcast "&cCzas &6%{chat.player}%&c skonczyl sie!"
  87.                         make console execute command "pex user %{chat.player}% remove mchat.allow"
  88.                         clear {chat.player}
  89.                         set {counter0} to 0
  90.                         add 1 to {limit20}
  91.                 if {limit0} is {limit20}:
  92.                         delete {time0}
  93.                         delete {counter0}
  94.                         delete {limit0}
  95.                         delete {limit20}
  96.  
  97. on chat:
  98.         if player has permission "mchat.allow":
  99.                 stop
  100.         else:
  101.                 if {chat.on} is false:
  102.                         cancel event
  103.                         send "<light red>Pisanie wylaczone.!"
  104.                         stop
  105.                 if {chat.on} is true:
  106.                         stop
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement