Afk detector
#1

I have seen few servers having perfect afk system,when you press on esc,it automaticly puts a timer above your head and counts the seconds you are afk for,i asked one of the server's owners he told me that they dont use OnPlayerUpdate and if he dorsnt update for few minutes he gets counted ask afk,and he doesnt use position thing,then what is he using?he doesnt want to tell me thats why i am asking here,i just want to know how do they know if you are afk,when you just press on esc it knows,how?
Reply
#2

There's one way i can think of doing it something like this:

pawn Код:
new LastActive[MAX_PLAYERS];

//under some callback that requires user input (dialog response/onplayertext etc)
LastActive[playerid] = gettime();

//to check:

if(LastActive[playerid] > 5*60)// whatever you want here for being counted as AFK. I used 5 mins as an example.
{
    //code here.
}
Reply
#3

Not like that way....anyone?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)