I have this, bit it's need to fix errors.
PHP Code:
stock set_task_runtime(time[11], const func[], id = 0, const param[]="", len = 0)
{
new h[5], m[5], s[5]
get_time("%H", h, charsmax(h))
get_time("%M", m, charsmax(m))
get_time("%S", s, charsmax(s))
new iCurSeconds = (str_to_num(h) * 3600) + (str_to_num(m) * 60) + str_to_num(s)
replace_all(time, charsmax(time), ":" , " ")
parse(time, h, charsmax(h), m, charsmax(m), s, charsmax(s))
new iRunSeconds = (str_to_num(h) * 3600)+ (str_to_num(m) * 60) + str_to_num(s)
new iTotal = iRunSeconds - iCurSeconds
if(iTotal<=0) iTotal = iCurSeconds - iRunSeconds
return set_task(float(iTotal), func, id, param, len)
}
PHP Code:
set_task_runtime("23:00:00", "GoToSleep_Kid", id)
If anyone is can fix it, please.