Help me with this (floatround/timer/countdown)
#1

I dont know how to start lol, its all about countdown im about to make it textdraw for example
hours*3600

when i set hours = 1 out come 1*3600 equevalent to 1hour

how can i make that 3600 secs by dividing something that would make appear 1 Hour Left, and when its below 1 hour the out come will become in Minutes, For example 59mins left..58Mins left something like that

am i going to use floatround? and how? can anyone explain and teach me.

Sorry for my bad english
Reply
#2

Devide by 60. 3600 will become 60 so check if its <= 60 so its 1 hour + minutes else > 60 minutes.

I'm not sure if it will work tho.
Reply
#3

You can get hours with this function..
pawn Код:
stock CountDown(hours, countdown)
{
    new count = countdown - gettime();
    while(count > 3600)
    {
        hours ++;
        count = count - 3600;
    }
    return true;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)