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

nVault weird saving


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Shadows Adi
AlliedModders Donor
Join Date: Aug 2019
Location: Romania
Old 03-25-2020 , 08:39   nVault weird saving
Reply With Quote #1

Hello,
I made a plugin which is supposed to saving/loading players data from nVault (name saving data).
Code for saving data:
PHP Code:
SaveDATAid 

    new 
szName32 
    
get_user_nameidszNamecharsmaxszName ) ) 
    
    new 
szVaultKey128 ], szVaultData512 
    
    
formatexszVaultKey127"%s-/"szName 
    
formatexszVaultData511"%i %i %i %i %i %i %i %i"Data[id],Kills[id],Deaths[id],Shots[id],Damage[id],Hits[id],Rank[id], Skill[id]) 
    
nvault_setg_nVaultszVaultKeyszVaultData 

Code for loading data:
PHP Code:
LoadDATAid 

    new 
szName32 
    
get_user_nameidszNamecharsmaxszName ) ) 

    new 
szVaultKey128 ], szVaultData512 

    
formatexszVaultKey127"%s-/"szName 
    
formatexszVaultData511"%i %i %i %i %i %i %i %i"Data[id],Kills[id],Deaths[id],Shots[id],Damage[id],Hits[id],Rank[id], Skill[id]) 

    
nvault_getg_nVaultszVaultKeyszVaultData511 

    new 
did[32],dkills[32],ddeaths[32],dshots[32],ddamage[32],dhits[32],drank[32],dskill[32]

    
parseszVaultDatadid31,dkills31,ddeaths31dshots31ddamage31dhits31 ,drank31dskill31

    
Dataid ] = str_to_numdid)
    
Killsid ] = str_to_numdkills
    
Deaths[id] = str_to_numddeaths)
    
Shots[id] = str_to_numdshots)
    
Damage[id] = str_to_numddamage)
    
Hits[id] = str_to_numdhits)
    
Rank[id] = str_to_numdrank)
    
Skill[id] = str_to_numdskill)
    

The problem is that these data keep switching between players.
If I make saving on authid, it's everything ok, but I want to keep this name saving.
__________________


Accepting Paid Requests, contact PM.

MVP Of The Round View project on GITHUB / AlliedModders
CSGO REMAKE ~ CSGO MOD [STABLE + SOURCE CODE]
Shadows Adi is offline
 


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 03:06.


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