Convert seconds to minutes and seconds
#1

Hello,

I'm trying to convert seconds, to minutes and seconds. For example 119 seconds, would be 1 minute and 59 seconds.

How do I do that in PAWN? This is what I got so far, probably totally wrong:

pawn Код:
new string[128], timeTotal, minutes, secondss, seconds, secondsinstring;
                timeTotal = gettime() - PInfo[playerid][StartTime];
                minutes = timeTotal / 60;
                sscanf(minutes, "p<.>ii", minutes, secondss);
                format(string, sizeof(string), "0.%d", secondss);
                sscanf(string, "i", seconds);
                secondsinstring = seconds * 60;
Anyone who could help me out with this?

Thanks!
Reply


Messages In This Thread
Convert seconds to minutes and seconds - by SomebodyAndMe - 13.01.2014, 13:32
Re: Convert seconds to minutes and seconds - by cessil - 13.01.2014, 13:38
Re: Convert seconds to minutes and seconds - by SomebodyAndMe - 13.01.2014, 13:58

Forum Jump:


Users browsing this thread: 3 Guest(s)