Raised This Month: $ Target: $400
 0% 

[Need help] Nvault -> MySql saving


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
andrzN
Senior Member
Join Date: Jan 2010
Location: Bodø / Norway
Old 12-29-2012 , 19:32   Re: [Need help] Nvault -> MySql saving
Reply With Quote #8

Quote:
Originally Posted by Sylwester View Post
That's because you open and close nvault every time you save or load data. Open it in plugin_init and close in plugin_end to get rid of lags.
Oh I didn't know that.

By the way, I feel bad to ask you, but can you change another plugin I have to mysql saving? This one is really small, and I've tried using the way above, but I just fail and it bugs.

Here are the saving/loading codes.

PHP Code:
public client_connectid )
{
    
load_jumpsid )
}

public 
client_disconnectid )
{
    
save_jumpsid )

PHP Code:
public save_jumpsid )
{
    new 
jump_data128 ],sSteam_Id40 ], key_format238 ]
    
    
get_user_authididsSteam_Id39 )
    
    
formatexkey_format237"%s-Jumps"sSteam_Id )
    
num_to_strvJumpid ], jump_data127 )
    
    
fvault_set_datavaultkey_formatjump_data )
}

public 
load_jumpsid )
{
    new 
jump_data128 ],sSteam_Id40 ], key_format238 ]
    
    
get_user_authididsSteam_Id39 )
    
    
formatexkey_format237"%s-Jumps",sSteam_Id )
    
    
fvault_get_datavaultkey_formatjump_data15 )
    
    
vJumpid ] = str_to_numjump_data )    


Last edited by andrzN; 12-29-2012 at 19:32.
andrzN is offline
Send a message via MSN to andrzN
 



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 13:36.


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