31.01.2015, 08:13
i suggest you use this simple function:
an example:
pawn Код:
stock Sec2HMS(secs, &hours, &minutes, &seconds)
{
if (secs < 0) return false;
minutes = secs / 60;
seconds = secs % 60;
hours = minutes / 60;
minutes = minutes % 60;
return 1;
}
pawn Код:
new sec = 5162;
new Hours, Minutes, Seconds;
Sec2HMS(sec, Hours, Minutes, Seconds);
printf("%d:%d:%d",Hours, Minutes, Seconds);
//Output: 1:26:2