Raised This Month: $ Target: $400
 0% 

Event for specified time - do every day in xx:xx hours


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
FromTheFuture
Senior Member
Join Date: Jan 2013
Old 10-06-2014 , 15:02   Re: Event for specified time - do every day in xx:xx hours
Reply With Quote #4

PHP Code:
stock set_task_runtime(str_time[11], const func[], id 0, const param[] = ""len 0
{
    new 
h[5], m[5], s[5]; 

    
get_time("%H"hcharsmax(h)); 
    
get_time("%M"mcharsmax(m)); 
    
get_time("%S"scharsmax(s)); 
  
    new 
iCurSeconds = (str_to_num(h) * 3600) + (str_to_num(m) * 60) + str_to_num(s); 
  
    
replace_all(str_timecharsmax(str_time), ":" " "); 
    
parse(str_timehcharsmax(h), mcharsmax(m), scharsmax(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 = ( 86400 iCurSeconds ) + iRunSeconds;
    }
  
    return 
set_task(float(iTotal), funcidparamlen); 

FromTheFuture is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 17:36.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode