[Include] AFK Auto-Detector[v0.1]
#1

AFK Auto-Detector[v0.2]
Introduction
This include will show you in console when a player is on pause mode or when a player resume the game after he went AFK. All of this, automatically, without commands like /afk; /sleep ...
The include detects the player after 6 seconds in Pause mode.

This include can detect:
- When a player is AFK.
- When a player is no longer AFK.


Screenshot:



New functions:
pawn Код:
public OnPlayerPause(playerid) //Called when the player is AFK
public OnPlayerUnpause(playerid) //Called when the player is back in game or left the game when is AFK.
IsPlayerPause(playerid) //Show the value 1(AFK) or 0('NON-AFK')
TimeSincePaused(playerid) //Show the current AFK time from a player when he's afk or when is no longer afk, shows last AFK time.
You can see the AFK players by using this command.
pawn Код:
CMD:afklist(playerid)
{
    new count,name[32],string[100];
    SendClientMessage(playerid,0x17A631FF,"________ AFK Players ________");
    foreach(Player, i) {
        if(IsPlayerPause(i)) {
            GetPlayerName(i,name,sizeof(name));
            format(string,sizeof(string),"%s [%d]",name,i);
            SendClientMessage(playerid,-1,string);
        }
    }
    return 1;
}

DOWNLOAD
- Pastebin
- GitHub

If you want me to add others specific features, post bellow.
Reply


Messages In This Thread
AFK Auto-Detector[v0.2] - by Mihaitza97 - 12.07.2014, 19:59
Respuesta: AFK Auto-Detector[v0.1] - by Swedky - 12.07.2014, 20:03
Re: AFK Auto-Detector[v0.1] - by Mihaitza97 - 12.07.2014, 20:07
Re: AFK Auto-Detector[v0.1] - by friezakinght - 12.07.2014, 20:09
Re: AFK Auto-Detector[v0.1] - by mathuusho - 12.07.2014, 20:12
Re: AFK Auto-Detector[v0.1] - by SickAttack - 12.07.2014, 20:17
Re: AFK Auto-Detector[v0.1] - by Mihaitza97 - 12.07.2014, 20:20
Re: AFK Auto-Detector[v0.1] - by SickAttack - 12.07.2014, 20:26
Re: AFK Auto-Detector[v0.1] - by Mihaitza97 - 21.07.2014, 14:47
Re: AFK Auto-Detector[v0.1] - by n0minal - 22.07.2014, 02:04

Forum Jump:


Users browsing this thread: 2 Guest(s)