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.

how to make afk kick player skript

Discussion in 'Skript' started by ECSE, Jun 11, 2021 at 5:49 PM.

  1. ECSE

    ECSE Member

    Joined:
    May 27, 2021
    Messages:
    3
    Likes Received:
    0
    how to make varriable for afk player (not any movement for 30seconds)?

    i can't find suitable event.
     
  2. Minecoll_YT

    Minecoll_YT Active Member

    Joined:
    Dec 2, 2018
    Messages:
    149
    Likes Received:
    5
    Code (Text):
    1. every 30 seconds:
    2.   loop all players:
    3.     if {lastlocation::%loop-player%} is location of loop-player:
    4.       kick loop-player due to "afk"
    5.     else:
    6.       set {lastlocation::%loop-player%} to location of loop-player
    7.  
    8. on quit:
    9.   delete {lastlocation::%player%}
    10.  
    11. on join:
    12.   set {lastlocation::%player%} to location of player
     

Share This Page

Loading...