Raised This Month: $ Target: $400
 0% 

Look up a players stats by their AuthID


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 10-08-2007 , 09:44   Re: Look up a players stats by their AuthID
Reply With Quote #7

Quote:
Originally Posted by purple_pixie View Post
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:0434343 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
__________________

Last edited by Bugsy; 10-08-2007 at 10:03.
Bugsy is offline
 



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 16:03.


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