nVault Utility
PHP Code:
#include <amxmodx>
#include <nvault_util>
new const Version[] = "0.1";
public plugin_init()
{
register_plugin( "nVault to SQL" , Version , "bugsy" );
nVault_to_SQL();
}
public nVault_to_SQL()
{
new iVault = nvault_util_open( "yourVault" );
nvault_util_readall( iVault , "nVault_to_SQL_Result" );
nvault_util_close( iVault );
}
public nVault_to_SQL_Result( iCurrent , iTotal , const szKey[] , const szVal[] , iTimeStamp , const Data[] , iSize )
{
new szBuffer[ 128 ];
formatex( szBuffer , charsmax( szBuffer ) , "INSERT INTO yourTable (%s) VALUES (%s)" , szKey , szVal );
//Execute SQL (szBuffer)
}
__________________