16.06.2010, 09:06
I posted this about a week ago, it's probably the simplest way of detecting if a player is paused.
Then to check if they're paused, use:
You can also define it like this, to have a simple function to use:
You could also change the 2000 to something lower or higher.
pawn Код:
new lastupdate[MAX_PLAYERS];
public OnPlayerUpdate(playerid) {
lastupdate[playerid] = GetTickCount();
return 1;
}
pawn Код:
if(GetTickCount() > (lastupdate[playerid]+2000))
pawn Код:
#define IsPlayerPaused(%1) GetTickCount() > (lastupdate[%1]+2000)