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

Quest about Fvault


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Synceed
Junior Member
Join Date: Apr 2016
Old 01-13-2023 , 05:33   Quest about Fvault
Reply With Quote #1

Hello everyone I have a question about Fvault
I'm using Fvault method to save players time points which mean they getting every 1 min Point
the question is how much the file can take isn't it sitting heavy on the server ?
or he can take unlimited players and be updated every second without any problem
Thanks have a good day.
Synceed is offline
metal_upa
Senior Member
Join Date: Jun 2016
Old 01-13-2023 , 08:52   Re: Quest about Fvault
Reply With Quote #2

Here a test plugin for you to loop save every seconds.
PHP Code:
#include <amxmodx>
#include <fvault>

const iMaxPlayers 32;
new const 
szVaultName[] = "TestLoopSave";
new 
iPlayTime[33];

public 
plugin_cfg()
{
    
set_task(1.0"LoopSave"___"b"); //every seconds
}

public 
LoopSave()
{
    new 
szKey[3], szData[16];
    for(new 
id=1;id<=iMaxPlayers;id++)
    {
        
iPlayTime[id]++;
        
num_to_str(idszKeycharsmax(szKey));
        
num_to_str(iPlayTime[id], szDatacharsmax(szData));
        
fvault_set_data(szVaultNameszKeyszData);
    }

See the result in your server, good luck then.

Last edited by metal_upa; 01-13-2023 at 08:54.
metal_upa is offline
Synceed
Junior Member
Join Date: Apr 2016
Old 01-14-2023 , 06:37   Re: Quest about Fvault
Reply With Quote #3

Quote:
Originally Posted by metal_upa View Post
Here a test plugin for you to loop save every seconds.
PHP Code:
#include <amxmodx>
#include <fvault>

const iMaxPlayers 32;
new const 
szVaultName[] = "TestLoopSave";
new 
iPlayTime[33];

public 
plugin_cfg()
{
    
set_task(1.0"LoopSave"___"b"); //every seconds
}

public 
LoopSave()
{
    new 
szKey[3], szData[16];
    for(new 
id=1;id<=iMaxPlayers;id++)
    {
        
iPlayTime[id]++;
        
num_to_str(idszKeycharsmax(szKey));
        
num_to_str(iPlayTime[id], szDatacharsmax(szData));
        
fvault_set_data(szVaultNameszKeyszData);
    }

See the result in your server, good luck then.
I have already mod that working on fvault its saving every min info about player and giving him 1 point every min the points saved on the fvault the question if its can sit heavy on the server and its will be able to save all players that gonna come or its someday will have limit

Last edited by Synceed; 01-14-2023 at 06:40.
Synceed is offline
bigdaddy424
Senior Member
Join Date: Oct 2021
Location: Jupiter
Old 01-15-2023 , 18:05   Re: Quest about Fvault
Reply With Quote #4

Quote:
Originally Posted by metal_upa View Post
Here a test plugin for you to loop save every seconds.
PHP Code:
#include <amxmodx>
#include <fvault>

const iMaxPlayers 32;
new const 
szVaultName[] = "TestLoopSave";
new 
iPlayTime[33];

public 
plugin_cfg()
{
    
set_task(1.0"LoopSave"___"b"); //every seconds
}

public 
LoopSave()
{
    new 
szKey[3], szData[16];
    for(new 
id=1;id<=iMaxPlayers;id++)
    {
        
iPlayTime[id]++;
        
num_to_str(idszKeycharsmax(szKey));
        
num_to_str(iPlayTime[id], szDatacharsmax(szData));
        
fvault_set_data(szVaultNameszKeyszData);
    }

See the result in your server, good luck then.
if your script is somewhat like this, it will work but its not efficient
__________________
bigdaddy424 is offline
metal_upa
Senior Member
Join Date: Jun 2016
Old 01-16-2023 , 00:43   Re: Quest about Fvault
Reply With Quote #5

Quote:
Originally Posted by bigdaddy424 View Post
if your script is somewhat like this, it will work but its not efficient
Quote:
Originally Posted by Synceed View Post
be updated every second without any problem
Thanks have a good day.
It was a test plugin to see it lag or not, it's not a true/complete plugin, if it lag then save interval every second is a bad idea. I see no limitation size in fvault.inc.
metal_upa 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 10:09.


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