[HELP] time convert
#1

Hi guys, I need to convert the time from minutes to hours.. For example: 68min --> 1 h. 8 min.

I have this one:

pawn Код:
TimeConvert(seconds)
{
    new tmp[16];
    new minutes = floatround(seconds/60);
    seconds -= minutes*60;
    format(tmp, sizeof(tmp), "%d:%02d", minutes, seconds);
    return tmp;
}
How to change?
Reply
#2

pawn Код:
hour=minutes/60;
Rest=minutes-(hour*60);
format (string, sizeof(string), "%dh %dmin", hour, Rest);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)