1. 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 comminuty!

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

  2. LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Solved Player ping

Discussion in 'Skript' started by Turb032, Jan 21, 2020.

Thread Status:
Not open for further replies.
  1. Turb032

    Turb032 Active Member

    Joined:
    Jan 16, 2020
    Messages:
    109
    Likes Received:
    0
    Hi guys, i'm trying to do a skript that uses condition: "if player's ping is < 130:" ... but it give me an error:
    "player's ping" is not an item stack or maybe "victim's ping" is not an entity type. I think my skript version is the problem, but i can't find a supported verion for this, please help!
     
  2. Goose

    Supporter

    Joined:
    Nov 23, 2019
    Messages:
    429
    Likes Received:
    30
    i put this into the parser and no errors, what version of skript are you using?

    Code (Text):
    1. every second:
    2.     loop all players:
    3.         if loop-player's ping > 130:
    4.             send "&choly crap get good wifi nerd" to loop-player
     
  3. Turb032

    Turb032 Active Member

    Joined:
    Jan 16, 2020
    Messages:
    109
    Likes Received:
    0
    Ok so, i tryed that with this:

    every 1 second:
    loop all players
    if loop-player's ping < 130:
    set {location1.%victim%} to victim's location
    wait 2 ticks
    set {location2.%victim%} to victim's location
    if {location1.%victim%} = {location2.%victim%}:
    loop-player-2 has permission "anticheat.notify":
    message "&8(&c&lAntiCheat&8) &e> &c%attacker% &7Looks like he's using &cAntiKnockback&7: &8(&b%ping of victim% ms&8)" to loop-player-2

    but the error is: there's no loop that maches with "loop-player's ping"
    p.s. i'm very bad at skript and i'm using 2.1.2
    --- Double Post Merged, Jan 22, 2020, Original Post Date: Jan 22, 2020 ---
    (i replaced %ping of victim% with %loop-player's ping% and nothing happend)
     
  4. Goose

    Supporter

    Joined:
    Nov 23, 2019
    Messages:
    429
    Likes Received:
    30
    You are supposed to have a ":" after the "loop all players" because otherwise it wouldn't recognize the loop and cause errors.
     
  5. Turb032

    Turb032 Active Member

    Joined:
    Jan 16, 2020
    Messages:
    109
    Likes Received:
    0
    every second:
    loop all players:
    if loop-player's ping is < 130:
    set {location1.%player%} to loop-player's location
    wait 2 ticks
    set {location2.%player%} to loop-player's location
    if {location1.%player%} = {location2.%player%}:
    loop-player-2 has permission "anticheat.notify":
    message "&8(&c&lAntiCheat&8) &e> &c%attacker% &7Looks like he's using &cAntiKnockback&7: &8(&b%ping of victim% ms&8)" to loop-player-2

    error... There's no loop that matches with "loop-player's ping". Maybe is the version of the plugin that isn't working?
    --- Double Post Merged, Jan 23, 2020, Original Post Date: Jan 23, 2020 ---
    and please tell me if this is right:
    on damage:
    if victim is player:
    loop all players:
    if loop-player's ping < 130:
    set {location1.%loop-player%} to loop-player's location
    wait 2 ticks
    set {location2.%loop-player%} to loop-player's location
    if {location1.%loop-player%} = {location2.%loop-player%}:
    loop all players:
    loop-player-2 has permission "anticheat.notify":
    message "&8(&c&lAntiCheat&8) &e> &c%attacker% &7Looks like he's using &cAntiKnockback&7: &8(&b%ping of loop-player% ms&8)" to loop-player-2
     
  6. Philotastisch

    Philotastisch Member

    Joined:
    Sep 25, 2019
    Messages:
    45
    Likes Received:
    0
    Pleased Put it in a Code field.
     
  7. Turb032

    Turb032 Active Member

    Joined:
    Jan 16, 2020
    Messages:
    109
    Likes Received:
    0
    how can i do it?
    --- Double Post Merged, Jan 26, 2020, Original Post Date: Jan 26, 2020 ---
    on damage:
    if victim is player:
    loop all players:
    if loop-player's ping < 130:
    set {location1.%loop-player%} to loop-player's location
    wait 2 ticks
    set {location2.%loop-player%} to loop-player's location
    if {location1.%loop-player%} = {location2.%loop-player%}:
    loop all players:
    loop-player-2 has permission "anticheat.notify":
    message "&8(&c&lAntiCheat&8) &e> &c%attacker% &7Looks like he's using &cAntiKnockback&7: &8(&b%ping of loop-player% ms&8)" to loop-player-2
    --- Double Post Merged, Jan 26, 2020 ---
    on damage:
    if victim is player:
    loop all players:
    if loop-player's ping < 130:
    set {location1.%loop-player%} to loop-player's location
    wait 2 ticks
    set {location2.%loop-player%} to loop-player's location
    if {location1.%loop-player%} = {location2.%loop-player%}:
    loop all players:
    loop-player-2 has permission "anticheat.notify":
    message "&8(&c&lAntiCheat&8) &e> &c%attacker% &7Looks like he's using &cAntiKnockback&7: &8(&b%ping of loop-player% ms&8)" to loop-player-2
    --- Double Post Merged, Jan 26, 2020 ---
    idk how to do that sry
    --- Double Post Merged, Jan 26, 2020 ---
    Code (Text):
    1. on damage:
    2.   if victim is player:
    3.     loop all players:
    4.       if loop-player's ping < 130:
    5.         set {location1.%loop-player%} to loop-player's location
    6.         wait 2 ticks
    7.         set {location2.%loop-player%} to loop-player's location
    8.         if {location1.%loop-player%} = {location2.%loop-player%}:
    9.           loop all players:
    10.             loop-player-2 has permission "anticheat.notify":
    11.               message "&8(&c&lAntiCheat&8) &e> &c%attacker% &7Looks like he's using &cAntiKnockback&7: &8(&b%ping of loop-player% ms&8)" to loop-player-2
    --- Double Post Merged, Jan 26, 2020 ---
    oh ok, here it is, and sry for spam
     
  8. Philotastisch

    Philotastisch Member

    Joined:
    Sep 25, 2019
    Messages:
    45
    Likes Received:
    0
    What is your Minecraft and Skript Version?
     
  9. Turb032

    Turb032 Active Member

    Joined:
    Jan 16, 2020
    Messages:
    109
    Likes Received:
    0
    Skript is old and I think that s the problem, I have 2.1.2. Minecraft 1.8.8 optifine
    --- Double Post Merged, Jan 26, 2020, Original Post Date: Jan 26, 2020 ---
    But I can't found a compatible Skript version, idk why but if I install another version all add-ons go red in plug-ins and it won't work
     
  10. Philotastisch

    Philotastisch Member

    Joined:
    Sep 25, 2019
    Messages:
    45
    Likes Received:
    0
  11. Turb032

    Turb032 Active Member

    Joined:
    Jan 16, 2020
    Messages:
    109
    Likes Received:
    0
    Screenshot_20200126-015303.jpg
    --- Double Post Merged, Jan 26, 2020, Original Post Date: Jan 26, 2020 ---
    Is this the right condition?
     
  12. Philotastisch

    Philotastisch Member

    Joined:
    Sep 25, 2019
    Messages:
    45
    Likes Received:
    0
    I think thats the right.
    You must try Out.
     
  13. Turb032

    Turb032 Active Member

    Joined:
    Jan 16, 2020
    Messages:
    109
    Likes Received:
    0
    I tryed but I says it requires skelletproxy... I don't know what it is..
     
  14. Turb032

    Turb032 Active Member

    Joined:
    Jan 16, 2020
    Messages:
    109
    Likes Received:
    0
  15. Philotastisch

    Philotastisch Member

    Joined:
    Sep 25, 2019
    Messages:
    45
    Likes Received:
    0
    I think you need skungee.
     
  16. Turb032

    Turb032 Active Member

    Joined:
    Jan 16, 2020
    Messages:
    109
    Likes Received:
    0
    Done, nothing happend: There's no loop that matches with "loop-player's ping"
     
  17. Philotastisch

    Philotastisch Member

    Joined:
    Sep 25, 2019
    Messages:
    45
    Likes Received:
    0
  18. Turb032

    Turb032 Active Member

    Joined:
    Jan 16, 2020
    Messages:
    109
    Likes Received:
    0
    thank you, i need to install it in bungeecord or in the server plugins?
    --- Double Post Merged, Jan 27, 2020, Original Post Date: Jan 26, 2020 ---
    ok i tried, but i don't know a thing, i need to put it in bungeecord plugins or in spigot plugins? and if it's bungeecord, how do i use it?
    thanks anyways
    --- Double Post Merged, Jan 27, 2020 ---
    OH OK, i think i solved!!! THANK YOU SO MUCH
     
  19. PanHack

    PanHack Active Member

    Joined:
    Dec 18, 2019
    Messages:
    143
    Likes Received:
    8
    set thread as solved please
     
Thread Status:
Not open for further replies.

Share This Page

Loading...