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