Timer stops incrementing variable after a while.
#1

pawn Код:
forward HourTimer();
public HourTimer()
{

   
    for(new i; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerNPC(i)) continue;
        if(!IsPlayerConnected(i) ) continue;
        if(PlayerStats[i][Minutes] >= 60)
        {
            if(PlayerStats[i][Hours] == 0)
            {
                SendClientMessage(i,0xffffff,"{FFFFFF}level up obtained, You have recieved $20000");
                SendClientMessage(i,0xffffff,"{FFFFFF}Next level: 23 hours, Reward: ");
                GivePoints(i,20000);
                if(PlayerStats[i][Level] == 0)
                {
                    PlayerStats[i][Level] = 1;
                    ResetColor(i);
                }
            }
            if(PlayerStats[i][Hours] == 23)
            {
                SendClientMessage(i,0xffffff,"{FFFFFF}Level up obtained, maximum level reached for now.");
                GivePoints(i,75000);
                if(PlayerStats[i][Level] == 1)
                {
                    PlayerStats[i][Level] = 2;
                    ResetColor(i);
                }
            }
            PlayerStats[i][Hours]++;
            PlayerStats[i][Minutes] = 0;
            UpdateScore(i);
            HUDUpdateHours(i);
            continue;
        }
        else
        {
            PlayerStats[i][Minutes]++;
        }
    }
}

any ideas?
Reply


Messages In This Thread
Timer stops incrementing variable after a while. - by Hoborific - 27.02.2014, 06:57
Re: Timer stops incrementing variable after a while. - by Lidor124 - 27.02.2014, 07:05
Re: Timer stops incrementing variable after a while. - by Hoborific - 27.02.2014, 07:15

Forum Jump:


Users browsing this thread: 1 Guest(s)