Jump to content

I need help setup how many homes default player can have


GoBoiee74

Recommended Posts

# Set home for player
command /sethome [<text>]:
    description: "Set your home"
    trigger:
        if arg-1 is not set :
            send ""
            send "&9&lXBUST &f| You have to set home name" to player
            send ""
        else:
            if {home::%player's uuid%::%arg-1%} is set:
                send ""
                send "&9&lXBUST &f| This home name already exist. Try use another name"
                send ""
            else:
                set {home::%player's uuid%::%arg-1%} to location of player
                set {homenames::%player's uuid%::%arg-1%} to arg-1
                send ""
                send "&9&lXBUST &f| Your home %arg-1% was set" to player
                send ""

# Delete players home
command /delhome [<text>]:
    trigger:
        if arg-1 is not set:
            send ""
            send "&9&lXBUST &f| You have to define your home name" to player
            send ""
        else:
            if {home::%player's uuid%::%arg-1%} is not set:
                send ""
                send "&9&lXBUST &f| You have to define valid home name" to player
                send ""
            else:
                delete {home::%player's uuid%::%arg-1%}
                delete {homenames::%player's uuid%::%arg-1%}
                send ""
                send "&9&lXBUST &f| Your home %arg-1% was deleted" to player
                send ""

#List player's homes
command /listhomes:
    trigger:
        if {homenames::%player's uuid%::*} is not set:
            send "&9&lXBUST &f| You have no home set"
        else:
            send "&9&lXBUST &f| Your homes: &a&l%{homenames::%player's uuid%::*}%"

# Teleport player to his home
command /home [<text>]:
    trigger:
        if arg-1 is not set:
            send ""
            send "&9&lXBUST &f| You have to define home name" to player
            send ""
        else:
            if {home::%player's uuid%::%arg-1%} is not set:
                send ""
                send "&9&lXBUST &f| You have to define valid home name" to player
                send ""
            else:
                teleport player to {home::%player's uuid%::%arg-1%}
                send ""
                send "&9&lXBUST &f| You've been teleported to %arg-1%&7 home"
                send ""

command /homes:
    trigger:
        stop

command /homes:
    trigger:
        set 

Link to comment
Share on other sites

  • 2 weeks later...

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