|
Author
|
Message
|
|
Surprise Ascot!
Join Date: May 2010
Location: Malaysia
|

08-06-2011
, 02:07
Re: [HELP] Export Nvault data to .txt file.
|
#1
|
Quote:
Originally Posted by Bugsy
The export file will be created in the vault directory. You must specify nVaultFile and OutputFile. The default delimiter char is tab but you can change to whatever.
PHP Code:
#include <amxmodx> #include <nvault_util>
new const Version[] = "0.1";
new const nVaultFile[] = "vault_name"; new const Delimiter = ' '; new const OutputFile[] = "nvault_export.txt";
new szFile[ 64 ];
public plugin_init() { register_plugin( "Export nVault to Text" , Version , "bugsy" ); formatex( szFile[ get_datadir( szFile , charsmax( szFile ) ) ] , charsmax( szFile ) , "/vault/%s" , OutputFile ); new iVaultHandle = nvault_util_open( nVaultFile ); nvault_util_readall( iVaultHandle , "nvault_export_fwd" ); nvault_util_close( iVaultHandle ); }
public nvault_export_fwd( iCurrent , iTotal , const szKey[] , const szVal[] , iTimeStamp , const Data[] , iSize ) { static szData[ 1024 ];
formatex( szData , charsmax( szData ) , "%s%c%s%c%d" , szKey , Delimiter , szVal , Delimiter , iTimeStamp ); write_file( szFile , szData ); }
|
Thank you bugsy, work fine just like i want
__________________
Team-MMG CS1.6 Servers:
✅ MultiMod -- 103.179.44.152:27016
✅ Zombie Plague -- 103.179.44.152:27015
✅ Zombie Escape -- 103.179.44.152:27017
✅ Klassik Kombat -- 103.179.44.152:27018
✅ Boss-Battle -- 103.179.44.152:27019
|
|
|
|