AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Reset nvault on next map (https://forums.alliedmods.net/showthread.php?t=153176)

Xalus 03-19-2011 17:40

Reset nvault on next map
 
Hello,

PHP Code:

public plugin_cfg() {
    
g_Vault nvault_open"WarningData" );
    
    if ( 
g_Vault == INVALID_HANDLE )
        
set_fail_state"Error opening nVault" );
    
    
nvault_pruneg_Vault get_systime() );


I try'd that,
but for some reason it don't get resetted.

Maybe, becuase players disconnect, it saves.
But plugin_cfg, loads on new map I touge so

I don't get the problem.

Can somoene help ?

Thanks.

Thanks to move.

wrecked_ 03-19-2011 18:03

Re: Reset nvault on next map
 
Are you using nvault_set() or nvault_pset()?

Two other methods:
  • delete_file()
  • Save each ID you save data under (I assume you're using Steam ID as the key for setting data) and then loop through the ID's on plugin_end() and use nvault_remove().

Xalus 03-20-2011 12:28

Re: Reset nvault on next map
 
If I wanna use Delete_file()

I need do: delete_file(g_Vault) or ("WarningData")

& I use nvault_set

wrecked_ 03-20-2011 13:38

Re: Reset nvault on next map
 
The only argument in delete_file() is the file directory (string).

ConnorMcLeod 03-20-2011 14:20

Re: Reset nvault on next map
 
If you don't want to save datas after map has changed, just use a Trie or a dynamic array or whatever the system.

Xalus 03-20-2011 17:24

Re: Reset nvault on next map
 
Thanks,


All times are GMT -4. The time now is 14:31.

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