PHP Code:
//plugin_cfg - Clear out everything that is in the vault up until current time
//This will eliminate all records that have expired
nvault_prune( vault , 0 , get_systime() );
//give playe something
nvault_set( vault , "STEAM:0:12345" , "glock" );
//Set the timestamp to now + 1 day
nvault_touch( vault , "STEAM:0:12345" , get_systime() + 86400 );
//player trying to do something
if ( nvault_lookup( vault , "STEAM:0:12345" , szVal , charsmax( szVal ) , iTS ) )
//item found
else
//item expired or never existed (doesnt exist in vault right now)
You can instead not prune, and respond to the player accordingly based on the expired timestamp value returned by nvault_lookup().
PHP Code:
if ( iTS < get_systime() )
//Sorry, this item has expired
__________________