ReportCards

PlayerSlots Skript

May 24th, 2020
177
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.13 KB | None | 0 0
  1. # -» Playerslots Skript «-
  2. # Created By : ReportCards
  3.  
  4. options:
  5. bypass-permission: "playerslots.bypass" #Permission to bypass the set limit
  6. command-permission: "playerslots.command" #Permission to use the config command
  7.  
  8. on script load:
  9. if {playerslots::slots} is not set:
  10. set {playerslots::slots} to max players
  11. else if {playerslots::slots} > max players:
  12. set {playerslots::slots} to max players # Amount of slots (Doesn't allow you to go above limit)
  13.  
  14. command /playerslots [<text = "help">] [<text>]:
  15. permission: {@command-permission}
  16. trigger:
  17. if arg-1 is "help":
  18. send "&8&l » &7Command list for &fPlayerSlots"
  19. send "&7/ps set <number> &f&l♦ &7Set the amount of slots"
  20. else if arg-1 is "set":
  21. if arg-2 parsed as integer is not set:
  22. send "&4&l » &cInvalid number"
  23. else:
  24. set {playerslots::slots} to arg-2 parsed as integer
  25. send "&2&l » &aSet the amount of slots to &f%arg-2%"
  26.  
  27. on connect:
  28. if player does not have permission "{@bypass-permission}"
  29. number of players >= {playerslots::slots}
  30. kick player due to "&4&l » &cThe server is full!"
Add Comment
Please, Sign In to add comment