Raised This Month: $ Target: $400
 0% 

Vault, help?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
BioHazardousWaste
Senior Member
Join Date: Apr 2005
Location: Ontario, Canada =)
Old 04-23-2005 , 15:04  
Reply With Quote #4

V3x.. you screwed up on this line here.. suprised you didn't get a missing parameter error:

set_vaultdata(vData)

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 }


That should fix it up for you
__________________
"What then is truth? Truths are illusions which we have forgotten are illusions - they are metaphors that have become worn out... this (truth) is the duty to lie according to a fixed convention.

-Friedrich Nietzsche
BioHazardousWaste is offline
Send a message via MSN to BioHazardousWaste
 



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 09:55.


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