Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # -» Playerslots Skript «-
- # Created By : ReportCards
- options:
- bypass-permission: "playerslots.bypass" #Permission to bypass the set limit
- command-permission: "playerslots.command" #Permission to use the config command
- on script load:
- if {playerslots::slots} is not set:
- set {playerslots::slots} to max players
- else if {playerslots::slots} > max players:
- set {playerslots::slots} to max players # Amount of slots (Doesn't allow you to go above limit)
- command /playerslots [<text = "help">] [<text>]:
- permission: {@command-permission}
- trigger:
- if arg-1 is "help":
- send "&8&l » &7Command list for &fPlayerSlots"
- send "&7/ps set <number> &f&l♦ &7Set the amount of slots"
- else if arg-1 is "set":
- if arg-2 parsed as integer is not set:
- send "&4&l » &cInvalid number"
- else:
- set {playerslots::slots} to arg-2 parsed as integer
- send "&2&l » &aSet the amount of slots to &f%arg-2%"
- on connect:
- if player does not have permission "{@bypass-permission}"
- number of players >= {playerslots::slots}
- kick player due to "&4&l » &cThe server is full!"
Add Comment
Please, Sign In to add comment