Raised This Month: $64 Target: $400
 16% 

New File Vault - A newer file vault system!


Post New Thread Reply   
 
Thread Tools Display Modes
Emp`
AMX Mod X Plugin Approver
Join Date: Aug 2005
Location: Decapod 10
Old 05-22-2009 , 16:21   Re: New File Vault - A newer file vault system!
Reply With Quote #11

Quote:
Originally Posted by Exolent[jNr] View Post
What is the advantage of using a "name" along with the "key" rather than formatting all of the data into one to save it, and then breaking it apart to use it.
Also, what about just formatting the "name" and "key" into one key?
It reduces read/write times when there is a lot of data saved.

Also, some config files plugins use have a format similar to this where it is broken down into subcategories.
Emp` is offline
Send a message via AIM to Emp` Send a message via MSN to Emp` Send a message via Yahoo to Emp` Send a message via Skype™ to Emp`
AntiBots
Veteran Member
Join Date: May 2008
Location: La Plata, Bs As, Argenti
Old 05-24-2009 , 19:12   Re: New File Vault - A newer file vault system!
Reply With Quote #12

Thanks. Good Job
__________________
AntiBots is offline
Send a message via ICQ to AntiBots Send a message via MSN to AntiBots Send a message via Skype™ to AntiBots
alan_el_more
Veteran Member
Join Date: Jul 2008
Location: amxmodx-es.com
Old 09-24-2009 , 09:06   Re: New File Vault - A newer file vault system!
Reply With Quote #13

If the server crash, you lose all data -.-
__________________
alan_el_more is offline
Alucard^
AMXX Moderator: Others
Join Date: Sep 2007
Location: Street
Old 09-24-2009 , 13:46   Re: New File Vault - A newer file vault system!
Reply With Quote #14

GJ Emp... in this moment i don't need to use this but sure i will use it in another time. I like your tutorials.
__________________
Approved Plugins - Steam Profile

Public non-terminated projects:
All Admins Menu, HLTV parameters, Subnick,
Second Password (cool style), InfoZone,
Binary C4 plant/defuse, and more...

Private projects:
NoSpec (+menu), NV Surf Management,
PM Adanved System, KZ longjump2, and more...
Alucard^ is offline
Send a message via Skype™ to Alucard^
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 09-24-2009 , 14:09   Re: New File Vault - A newer file vault system!
Reply With Quote #15

Quote:
Originally Posted by Emp` View Post
Pruning Data
  • Vault: Not Capable
  • NVault:
    Code:
    nvault_prune(vault, start, end);
  • FVault: Not Capable
  • NFVault:
    PHP Code:
    nfv_prune(const key[], const start=-1, const end=-1); 

Touching Little Boys Data
  • Vault: Not Capable
  • NVault:
    Code:
    nvault_touch(vault, const key[], timestamp=-1);
  • FVault: Not Capable
  • NFVault:
    PHP Code:
    nfv_touch(const filename[], const new_time=-1); 
FVault actually has these capabilities now.

The differences now is the way that the keys work.
Yours, you can have a name and a key, such as this:
Code:
new szFilename[ 128 ]; copy( szFilename, 127, nfv_file( "some_mod.txt" ) ); new szAuthid[ 35 ]; get_user_authid( client, szAuthid, 34 ); new szData[ 16 ]; // save num_to_str( get_user_frags( client ), szData, 15 ); nfv_set_data( szFilename, szAuthid, "frags", szData ); num_to_str( get_user_deaths( client ), szData, 15 ); nfv_set_data( szFilename, szAuthid, "deaths", szData ); // load nfv_get_data( szFilename, szAuthid, "frags", szData, 15 ); new iFrags = str_to_num( szData ); nfv_get_data( szFilename, szAuthid, "deaths", szData, 15 ); new iDeaths = str_to_num( szData );
Whereas mine would be:
Code:
new const szVaultName[ ] = "some_mod"; new szAuthid[ 35 ]; get_user_authid( client, szAuthid, 34 ); new szData[ 32 ]; // save formatex( szData, 31, "%i %i", get_user_frags( client ), get_user_deaths( client ) ); fvault_set_data( szVaultName, szAuthid, szData ); // load new szFrags[ 16 ], szDeaths[ 16 ]; fvault_get_data( szVaultName, szAuthid, szData, 31 ); parse( szData, szFrags, 15, szDeaths, 15 ); new iFrags = str_to_num( szFrags ); new iDeaths = str_to_num( szDeaths );
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
hleV
Veteran Member
Join Date: Mar 2007
Location: Lithuania
Old 09-25-2009 , 11:28   Re: New File Vault - A newer file vault system!
Reply With Quote #16

I wish someone made a simple SQLite Vault.
__________________
hleV is offline
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 09-25-2009 , 15:59   Re: New File Vault - A newer file vault system!
Reply With Quote #17

It's already made? AMXMODX base pack have sqlite, just make a tuple with null server/name/password then use the same syntaxes as MySQL.
__________________
Still...lovin' . Connor noob! Hello
Alka is offline
hleV
Veteran Member
Join Date: Mar 2007
Location: Lithuania
Old 09-25-2009 , 17:38   Re: New File Vault - A newer file vault system!
Reply With Quote #18

It would be easier to just do sqlite_[save|load]. I suck at SQL. It never works for me.
__________________
hleV is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 09-27-2009 , 01:43   Re: New File Vault - A newer file vault system!
Reply With Quote #19

Quote:
Originally Posted by hleV View Post
It would be easier to just do sqlite_[save|load]. I suck at SQL. It never works for me.
I agree and second this idea\request. A module that does SQL transactions with the ease of nvault-esque commands. I may start trying to put something together for this.
__________________
Bugsy is offline
Emp`
AMX Mod X Plugin Approver
Join Date: Aug 2005
Location: Decapod 10
Old 12-05-2009 , 14:20   Re: New File Vault - A newer file vault system!
Reply With Quote #20

Changes on new update:
  • Added several "advanced" functions
  • Added tagged functions for easier saving
  • Added several tagged player functions
  • Added extra string functions
  • Changed param overwrite to a bitsum of properties
  • "get" functions now have extra params for seeking and finding
  • Wildcard constant for key and name lets it detect anything
  • "get" functions have extra params for copying when Wildcard is used
  • Data will by default clean itself of "s by putting a temporary replacement character. (Retrieving data will put "s back in)


Attaching old version below for backup reasons. See first post for new version.
Attached Files
File Type: inc nfvault.inc (13.8 KB, 117 views)
Emp` is offline
Send a message via AIM to Emp` Send a message via MSN to Emp` Send a message via Yahoo to Emp` Send a message via Skype™ to Emp`
Reply


Thread Tools
Display Modes

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 11:35.


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