Raised This Month: $ Target: $400
 0% 

Save to .ini or .txt files


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Randomize
BANNED
Join Date: May 2012
Location: in your heart
Old 08-17-2012 , 11:30   Save to .ini or .txt files
Reply With Quote #1

Can someone make this save to .ini or .txt file?

PHP Code:
    g_vault nvault_open("animod")
    
//we just opened a new connection NVAULT connection
    // we will call it animod

    
register_clcmd("say /rank""ShowHud")
    
register_clcmd("say_team /rank""ShowHud")
}
public 
client_connect(id)
{
    if(
get_pcvar_num(SavePoint) == 1)
    {
        
        
LoadData(id)
    }
    if(
get_pcvar_num(SaveExp) == 1)
    {
        
        
LoadData(id)
    }
}
public 
client_disconnect(id)
{
    if(
get_pcvar_num(SavePoint) == 1)
    {
    
        
SaveData(id)
    }
    if(
get_pcvar_num(SaveExp) == 1)
    {
    
        
SaveData(id)
    }
    
PlayerPoint[id] = 0
    PlayerExp
[id] = 0
}
public 
SaveData(id)
{
    new 
AuthID[35]
    
get_user_authid(id,AuthID,34)
    
    new 
vaultkey[64],vaultdata[256]
    
format(vaultkey,63,"%s-Mod",AuthID)
    
format(vaultdata,255,"%i#%i#",PlayerPoint[id],PlayerExp[id])
    
nvault_set(g_vault,vaultkey,vaultdata)
    return 
PLUGIN_CONTINUE
}
public 
LoadData(id)
{
    new 
AuthID[35]
    
get_user_authid(id,AuthID,34)
    
    new 
vaultkey[64],vaultdata[256]
    
format(vaultkey,63,"%s-Mod",AuthID)
    
format(vaultdata,255,"%i#%i#",PlayerPoint[id],PlayerExp[id])
    
nvault_get(g_vault,vaultkey,vaultdata,255)
 
    
replace_all(vaultdata255"#"" ")
 
    new 
playerpoint[32], playerexp[32]
 
    
parse(vaultdataplayerpoint31playerexp31)
 
    
PlayerPoint[id] = str_to_num(playerpoint)
    
PlayerExp[id] = str_to_num(playerexp)
 
    return 
PLUGIN_CONTINUE

Randomize 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 05:44.


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