Raised This Month: $ Target: $400
 0% 

Clean UP nvault


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
devilicioux
Veteran Member
Join Date: Jun 2013
Location: Delhi,India
Old 12-27-2013 , 18:10   Re: Clean UP nvault
Reply With Quote #1

Quote:
Originally Posted by ConnorMcLeod View Post
He opened nvault.inc, and then there was light.
LoL For Newbies Exploring things .. There is a light on every page they open .. Keep Calm and Enjoy the conversation

Quote:
Originally Posted by pokemonmaster View Post
PHP Code:
/* Prunes the vault for entries that are within the given timestamps.
 * This will not erase values set with pset
 */
native nvault_prune(vaultstartend); 
Thank you .. 2 small doubts .. Does the timestamps gets updated everytime they are accessed ? Which means if i want to remove 30 days old "UNACCESSED or UNTOUCHED" entries (Player doesnt Join the server for last 30 days)

this should work ?

Quote:
nvault_prune( vault_name,0,get_systime() - (30*86400));
Also How to clean up those entries who were accessed 30 days ago with certain condition checks .. (Like Player level Less than 2 or something like that )

Thank you all for supporting and helping Newbies around
__________________
You keep bringing ANTICHRISTUS down .. He will rise again and kick asses !

#RespectList ANTICHRISTUS fysiks Bugsy

Most Common Errors You Can Encounter Every Now and Then

Last edited by devilicioux; 12-27-2013 at 18:21.
devilicioux is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 12-28-2013 , 02:39   Re: Clean UP nvault
Reply With Quote #2

1. Seems correct, i'm using it like this but result should be the same :

PHP Code:
nvault_prune(vault_name0get_systime(-30 86400)); 

2. You can't do that if you use the previous method.
May be, i'm not sure, you can do something with nvault_util.inc from Bugsy, this file is not included with default amxx package, you have to search it (author bugsy, forum "snippet/tutorial").
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
devilicioux
Veteran Member
Join Date: Jun 2013
Location: Delhi,India
Old 01-02-2014 , 01:57   Re: Clean UP nvault
Reply With Quote #3

Nice .. Thank you ..
I dont wanna create a new thread ..So i ll continue here itself ..
After this I was thinking of arranging the nvault entries (sorted on basis of data in entry assuming points) .. Possible anyway ?

Here is the Exact thing I wanna do .. Asked by Hornet .. Solution isnt there.. and I dont wanna revive that 2 year old thread.
Implementation by self is way above my knowledge for now

Quote:
Originally Posted by hornet View Post
I'm trying to make a custom score table, which will be shown through a motd - I'm ok with that part. I'm saving player's scores to an nvault, and then when someone types the command to view the score table, I need to somehow read every line/player entry in the nvault to get all the scores, sort them ascendingly, and then place the top 15 in my motd table. How can you read each entry without searching the nvault by key?
Or is there some much easier way of doing this?

Thanks.
__________________
You keep bringing ANTICHRISTUS down .. He will rise again and kick asses !

#RespectList ANTICHRISTUS fysiks Bugsy

Most Common Errors You Can Encounter Every Now and Then

Last edited by devilicioux; 01-02-2014 at 02:37.
devilicioux is offline
Reply



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 20:34.


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