Raised This Month: $ Target: $400
 0% 

Saving with nVault - Nothing happens..


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
HBxander
Senior Member
Join Date: Jan 2011
Location: Behind you!
Old 04-28-2011 , 12:39   Saving with nVault - Nothing happens..
Reply With Quote #1

Hi there..

Im making this moneymod for a hidenseek clan, wich rly wants it soon..

now im done, but it wont save -_-

i've added Save ( iPlayer )

everywhere ill remove / add / set any lvls / money
but it wont save..
Code -->
PHP Code:
public Load(iPlayer)
{
    static 
data[256], timestamp;
    if( 
nvault_lookup(gVaultg_iAuthID[iPlayer], datasizeof(data) - 1timestamp) )
    {
        
ParseLoadData(iPlayerdata);
    }
    else
    {
        
NewUser(iPlayer)
        
CmdSayUser(iPlayer)
    }
}

public 
CmdSayUser iPlayer )
{
    new 
start get_pcvar_num MoneyStart )
    new 
name 32 ]
    
get_user_name iPlayername32 )
    
    
ColorChat iPlayerGREY"%s You got^4 $%i^3 for playing here for your^4 first^3 time!"prefixstart )
}

public 
NewUser(iPlayer)
{
    
g_first_time[iPlayer] = 1
    
new start get_pcvar_num MoneyStart )
    
    
iMoney[iPlayer] = start
    gMoney
[iPlayer] = start
    tMoney 
iPlayer ] = start
    
    
for( new iItem 0iItem ItemCountiItem++ )
    {
        
iLevel_Item[iPlayer][iItem] = 0;
    }
    for( new 
iWeap 0iWeap WeapCountiWeap++ )
    {
        
iLevel_Weap[iPlayer][iWeap] = 0;
    }
    for ( new 
iVip 0iVip VipCountiVip++ )
    {
        
iLevel_Vip iPlayer ] [ iVip ] = 0;
    }
}

public 
ParseLoadData(iPlayerdata[256])
{
    static 
num[6];
    
strbreak(datanumsizeof(num) - 1datasizeof(data) - 1);
    
    
iMoney[iPlayer] = str_to_num(num);
    
    for( new 
iItem 0iItem ItemCountiItem++ )
    {
        
strbreak(datanumsizeof(num) - 1datasizeof(data) - 1);
        
iLevel_Item[iPlayer][iItem] = clamp(str_to_num(num), 0ItemMaxLevel[iItem]);
    }
    
    for( new 
iWeap 0iWeap WeapCountiWeap++ )
    {
        
strbreak(datanumsizeof(num) - 1datasizeof(data) - 1);
        
iLevel_Weap[iPlayer][iWeap] = clamp(str_to_num(num), 0WeapMaxLevel[iWeap]);
    }
    
    for( new 
iVip 0iVip VipCountiVip++ )
    {
        
strbreak datanumsizeof(num) - 1datasizeof(data) - 1)
        
iLevel_Vip iPlayer ] [ iVip ] = clamp str_to_num num ), 0VipMaxLevel iVip ] )
    }
}

public 
Save(iPlayer)
{
    static 
data[256];
    new 
len formatex(datasizeof(data) - 1"%i"iMoney[iPlayer]);
    
    for( new 
iItem 0iItem ItemCountiItem++ )
    {
        
len += formatex(data[len], sizeof(data) - len 1" %i"iLevel_Item[iPlayer][iItem]);
    }
    
    for( new 
iWeap 0iWeap WeapCountiWeap++ )
    {
        
len += formatex(data[len], sizeof(data) - len 1" %i"iLevel_Weap[iPlayer][iWeap]);
    }
    
    for( new 
iVip 0iVip VipCountiVip++ )
    {
        
len += formatex(data[len], sizeof(data) - len 1" %i"iLevel_Vip[iPlayer][iVip])
    }
    
nvault_set(gVaultg_iAuthID[iPlayer], data)

any1 help please
__________________
Selling:

- PointMod for Hide And Seek - $20
- Private BlockMaker with Weapon Block And More - $50
- Achievements ( FFA GamePlay ) - $25

PM Me about Private Work!
HBxander is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 04-28-2011 , 17:18   Re: Saving with nVault - Nothing happens..
Reply With Quote #2

Show your full code.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
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 04:20.


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