Thread: [INC] Unix Time
View Single Post
rak
Veteran Member
Join Date: Oct 2011
Location: banned country
Old 08-25-2012 , 02:29   Re: [INC] Unix Time
Reply With Quote #13

bugsy, look, i use your .inc to make a task in a specific date.. if i use the stock without my change, this give me bad result

look my code
PHP Code:
public _register_task_date(iPluginiParams) {
    
    new 
iTime TimeToUnix(get_param(1), get_param(2), get_param(3), get_param(4), get_param(5), get_param(6), UT_TIMEZONE_SERVER)
    
    new 
SysTime get_systime()
    
    
server_print("iTime=%d || SysTime=%d || Diference=%d"iTimeSysTime, (iTime-SysTime))
    
    if((
SysTime get_timeleft()) < iTime)
        return -
1
    
    
if((iTime iTime SysTime) <= 0)
        return -
2

    entity_set_float
(g_EntEV_FL_nextthinkfloat(iTime))

    return 
1

EDIT:

I found the diference.. it's from get_systime..
PHP Code:
get_systime() 

PHP Code:
get_systime(TimeZoneOffset[GetTimeZone()]) 
sorry bugsy
__________________

www.amxmodx-es.com

Steam: Luchokoldo

Last edited by rak; 08-25-2012 at 03:12.
rak is offline
Send a message via MSN to rak Send a message via Skype™ to rak