24.10.2011, 03:05
Algo asн:
output[0] dice que tipo de dato es (dнas, horas, minutos, segundos, milisegundos) y output[1] la cantidad.
pawn Код:
stock Float:EllaDiceBeautiful(Float:tick_count)
{
new output[2] = {-1, -1};
output[1] = tick_count / 86400000.0;
if(output[1] < 1.0)
{
output[1] = tick_count / 3600000.0;
if(output[1] < 1.0)
{
output[1] = tick_count / 60000.0;
if(output[1] < 1.0)
{
output[1] = tick_count / 1000.0;
if(output[1] < 1.0)
{
output[1] = tick_count;
output[0] = 0;
}
else output[0] = 1;
}
else output[0] = 2;
}
else output[0] = 3;
}
else output[0] = 4;
return output;
}