Organized

Chat Control [SK]

Jun 29th, 2017
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. command /chat <text>:
  2. permission: skript.op
  3. usage: /c <clear/mute>
  4. aliases: /c
  5. trigger:
  6. if arg 1 is "clear" or "c":
  7. loop all players:
  8. {si::on::%loop-player%} is not set
  9. loop 99 times:
  10. send "" to loop-player
  11. broadcast "{@PP} The chat was cleared."
  12. else if arg 1 is "mute" or "m":
  13. if {UHC::Chat::Muted} is true:
  14. delete {UHC::Chat::Muted}
  15. broadcast "{@PP} The chat was been &aenabled{@N}."
  16. else:
  17. set {UHC::Chat::Muted} to true
  18. broadcast "{@PP} The chat was been &cdisabled{@N}."
  19.  
  20. on chat:
  21. {UHC::Chat::Muted} is true
  22. cancel event
  23.  
  24. on tab completer for "/chat":
  25. player has permission "skript.op"
  26. loop split "clear mute" at " ":
  27. add "%loop-value%" to completions
Advertisement
Add Comment
Please, Sign In to add comment