31.01.2013, 17:48
Quote:
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... |
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;
}