I Solved it
i did it with fVault becuse that was easier
Edit: here is the code if anyone needs it
Code:
/*
CODE FROM JUMPSTATS BY EXOLENT EDIT IRONSKILLZ1(SNUSMUMRIKEN)
*/
#include <amxmodx>
#include <fvault>
new cvar_save_prune;
new const g_agree_vault[] = "hello";
new bool:g_agreed[33];
public plugin_init()
{
cvar_save_prune = register_cvar("js_save_prune", "1"); // 1 day
register_clcmd( "say /hello", "Hello" );
Check()
}
public Hello(client)
{
static authid[35];
get_user_authid(client, authid, sizeof(authid) - 1);
g_agreed[client] = true;
fvault_set_data(g_agree_vault, authid, "1");
}
public client_authorized(client)
{
if( !is_user_bot(client) )
{
static authid[35];
get_user_authid(client, authid, sizeof(authid) - 1);
if( fvault_get_keynum(g_agree_vault, authid) == -1 )
{
g_agreed[client] = false;
}
else
{
g_agreed[client] = true;
}
}
}
public Check()
{
static bool:bAlreadyExecuted;
if( !bAlreadyExecuted )
{
new iDays = get_pcvar_num( cvar_save_prune );
if( iDays )
{
fvault_prune( g_agree_vault, _, get_systime( ) - ( iDays * 60 * 60 ) );
}
bAlreadyExecuted = true;
}
}
__________________