Convert 60 seconds to 1:00(minutes to secons)
#3

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;
}
pawn Код:
format(string, sizeof(string), "~w~TIME LEFT~n~~r~%d", ConvertToMinutes(PrisonTime[i]));
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)