Location error

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the community!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

ForPlay_HD

Member
Aug 23, 2018
11
0
1
Hi, i've tried to make a skript plugin, to buy something from a 24/7, but i want the command to work when executor is at the location of 24/7, and i don't know how...
Sorry for my english, thanks.

code_language.skript:
on command:
    if command contains "buy":
        if player is at location {24/7} #variable location of 24/7    #bla bla bla
 
1. idk if is right to use "/" in variables
2. you should check if the player is in the radius of that location.

code_language.skript:
on command:
    if command contains "buy":
        if distance between player and {24/7} < 5: # 5 blocks
            #stuff
 
Example: (should work)
code_language.skript:
command /posset:
    trigger:
        set {24/7} to location of player
        send "&c24/7's location set!"

command /buy:
    trigger:
        set {loc} to location of player
        if {loc} is {24/7}: # If the player is at {24/7}
            #stuff
 
Last edited:
Status
Not open for further replies.