View Single Post
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