Zeldaboy111

Skript Tutorial #14 Custom ban

Oct 4th, 2018
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.49 KB | None | 0 0
  1. options:
  2. {ban::%player%} = {ban::%arg 1%}
  3. {ban::%player%} = {ban::%loop-player%}
  4. {bann::%player%} = {bann::%arg 1%}
  5. {bann::%player%} = {bann::%loop-player%}
  6.  
  7. command /punishment [<offline player>]:
  8. trigger:
  9. if player has permission "punishment":
  10. if arg 1 is set:
  11. open chest with 2 rows named "&4-=-=-&cBan &c%arg 1%&4-=-=-" to player
  12.  
  13. format slot 0 of player with diamond named "&3X-Ray hacks" with lore "&7Ban voor: 3 dagen" to close then run [execute console command "/cpunishment Zeldaboy111 x-ray"]
  14. else:
  15. send "&c<Punishment> &4Doe &c/punishment [speler] &4om deze command uit te voeren."
  16. else:
  17. send "&c<Punishment> &4Je hebt onvoldoende rechten om deze command uit te voeren."
  18.  
  19. command /cpunishment [<offline player>] [<text>]:
  20. executable by: console
  21. trigger:
  22. if arg 1 is set:
  23. if arg 2 is set:
  24. set {ban::%arg 1%} to 10
  25. set {bann::%arg 1%} to arg 1
  26. kick arg 1
  27. ban arg 1 by reason of "&4X-Ray is niet toegestaan Banned voor: &c%{ban::%arg 1%}%"
  28. else:
  29. send "&c<CPunishment> &4Kan persoon niet bannen omdat: de &creden &4is niet opgegeven." to console
  30. else:
  31. send "&c<CPunishment> &4Kan persoon niet bannen omdat: de &cnaam &4is niet opgegeven en de &creden &4is niet opgegeven." to console
  32. every 1 second:
  33. loop all players:
  34. if {ban::%loop-player%} is not 0:
  35. remove 1 from {ban::%loop-player%}
  36. stop
  37. if {ban::%loop-player%} is 0:
  38. unban {bann::%loop-player%}
  39. delete {ban::%loop-player%}
Add Comment
Please, Sign In to add comment