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