vNexter_123

AdminChat.sk

Jan 12th, 2018
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.32 KB | None | 0 0
  1. options:
  2. #Permission
  3. permission: adminchat.chat
  4. #No permission message
  5. PermMsg: &4You do not have permission to use this command!
  6. #Admin chat
  7. Prefix: &b[%player%&b]
  8.  
  9. command /. [<text>]:
  10. permission: {@permission}
  11. permission message: {@PermMsg}
  12. executable by: players and console
  13. aliases: staffchat, sc, a
  14. trigger:
  15. if argument 1 is not set:
  16. if {adminchat::%player%} is not set:
  17. set {adminchat::%player%} to 1
  18. message "&bAdmin Chat &aOn&b."
  19. if {adminchat::%player%} is 1:
  20. set {adminchat::%player%} to 0
  21. message "&bAdmin Chat &4Off&b."
  22. if argument 1 is set:
  23. if argument 1 is "on":
  24. set {adminchat::%player%} to 1
  25. message "&bAdmin Chat &aOn&b."
  26. if argument 1 is "off":
  27. set {adminchat::%player%} to 0
  28. message "&bAdmin Chat &4Off&b."
  29. if argument 1 is not "on" or "off":
  30. loop all players:
  31. loop-player has the permission "{@permission}":
  32. message "{&6&l%player%&f} %coloured argument%" to loop-player
  33.  
  34. on chat:
  35. if {adminchat::%player%} is 1:
  36. cancel event
  37. loop all players:
  38. loop-player has the permission "{@permission}":
  39. message "{&6&l%player%&f} %coloured message%" to loop-player
  40. else:
  41. stop
  42.  
  43. on quit:
  44. if {adminchat::%player%} is 1:
  45. delete {adminchat::%player%}
  46. if {adminchat::%player%} is 0:
  47. delete {adminchat::%player%}
Advertisement
Add Comment
Please, Sign In to add comment