#Check if player is afk
1 messages · Page 1 of 1 (latest)
every 5 seconds:
add 5 to {afk::%player%}
on any move:
if {afk::%player%} is set:
clear {afk::%player%}```
That is not what I’m looking for
loop all players:
if loop-player is in the region "xpborder" or "endborder":
if {%loop-player%::afk} is true:
execute console command "/spawn %loop-player%"
send "Hey %loop-player%! You were afk at an XP Farm so the server automatically teleported you to spawn!" to loop-player```
on command "/afk":
if {%event-player%::afk} is true:
set {%event-player%::afk} to false
if {%event-player%::afk} is false:
set {%event-player%::afk} to true```
this is what i have so far
errors?
there are none