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

FVault - A new vault system!


Post New Thread Reply   
 
Thread Tools Display Modes
YKH =]
Senior Member
Join Date: Sep 2008
Location: Hong Kong
Old 01-29-2010 , 09:23   Re: FVault - A new vault system!
Reply With Quote #31

useless
__________________
Approved Plugins

[ZP] Effect Plugins :
Damage Effect
Real Death

Last edited by YKH =]; 01-29-2010 at 09:27. Reason: i have blind...
YKH =] is offline
grimvh2
Veteran Member
Join Date: Nov 2007
Location: Fishdot Nation
Old 02-04-2010 , 12:59   Re: FVault - A new vault system!
Reply With Quote #32

Quote:
Originally Posted by YKH =] View Post
my comments are useless
__________________
I am out of order!
grimvh2 is offline
YKH =]
Senior Member
Join Date: Sep 2008
Location: Hong Kong
Old 02-06-2010 , 09:38   Re: FVault - A new vault system!
Reply With Quote #33

Quote:
Originally Posted by YKH =] View Post
when the server crash , we may lose some data..... How can we fix his problem?
__________________
Approved Plugins

[ZP] Effect Plugins :
Damage Effect
Real Death
YKH =] is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 02-06-2010 , 14:20   Re: FVault - A new vault system!
Reply With Quote #34

That only happens if you save data in global variables and don't save until client_disconnect/plugin_end.
If you save data right when it changes, that problem won't happen.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
matsi
Thinkosaur
Join Date: Sep 2006
Old 02-06-2010 , 14:30   Re: FVault - A new vault system!
Reply With Quote #35

I said it to you YKH =] before in my post.
matsi is offline
YKH =]
Senior Member
Join Date: Sep 2008
Location: Hong Kong
Old 02-07-2010 , 03:28   Re: FVault - A new vault system!
Reply With Quote #36

thank you . i found some solutions to solve it
__________________
Approved Plugins

[ZP] Effect Plugins :
Damage Effect
Real Death
YKH =] is offline
meTaLiCroSS
Gaze Upon My Hat
Join Date: Feb 2009
Location: Viņa del Mar, Chile
Old 02-13-2010 , 18:39   Re: FVault - A new vault system!
Reply With Quote #37

It's a good idea to use the next code to save some data when the server crashes?:

PHP Code:
register_forward(FM_Sys_Error"fw_ServerShutdown")
register_forward(FM_GameShutdown"fw_ServerShutdown")
register_forward(FM_ServerDeactivate"fw_ServerShutdown")

public 
fw_ServerShutdown()
{
    for(new 
id 1id <= g_iMaxPlayersid++)
    {
        if(
is_user_connected(id))
        {
            
save_the_fucking_data(id)
        }
    }

__________________
Quote:
Originally Posted by joropito View Post
You're right Metalicross
meTaLiCroSS is offline
Lure.d
BANNED
Join Date: Dec 2009
Location: Lithuania->USA
Old 03-10-2010 , 08:17   Re: FVault - A new vault system!
Reply With Quote #38

But isn't server shut down, and server crash 2 diff things?

ShutDown: Close all open processes, and save all stuff and then closes.

Crash: Just close, also has a pretty nice error window too
Lure.d is offline
Send a message via Skype™ to Lure.d
Kreation
Veteran Member
Join Date: Jan 2010
Location: Illinois
Old 07-03-2010 , 15:52   Re: FVault - A new vault system!
Reply With Quote #39

If I have this code:

Code:
SaveXP(id) {      new steamid[35];      get_user_authid(id, steamid, 34);      new data[20];      num_to_str(g_xp[id], data, sizeof(data) - 1);      fvault_set_data(g_vault, steamid, data); }

and I have more to save can I just do this:

Code:
SaveXP(id) {      new steamid[35];      get_user_authid(id, steamid, 34);      new data[20];      num_to_str(g_xp[id], data, sizeof(data) - 1);      num_to_str(g_level[id], data, sizeof(data) - 1);      fvault_set_data(g_vault, steamid, data); }

Or is it more complex than that?
__________________
Hi.
Kreation is offline
RedRobster
Veteran Member
Join Date: Apr 2010
Location: Your Closet
Old 07-03-2010 , 17:22   Re: FVault - A new vault system!
Reply With Quote #40

Quote:
Originally Posted by Kreation View Post
If I have this code:

Code:
SaveXP(id) { new steamid[35];
get_user_authid(id, steamid, 34);

new data[20];
num_to_str(g_xp[id], data, sizeof(data) - 1);

fvault_set_data(g_vault, steamid, data);
}



and I have more to save can I just do this:

Code:
SaveXP(id) { new steamid[35];
get_user_authid(id, steamid, 34);

new data[20];
num_to_str(g_xp[id], data, sizeof(data) - 1);
num_to_str(g_level[id], data, sizeof(data) - 1);

fvault_set_data(g_vault, steamid, data);
}



Or is it more complex than that?
I would do:
PHP Code:
SaveXP(id)
{
     new 
steamid[35];
     
get_user_authid(idsteamid34);

     new 
data[20];
     
format(data19"%i#%i"g_xp[id], g_level[id])

     
fvault_set_data(g_vaultsteamiddata);

That way, when you load the data, you can replace the # and parse the data, and define the variables more easily than trying to figure out where one ended and the other begins.

Last edited by RedRobster; 07-03-2010 at 17:25.
RedRobster is offline
Reply


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 07:39.


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