06.06.2010, 19:34
anyone can come in handy
use
PS days themselves split
Код:
ConvertSeconds(time) { new string[128]; if(time < 60)format(string, sizeof(string), "%d seconds", time); else if(time == 60)string = "1 minute"; else if(time > 60 && time < 3600) { new Float: minutes; new seconds; minutes = time / 60; seconds = time % 60; format(string, sizeof(string), "%.0f minutes %d seconds", minutes, seconds); } else if(time == 3600)string = "1 hoiur"; else if(time > 3600) { new Float: hours; new minutes_int; new Float: minutes; new seconds; hours = time / 3600; minutes_int = time % 3600; minutes = minutes_int / 60; seconds = minutes_int % 60; format(string, sizeof(string), "%.0f:%.0f:%d", hours, minutes, seconds); } return string; }
Код:
format(string,sizeof(string),"SERVER: blahblahblah %s.",ConvertSeconds(TIME_TO_KICK));