kollinkoko

Maxplayers [SK]

Oct 18th, 2016
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. command /maxplayers [<integer>]:
  2. permission: skript.op
  3. trigger:
  4. if arg-1 is not set:
  5. message "&eMaximum players &fis &e%{maxplayers}%"
  6. else:
  7. delete {maxplayers}
  8. wait 5 ticks
  9. set {maxplayers} to arg 1
  10. message "&eMaximum players &fset to &e%arg-1%"
  11.  
  12. on connect:
  13. if player does not have the permission "maxplayers.exempt":
  14. if amount of players is greater than or equal to {maxplayers}:
  15. kick the player due to "&4Server is full&r (&e%amount of players%&f/&e%{maxplayers}%&f)"
  16.  
  17. on server list ping:
  18. set max player count to {maxplayers}
Advertisement
Add Comment
Please, Sign In to add comment