Raised This Month: $12 Target: $400
 3% 

nVault prune help!


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
CarbonDioxide
Member
Join Date: Apr 2012
Old 05-26-2012 , 07:00   nVault prune help!
Reply With Quote #1

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
CarbonDioxide is offline
sudzone
Member
Join Date: Jan 2010
Location: Bucharest
Old 05-26-2012 , 07:08   Re: nVault prune help!
Reply With Quote #2

PHP Code:
    if(!cmd_access(idlevelcid2)) 
        return 
PLUGIN_HANDLED


to ->
PHP Code:
    if(!cmd_access(idlevelcid1)) 
        return 
PLUGIN_HANDLED
sudzone is offline
Send a message via Yahoo to sudzone
CarbonDioxide
Member
Join Date: Apr 2012
Old 05-26-2012 , 07:17   Re: nVault prune help!
Reply With Quote #3

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

Last edited by CarbonDioxide; 05-26-2012 at 16:13.
CarbonDioxide is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


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