Quote:
Originally Posted by jdlovins
So i'm trying to make a plugin that uses this afk manager, and i have the 2 forwards setup, AFKM_OnClientAFK & Back with a simple PrintToChat( client, "Marked as afk" / "Unmarked as afk" ) messages.
However as im walking around it keeps spamming Marked as afk and unmarked as afk over and over again. Am i using the forwards wrong? They seemed pretty simple but i could be an idiot haha.
|
Well I don't know what you are trying to achieve you might need to provide more details but those forwards are probably acting as they are supposed to, they fire when a client is marked as AFK and not AFK which would happen a lot depending on what is happening...
You need to handle events yourself in your plugin and check for example (using the include) AFKM_GetClientAFKTime() if you want to know if they have been AFK for a period of time or AFKM_IsClientAFK to check if they are currently AFK, but again I don't know what you are looking to do but really you need to handle events in your own plugins but can use the forwards to assist?
i.e. you might need to make your own timer and you can call for instance AFKM_GetClientAFKTime to see how long they have been AFK but if you want to change status if a client goes out of AFK between your handling you could use AFKM_OnClientBack() if that makes sense. Basically AFKM_OnClientAFK() and AFKM_OnClientBack() will fire a lot...
Hopefully this all makes sense, if you have suggestions your welcome to let me know or otherwise provide more details on how you think the forwards are not working.