Quote:
Originally Posted by Seif_
Quote:
Originally Posted by russooooo
Quote:
Originally Posted by Seif_
To see if he's paused, run a timer in OnPlayerUpdate that gets called in 2 seconds. In that timer function, you will know the player is paused. Kill the timer before you call it.
|
I didn't understand a shit. Sorry for the bad word but i don't know other for this case.
Can you please show me? Thanks. 
|
|
There's an easier way to do this:
pawn Код:
new lastupdate[MAX_PLAYERS];
public OnPlayerUpdate(playerid) {
lastupdate[playerid] = GetTickCount();
}
Then to check if they're paused, use:
pawn Код:
if(GetTickCount() > (lastupdate[playerid]+2000))
You can also define it like this, to have a simple function to use:
pawn Код:
#define IsPlayerPaused(%1) GetTickCount() > (lastupdate[%1]+2000)