Problem with AFK Detection
Hello,
I have a problem with AFK Detection, it detect me as afk, but at next spawn, when I move, it count me as AFK. Code: Code:
Code:
fwSpawn() function: Code:
(1): When cvar value is 1, it increase my k with an unit and print the message from (2) point, even I am AFK or not. When it is 2, it doesn't increase k if I am AFK or now, but it show me the message from (2). |
Re: Problem with AFK Detection
Make something to reset on new round.
For example, on this AFK plugin timer does not start until any 'buttons' are NOT being used. IN_ATTACK, IN_JUMP, IN_DUCK, IN_FORWARD, IN_BACK, IN_USE, IN_CANCEL, IN_LEFT, IN_RIGHT, IN_MOVELEFT, IN_MOVERIGHT, IN_ATTACK2, IN_RUN, IN_RELOAD, IN_ALT1, IN_SCORE |
Re: Problem with AFK Detection
Maybe you can tweak this one for what you need?
https://forums.alliedmods.net/showpo...7&postcount=38 |
Re: Problem with AFK Detection
Quote:
|
Re: Problem with AFK Detection
Ok, then instead of slaying and moving to spec, set a bool to true for the AFK player then adjust kills for killer each time he kills the AFK player.
|
Re: Problem with AFK Detection
I've tried your way, but it don't work. This should check if is player AFK after 15 second from spawn.
The code: Code:
Registered events: Code:
|
Re: Problem with AFK Detection
Do this at spawn:
PHP Code:
PHP Code:
Spoiler
|
Re: Problem with AFK Detection
Still don't work in this situation:
Code:
|
Re: Problem with AFK Detection
Do some debugging. This involves adding logs/server_prints() in places in your code to help determine why conditions/values are not what you expect.
PHP Code:
|
Re: Problem with AFK Detection
I've solved this bug. I indexed 'origin[ ]' and this seems work
Code:
|
| All times are GMT -4. The time now is 16:50. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.