Raised This Month: $51 Target: $400
 12% 

[HELP][NVAULT]save and load....


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
yas17sin
Veteran Member
Join Date: Oct 2016
Location: Morocco/Sale
Old 03-19-2017 , 16:18   [HELP][NVAULT]save and load....
Reply With Quote #1

Hi i am using nvault to save but it sames not working good, can anyone tell me what i am doing wrong.

CODE :
PHP Code:
public client_putinserver(id)
{
    
LoadLevel2(id);
}
public 
client_disconnect(id)
{
    
SaveLevel2(id);
}
SaveLevel2(id)
{
    new 
szAuthId[32]; 
    
get_user_authid(idszAuthIdcharsmax(szAuthId));
    
    new 
szName[32]; 
    
get_user_name(idszNamecharsmax(szName));
    
    new 
szData[200];
    
formatex(szDatacharsmax(szData), "^"%s^" ^"%d^" ^"%d^" ^"%d^" ^"%d^" ^"%d^" ^"%d^" ^"%d^" ^"%d^" ^"%d^" ^"%d^" ^"%d^" ^"%d^""szNamegPowers[id][_gSpeed], gPowers[id][_gRespawn],gPowers[id][_gHealth],\
    
gPowers[id][_gDamage],gPowers[id][_gGravity],gPowers[id][_gRegener],gPowers[id][_gBonusXP],gPowers[id][_gArmor],gPowers[id][_gFastShooting],gPowers[id][_gExplosion],gPowers[id][_gReduceFall]);
    
    
//nvault_remove(g_iVault, szAuthId);
    
nvault_set(g_iVaultszAuthIdszData);
}
public 
LoadLevel2(id)
{
    new 
szAuthId[32]; get_user_authid(idszAuthIdcharsmax(szAuthId));
    
    new 
szData[200], iTimeStamp;
    if(
nvault_lookup(g_iVaultszAuthIdszDatacharsmax(szData), iTimeStamp))
    {
        new 
szSavedname[32], szPower[16], szPower1[16], szPower2[16], szPower3[16], szPower4[16], szPower5[16], szPower6[16], szPower7[16], szPower8[16], szPower9[16], szPower10[16];
        
parse(szDataszSavednamecharsmax(szSavedname), szPowercharsmax(szPower), szPower1charsmax(szPower1), szPower2charsmax(szPower2), szPower3charsmax(szPower3), szPower4charsmax(szPower4),\
        
szPower5charsmax(szPower5), szPower6charsmax(szPower6), szPower7charsmax(szPower7), szPower8charsmax(szPower8), szPower9charsmax(szPower9), szPower10charsmax(szPower10))
        
remove_quotes(szSavedname)
        
remove_quotes(szPower)
        
remove_quotes(szPower1)
        
remove_quotes(szPower2)
        
remove_quotes(szPower3)
        
remove_quotes(szPower4)
        
remove_quotes(szPower5)
        
remove_quotes(szPower6)
        
remove_quotes(szPower7)
        
remove_quotes(szPower8)
        
remove_quotes(szPower9)
        
remove_quotes(szPower10)
        
set_user_info(id"name"szSavedname)
        
gPowers[id][_gSpeed] = str_to_num(szPower)
        
gPowers[id][_gRespawn] = str_to_num(szPower1)
        
gPowers[id][_gHealth] = str_to_num(szPower2)
        
gPowers[id][_gDamage] = str_to_num(szPower3)
        
gPowers[id][_gGravity] = str_to_num(szPower4)
        
gPowers[id][_gRegener] = str_to_num(szPower5)
        
gPowers[id][_gBonusXP] = str_to_num(szPower6)
        
gPowers[id][_gArmor] = str_to_num(szPower7)
        
gPowers[id][_gFastShooting] = str_to_num(szPower8)
        
gPowers[id][_gExplosion] = str_to_num(szPower9)
        
gPowers[id][_gReduceFall] = str_to_num(szPower10)
     }

__________________
FINISHED WORKING ON : Attack On Titan Mod (100% Done).

FB Acc : FaceBook Account.

pic: http://prntscr.com/fszkke not good quality

Last edited by yas17sin; 03-19-2017 at 17:01.
yas17sin is offline
Send a message via ICQ to yas17sin
Natsheh
Veteran Member
Join Date: Sep 2012
Old 03-19-2017 , 16:33   Re: [HELP][NVAULT]save and load....
Reply With Quote #2

what is this bullshit ?

PHP Code:
    if(!gCanLoad )
    {
        
set_task(1.0"LoadLevel2"id);
        return;
    } 
PHP Code:
    if(!gCanSave || !g_loaded_data[id])
    {
        return;
    } 
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !

Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
yas17sin
Veteran Member
Join Date: Oct 2016
Location: Morocco/Sale
Old 03-19-2017 , 16:45   Re: [HELP][NVAULT]save and load....
Reply With Quote #3

Quote:
Originally Posted by Natsheh View Post
what is this bullshit ?
i am using it in native for load.
__________________
FINISHED WORKING ON : Attack On Titan Mod (100% Done).

FB Acc : FaceBook Account.

pic: http://prntscr.com/fszkke not good quality
yas17sin is offline
Send a message via ICQ to yas17sin
Natsheh
Veteran Member
Join Date: Sep 2012
Old 03-19-2017 , 16:54   Re: [HELP][NVAULT]save and load....
Reply With Quote #4

load data in client putinserver >> save it in client disconnect otherwise its a bullshit!
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !

Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
yas17sin
Veteran Member
Join Date: Oct 2016
Location: Morocco/Sale
Old 03-19-2017 , 16:57   Re: [HELP][NVAULT]save and load....
Reply With Quote #5

Quote:
Originally Posted by Natsheh View Post
load data in client putinserver >> save it in client disconnect otherwise its a bullshit!
okay, thanks for advice i follow it. so the problem is because of that ?
__________________
FINISHED WORKING ON : Attack On Titan Mod (100% Done).

FB Acc : FaceBook Account.

pic: http://prntscr.com/fszkke not good quality
yas17sin is offline
Send a message via ICQ to yas17sin
Natsheh
Veteran Member
Join Date: Sep 2012
Old 03-19-2017 , 17:04   Re: [HELP][NVAULT]save and load....
Reply With Quote #6

the code looks fine only the bullshit u were putting in..
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !

Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
Reply



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 05:52.


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