2025-09-07, 06:29 AM
This is a stock :
Code:
stock Convert(seconds, stringTos[], size = sizeof(stringTos))
{
stringTos[0] = 0x0;
new result[4];
result[0] = floatround(seconds / (3600 * 24));
result[1] = floatround(seconds / 3600);
result[2] = floatround((seconds / 60) - (result[1] * 60));
result[3] = floatround(seconds - ((result[1] * 3600) + (result[2] * 60)));
switch(result[0])
{
case 0:
{
switch(result[1])
{
case 0: format(stringTos,size,"%d:%02d",result[2],result[3]);
default: format(stringTos,size,"%d:%d:%02d",result[1],result[2],result[3]);
}
}
}
return stringTos;// Convert(time[0]/1000, timew[0]);//51
}