Posts: 83
Threads: 29
Joined: Oct 2016
Reputation:
0
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.
Posts: 206
Threads: 18
Joined: Dec 2010
Reputation:
0
Get the player position and make a timer.
Posts: 6,242
Threads: 8
Joined: Jun 2008
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.
Posts: 83
Threads: 29
Joined: Oct 2016
Reputation:
0
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)".
Posts: 6,242
Threads: 8
Joined: Jun 2008
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.