Is this how I would do it?
Code:
nvault_set(vault , key , "");
I'm trying to remove a SteamID from a vault file by command and doesn't want to work:
Code:
public concmd_removesteam(id , lvl , cid)
{
if(!cmd_access(id , lvl , cid , 2))
return PLUGIN_HANDLED;
new arg[33];
read_argv(1 , arg , 32);
vault = nvault_open(VAULT_NAME);
if(vault == INVALID_HANDLE)
{
console_print(id , "[AMXX] Error opening vault file: %s" , VAULT_NAME);
return PLUGIN_HANDLED;
}
remove_quotes(arg);
trim(arg);
new temp[9] , timestamp;
if(!nvault_lookup(vault , arg , temp , 8 , timestamp))
{
console_print(id , "[AMXX] That STEAMID doesn't exist!");
nvault_close(vault);
return PLUGIN_HANDLED;
}
nvault_set(vault , arg , "");
nvault_close(vault);
new steamid[33] , players[32] , num , i;
for(i = 0; i < num; i++)
{
get_user_authid(players[i] , steamid , 32);
if(equal(steamid , arg))
flagged[players[i]] = false;
}
console_print(id , "[AMXX] %s removed from vault file: ^"%s^"" , arg , VAULT_NAME);
return PLUGIN_HANDLED;
}
__________________