value to clock format?
#5

Quote:
Originally Posted by Dusan01
Посмотреть сообщение
here u go a function:
PHP код:
stock ConvertTime(vreme)
{
    new 
minutisekundestring[128];
    if(
vreme 59)
    {
        
minuti floatround(vreme/60);
        
sekunde floatround(vreme minuti*60);
        if(
sekunde 9format(stringsizeof(string), "%d:%d"minutisekunde);
        else 
format(stringsizeof(string), "%d:0%d"minutisekunde);
    }
    else
    {
        
sekunde floatround(vreme);
        if(
sekunde 9format(stringsizeof(string), "0:%d"sekunde);
        else 
format(stringsizeof(string), "0:0%d"sekunde);
    }
    return 
string;

First, learn how to use format ~.~
https://sampwiki.blast.hk/wiki/Format
Reply


Messages In This Thread
value to clock format? - by Lirbo - 08.07.2016, 17:46
Re: value to clock format? - by Dusan01 - 08.07.2016, 17:47
Re: value to clock format? - by AbyssMorgan - 08.07.2016, 17:49
Re: value to clock format? - by Konstantinos - 08.07.2016, 17:53
Re: value to clock format? - by AbyssMorgan - 08.07.2016, 17:54
Re: value to clock format? - by Dayrion - 08.07.2016, 18:11
Re: value to clock format? - by AbyssMorgan - 08.07.2016, 18:16
Re: value to clock format? - by Lirbo - 08.07.2016, 18:42

Forum Jump:


Users browsing this thread: 1 Guest(s)