Raised This Month: $ Target: $400
 0% 

nvault.


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 01-19-2020 , 12:48   nvault.
Reply With Quote #1

So, i've been reading bugsy's tutorial on how to save and load data using nVault. I understand how to save and load a single array, but i have more than 1 array to save & load. The thing is i want to use formatex and use nvault_set just once to save the data. I'm not even sure if i can use nvault_set multiple times to save multiple arrays.

my current code (Code which doesn't work when i change map)
PHP Code:
public client_disconnect(id)
{
    new 
szAuth[35], szTemp[60]; 
    
get_user_authid(idszAuthcharsmax(szAuth));
    
    
formatex(szTempcharsmax(szTemp), "%i#%i#%i"iPoints[id], iTsKilled[id], iCtKilled[id]);
    
    
nvault_set(szVaultNameszAuthszTemp);
}

public 
client_connect(id)
{
    new 
szAuth[35], szTemp[60], szTsKills[33], szCtKills[33], szPoints[33];
    
get_user_authid(idszAuthcharsmax(szAuth));
    
    
formatex(szTempcharsmax(szTemp), "%i#%i#%i"iPoints[id], iTsKilled[id], iCtKilled[id]);
    
nvault_get(szVaultNameszAuthszTemp);
    
    
replace_all(szTempcharsmax(szTemp), "#"" ");
    
    
parse(szTempszTsKillscharsmax(szTsKills), charsmax(szCtKills), szPointscharsmax(szPoints));
    
    
iTsKilled[id] = str_to_num(szTsKills);
    
iCtKilled[id] = str_to_num(szCtKills);
    
iPoints[id] = str_to_num(szPoints);

__________________

Last edited by Napoleon_be; 01-19-2020 at 13:27.
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
 


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 02:40.


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