Advertisement
Kacperski89

AC

Jun 20th, 2017
429
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. options:
  2.  
  3.     tag-mod: &8[&9&&8]&r
  4.     tag-perm: adminchat.switch.mod
  5.  
  6.     tag-admin: &8[&4&lAC&8]&r
  7.     perm-admin: adminchat.switch.admin
  8.  
  9. variables:
  10.     {adminchat::%player%} = "false"
  11.     {adminchat::moderator::%player%} = "false"
  12.     {adminchat::group} = ""
  13.     {adminchat::moderator::group} = ""
  14. on load:
  15.     if folder "plugins/AdminChat/" doesn't exists:
  16.         create folder "plugins/AdminChat"
  17.         stop
  18.    if file "plugins/AdminChat/log.yml" doesn't exists:
  19.         create file "plugins/AdminChat/log.yml"
  20.         stop
  21. command /ac:
  22.     trigger:
  23.         if player don't have permission "{@perm-admin}" or "{@perm-mod}":
  24.             send "&8» &cNie posiadasz uprawnien &8(&7{@perm-admin} / {@perm-mod}&8)
  25.             stop
  26.         if player has permission "{@perm-admin}":
  27.             if {adminchat::%player%} is false:
  28.                 set {adminchat::%player%} to true
  29.                 add player to {adminchat::group}
  30.                 send "&8» &4AC &9zostal &awlaczony" to the player
  31.                 send "{@tag-admin} &9Do &4AC &9dolacza %player%" to the {adminchat::group}
  32.                 wf "[%now%] (%player%) : dolacza do AC" to "plugins/AdminChat/log.yml"
  33.                 stop
  34.             else if {adminchat::%player%} is true:
  35.                 set {adminchat::%player%} to false
  36.                 remove player from {adminchat::group}
  37.                 send "&8» &4AC &9zostal &cwylaczony" to the player
  38.                 send "{@tag-admin} &9%player% odlacza sie od &4AC" to the {adminchat::group}
  39.                 wf "[%now%] (%player%) : wychodzi z AC" to "plugins/AdminChat/log.yml"
  40.                 stop
  41.         if player has permission "{@perm-mod}":
  42.             if {adminchat::moderator::%player%} is false:
  43.                 set {adminchat::moderator::%player%} to true
  44.                 add player to {adminchat::moderator::group}
  45.                 send "&8» &4AC &9zostal &awlaczony" to the player
  46.                 send "{@tag-admin} &9Do &4AC &9dolacza %player%" to the {adminchat::moderator::group}
  47.                 wf "[%now%] (%player%) : dolacza do AC MOD" to "plugins/AdminChat/log.yml"
  48.                 stop
  49.             else if {adminchat::moderator::%player%} is true:
  50.                 set {adminchat::moderator::%player%} to false
  51.                 remove player from {adminchat::moderator::group}
  52.                 send "&8» &4AC MOD &9zostal &cwylaczony" to the player
  53.                 send "{@tag-mod} &9%player% odlacza sie od &4AC MOD" to the {adminchat::moderator::group}
  54.                 wf "[%now%] (%player%) : wychodzi z AC MOD" to "plugins/AdminChat/log.yml"
  55.                 stop
  56. on chat:
  57.     if {adminchat::moderator::%player%} is true:
  58.         cancel event
  59.         send "{@tag-mod} &8(&a%player%&8) &6► &9%message% &8•" to {adminchat::moderator::group}
  60.         stop
  61.     if {adminchat::%player%} is true:
  62.         cancel event
  63.         send "{@tag-admin} &8(&c%player%&8) &6» &9%message% &8•" to {adminchat::group}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement