AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   nVault prune help! (https://forums.alliedmods.net/showthread.php?t=186140)

CarbonDioxide 05-26-2012 07:00

nVault prune help!
 
Hi all, I have this code:

PHP Code:

public plugin_init() 
{
    
register_concmd("amx_info_reset""admin_reset_all"ADMIN_IMMUNITY);


PHP Code:

public admin_reset_all(idlevelcid)
{
    if(!
cmd_access(idlevelcid2))
        return 
PLUGIN_HANDLED;
    
    new 
Vault nvault_open("Time_played");
    
    if(
Vault == INVALID_HANDLE)
        
set_fail_state("nVault returned invalid handle");
    
    
nvault_prune(Vault0get_systime());
    
nvault_close(Vault);

    return 
PLUGIN_HANDLED;


What I am trying to do is prune all the information in a .vault .
My problem is that when I compile it(successfully) and test it ingame, when I enter the command in the cs console this is returned and nothing happens:
Code:

] amx_info_reset 
Usage:  amx_info_reset

Am I doing something wrong ?
Regards

sudzone 05-26-2012 07:08

Re: nVault prune help!
 
PHP Code:

    if(!cmd_access(idlevelcid2)) 
        return 
PLUGIN_HANDLED



to ->
PHP Code:

    if(!cmd_access(idlevelcid1)) 
        return 
PLUGIN_HANDLED


CarbonDioxide 05-26-2012 07:17

Re: nVault prune help!
 
Hmm, indeed now the command seems to be working, but the .vault doesn't seem to have been reseted! Anybody knows why ?


All times are GMT -4. The time now is 04:40.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.