AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   nVault - Database (https://forums.alliedmods.net/showthread.php?t=108830)

Leon M. 11-10-2009 02:45

nVault - Database
 
Hello guys,

I would like to use the nvault database instead of the vault database to store some important values of my plugin. But I haven't any experience with the nvault modul and didn't find a tutorial.

1. Should I open and close the database for each query, or should I open the database on plugin_init and close them on plugin_end?
2. What is the parent folder of the nvault_open function, the cstrike folder or the data folder where I can find the vault.ini?

Many many thanks in advance.

Best Regards
Leon

unnyquee 11-10-2009 03:31

Re: nVault - Database
 
Your nVault folder is in:
PHP Code:

$gamedir/addons/amxmodx/data/vault 

No, you don't have to open or close the nVault at each query :)
Just start it in plugin_init() and close it in plugin_end() or wherever in your public.

Hope that helps :)

xbatista 11-10-2009 03:52

Re: nVault - Database
 
I'm using this :up:
http://forums.alliedmods.net/showthread.php?t=91503

unnyquee 11-10-2009 04:11

Re: nVault - Database
 
It is a very good way to store data :) (like frags, deaths, money or whatever)
But if you want to display those informations on websites, you could use DBI (from my point of view, it's very simple) :)

Good luck!

Leon M. 11-10-2009 05:55

Re: nVault - Database
 
omg :oops:, I'm blind. I didn't find this thread. Thank you very much for the replies.

unnyquee 11-10-2009 06:09

Re: nVault - Database
 
I hope that you are aware that nVault informations are stored in binary mode.. so you can't open them and read just like an ordinary document.. :)

Leon M. 11-10-2009 10:19

Re: nVault - Database
 
I know but its not necessary to read the file. I will only store some settings for the clients which are used in the game. :)

grimvh2 11-10-2009 11:42

Re: nVault - Database
 
Im using this : http://forums.alliedmods.net/showthread.php?t=76453

Pretty happy so far.


All times are GMT -4. The time now is 17:48.

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