Quote:
Originally Posted by purple_pixie
You would have to start over, sadly.
I could write you a .exe to fix it for you, if you like ...
What you want is to make it save as in the quote I posted.
So when you add a new player to the vault, it makes 2 new entries - one is a pointer from Steam ID to Index, and one is from Index to Time.
|
Ok, so basically stats are saved in a similar fashion as my plugin? When a new player comes to the server their stats index is total-stats-entries + 1?
Edit:
Just to clarify, I would add entries like this?
"ENTRIES" entries count+1
"STEAM1111" entriesvalue
entriesvalue time
"ENTRIES" entries count+1
"STEAM2222" entriesvalue
entriesvalue time
"ENTRIES" entries count+1
"STEAM3333" entriesvalue
entriesvalue time
Edit2: Now that I'm thinking, there was reasoning behind why I used an index as the key. This way I can cycle through all of the entries without knowing an authid or name. I am currently doing a for loop starting at 1 (first entry) and stopping at ENTRIES value. How would I go about checking all entries with this method?
Here's some samples:
"1" "STEAM_0:0

434343 4167"
"2" "STEAM_0:1:43434343 6"
"3" "STEAM_0:1:6767676 158"
Edit3: Ignore edit2, I get it now...I think.
Start at entry1 value and read stats data at entry1 index (which gets me name, authid, etc)
Then take the authid and get that players time index from vault
Take that time index and read the players time value from vault
__________________