Raised This Month: $ Target: $400
 0% 

Save/Load (XP)


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Driving To Heaven
Senior Member
Join Date: Jun 2009
Location: somewhere far away
Old 06-29-2012 , 07:13   Save/Load (XP)
Reply With Quote #1

Does such a thing possible? If so what's wrong? Because it does not work.
PHP Code:
Save_Data(id)
{
    new 
szKey[64]
    
get_user_ip(idszKeycharsmax(szKey), 1)
 
    new 
iLen 0
    
static szData[1000]
 
    for (new 
0Maxsi++)
    {
        
iLen += formatex(szData[iLen], charsmax(szData) - iLen"%d#"PlayerXP[id][i]
    }
    
nvault_set(NvaultszKeyszData)
}
 
Load_Data(id)
{
    new 
szKey[64]
    
get_user_ip(idszKeycharsmax(szKey), 1)
 
    static 
szData[1000], szAll[1000]
    new 
szClassLevel[512]
    new 
szXP[10]
 
    
nvault_get(NvaultszKeyszDatacharsmax(szData))
 
    
strtok(szDataszDatasizeof(szData) - 1szAllsizeof(szAll) - 1'#')
 
    for (new 
0Maxsi++)
    {
        
strtok(szAllszClassLevelsizeof(szClassLevel) - 1szAllsizeof(szAll) - 1'#')
        
strtok(szClassLevelszXPsizeof(szXP) - 1szClassLevelsizeofszClassLevel ) - 1' ')
 
        
PlayerXP[id][i] = str_to_num(szXP)
    }

----
sorry for bad english.
Driving To Heaven 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 15:07.


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