[FilterScript] AFK system, making AFK players invisble
#1

This is a simple AFK system that make players who are AFK for 15 minutes invisible. When the player gets back from AFK, he will be visible again.

- Each second all players will be checked and their old coordinates stored
- If at the next check the location did not change, the player is considered AFK and will be checked each second again.
- After 900 seconds (15 minutes) of being AFK, the player will be set in another VW
- If the player is back and moves, he is no longer AFK. The AFK timer will reset and if the player was invisible, he'll be visible again
- If the player types something, the AFK timer resets
- If the player disconnects, he will be visible again to avoid problems with servers that save player data
- This only works for people in VW 0 already

Pastebin;
http://pastebin.com/jvdxjqyb
Reply
#2

Very nice AFK system. Good job.
Reply
#3

Thank you, my first FS released.
Reply
#4

I have seen many AFK systems, and even made my own but for a first FS, this is great. Very clean, organised, explained, and easy for beginners to understand. A reputation for you sir.
Reply
#5

Nice script, but you should also save the original virtual world and interior. If the player goes AFK in (for example) world 60 he will be put back to his original position but in world 0 when he returns. Same for the interior.
Reply
#6

Quote:
Originally Posted by Sinner
Посмотреть сообщение
Nice script, but you should also save the original virtual world and interior. If the player goes AFK in (for example) world 60 he will be put back to his original position but in world 0 when he returns. Same for the interior.
The VW won't be adjusted if the player's VW is different than 0, to avoid this problem.
Reply
#7

its nice and better than other afk systems
Reply
#8

so nice but i got 13 warns
Reply
#9

I see, still works though.

Anyone who uses this for his server already? Opinions?
Reply
#10

SetTimer("Timer", 1000, true);
public Timer(playerid)
{
....
}

stupid question, but how does this work ? i dont get where the value of playerid came from
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)