Raised This Month: $ Target: $400
 0% 

Calculate days


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
killergirl
Senior Member
Join Date: Jul 2010
Old 04-25-2011 , 19:52   Calculate days
Reply With Quote #1

I think the topic title says it all. I'm trying to find a way to calculate days before the the plugin prune the vault file.

Here is my code:
PHP Code:
public test(idlvlcid)
{
    if(!
cmd_access(idlvlcid3))
        return 
PLUGIN_HANDLED
    
    
new arg[32], Value[32], TimeStamp
    
    
new dMonthdDaydYeardHourdMinutedSecond
    
new iMonthiDayiYeariHouriMinuteiSecond
    
    read_argv
(1arg31)
    
read_argv(2Value31)
    
    new 
data nvault_lookup(x_VaultargValue31TimeStamp)
    
    if(
data)
    {
        new 
CreateDate TimeStamp
        
new iUnixTime = ( TimeStamp + (10 86400) )
        
        
UnixToTimeCreateDate dYear dMonth dDay dHour dMinute dSecond )
        
UnixToTimeiUnixTime iYear iMonth iDay iHour iMinute iSecond )
        
        
console_print(id"Created: = %02d/%02d/%02d %02d:%02d:%02d" dYear dMonth dDay dHour dMinute dSecond )
        
console_print(id"Prune: = %02d/%02d/%02d %02d:%02d:%02d" iYear iMonth iDay iHour iMinute iSecond )
        
        new 
HowToCalculateDays = ???
        
        
console_print(id"Day's remaining to prune x_Vault: %d"HowToCalculateDays)
    }
    else
    {
        
        
console_print(id"No existing data !")
    }
    return 
PLUGIN_HANDLED

killergirl 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 19:54.


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