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.
PHP Code:
public test(id, lvl, cid)
{
if(!cmd_access(id, lvl, cid, 3))
return PLUGIN_HANDLED
new arg[32], Value[32], TimeStamp
new dMonth, dDay, dYear, dHour, dMinute, dSecond
new iMonth, iDay, iYear, iHour, iMinute, iSecond
read_argv(1, arg, 31)
read_argv(2, Value, 31)
new data = nvault_lookup(x_Vault, arg, Value, 31, TimeStamp)
if(data)
{
new CreateDate = TimeStamp
new iUnixTime = ( TimeStamp + (10 * 86400) )
UnixToTime( CreateDate , dYear , dMonth , dDay , dHour , dMinute , dSecond )
UnixToTime( iUnixTime , 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
}