lil question
#10

pawn Код:
New Minutes[MAX_PLAYERS];
New Hours[MAX_PLAYERS];
forward OnlineTimer(playerid);

SetTimerEx("OnlineTimer",60000,1,"i",playerid);

public OnlineTimer(playerid)
{
    Minutes[playerid]++;
    if(Minutes[playerid] == 60)
    {
        Hours[playerid]++;
        Minutes[playerid] = 0;
    }
    return 1;
}
also remember to stop the timer when the player goes offline
Reply


Messages In This Thread
lil question - by tanush - 21.03.2011, 23:43
Re: lil question - by Mauzen - 22.03.2011, 00:12
Re: lil question - by Marricio - 22.03.2011, 00:17
Re: lil question - by tanush - 22.03.2011, 00:54
Re: lil question - by tanush - 22.03.2011, 01:10
Re: lil question - by tanush - 22.03.2011, 02:07
Re: lil question - by Tee - 22.03.2011, 02:10
Re: lil question - by tanush - 22.03.2011, 03:19
Re: lil question - by Tee - 22.03.2011, 04:05
Re: lil question - by PinkFloydLover - 22.03.2011, 04:13

Forum Jump:


Users browsing this thread: 1 Guest(s)