07.09.2011, 11:56
There are more efficient ways to do it(for the alttabing). Btw it shouldn't be called alt-tabbing, because it returns true even if you pressed the pause key(ESC).
pawn Код:
new PlayerTick[MAX_PLAYERS];
#define IsPlayerAfk(%0) (PlayerTick[%0]+1000 < GetTickCount())
public OnPlayerUpdate(playerid)
{
PlayerTick[playerid]=GetTickCount();
}