Help me about AFK check
#1

How do I know if the player is AFK or not, I have skipped a few topics but still do not understand the principle of its operation. Who can help me, please. Sorry for my bad english.
Reply
#2

Get the player position and make a timer.
Reply
#3

Quote:
Originally Posted by RowdyrideR
Посмотреть сообщение
Get the player position and make a timer.
I still do not understand
Reply
#4

You can have people tabbed, or in the menu, which will make OnPlayerUpdate not activate, which is the simplest check to see if someone is 'tabbed', but it also happens in the same way if they are just losing connection.

With checking the players position, you're checking that they aren't moving. This could also be coupled with checking when they last said anything in chat, or when they last used a command.

The later coupling can detect if someone is 'mobile' yet sitting in their friends car, being driven around.
Reply
#5

My goal is to recognize when the ESC or Alt-Tab user presses the AFK on their head, and when they come back, the SendClientMessage line is "You have AFK in minutes (minutes: seconds)".
Reply
#6

Quote:
Originally Posted by hoanduy
Посмотреть сообщение
My goal is to recognize when the ESC or Alt-Tab user presses the AFK on their head, and when they come back, the SendClientMessage line is "You have AFK in minutes (minutes: seconds)".
You can achieve the same^ using Emmet's Callbacks Include.
It checks for alt-tab and ESC but it won't check player movement. You can do some modifications by adding a camera movement check and a player position check.
Reply
#7

You don't even need the include for such a minor thing...


"We'll just add 100 new 'features' only to use 1"... Seems legit.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)