V3x.. you screwed up on this line here.. suprised you didn't get a missing parameter error:
what you need to do is save some data INTO the key vData. I would do it like this.
Code:
#include <amxmodx>
public plugin_init() {
register_plugin("Vault data test","0.1","v3x")
register_clcmd("say vault_test","Vault_Test")
}
public Vault_Test(id) {
new authID[30]
get_user_authid(id,authID,29)
new name[33]
get_user_name(id,name,32)
//adding here
new vKey[78]
format(vKey,77, "%s", authID)
//this ^^ will be your key (or reference)
new vData[78]
format(vData,77,"%s_%s_1337",authID,name)
//this ^^ will be the data you are actually saving
if(!vaultdata_exists(vData)) {
set_vaultdata(vKey, vData)//fixed this line, to save vData into vKey
client_print(id,print_chat, "User %s (SteamID %s) saved to vault!", name, authID)//adding a better msg lol
}
else if(vaultdata_exists(vData)) {
//set_vaultdata(vData2)
client_print(id,print_chat,"User %s (SteamID %s) already exists!", name, authID)//adding another better message :P
client_print
}
return PLUGIN_HANDLED
}