Jump to content

Skript Tutorial. How to make a warn skript! and Skript Tutorial. How to make a staff chat!


asaf03124

Recommended Posts

staffchat

 

 

 

  1. command /staffchat [<text>]:
  2. trigger:
  3. if player has permission "staffchat.toggle":
  4. if arg-1 isn't set:
  5. send "&cYou must use /staffchat on/off"
  6. if arg-1 is "on":
  7. set {staffchat::toggle::%player's uuid%} to true
  8. send "&aYou enabled staff chat!"
  9. if arg-1 is "off":
  10. set {staffchat::toggle::%player's uuid%} to false
  11. send "&cYou disabled staff chat!"
  12. on chat:
  13. loop all players:
  14. if loop-player has permission "staffchat.toggle":
  15. if {staffchat::toggle::%player's uuid%} is true:
  16. cancel event
  17. send "&8[&aStaffChat&8]&7%player%: &7%message%"
 
 
 
 
 
 
 
 
 
warn 
 
 
 
 
 
 
 
 
 
  1. command /warn [<offlineplayer>] [<text>]:
  2. trigger:
  3. if player has permission "warn.give":
  4. add skull of arg-1 named "&c&l&nWarning: %arg-1%" with lore "&8* &bWho warned: &c%player%", "&8* &bReason: %colored arg-2%", "" and "&c&lClick to remove warn!" to {warns::*}
  5. send "&aYou warned %arg-1%&a!"
  6. command /warnlist:
  7. trigger:
  8. if player has permission "warn.list":
  9. warns(player)
  10. function warns(P: player):
  11. open chest inventory with 6 rows named "&c&l&nWarnings" to {_P}
  12. set {_fill} to -1
  13. loop {warns::*}:
  14. set {_W} to loop-value
  15. add 1 to {_fill}
  16. set slot {_fill} of {_P}'s current inventory to {_W}
  17. on inventory click:
  18. if name of player's current inventory contains "&c&l&nWarnings":
  19. cancel event
  20. if clicked inventory isn't player's inventory:
  21. remove event-slot from {warns::*}
  22. warns(player)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...