|
Senior Member
Join Date: Oct 2021
Location: Jupiter
|
01-15-2023
, 18:05
Re: Quest about Fvault
|
#4
|
Quote:
Originally Posted by metal_upa
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(id, szKey, charsmax(szKey));
num_to_str(iPlayTime[id], szData, charsmax(szData));
fvault_set_data(szVaultName, szKey, szData);
}
}
See the result in your server, good luck then.
|
if your script is somewhat like this, it will work but its not efficient
__________________
|
|
|
|