Posts: 1,208
Threads: 36
Joined: Apr 2015
Quote:
Originally Posted by Dusan01
here u go a function:
PHP код:
stock ConvertTime(vreme)
{
new minuti, sekunde, string[128];
if(vreme > 59)
{
minuti = floatround(vreme/60);
sekunde = floatround(vreme - minuti*60);
if(sekunde > 9) format(string, sizeof(string), "%d:%d", minuti, sekunde);
else format(string, sizeof(string), "%d:0%d", minuti, sekunde);
}
else
{
sekunde = floatround(vreme);
if(sekunde > 9) format(string, sizeof(string), "0:%d", sekunde);
else format(string, sizeof(string), "0:0%d", sekunde);
}
return string;
}
|
First, learn how to use format ~.~
https://sampwiki.blast.hk/wiki/Format