Raised This Month: $ Target: $400
 0% 

nVault


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
~Ice*shOt
Veteran Member
Join Date: Mar 2009
Location: Lithuania
Old 11-28-2014 , 16:10   nVault
Reply With Quote #1

I have this vault and I need to add one more saving, it's bool variable: g_bTrue[][]. Here is what I have

PHP Code:
new const g_szSomething[][] =
{
      
"First",
      
"Second",
      
"Third"
      
// etc.
};

new 
boolg_bTrue[33][sizeof g_szSomething]; // NEED TO ADD THIS IN SAVE AND LOAD FUNCTIONS
 
new g_iVar1[33];
new 
g_iVar2[33];
 
public 
SaveData(id)
{
    new 
szData[16];
    new 
szKey[40];
 
    
formatex(szKeycharsmax(szKey), "%s-AuthID"g_szAuthID[id]);
    
formatex(szDatacharsmax(szData), "%i#%i#"g_iVar1[id], g_iVar2[id]);
 
    
nvault_set(g_VaultszKeyszData);
}
 
public 
LoadData(id)
{
    new 
szData[16];
    new 
szKey[40];
 
    
formatex(szKeycharsmax(szKey), "%s-AuthID"g_szAuthID[id]);
    
formatex(szDatacharsmax(szData), "%i#%i#"g_iVar1[id], g_iVar2[id]);
 
    
nvault_get(g_VaultszKeyszDatacharsmax(szData));
 
    
replace_all(szData255"#"" ")
 
    new 
szVar1[32], szVar2[32];
    
parse(szDataszVar1charsmax(szVar1), szVar2charsmax(szVar2));
 
    
g_iVar1[id] = str_to_num(szVar1);
    
g_iVar2[id] = str_to_num(szVar2);

I am asking for a help because my knowledge of nvault is very low.

Last edited by ~Ice*shOt; 11-28-2014 at 16:11.
~Ice*shOt is offline
Send a message via Skype™ to ~Ice*shOt
 


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 17:41.


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