I managed to confuse myself - Custom game time help
#1

Brief: If the time is afternoon (pm), the world time should not look like midnight, however it does. I thought I was pro at counting and conditionals. lol

pawn Код:
// Update time
    minute++;
    if(minute == 60)
    {
        minute = 0;
        hour++;
    }
    if(hour == 12 && minute == 0)
    {
        if(IsMorning == true){IsMorning = false;}
        else{IsMorning = true;}
    }
    if(hour == 13){hour = 1;}
    new gamehour;
    if((IsMorning == false && hour != 12) || (IsMorning == true && hour == 12))
    {
        gamehour = hour+12;
    }
    else {gamehour = hour;}
    SetWorldTime(gamehour);
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 3 Guest(s)