Raised This Month: $51 Target: $400
 12% 

Sort of afk manager


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Misery
Senior Member
Join Date: Dec 2010
Old 08-23-2012 , 10:54   Sort of afk manager
Reply With Quote #1

Hi,

I'm trying to achieve an AFK manager which will be different than others...
Basically afk managers check if a player has moved (origin changes) in an infinite task flagged "b".
However, I find this method not the best to check for afks... indeed if someone moves his mouse for example without changing position, he would still be considered afk.

I was wondering...

1- Is there a hook we could set which would fire on every player move (including moving mouse and such?)
2- In the case that hypothetic hook is not possible in question #1, instead of having a task which loops say at each 5 seconds, is there a hook we could have which would fire on each time the position of a player changes?
3- Any other ideas?

Thanks!

Misery
Misery is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 08-23-2012 , 11:21   Re: Sort of afk manager
Reply With Quote #2

We can use a forward like FM_CmdStart to know when the last time the player pressed a button.
Then we can use PreThink to know if a player's angles changed, since there is no hook for mouse movement.
Finally, your overall check for buttons/angles could be in a task for all players, or just check in PreThink.

I can write a quick example if needed.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 02:56.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode