Detect back windows?
#6

Quote:
Originally Posted by Rapgangsta
Посмотреть сообщение
Nope, you can't detect if a players has alt-tabbed, you can only see it in game (only if you use SA-MP nametag)

And no one knows why...
It's possible;

pawn Код:
#include <a_samp>
 
new Timer[MAX_PLAYERS],pPaused[MAX_PLAYERS];
 
forward public AFKTimer(playerid);
 
public OnPlayerConnect(playerid)
{
        pPaused[playerid] = 1;
        Timer[playerid] = SetTimerEx("AFKTimer",500,1,"i",playerid);
        return 1;
}
 
public AFKTimer(playerid)
{
        pPaused[playerid] = 1;
        return 1;
}
 
public OnPlayerUpdate(playerid)
{
        pPaused[playerid] = 0;
        return 1;
}
 
public OnPlayerDisconnect(playerid)
{
        KillTimer(Timer[playerid]);
        return 1;
}
OnPlayerUpdate returns 0 when a player is paused.
Reply


Messages In This Thread
Detect back windows? - by scott1 - 31.01.2013, 17:25
Re: Detect back windows? - by wups - 31.01.2013, 17:30
Re: Detect back windows? - by Gforcez - 31.01.2013, 17:33
Re: Detect back windows? - by FufLa - 31.01.2013, 17:36
Re: Detect back windows? - by Rapgangsta - 31.01.2013, 17:45
Re: Detect back windows? - by tyler12 - 31.01.2013, 17:48
Re: Detect back windows? - by Cypress - 31.01.2013, 17:51
Re: Detect back windows? - by wups - 31.01.2013, 18:02
Re : Re: Detect back windows? - by scott1 - 31.01.2013, 18:26
Re: Detect back windows? - by AndreT - 01.02.2013, 09:26

Forum Jump:


Users browsing this thread: 2 Guest(s)