13.03.2013, 19:59
I'm not sure. My Div Function is good, use it. It will return you how many times is b in a, without decimal places.
pawn Код:
stock Div(a,b)
{
new count = 0;
if(a < b) return 0;
while((count*b) < a)
{
count++;
}
count--;
return count;
}
stock ConvertTime(time)
{
new String[300];
new day = Div(time,24*60);
new hour = Div(time-(24*60*days),60);
new minute = time - (days*60*24)-(hour*60);
format(String, sizeof String, "{FF0000}%d {FFFFFF}days, {FF0000}%d {FFFFFF}hours and {FF0000}%d {FFFFFF}minutes", day, hour, minute);
return String;
}