Question about timers/time
#2

Just check if the player is paused or not when hours, minutes and seconds equals 0

pawn Код:
#define PAUSE_THRESHOLD_SECONDS \
    5

new g_PlayerLastUpdate[MAX_PLAYERS];

#define GetPlayerPausedTime(%0) \
    (gettime() - g_PlayerLastUpdate[%0])

#define IsPlayerPaused(%0) \
    (gettime() - g_PlayerLastUpdate[%0] > PAUSE_THRESHOLD_SECONDS)

public OnPlayerUpdate(playerid) {
    g_PlayerLastUpdate[playerid] = gettime();
    return 1;
}
Reply


Messages In This Thread
Question about timers/time - by Saddin - 18.11.2017, 20:55
Re: Question about timers/time - by RedFusion - 18.11.2017, 21:00
Re: Question about timers/time - by Saddin - 18.11.2017, 21:02
Re: Question about timers/time - by RedFusion - 18.11.2017, 21:05
Re: Question about timers/time - by Saddin - 18.11.2017, 21:06
Re: Question about timers/time - by RedFusion - 18.11.2017, 21:08
Re: Question about timers/time - by Saddin - 18.11.2017, 21:17
Re: Question about timers/time - by RedFusion - 18.11.2017, 21:21
Re: Question about timers/time - by Lucases - 19.11.2017, 08:53

Forum Jump:


Users browsing this thread: 2 Guest(s)