AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Using vault... (https://forums.alliedmods.net/showthread.php?t=25988)

organizedKaoS 03-25-2006 02:52

Using vault...
 
I would like to know how to properly use vault so that I can write info to a vault file. I am trying to write a plugin that will write a persons steamid and all their names to this file so that it may be viewed at a later time. Could anyone help me to understand how to use vault for something like this? Thanks

VEN 03-25-2006 03:00

Code:
// vault.inc /* Reads a data from given key. * If len is set to zero then get_vaultdata * returns value as an number. */ native get_vaultdata(const key[], data[] = "", len = 0); /* Sets a data under given key. */ native set_vaultdata(const key[], const data[] = "" ); /* Removes a key from vault.*/ native remove_vaultdata(const key[]); /* Checks if a key exists in the vault.*/ native vaultdata_exists(const key[]);

Example of set_vaultdata:
Code:
set_vaultdata("key", "data here")
I believe output would be:
Code:

"key" "data here"

v3x 03-25-2006 03:05

nVault is better than regular Vault.

organizedKaoS 03-25-2006 03:09

Quote:

Originally Posted by v3x
nVault is better than regular Vault.

Differences please?

v3x 03-25-2006 03:25

nVault is faster and it supports multiple vault files, timestamps, etc.

Rixorster 03-25-2006 03:30

Can ya show like code example how to write to vault? i need this too :P


All times are GMT -4. The time now is 16:37.

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