Raised This Month: $ Target: $400
 0% 

[SOLVED] Export Nvault data to .txt file.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
yokomo
Surprise Ascot!
Join Date: May 2010
Location: Malaysia
Old 08-06-2011 , 02:07   Re: [HELP] Export Nvault data to .txt file.
Reply With Quote #1

Quote:
Originally Posted by Bugsy View Post
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 
szFile64 ];

public 
plugin_init() 
{
    
register_plugin"Export nVault to Text" Version "bugsy" );
    
    
formatexszFileget_datadirszFile charsmaxszFile ) ) ] , charsmaxszFile ) , "/vault/%s" OutputFile );
    
    new 
iVaultHandle nvault_util_opennVaultFile );
    
nvault_util_readalliVaultHandle "nvault_export_fwd" );
    
nvault_util_closeiVaultHandle );
}

public 
nvault_export_fwdiCurrent iTotal , const szKey[] , const szVal[] , iTimeStamp , const Data[] , iSize )
{
    static 
szData1024 ];

    
formatexszData charsmaxszData ) , "%s%c%s%c%d" szKey Delimiter szVal Delimiter iTimeStamp ); 
    
write_fileszFile 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
yokomo is offline
rx1983
Senior Member
Join Date: Jan 2009
Location: BRASIL
Old 12-25-2012 , 16:10   Re: [SOLVED] Export Nvault data to .txt file.
Reply With Quote #2

how to create a new file. nvault_export.txt
overwriting what was written before?
ie always deleting what was already her ???
__________________
rx1983 is offline
Send a message via MSN to rx1983
Reply



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 03:20.


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