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 Afk kick prevention

Discussion in 'Skript' started by bebeli555, Feb 7, 2020.

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

    bebeli555 Member

    Joined:
    Feb 6, 2020
    Messages:
    28
    Likes Received:
    0
    So how could i make a simple skript that. When player has been idle for 4minutes it would tp the player to an afk pool i have on my server?`
    Something like this?
    If player idle 4minutes
    make console execute "warp %player% afkpool"
     
  2. Best Answer:
    Post #2 by PlaySkyHd, Feb 7, 2020
  3. PlaySkyHd

    PlaySkyHd New Member

    Joined:
    Oct 20, 2017
    Messages:
    5
    Likes Received:
    0
    Code (Text):
    1. every 4 minutes:
    2.     loop all players:
    3.         if {AFK.%loop-player%} is set:
    4.             make console execute "warp %player% afkpool"
    5.         if {AFK.%loop-player%} is not set:
    6.             set {AFK.%loop-player%} to loop-player's location
    7. on any move:
    8.     delete {AFK.%player%}
    9. on chat:
    10.     delete {AFK.%player%}
    11. on click:
    12.     delete {AFK.%player%}
    13. on inventory click:
    14.     delete {AFK.%player%}
    15. on command:
    16.     delete {AFK.%player%}
    Like this?
     
    #2 PlaySkyHd, Feb 7, 2020
    Last edited: Feb 7, 2020
  4. bebeli555

    bebeli555 Member

    Joined:
    Feb 6, 2020
    Messages:
    28
    Likes Received:
    0
Thread Status:
Not open for further replies.

Share This Page

Loading...