Help to detect player

  • 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!

MasterGick122

Member
Feb 18, 2024
2
0
1
hello i need help with this. my plan is when i do right click with a eye of ender it's scan all player around him of 3 block and tp all this player to the player who have made the right click.
But the player can be more than 3 block above and under

i got this for now but idk how to continue.
Code:
on right click with eye of ender:
    if {start} is "on":
        if player has permission "sk.endermage":
            cancel event
            loop all players:
                if distance between player's location and loop-player <= 3:
                    loop-player is not player
                    teleport loop-player to player

1708273129406.png
1708273189614.png
 
I would just get the difference x of player and loop player and z of player and loop player. Because right now it also takes the hight as the difference and as I understand it you want it even if you are at hight 200k or something right?
 
on right click with eye of ender:
if {start} is "on":
if player has permission "sk.endermage":
cancel event
set {_waited} to difference between {endermage.%player%.lastused} and now
if {_waited} is less than 1 minutes:
send "&6Il vous reste &c%difference between 1 minutes and {_waited}% &6avant de pouvoir réutilisé." to player
stop
set {endermage.%player%.lastused} to now
loop all players:
loop-player is not player
if difference between x-coordinate of player and x-coordinate of loop-player <= 3:
if difference between z-coordinate of player and z-coordinate of loop-player <= 3:
teleport loop-player to player
got it thanks