AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   General (https://forums.alliedmods.net/forumdisplay.php?f=7)
-   -   Quest about Fvault (https://forums.alliedmods.net/showthread.php?t=341251)

Synceed 01-13-2023 05:33

Quest about Fvault
 
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.

metal_upa 01-13-2023 08:52

Re: Quest about Fvault
 
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.

Synceed 01-14-2023 06:37

Re: Quest about Fvault
 
Quote:

Originally Posted by metal_upa (Post 2797070)
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

bigdaddy424 01-15-2023 18:05

Re: Quest about Fvault
 
Quote:

Originally Posted by metal_upa (Post 2797070)
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

metal_upa 01-16-2023 00:43

Re: Quest about Fvault
 
Quote:

Originally Posted by bigdaddy424 (Post 2797244)
if your script is somewhat like this, it will work but its not efficient

Quote:

Originally Posted by Synceed (Post 2797039)
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.


All times are GMT -4. The time now is 06:28.

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