Advertisement
herhor67

StatusSign - herhor67

Nov 12th, 2014
474
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.62 KB | None | 0 0
  1. options:
  2.     offline-color: &c
  3.     online-color: &a
  4.     tabliczka: &6[StatusSign]
  5.     tag: &8[&6Status&eSign&8]
  6.  
  7. #------------------------#
  8. #   Dodawanie tabliczek  #
  9. #------------------------#
  10. on sign change:
  11.     line 1 is "[statussign]":
  12.         player has permission "statussign.*":
  13.             line 3 is not empty:
  14.                 set line 1 to "{@tabliczka}"
  15.                 set {_player} to line 3 parsed as player
  16.                 {_player} is online:
  17.                     send "{@tag} &6Stworzyłeś tabliczkę gracza {@online-color}%{_player}%&6!"
  18.                     set line 3 to "{@online-color}%{_player}%"
  19.                 else:
  20.                     send "{@tag} &6Stworzyłeś tabliczkę gracza {@offline-color}%{_player}%&6!"
  21.                     set line 3 to "offline-color%{_player}%"
  22.             else:
  23.                 set event-block to air
  24.                 drop sign at event-location
  25.                 send "{@tag} &cLinia 3 nie zawiera nazwy gracza!"
  26.         else:
  27.             set event-block to air
  28.             drop sign at event-location
  29.             send "{@tag} &cNie masz uprawnień!"
  30.  
  31. #------------------------#
  32. #   Usuwanie tabliczek   #
  33. #------------------------#
  34. on break of sign:
  35.     line 1 of event-block is "&1[AdminOnline]":
  36.         send "{@tag} &6Zniszczono tabliczkę ze statusem!"
  37.  
  38. #------------------------#
  39. #   Setowanie tabliczek  #
  40. #------------------------#
  41. on join:
  42.     loop all blocks:
  43.         loop-block is sign:
  44.             line 1 of loop-block is "{@tabliczka}":
  45.                 line 3 of loop-block contains "%player%":
  46.                     set line 3 of loop-block to "{@online-color}%player%"
  47. on quit:
  48.     loop all blocks:
  49.         loop-block is sign:
  50.             line 1 of loop-block is "{@tabliczka}":
  51.                 line 3 contains "%player%":
  52.                     set line 3 of loop-block to "{@offline-color}%player%"
  53.                     set line 2 of loop-block to "{@offline-color}%now%"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement