Timer Question
#1

Hello, i would ask if there is anything wrong with this code, will it working?

Код:
TimeConvert(time)
{
    new minutes;
    new seconds;
    new string[128];
    if(time > 59){
        minutes = floatround(time/60);
        seconds = floatround(time - minutes*60);
        if(seconds>9)format(string,sizeof(string),"%d:%d",minutes,seconds);
        else format(string,sizeof(string),"%d:0%d",minutes,seconds);
    }
    else{
        seconds = floatround(time);
        if(seconds>9)format(string,sizeof(string),"0:%d",seconds);
        else format(string,sizeof(string),"0:0%d",seconds);
    }
    return string;
}
Reply


Messages In This Thread
Timer Question - by Blackazur - 03.06.2013, 18:03
Re: Timer Question - by Scenario - 03.06.2013, 18:06
AW: Timer Question - by Blackazur - 03.06.2013, 18:17

Forum Jump:


Users browsing this thread: 1 Guest(s)