http://www.speedyshare.com/697961824.html
Usage
If you ever wanted to modify your userstats.dat (the file that contains all of the kills/ranking/info, you'll find that if you tried to open the file in a normal editor, it's just a jumble of weird characters. Well here's program that let's you work with the userstats.dat file. On top of that it can also export the userstats.dat to a SQL file and run it against the MySQL database.
This library requires Python and (optionally) MySQLdb.
Just extract this into your cs2d/sys/stats directory.
Don't forget to read the README (Link) file.
Demos:
Demo (Link)
Example: You want to change everyone's name to "KPD of their_kpd"
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
from userstats import Stats
#Parse the userstats.dat file
Stats.filename = 'userstats.dat'
#Log into MySQL via username = 'root' and No password
Stats.login('root')
#Cache the variables. This is very convenient
stats = Stats.stats
model = Stats.model
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-#
for player in stats:
	try:
		player.name = "KPD of %s"%str(float(player.kills/player.death))
	except:
		player.name = "KPD of %s"%str(player.kills)
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-#
#Updates and saves both the MySQL and userstats.dat Data
Stats.run()
You'll find a userstats.dat.backup and a userstats.dat.sql. If you have MySQL installed you'll also find a new database called userstats with a table called stats filled with the userstats information.
Editing your Userstats (Rank/KPD/stuff)
1 
Offline