Quote:
Originally Posted by kirostar
|
Interesting people in this community..
Quote:
Originally Posted by SickAttack
pawn Код:
stock ConvertToMinutes(time) { new string[10], minutes, seconds; if(time > 59) { minutes = floatround(time / 60); seconds = floatround(time - minutes * 60); format(string, sizeof(string), "%02d:%02d", minutes, seconds); } else { seconds = floatround(time); format(string, sizeof(string), "00:%02d", seconds); } return string; }
|
Small improvement:
pawn Код:
ConvertToMinutes(time)
{
new string[10], minutes, seconds;
minutes = floatround(time / 60);
seconds = floatround(time - minutes * 60);
format(string, sizeof(string), "%02d:%02d", minutes, seconds);
return string;
}
You don't need an if check there..