Jump to content
  • 0

How do i add a limit to sethomes


JupiterBlooper

Question

I'm trying to make a sethome skript that limits the number of sethomes you can have, by using permissions. For some reason the limit part of it wont work, when the rest of it is functioning fine. No errors are showing in chat. Can anyone help out and tell me what i did wrong/how i fix it?


command /sethome <text>:
    trigger:
        if {homes::%uuid of player%::%arg-1%} is set:
            send "&cYou have already set a home to &3%arg-1%&r"
        if {homes::%uuid of player%::%arg-1%} isn't set:
            set {homes::%uuid of player%::%arg-1%} to location of player
            add arg-1 to {%uuid of player%.homeList::*}
            send "&aSet a home to &3%arg-1%&r"
        if {sethomes::%uuid of player%} is 3:
            player does not have permission "4th.house":
            message "&cYou cannot set more than 3 homes! Buy more in &3/shop"
        if {sethomes::%uuid of player%} is 4:
            player does not have permission "5th.house":
            message "&cYou cannot set more than 4 homes! Buy more in &3/shop"
        if {sethomes::%uuid of player%} is 5:
            player does not have permission "6th.house":
            message "&cYou cannot set more than 5 homes! Buy more in &3/shop"
        if {sethomes::%uuid of player%} is 6:
            player does not have permission "vip":
            message "&cYou cannot set more than 6 homes! Get 1 more with &6VIP &3/buy"
        if {sethomes::%uuid of player%} is 7:
            message "&cYou cannot set more than 7 homes!"

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0
47 minutes ago, JupiterBlooper said:

I'm trying to make a sethome skript that limits the number of sethomes you can have, by using permissions. For some reason the limit part of it wont work, when the rest of it is functioning fine. No errors are showing in chat. Can anyone help out and tell me what i did wrong/how i fix it?


command /sethome <text>:
    trigger:
        if {homes::%uuid of player%::%arg-1%} is set:
            send "&cYou have already set a home to &3%arg-1%&r"
        if {homes::%uuid of player%::%arg-1%} isn't set:
            set {homes::%uuid of player%::%arg-1%} to location of player
            add arg-1 to {%uuid of player%.homeList::*}
            send "&aSet a home to &3%arg-1%&r"
        if {sethomes::%uuid of player%} is 3:
            player does not have permission "4th.house":
            message "&cYou cannot set more than 3 homes! Buy more in &3/shop"
        if {sethomes::%uuid of player%} is 4:
            player does not have permission "5th.house":
            message "&cYou cannot set more than 4 homes! Buy more in &3/shop"
        if {sethomes::%uuid of player%} is 5:
            player does not have permission "6th.house":
            message "&cYou cannot set more than 5 homes! Buy more in &3/shop"
        if {sethomes::%uuid of player%} is 6:
            player does not have permission "vip":
            message "&cYou cannot set more than 6 homes! Get 1 more with &6VIP &3/buy"
        if {sethomes::%uuid of player%} is 7:
            message "&cYou cannot set more than 7 homes!"

Try using "else if" or stop

 

 

 

image.png.bc433d6489d70ad831075fe76809b993.png
 

Lifestealed | Minecraft Servers
 

OG [VIP] 12/26/20 - 10/27/2021
OG [PRO] 12/27/21 - 11/18/2022
OG [LEGEND] 11/18/2022 - 3/14/2023
[DEFAULT] 3/14/2023 - Present

 

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...