xMateuszP0L

Chat OFF ON i permissje

Oct 3rd, 2014
251
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.63 KB | None | 0 0
  1. # Skrpyt by xMateuszP0L v0.1
  2. # Permisje dla admina "chat.*"
  3. # Dasz lajka na skript.pl ?
  4. # TEMAT http://skript.pl/index.php/topic/3292-wy%C5%82%C4%85czanie-chatu/
  5. variables:
  6. {chat} = true
  7.  
  8. command /chat [<text>] [<text>]:
  9. trigger:
  10. if arg 1 is not set:
  11. send "&6&lP0L &7- CHAT"
  12. send "&6/chat on &7- wlacza chat"
  13. send "&6/chat off &7- wylacza chat"
  14. if arg 1 is not "on" or "off":
  15. send "&6&lP0L &7- CHAT"
  16. send "&6/chat on &7- wlacza chat"
  17. send "&6/chat off &7- wylacza chat"
  18. if arg 1 is "on":
  19. if {chat} is false:
  20. if player has permission "chat.on" or "chat.*":
  21. set {chat} to true
  22. broadcast "&7Chat zostal wlaczony."
  23. stop
  24. else:
  25. send "&cNie masz uprawnienia."
  26. stop
  27. else:
  28. send "&7Chat jest juz wlaczony"
  29. stop
  30. if arg 1 is "off":
  31. if arg 2 is set:
  32. if {chat} is true:
  33. if player has permission "chat.*":
  34. set {chat} to false
  35. loop 100 times:
  36. broadcast " "
  37. broadcast "&4Chat zostal wylaczony. Powod &e%colored arg 2%&4"
  38. stop
  39. else:
  40. send "&cNie masz uprawnienia"
  41. stop
  42. else:
  43. send "&cChat jest juz wylaczony"
  44. stop
  45. else:
  46. if {chat} is true:
  47. if player has permission "chat.*":
  48. set {chat} to false
  49. loop 100 times:
  50. broadcast " "
  51. broadcast "&4Chat zostal wylaczony."
  52. stop
  53. else:
  54. send "&cNie masz uprawnienia"
  55. stop
  56. else:
  57. send "&cChat jest juz wylaczony"
  58. stop
  59. on chat:
  60. if {chat} is false:
  61. if player has permission "chat.*":
  62. stop
  63. else:
  64. cancel event
  65. send "&7Chat jest aktualnie wylaczony!"
  66. stop
Advertisement
Add Comment
Please, Sign In to add comment