10.10.2014, 23:09
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]));