03.02.2014, 15:41
Quote:
Here's my AutoAFK detector which has been created as an include for my personal use a long time ago. However, I've just added it on GitHub now and you can use it in case if you want.
https://github.com/Lordzy/AutoAFK You can use either the callbacks - OnPlayerPause and OnPlayerResume or IsPlayerPaused function which would return true if paused and false if not paused. There might be better AFK detectors, I used this for my personal use before. It works well though. |
EDIT: Thanks again for the help I did +rep you
EDIT2:
pawn Код:
forward PauseCheck();
public PauseCheck()
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(OnPlayerUpdate(i) == 0)
{
PlayerPaused[i] = 1;
}
if(OnPlayerUpdate(i) == 1)
{
PlayerPaused[i] = 0;
}
}
}
}