Detect back windows?
#9

Quote:
Originally Posted by tyler12
Посмотреть сообщение
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.
The onplayerupdate won't be called if the player is back windows.

And, if it's call you func won't work

Max
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: 1 Guest(s)