22.02.2013, 10:58
Код:
new LastPlayerUpdate[MAX_PLAYERS]; #define IsPlayerPaused(%1,%2) GetTickCount() > (LastPlayerUpdate[%1] + (%2 * 1000)) // Returns the paused time in seconds // Example Usage: public OnPlayerUpdate(playerid) { LastPlayerUpdate[playerid] = GetTickCount(); return 1; } // In a timer or something if(IsPlayerPaused(playerid, 300) && GetPlayerState(playerid) != PLAYER_STATE_SPECTATING) // 300 seconds = 5 minutes { Kick(playerid); }