Loop won't break correctly (Timer)
#7

Try this maybe :
PHP код:
    if(TMins == 60)
    {                            
//this resets the mins to 00 one it reaches 60
        
THrs ++;
        
TMins 00;
        foreach(new 
Player)
        {
            
SetPlayerTime(i,THrs,TMins);
            if(
LoggedIn[i])
            {
                if(
LastPayday[i] < 60)
                {
                    
SendClientMessage(iCOLOUR_PURPLE"You did not qualify for a paycheck as you have not played for enough time.");
                }
                else if(
LastPayday[i] >= 60)
                {
                    
doPayDay(i);
                }
                if(
DrunkLevel[i] != 0)
                {
                    
DrunkLevel[i] -= 0.015;
                    if(
DrunkLevel[i] < 0.08)
                       {
                          
SetPlayerDrunkLevel(i0);
                     }
                    else if(
DrunkLevel[i] >= 0.08 && DrunkLevel[i] < 0.2)
                    {
                        
SetPlayerDrunkLevel(i0);
                    }
                    else if(
DrunkLevel[i] >= 0.2 && DrunkLevel[i] < 0.5)
                    {
                        
SetPlayerDrunkLevel(i20000);
                    }
                    else if(
DrunkLevel[i] >= 0.5 && DrunkLevel[i] < 1.0)
                       {
                        
SetPlayerDrunkLevel(i30000);
                    }
                       else if(
DrunkLevel[i] >= 1.0)
                     {
                      
SetPlayerDrunkLevel(i50000);
                    }
                }
                return 
1;
            }
            else break;
        }
    } 
Reply


Messages In This Thread
Loop won't break correctly (Timer) - by Dokins - 02.06.2016, 13:41
Re: Loop won't break correctly (Timer) - by Stinged - 02.06.2016, 13:49
Re: Loop won't break correctly (Timer) - by Dokins - 02.06.2016, 13:50
Re: Loop won't break correctly (Timer) - by oMa37 - 02.06.2016, 13:50
Re: Loop won't break correctly (Timer) - by Dokins - 02.06.2016, 14:02
Re: Loop won't break correctly (Timer) - by Dokins - 02.06.2016, 14:41
Re: Loop won't break correctly (Timer) - by Dayrion - 02.06.2016, 16:31

Forum Jump:


Users browsing this thread: 2 Guest(s)