13.01.2014, 13:32
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:
Anyone who could help me out with this?
Thanks!
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;
Thanks!