PDA

View Full Version : SoD Player Stats


Pages : [1] 2 3 4

FrostbyteX
02-22-2008, 00:47
For CSGO (protobuf) update : see this post (https://forums.alliedmods.net/showthread.php?p=2115046#post2115046) - Written by RedSword

SoD Stats

Description
If you're looking for a stats plugin that takes hours to setup and daily maintenance, then look somewhere else. This stats plugin has a zero-configuration install. Just unzip this to your server and join the game. It just works.

Don't worry about upgrades either. When there's a new version, just unzip the new files and your stats will be automatically and seamlessly updated.

Simple is good.

Setup & Upgrade

Unzip sodstats.zip to your game directory.

When upgrading to version 1.0.10 you may have to reset stats and change the map upon first run.

Statistics Information
A players gains two points per kill, plus one extra point for each 100 points higher his victim's score is. The victim loses the equivalent number of points. This is done so that a really good player cannot boost his score by killing beginners over and over again; likewise, when a skilled player connects he can reach a high rating quickly because everyone else will start out with a much higher score.

This is hardly a tried and tested method, but from testing on my own server, it did seem to correctly identify the skill level of the players. It slightly rewards playing time, but mostly individual skill.

When I get the time, I'll add a team score for games like TF2 and DoD:S.

Cvars

sm_stats_enabled - [1/0] - Enables/disables stat storing and say commands.
sm_stats_startpoints - [0-10000] - Sets the starting points for new players.
sm_stats_displaymode - [0/1/2] - Changes who sees chat output. (0: public rank display, 1: private rank display, 2: chat rank display).

Commands

sm_stats_reset - Resets player stats.
sm_stats_purge [#days] - Removes players from database who haven't connected for [#days] days.

Say "rank" to see your rank.
Say "top" or "top10" to see the top ten players.
Say "session" or "statsme" to see your session and stats information.

Notes

This plugin uses the default "storage-local" database. The goal was to make a simple copy/paste plugin without configuration. If you want players to be stored in a different database, I will add a configuration file.

If the top10, statsme and session menus are appearing incorrectly in your mod, then read the following thread:
http://forums.alliedmods.net/showthread.php?p=566380
(Credits to Warnink (http://forums.alliedmods.net/member.php?u=19822) for finding this)

If you are running DoD:S and downloaded v1.0.11 before August 13th, please redownload to obtain the DoD:S hotfix.

Credits

The SourceMod team and everyone whose plugins I reviewed to learn SourcePawn.
mplostcause (http://forums.alliedmods.net/member.php?u=34700) - for testing on DoD:S
misfit (http://forums.alliedmods.net/member.php?u=29803) - for testing on TF2
Sgt-Mess, Bl1nk, PStar, Box Cutter, Guardia Republicano - for testing v1.0.11

Pending Features

Translations (I'll need some help!)
Kill-to-Death ratio in "rank"

sm_stats_resetrank <STEAM_ID>
sm_stats_minkills <#kills>
sm_stats_countbots <1/0>

Zombie Panic!:
Removing penalty for deaths (please PM me if you have a better idea for a Zombie Panic! point system)

Changelog
8/03/2008 - Version 1.0.11 -
Added headshot stats for DoD:S. Added purging. Fixed MySQL bugs. Added text display modes. Fixed some crashes. Removed 'active_badges' column from database.
5/26/2008 - Version 1.0.10 -
Added colored text. Added headshot logging for counter-strike. Added "sm_stats_startpoints" cvar. Shows points to next rank when saying "rank".
3/11/2008 - Version 1.0.9 -
Added default functionality for unknown mods.
3/03/2008 - Version 1.0.8 -
Added support for EmpiresMod.
3/03/2008 - Version 1.0.7 -
Added support for FortressForever mod.
3/02/2008 - Version 1.0.6 -
Fixed incorrect time_joined problem in CreatePlayer.
3/01/2008 - Version 1.0.5 -
Rewrote to use natives.
2/28/2008 - Version 1.0.4 -
Added time-played.
2/27/2008 - Version 1.0.3 -
Added support for TF2/DoD:S - needs testing. Added code for ingame "badges," but commented out for future use.
2/23/2008 - Version 1.0.2 -
Added highlighting to "statsme" menu.
2/22/2008 - Version 1.0.1 -
Added "statsme" and "session". Fixed a bug with accuracy.

errorbartje
02-23-2008, 11:12
Nice Plugin Thx

FrostbyteX
02-26-2008, 13:07
Nice Plugin Thx
You're welcome. What do you think of it? I've only tested it with up to 16 players and there is no notable choke. Mind you, that's on an unstacked 100tic 500fps server.

Does anyone have any particular requests for features? I'm currently adding in-game achievements ("badges").

Steve

qcg33k
02-27-2008, 10:25
Does this plugin work for Team Fortress 2? For some reason, I've been trying to use a couple of TF2 rank mods for SM. But with no avail, they don't seem to be working. Currently I'm using mani-mod only for the ranking.

FrostbyteX
02-27-2008, 11:59
This should work for TF2, but I have not tested it since I do not have a TF2 server.

misfit
02-27-2008, 15:36
on TF2 -


15:33:46 sm plugins list
15:33:46 [SM] Listing 1 plugin:
01 <Error> "SoDStats" (1.0) by ]SoD[ Frostbyte
15:34:06 sm plugins debug 1 on
15:34:06 [SM] Could not toggle debug mode on plugin sodstats.smx.
[SM] Plugin returned error: Plugin is not runnable.

pRED*
02-27-2008, 15:50
Use 'sm plugins info 1' to show the reason it failed to load.

mplostcause
02-27-2008, 18:08
I am getting similar results when trying to use this plugin on DoDS. This is the log for plugin.


L 02/27/2008 - 16:01:40: SourceMod error session started
L 02/27/2008 - 16:01:40: Info (map "dod_orange_the_tower") (file "errors_20080227.log")
L 02/27/2008 - 16:01:40: [SM] Native "HookEvent" reported: Game event "weapon_fire" does not exist
L 02/27/2008 - 16:01:40: [SM] Debug mode is not enabled for "sodstats.smx"
L 02/27/2008 - 16:01:40: [SM] To enable debug mode, edit plugin_settings.cfg, or type: sm plugins debug 19 on
L 02/27/2008 - 16:09:24: [SM] Native "HookEvent" reported: Game event "weapon_fire" does not exist
L 02/27/2008 - 16:09:24: [SM] Debug mode is not enabled for "sodstats.smx"
L 02/27/2008 - 16:09:24: [SM] To enable debug mode, edit plugin_settings.cfg, or type: sm plugins debug 22 on
L 02/27/2008 - 16:47:47: Error log file session closed.
L 02/27/2008 - 16:47:47: SourceMod error session started
L 02/27/2008 - 16:47:47: Info (map "dod_orange_the_tower") (file "errors_20080227.log")
L 02/27/2008 - 16:47:47: [SM] Native "HookEvent" reported: Game event "weapon_fire" does not exist
L 02/27/2008 - 16:47:47: [SM] Debug mode is not enabled for "sodstats.smx"
L 02/27/2008 - 16:47:47: [SM] To enable debug mode, edit plugin_settings.cfg, or type: sm plugins debug 22 on

FrostbyteX
02-27-2008, 19:34
I'll have that fixed by tomorrow night if I can find someone to test DoD:S and/or TF2.

mplostcause
02-27-2008, 19:47
I'll test DoD:S for you.

FrostbyteX
02-27-2008, 20:12
I'll test DoD:S for you.

I just uploaded a new version for testing with TF2/DoD:S. It still works fine on CS:S - I tested that.

One problem I would look for in DoD:S is bugged player shot counting.

misfit
02-27-2008, 21:43
I'll test TF2. :-)

Can't DL:

Plugin failed to compile! Please try contacting the author.

FrostbyteX
02-27-2008, 22:06
Try now.

mplostcause
02-27-2008, 22:22
On DoD:S it will show in sm plugins list as running now but none of the commands in game work. All i can get it narrowed down to is this error when the plugin first loads and I never see anything else


L 02/27/2008 - 21:09:57: [sodstats.smx] [SoD-Rank] Invalid gameid.
L 02/27/2008 - 21:19:24: [sodstats.smx] [SoD-Rank] Invalid gameid.

FrostbyteX
02-27-2008, 22:29
I had the wrong gameid for DoD:S. If you try again, it should work.

Also, I just tested it in a TF2 server and the latest version works!

mplostcause
02-27-2008, 22:48
I can confirm, it is now working on DoD:S

FrostbyteX
02-27-2008, 22:52
Thanks for helping! I just updated the supported mods to "any," as it also works in TF2.

You may want to redownload the plugin if you intend to use it. There is an advertisement for my website on the "statsme" panel. That isn't intentional. I put it in because I use the plugin on my own server and I forgot to take it out before submitting.

If you find any other bugs, I check this forum daily and will fix them as soon as I can.

Steve

mplostcause
02-27-2008, 22:56
Thanks for expanding the community by writing plugins. I will continue to use your plugin on all my communities DoD:S servers and will notify you of any bugs that may arise.

82694
02-28-2008, 01:11
I run a FortressForever server did you ad any mod appid #'s? FF is 215

FrostbyteX
02-28-2008, 02:00
I'm using game directories instead of app-id's since I was too lazy to find an API. If you would like to test the plugin on FortressForever, PM me the game directory and I'll send you a version of the stats plugin that will run on it.

Steve

82694
02-28-2008, 02:21
I'm new to all this stuff so please excuse my ignorance ahead of time. How do you know the game directory? Is it in the gameinfo.txt?

FrostbyteX
02-28-2008, 02:25
The game directory is directory containing gameinfo.txt.

Steve

82694
02-28-2008, 02:36
In my client files it is this
Program Files\Steam\steamapps\SourceMods\FortressFore ver

In my server files It is just
FortressForever

The gameinfo.txt file is located in the FortressForever folder.

bl4nk
02-28-2008, 02:59
I run a FortressForever server did you ad any mod appid #'s? FF is 215

Adding support for mods by appid wouldn't work. It would work for Valve's games, but for any custom mod, it would return the same appid (215 in this case). This is because all custom mods use the Source SDK Base to run.

misfit
02-28-2008, 07:20
Installed plugin on TF2 server, loads fine and returns no errors, yet any command I type in returns nothing. Should this create a local file somewhere? What might I have done wrong? Thanks.

FrostbyteX
02-28-2008, 08:44
misfit, check if it created the file: sourcemod/data/sqlite/storage-local.sq3.

Steve

misfit
02-28-2008, 09:09
No, it didn't.

As an afterthought: Does it need any other plugins? I have none loaded, as the only reason I loaded SM/MM was to get stats.

FrostbyteX
02-28-2008, 09:28
Are you sure sourcemod is functioning correctly? To check, go into the console and type "meta list". That should print a list including "sourcemod" into the console. Then type "sm_help" and you should see a list of commands.

I have finals for the next four hours, but I will be back online afterwards to do TF2 testing. Do you have instant messenger? I'll be logged in all day - drop me a message if you want to debug the problem.

My AIM is FindAPattern.

Steve

(Edit: I don't know why I typed "mani list". I need more sleep.)

misfit
02-28-2008, 09:55
Yep, sourcemod is loaded just fine:

09:51:38 meta list
09:51:38 Listing 1 plugin:
[01] SourceMod (1.0.0.1904) by AlliedModders LLC

misfit
02-28-2008, 15:25
Thanks for your help. :-)

82694
02-28-2008, 18:24
misfit, check if it created the file: sourcemod/data/sqlite/storage-local.sq3.

Steve


I do have the above file but the stats don't work. Any progress?
Thanks in advance.

FrostbyteX
02-28-2008, 18:38
rename that file to "storage-local.bak" and then download the latest plugin

82694
02-29-2008, 02:08
This is what I get when I use sm_listplugins, I changed the file name as you stated above and nothing yet works.

[SM] Listing 24 plugins:
01 "Basic Commands" (1.0.0.1854) by AlliedModders LLC
02 "Reserved Slots" (1.0.0.1854) by AlliedModders LLC
03 "Admin Help" (1.0.0.1854) by AlliedModders LLC
04 "Basic Fun Votes" (1.0.0.1854) by AlliedModders LLC
05 "Rock The Vote" (1.0.0.1668) by AlliedModders LLC
06 "Basic Chat" (1.0.0.1854) by AlliedModders LLC
07 "M3Motd - MOTD / Rules Display" (0.2.1) by M3Studios, Inc.
08 "SlapSlay Commands" (1.0.0.1854) by AlliedModders LLC
09 "Basic Info Triggers" (1.0.0.1854) by AlliedModders LLC
10 "Admin File Reader" (1.0.0.1854) by AlliedModders LLC
11 "Nextmap" (1.0.0.1854) by AlliedModders LLC
12 "Basic Comm Control" (1.0.0.1854) by AlliedModders LLC
13 "MapChooser" (1.0.0.1668) by AlliedModders LLC
14 "Spray tracer (Menu)" (2.1) by Gweedo
15 "Basic Fun Commands" (1.0.0.1854) by AlliedModders LLC
16 "SoDStats" (1.0.3) by ]SoD[ Frostbyte
17 "Admin loggin" (1.0) by vIr-Dan
18 "Admin Menu" (1.0.0.1854) by AlliedModders LLC
19 "Basic Ban Commands" (1.0.0.1854) by AlliedModders LLC
20 "Bad name ban" (1.59) by vIr-Dan
21 "Anti-Flood" (1.0.0.1854) by AlliedModders LLC
22 "Basic Votes" (1.0.0.1854) by AlliedModders LLC
23 "Ads" (1.0.4.0) by Shane A. ^BuGs^ Froebel
24 "TeamSwitch" (1.0) by MistaGee

FrostbyteX
02-29-2008, 03:49
Make sure that you have the default databases.cfg in your sourcemod/configs directory.

82694
02-29-2008, 11:21
yes databases.cfg is there. Also I checked this file storage-local.bak and it is writing to it. So it seems that it just isn't recognizing the say commands?

Zalaxy
02-29-2008, 12:01
Try deleting everything related to stats and then re-installing. As I just installed last night and everything has run SMOOTH. I personally am psyched for the updates especially with the server achievements.

I cannot complain at all about this mod.

If you are taking any suggestions I do have a few.

If possible allow a detailed statistics command. The command could take in the total time the user has been on the server. Could also display the best class the player is good at, based off of KD ratio. Most points in one death.

I don't know if even half of these are possible but if they are it would be AMAZING if they were added. Thank you for this outstanding work.

Look for any of our 5 SKC server's to be having your stats plug-in. :P For TF2.

FrostbyteX
02-29-2008, 16:31
Zalaxy, I'm glad to hear that you are satisfied with this plugin. I will definitely drop by your servers.

I'm making a list of features to add for TF2, DoD and CS:S. Everything you mentioned will be added to that list and I'll do my best to implement each in a timely fashion. You can also expect weapon stats and a php web interface (with no modifications to plugin install!).

The only difficulty is keeping the requirements I have set for this project: zero-configuration required and minute resource usage. That should not be a problem for what you mentioned.

If you have any problems or find any bugs, feel free to PM me or contact me on AIM (ChessRoxorz).

Steve

pRED*
02-29-2008, 18:01
Hey.

Very nice plugin, can't say I read every line but it's well set out and appears to work well from user feedback.

Before I approve it do you want to create a public cvar? Create a cvar with the flag 'FCVAR_NOTIFY' (and any other you want) and put the cvar name into the header on the first post. This will let the 'servers with this plugin' feature work and let you track your mod on sourcemod.net and game-monitor.com etc. This is optional, just needs to be done prior to approval.

Some other suggestions:

NB: This is just my ramblings and can/should be ignored.

Badges should be a separate plugin. You've done a nice job with the compile defines but this is still over a lot of peoples heads. If you want to stick with them as one I'd upload two sp files.

Personally the best way to set up a ranking system (I started along this path with an extension and never finished it (http://forums.alliedmods.net/showthread.php?t=59439)) is to have one completely separate piece that records and stores stats data and nothing else (except maybe a points calculation - I used ELO in mine..)
It then provides natives and forwards for other plugins to use and access this data.

Then you write another plugin that does the real basics (stats, rank, session etc) using these natives.
Another plugin to add badges..

This way people can write their own extra plugins to extend upon this easily.

I found this one day as an example of a good skill calculation (its for cs1.6 but yeah) - http://forums.alliedmods.net/showpost.php?p=583116&postcount=24

It's obviously not perfect but made for interesting reading. If you had separate plugins a plugin to do a calculation of this sort could be made to replace the standard.

Anyway thats just my thoughts. Entirely up to you.

Let me know about the cvar and I'll approve the plugin.

FrostbyteX
02-29-2008, 19:07
Personally the best way to set up a ranking system (I started along this path with an extension and never finished it (http://forums.alliedmods.net/showthread.php?t=59439)) is to have one completely separate piece that records and stores stats data and nothing else (except maybe a points calculation - I used ELO in mine..)
It then provides natives and forwards for other plugins to use and access this data.

The original design of this plugin was exactly as you described - with natives for stat reading - but I did not fully understand what a native was, so I merged it into one file to avoid complications and headaches. That was an unwanted design sacrifice. I will look into natives and forwards and rewrite the plugin with a more robust design.

Thanks for your comments and suggestions. They are greatly appreciated. I will update the plugin as soon as I finish rewriting it.

Steve

(Edit: I just read more about natives. They would be used for accessing stats, duh!)

82694
02-29-2008, 21:04
Ok To sum things up I am running a FortressForever server. I up dated the plugin, removed it, reinstalled it and it still shows version 1.0.3 instead of 1.0.4. I realize that my mod really wasn't thought of when it was designed but I would really like to be able to run it on my servers.

So I'm asking this Can I get a complete list of files to remove so I can start from scratch.

This is what I have metamod 1.4.2.414

17:59:25 -Id- Name Version Author Status
[01] SBSRC-MM V:2.5.2 devicenull RUN
[02] SourceMod 1.0.0.185 AlliedModders LLC RUN
[03] SDK Tools 1.0.0.177 AlliedModders LLC RUN

18:02:04 [SM] Listing 24 plugins:
01 "Basic Commands" (1.0.0.1854) by AlliedModders LLC
02 "Reserved Slots" (1.0.0.1854) by AlliedModders LLC
03 "Admin Help" (1.0.0.1854) by AlliedModders LLC
04 "Basic Fun Votes" (1.0.0.1854) by AlliedModders LLC
05 "Rock The Vote" (1.0.0.1668) by AlliedModders LLC
06 "Basic Chat" (1.0.0.1854) by AlliedModders LLC
07 "M3Motd - MOTD / Rules Display" (0.2.1) by M3Studios, Inc.
08 "SlapSlay Commands" (1.0.0.1854) by AlliedModders LLC
09 "Basic Info Triggers" (1.0.0.1854) by AlliedModders LLC
10 "Admin File Reader" (1.0.0.1854) by AlliedModders LLC
11 "Nextmap" (1.0.0.1854) by AlliedModders LLC
12 "Basic Comm Control" (1.0.0.1854) by AlliedModders LLC
13 "MapChooser" (1.0.0.1668) by AlliedModders LLC
14 "Spray tracer (Menu)" (2.1) by Gweedo
15 "Basic Fun Commands" (1.0.0.1854) by AlliedModders LLC
16 "SoDStats" (1.0.3) by ]SoD[ Frostbyte
17 "Admin loggin" (1.0) by vIr-Dan
18 "Admin Menu" (1.0.0.1854) by AlliedModders LLC
19 "Basic Ban Commands" (1.0.0.1854) by AlliedModders LLC
20 "Bad name ban" (1.59) by vIr-Dan
21 "Anti-Flood" (1.0.0.1854) by AlliedModders LLC
22 "Basic Votes" (1.0.0.1854) by AlliedModders LLC
23 "Ads" (1.0.4.0) by Shane A. ^BuGs^ Froebel

18:03:14 sm plugins info 16
18:03:14 Filename: sodstats.smx
Title: SoDStats (A simple stats and ranking system.)
Author: ]SoD[ Frostbyte
Version: 1.0.3
URL: http://www.sonsofdavid.net
Debugging: No
Running: Yes
Reloads: Map Change if Updated

But yet the say commands don't work.

FrostbyteX
02-29-2008, 21:26
If someone can point me to the ModEvents.res and give me the game directory, I will add support for it.

82694
02-29-2008, 22:41
OK I must have missed the ModEvents.res the first time sorry.
Location is FortressForever\resource

I put a copy of the ModEvents.res here

http://www.rawlie.com/file/FF/downloads/ModEvents.res

Thanks for all the help.

TAZED
03-02-2008, 13:55
Thank you sooo much for making this. I have been looking for a simple replacement to Mani's stats and this is it. Very Great plugin that should be include in every SourceMod install.

FrostbyteX
03-02-2008, 17:39
You may want to redownload the plugin. I made a stupid mistake storing the time and just uploaded the corrected version.

The current version is now completely tested and works on CS:S, TF2 and DoD:S. Next on the list is adding headshot statistics and a team-player score (affected by kill assists and completing map objectives, possibly reducing points for players who kill teammates by blocking or shooting them).

Then weapon statistics and map statistics, and finally a web-interface.

Steve

TAZED
03-02-2008, 18:59
Does the include file stay inside the sod directory or does it go into sourcemod's include? You have it inside the new sod file which goes into scripting.

82694
03-02-2008, 19:40
If someone can point me to the ModEvents.res and give me the game directory, I will add support for it.

I was just wondering if I finally got you all the correct info?

FrostbyteX
03-02-2008, 21:02
Does the include file stay inside the sod directory or does it go into sourcemod's include? You have it inside the new sod file which goes into scripting.

If you're trying to compile, it stays in the sod directory. I have not yet braved accessing the natives from an external plugin, so I couldn't tell you what to do if you are trying to do that.

Steve

TAZED
03-03-2008, 01:21
If you're trying to compile, it stays in the sod directory. I have not yet braved accessing the natives from an external plugin, so I couldn't tell you what to do if you are trying to do that.

Steve

Sorry to confuse, i am a noob. In your updated version there is a new folder called sod that goes into the scripting directory. Inside that sod folder there is another folder called include. Does that folder stay in there or do i take out what's in it and put it into the folder in the scripting directory labeled "include"?

Zesi
03-03-2008, 06:13
hi ho!

can u add EmpiresMod für ur plugin? this will be nice. :) atm stats do not work without empires.sp

Greetz

Edit:


L 03/03/2008 - 12:10:20: SourceMod error session started
L 03/03/2008 - 12:10:20: Info (map "emp_duststorm") (file "errors_20080303.log")
L 03/03/2008 - 12:10:20: [sodstats.smx] [SoD-Rank] Invalid gameid (-1).
L 03/03/2008 - 12:10:20: [sodstats.smx] [SoD-Rank] Unable to hook events.
L 03/03/2008 - 12:21:38: Error log file session closed.

FrostbyteX
03-03-2008, 11:10
I was just wondering if I finally got you all the correct info?

Yes, you did. I'll add support today.

Zesi, can you get me the EmpiresMod game directory and ModEvents.res file?

Zesi
03-03-2008, 11:23
Nu kloar! :mrgreen:

dir must be ../empires/...

FrostbyteX
03-03-2008, 11:28
Nu kloar! :mrgreen:

dir must be ../empires/...

Done, but untested. Let me know how it works =).

Steve

Zesi
03-03-2008, 12:08
thx :)

but "statsme & session" dosent work (screen). By pressing, menu closed! how can i delete these commands? i not need this.
where is the rankfile saved?

EDIT: found it! in "sourcemod-local.sq3" or?

FrostbyteX
03-03-2008, 12:23
Zusi, I removed the panels from EmpiresMod. Only the "rank" command works now (as of v1.0.8).

Zesi
03-03-2008, 12:37
Zusi, I removed the panels from EmpiresMod. Only the "rank" command works now (as of v1.0.8).

Great BUT :twisted: now "top/top10" dosent work, thats not so good! :( but Empiresmod and SoD works! :)

FrostbyteX
03-03-2008, 12:40
Great BUT :twisted: now "top/top10" dosent work, thats not so good! :( but Empiresmod and SoD works! :)

Fixed!

Zesi
03-03-2008, 12:50
Fixed!

Thx for Ur fix! :) good-Fast-Work! :up:

will test this plugin this plugin now! :)

Thx

PS. atm it works good! ;)

FrostbyteX
03-05-2008, 11:27
I've finally finished a large plugin for my clan (task-based recruitment system, tag-enforcing, models by rank, badge/achievement system) and have time to add new features to this plugin.

I am planning to implement the following:
Hitbox statistics
Weapon statistics
Team statistics (points for map goals, kill assists, etc...)
Map statistics (per-map player rankings, map playtime, etc...)
Web interface (this will be finished last)

These will be completed, but I'm sure some are in higher demand than others. Which feature/features should I add first?

Steve

TAZED
03-05-2008, 14:09
Well i like it the way it is for DODS. I like just the standard features of kills and deaths. I would not want anymore features or then it just gets bloated. If people want more then they can get HLStatsX. If you do add more features at least let some of us keep just the basics like it is now.

FrostbyteX
03-05-2008, 15:08
Tazed,

All features will be included as external plugins that use the exported natives. If you don't want them, just delete them.

This whole project was started because I didn't like the other bloated stats plugins. This is all about speed and efficiency.

TAZED
03-05-2008, 15:32
And that's why i love your plugin. It's perfect for me right now.

MjrNuT
03-06-2008, 18:25
I was curious with all your recent updates to the plugin, did the output ingame for the format change at all? Or does your SS on the first post still reflect what it looks like?

Thanks

FrostbyteX
03-06-2008, 18:31
The output changed to better allow extensions from external plugins. For the most part, it is the same, but "statsme" and "session" are now broken into separate panels.

If you have a specific request for a GUI setup, let me know and I can change it.

You can test it out in any of the servers listed at the following link:

http://www.game-monitor.com/search.php?search=sm_stats_version&type=variable

Steve

W][LDF][RE
03-07-2008, 18:23
Any chance of Insurgency mod support? :up:
not sure where to get the items you request for mod requests. :oops:

FrostbyteX
03-07-2008, 21:07
From what I hear, Insurgency mod is ... unique. However, I'll see what I can do.

Steve

82694
03-09-2008, 03:31
Ok man it is up and working I'll give it a good run for a day and let you know if any issues. Thanks a lot. This is perfect.

I ran this for a few days and a couple issues on FF.

1) statsme and session command pops up the window but the menue buttons go no where.

2) top and top10 only displays three players.

3) Rank is working fine. :p

Running MetaMod 1.4.2 and SourceMod 1935

I believe there is another FF server running your plugin. Am I the only one having this issue?

Rebell
03-14-2008, 14:21
Nice plugin,

but how to prune players that not connected XXX days ?

cya

Zekas
03-14-2008, 16:40
got a problem with this rank plugin..it counts death and kills very well but rank for everyone is 1/1. what i should do?

FrostbyteX
03-14-2008, 19:08
Which version are you using? What mod are you running? What type of database are you using? Did this happen after an upgrade? Did this happen after resetting stats?

Steve

Zekas
03-15-2008, 04:32
i'm using sourcemod-r1939 for windows and metamod source 1.4.3 trying to run sodstats, database is sqlite i think, reseted stats but the same thing. Maybe i should delete the mani admin ranks ?

FrostbyteX
03-15-2008, 13:54
82694, FortressForever has a different menu system than other games. I'm not sure how it works, but it sounds like it only displays numbered, selectable menu items. If someone can confirm this, then I will rewrite it to work with that menu system.

Zekas, is it possible to backup and delete your storage-local.sq3 database in your sourcemod/data/sqlite folder? You will have to stop your server while you do this. Also, make sure you have an entry for "storage-local" in your sourcemod/cfg/databases.cfg file.

Steve

Zekas
03-15-2008, 15:10
In my sourcemod/data/sqlite folder is sourcemod-local.sq3 and in databases.cfg this entry :
"storage-local"
{
"driver" "sqlite"
"database" "sourcemod-local"
Is everything ok here?

FrostbyteX
03-15-2008, 16:43
Your DB cfg is fine. What mod are you running? (cstrike/dod/etc...) I'm wondering if some other plugin is using the same table names ...

Steve

Zekas
03-16-2008, 05:17
it's cstrike.

FrostbyteX
03-16-2008, 13:17
Add me on steam. My username is "uschess". I'll help you figure this out.

Steve

Zekas
03-17-2008, 07:23
well is there way to make sod stats count players kill/deaths by ip address?

FrostbyteX
03-17-2008, 14:17
There isn't right now, but I can easily add it.

Steve

Fenrix
03-23-2008, 17:00
The problem that is happening with Fortress forever with the top and session commands, happens on Zombie Panic: source as well.

the command works and it opens an escape style menu with buttons instead of player names, their stats are in the buttons but automatically cut off due to character limit per button I think.
Im only able to see the top 3 when this happens

FrostbyteX
03-23-2008, 23:36
The problem that is happening with Fortress forever with the top and session commands, happens on Zombie Panic: source as well.

the command works and it opens an escape style menu with buttons instead of player names, their stats are in the buttons but automatically cut off due to character limit per button I think.
Im only able to see the top 3 when this happens

I'm not familiar with those games. Is there a way to change the panel style? Can you recommend any other ways of displaying top10? I'm not a zombie panic or fortress forever player, so I cannot think of anything. Suggestions are welcome!

Steve

Fenrix
03-24-2008, 11:29
the mods use the same kind of gui menu that sourcemod uses, Im not a coder just a server owner so not much I can help you with there

chat messages work when using the rank command, is there a way of posting the top ten players user names in a chat message whith a command?

Warnink
03-24-2008, 12:51
You need to have ingame menus enabled to see top10 "ingame". I know this works for Zombie Panic but I do not host FF so not sure about that, just have a look at this thread it explains how to make them work...

http://forums.alliedmods.net/showthread.php?p=566380

Thanks for the awesome plugin FrostbyteX (http://forums.alliedmods.net/member.php?u=33356) I'm really interested to see where this goes in the future.

Fenrix
03-25-2008, 04:08
thanks for that, but it would be cool if we could get a chat command to print top ten in chat for all to see anyway

Fenrix
03-28-2008, 07:08
a player in my server wanted to know if there was a command for showing the points he required to reach the next rank, that would be really cool, especially for thse way down the bottom of the list

FrostbyteX
03-28-2008, 08:44
a player in my server wanted to know if there was a command for showing the points he required to reach the next rank, that would be really cool, especially for thse way down the bottom of the list

I'll add that to statsme. Great idea!

Steve

Rebell
04-01-2008, 02:18
And a "prune" function would be nice to delete players that did not connect "xxx" days to the server to keep the database fast and clean.

cya

monkie
04-01-2008, 03:33
1 more request, make it MULTI-LINGUAL plz

FrostbyteX
04-01-2008, 10:15
Sounds good.
Next release will have the following features:

Pruning (Will be optional. Requires a database upgrade.)
Translations file (I only know English, so I'll need some help on this one!)
Headshots (For CSS. Requires a database upgrade.)
Colored Text (For CSS and TF2.)
Points to next rank (In the "statsme" menu.)

Rebell
04-02-2008, 03:46
Nice update ^^

c y a

IHQ-ReimaDWMH]
04-02-2008, 04:50
This plugin seems to do everything that I need it to do - simple is beautiful.

But the problem is the mod I'm hosting: Ballmen (http://bmenmod.com). It is a HL2DM based mod. It basically calculates your kills, deaths and score from those two. I have tried all the easy stats plugins I could find, but this one is the only one I could get to run. It does save the player names but it can't calculate the K:D ratio.

I can still live with the 'esc' menu system, but I would really want to get my server to be the first with stats. Could there be a support for this mod? :)

And about the menu system (because the mod doesn't support the textmenus) - could there be a option that the plugin would print the top10 in chat and just for the player that requested it?

Thanks alot in advance!

FrostbyteX
04-02-2008, 10:11
Have you checked the thread about enabling support for text menus? It's in the plugin description.

Also, can you send me the modinfo.res (is this right?) file so that I can look at the mod's events?

Steve

IHQ-ReimaDWMH]
04-02-2008, 14:12
Have you checked the thread about enabling support for text menus? It's in the plugin description.

Also, can you send me the modinfo.res (is this right?) file so that I can look at the mod's events?

Steve

I tried the enabling, but when I for example type sm_admin to the console I get a very small gray box to the area where there should be the text based menu.

I send you some files that I looked into. Maybe they can help.

Fenrix
04-02-2008, 23:28
hmmm, I know this one might be tricky but could you build in a function to export the current ranks to a text file sorted by rank?
it would be easier for my style of ranking than the current way
as it is I reset the ranks each month and add the top 10 to a championship type ladder where each player is given reverse rank points

eg: rank 1 gets 10pts rank 2 gets 9, that kind of thing.

its easier than typing top and writing down the names in notepad :P
(this is mainly because I have not got any kind of web server access to my scores for outputting them)

FrostbyteX
04-03-2008, 10:01
Fenrix, would dumping top10 to console work?

IHQ-ReimaDWMH]
04-05-2008, 19:51
I got the stats working in deathmatch mode for the Ballmen mod:



Thanks in advance!

Edit: Took the code off to shorten this thread.

Fenrix
04-06-2008, 05:42
dumping to console would work.
whatever works that allows some simple text output of the ranks

IHQ-ReimaDWMH]
04-07-2008, 13:05
Now the ballmen.sp is working in every gamemode! Thanks alot for help to bl4nk!

// File: ballmen.sp

#define ID_BALLMEN 715517

HookEventsBallmen()
{
HookEvent("player_death", Event_BallmenDeath);
}

public Event_BallmenDeath(Handle:event, const String:name[], bool:dontBroadcast)
{
// Read relevant event data
new userid = GetClientOfUserId(GetEventInt(event, "userid"));
new attacker = GetClientOfUserId(GetEventInt(event, "attacker"));

if(g_initialized[attacker] &&
g_initialized[userid])
{
new user_team = GetClientTeam(userid);
new attacker_team = GetClientTeam(attacker);
new Handle:hndl_gameMode = FindConVar("mp_gamemode");
new gameMode = GetConVarInt(hndl_gameMode);

// Check for suicide
if(userid == attacker)
{
g_deaths[userid]++;
g_session_deaths[userid]++;
}
// Otherwise it's a legitimate kill!
else if(userid != attacker && gameMode == 0)
{
g_kills[attacker]++;
g_deaths[userid]++;

g_session_kills[attacker]++;
g_session_deaths[userid]++;

new score_dif = g_score[userid] - g_score[attacker];
if(score_dif < 0)
score_dif = 2;
else
score_dif = 2 + (g_score[userid] - g_score[attacker])/100;


g_score[attacker] += score_dif + 1;
g_session_score[attacker] += score_dif + 1;

g_score[userid] -= score_dif;
g_session_score[userid] -= score_dif;

SavePlayer(attacker);
SavePlayer(userid);
}
else if(user_team != attacker_team && gameMode == 1 || user_team != attacker_team && gameMode == 2)
{
g_kills[attacker]++;
g_deaths[userid]++;

g_session_kills[attacker]++;
g_session_deaths[userid]++;

new score_dif = g_score[userid] - g_score[attacker];
if(score_dif < 0)
score_dif = 2;
else
score_dif = 2 + (g_score[userid] - g_score[attacker])/100;


g_score[attacker] += score_dif + 1;
g_session_score[attacker] += score_dif + 1;

g_score[userid] -= score_dif;
g_session_score[userid] -= score_dif;

SavePlayer(attacker);
SavePlayer(userid);
}
}
}

IHQ-ReimaDWMH]
04-07-2008, 13:18
Fenrix, would dumping top10 to console work?

I have to use the 'esc' -menus. When I dump the top10 to console, I get only top3...like I have 3 buttons in 'esc' -menu. How I fix this?

FrostbyteX
04-07-2008, 21:53
;607888']I have to use the 'esc' -menus. When I dump the top10 to console, I get only top3...like I have 3 buttons in 'esc' -menu. How I fix this?
Since you've already modified the code a bit, just replace the DrawMenuText calls with DrawMenuItem.

PStar
04-22-2008, 05:20
Where does it stores the players stats?

FrostbyteX
04-23-2008, 11:44
Where does it stores the players stats?

In the "storage-local" SQLite database.

PStar
04-24-2008, 09:27
In the "storage-local" SQLite database.

What should i do if i want to reinstal the plugin buti want to get the old stat worikng whit the reinstalled plugin?

FrostbyteX
04-25-2008, 08:29
What should i do if i want to reinstal the plugin buti want to get the old stat worikng whit the reinstalled plugin?

If you want to upgrade, just replace the old stat plugin with the new one. Make sure to read the upgrade instructions in the first post to see if you have to take any more steps, though.

Steve

PStar
04-25-2008, 09:36
I will reinstal the whole mod of the server.
So recomping the sp file event the sod stats.

In short i will dele the whole addon flodder and rebuild it.
I that case what should i do tho make the palyaer stats stay?

huck529
04-25-2008, 09:54
two quick noob questions:why does the ranking start with 1000 points?
and is there a way to change this?

FrostbyteX
04-25-2008, 09:57
I will reinstal the whole mod of the server.
So recomping the sp file event the sod stats.

In short i will dele the whole addon flodder and rebuild it.
I that case what should i do tho make the palyaer stats stay?

player stats are stored in databases/sqlite/storage-local.sq3. deleting the addon will not remove player stats.

FrostbyteX
04-25-2008, 09:59
two quick noob questions:why does the ranking start with 1000 points?
and is there a way to change this?

1000 points is an arbitrary number. it is actually 0 in the database. if you want to change it, just replace "1000" with whatever score you want to start with and recompile.

huck529
04-25-2008, 11:58
just replace "1000" with whatever score you want to start with and recompile.

if i could find it now :p

PStar
04-26-2008, 21:42
It has ben deleted :-(
After i have reinstalled sourcemod.

FrostbyteX
04-28-2008, 09:26
It has ben deleted :-(
After i have reinstalled sourcemod.

well yes... after reinstalling sourcemod it would... but not after just reinstalling SoD stats

Jezternz
05-09-2008, 23:24
Hey I have several servers setup at the moment for a few different mods, and I want to combine all the stats.
I first looked at "CSS Little Rank System" because I thought this one(sod stats) was a local stored one, where i wanted a mysql db stored one, however I now realise this one also works with Mysql.
By looking through this thread it seems like the author is dedicatd to the mod. So I tried deleting CLRS and installin this mod. But I get the same errors :cry:

I can imagine this is something simple as I am new to sorcemod. Any help is hugely apreciated!

wow. that last question.. i dont know why you would get that. Anyway.

I have some rreally strange error.
Basicly, wen people join my server, it add's them to the database and thats all swell, but as soon as on shot is fired and as soon as it hits a person (or bot), whether it kills them or not. The server crashs.
The rank and top10 functions work fine. They display the stats.
but as soon as a shot is fired this happens:
http://img265.imageshack.us/img265/1796/errorno0.jpg

Any help would be hugely appreciated. Am I missing a file or something? Is this version of the stats no longer working?

Okay well i just went and remmed/commented out the source code that triggered on player damage.
(//HookEvent("player_hurt", EventPlayerHurt);)
That fixes the problem, however, The same problem occur on death.
Any ideas?

Also note I am running Gungame + ES tools + Event Scripts would this make a difference?

Jezternz
05-10-2008, 04:12
Completly rewriting this post :).
First things first. Can I use this mod with estools also installed (ie for gungame, cause when I have them both running it seems to crash the server (see previos post for details). I have noticed It runs fine if I run Es tools in safemode, however I would rather run it in standard mode if possible.

Secondly (and more importantly). Does this mod support mysql? or only the local-sql db. if it does support mysql, please help me to get this working, if not would it be easy enough to rewrite it so you coul connect to an external mysqldb. If not would the developer consider makng this an optional parameter (defaulting to local-sql)?

Thanks, Josh

ottobohn
05-11-2008, 10:35
Any fix for it to work on DM servers? I get nothing on ours and it's sourcemod 1.x with the newest DM.

Otto

FrostbyteX
05-12-2008, 12:45
The question about your server crashing when used with estools is too time-involved for me to look into at the moment. But you can use this plugin with mysql. Just open your storage-local database config file and change "SQLite" to "mysql" and then set your server IP and port below it.

As far as this plugin not working with deathmatch, which deathmatch mod are you running? Are you running the deathmatch sourcemod plugin or a separate assembly? Try executing "sm_stats_enabled 1" on the server.

Do you get any warnings or errors?

Steve

Jezternz
05-12-2008, 18:21
thanks heaps frostbyte, for this awesome pluggin, and it works fine in safemode, so im just gonna keep it in safemode. Will try the mysql later today :)

Hmmm well i presume you mean this file here: cstrike\addons\sourcemod\configs\databases.cf g

"Databases"
{
"driver_default" "mysql"

"default"
{
"driver" "default"
"host" "**.**.**.***"
"database" "*******"
"user" "*******"
"pass" "*******"
//"timeout" "0"
//"port" ""
}
"storage-local"
{
"driver" "mysql"
"database" "**.**.**.***"
"port" "3306"
}
}


I get the error:
sodstats.smx - Unable to connect to database -[2003] Cant connect to mysql server on 'localhost' (10061)

Anyways, all the details are correct im sure.
So I tried copying all of the stuff from "default" and pasted into "storage-local". After I did that I got the error "table could not be made".. does this mean it connected to the database that time?
I thought that it did mean this so I tried making the table manually with:

CREATE TABLE `gamecent_gcnz`.`players` (
`rank` INT NOT NULL AUTO_INCREMENT ,
`score` INT( 12 ) NOT NULL DEFAULT '0',
`steamid` VARCHAR( 255 ) NOT NULL ,
`kills` INT( 12 ) NOT NULL DEFAULT '0',
`deaths` INT( 12 ) NOT NULL DEFAULT '0',
`shots` INT( 12 ) NOT NULL DEFAULT '0',
`hits` INT( 12 ) NOT NULL DEFAULT '0',
`name` VARCHAR( 255 ) NOT NULL ,
`active_badge` VARCHAR( 255 ) NOT NULL DEFAULT '0',
`time_played` VARCHAR( 11 ) NOT NULL DEFAULT '0',
PRIMARY KEY ( `rank` )
)

So it created the table, but I still got the same error? (could not create table)
The mysql user does have the correct permissions btw.

Thanks in advance, Josh

Box Cutter
05-12-2008, 19:12
Frostbyte, a few posts earlier you mentioned some new features you will be adding in the next release. Do you know when you will have the next release out? I only ask because I'm going to install this plugin on my server here soon and if a update is about to come out I might save myself the trouble of upgrading and just install the new version. Thanks!

-BC

Jezternz
05-12-2008, 21:15
For anyone who in the future has the same table creation problem. I modified the create player tables query to

CREATE TABLE IF NOT EXISTS players(`rank` INTEGER NOT NULL AUTO_INCREMENT, `score` int(12) NOT NULL default 0 , `steamid` varchar(255) NOT NULL , `kills` int(12) NOT NULL default 0, `deaths` int(12) NOT NULL default 0, `shots` int(12) NOT NULL default 0, `hits` int(12) NOT NULL default 0, `name` varchar(255) NOT NULL , `active_badge` varchar(255) NOT NULL default 0, `time_played` int(11) NOT NULL default 0, PRIMARY KEY ( `rank` )) ENGINE = MYISAM;

Works Correctly now, probrably a slightly different syntax to the localsql, at least the version on mysql i am using (4.1.22-standard)
Thanks again Frostbyte for the great pluggin!

Also. Would having these queries fire off on every single gun shot be a heavy load for the server?
Im tempted to disable the onfire/onhurt events

Box Cutter
05-13-2008, 12:43
So I went ahead and installed the plugin on my CS:SDM server and can happily report that everything seems to be functioning properly. The only thing that seems wierd is the starting off with 1000 points. I know you mentioned something to this effect on a previous post but is there anyways to start people off at 0 points? I figured I would ask before players start asking why this is so.

Thanks a bunch for a great plugin.

-BC

FrostbyteX
05-13-2008, 13:34
Okay, let's see if I can remember all of this...

I've already written and tested the above "new features," but I'm trying to figure out a way to automatically upgrade without having to delete player stats (that means version checking and database migration).

The sample config file you posted has the IP under "database." That's actually the name of the database in MySQL. Look at the above entry in the default config for a template to follow.

Also, updating stats every gunshot would probably lock up your server. That's a lot of queries. At the moment the plugin saves statistics per player every player death.

Did I get everything?

Steve

Box Cutter
05-13-2008, 15:17
Well I would not mind deleting stats since I just added the plugin. If you would like to release the new version I would be more than happy to run it and test it out. Oh and about the 1000 points. Can it be set to start at zero or maybe a lesser number. Thanks.

-BC

FrostbyteX
05-13-2008, 15:34
I'll add it as a cvar.

sm_stats_startingpoints <0-infinity>

Though your players might not be too happy to see themselves with a negative score ;).

Box Cutter
05-13-2008, 17:28
So I would only have to run the command once right and then everyone will start racking up points from 0? Now that I think about it more it really doesnt matter about the whole 1000 thing since everyone starts there lol

-BC

Box Cutter
05-13-2008, 18:28
I am excited to see your next version. Can you give us a quick list of the new features it will have?

FrostbyteX
05-14-2008, 00:18
It has colored text, records headshots for CS:S, prunes old players from the database every mapchange, shows how many points until next rank, and allows top10 dump to console.

They aren't huge features, but I think they will be nice to have.

Steve

PStar
05-14-2008, 05:24
Can't wait till it is out XD

Box Cutter
05-14-2008, 11:35
Sounds good Frostbyte. +1 Karma for a great plugin and offering support. Do you still have plans to add weapon stats in the future?

-BC

FrostbyteX
05-14-2008, 12:39
I'll add weapon stats once I get the drive to start the web interface.

Steve

Box Cutter
05-14-2008, 13:05
Can it be done to appear in the MOTD window, sort of how the stats worked in AMXX?

PStar
05-14-2008, 13:10
Can it be done to appear in the MOTD window, sort of how the stats worked in AMXX?
You can place websites in you MODT just edit it hit a HTML editor.

Jezternz
05-14-2008, 16:34
My motd, is just an iframe Pointing to this: http://www.gamecentral.co.nz/motd.php
Thanks to Frostbytes pluggin :)

:D well its fully operational :D
www.gamestats.co.nz (http://www.gamestats.co.nz)
or directly
www.gamecentral.co.nz/?p=stats (http://www.gamecentral.co.nz/?p=stats)

FrostbyteX
05-15-2008, 08:58
Is that a web interface for this plugin? If so, that's impressive.

I'm thinking I'll have to use MySQL for web interface... Replicating the SQLite database is too much overhead.

Steve

Jezternz
05-15-2008, 17:41
yes it is :), thanks heaps for the pluggin. If you need any help with the SQL (which you seem to have sorted) or the web interface, I would love to help :mrgreen:

Edit: Spiced it up a it :)
http://www.gamecentral.co.nz/?p=stats
It also highlights your own stats if you login and set ur steamid wen u register. (offocurse you must play on the server a bit to see this)

ottobohn
05-16-2008, 00:02
The question about your server crashing when used with estools is too time-involved for me to look into at the moment. But you can use this plugin with mysql. Just open your storage-local database config file and change "SQLite" to "mysql" and then set your server IP and port below it.

As far as this plugin not working with deathmatch, which deathmatch mod are you running? Are you running the deathmatch sourcemod plugin or a separate assembly? Try executing "sm_stats_enabled 1" on the server.

Do you get any warnings or errors?

Steve

Hey Steve,

Looks like something's stopping it from loading. I have it working on all servers, but DM ones.


sm_stats_enabled 1
Unknown command: sm_stats_enabled


[CSSDM] Counter-Strike Source: Deathmatch (version 2.1.0.446)
Using a sourcemod version.

Otto

FrostbyteX
05-19-2008, 08:50
Sorry about not responding for a few days. I'm out of state at the moment and will get back sometime tonight.

(The web interface is very nice! If I need any help with it, I'll definitely drop you a line. Thanks!)

Steve

ottobohn
05-22-2008, 14:05
U think u could provide us with a download link for ur version of the mysql and the web php display for it please? We're very pleased with this plugin and your work.

otto

yes it is :), thanks heaps for the pluggin. If you need any help with the SQL (which you seem to have sorted) or the web interface, I would love to help :mrgreen:

Edit: Spiced it up a it :)
http://www.gamecentral.co.nz/?p=stats
It also highlights your own stats if you login and set ur steamid wen u register. (offocurse you must play on the server a bit to see this)

Box Cutter
05-22-2008, 15:31
I am also excited for the next version. I am not so much anxious for a web interface. I would just love to have a menu or MOTD window pull up that would give you hit and weapon stats. I think Frostbyte should go in the direction he feels is best and I will support this plugin either way.

-BC

Jezternz
05-22-2008, 18:46
Im at uni atm, but when I get home later on today, I will upload the modified smx / pluggin file with instructions on how to use.

Jezternz
05-22-2008, 21:47
Okay!
For reference, if you want the exact mysql query here it is:
CREATE TABLE IF NOT EXISTS players(`rank` INTEGER NOT NULL AUTO_INCREMENT, `score` int(12) NOT NULL default 0 , `steamid` varchar(255) NOT NULL , `kills` int(12) NOT NULL default 0, `deaths` int(12) NOT NULL default 0, `shots` int(12) NOT NULL default 0, `hits` int(12) NOT NULL default 0, `name` varchar(255) NOT NULL , `active_badge` varchar(255) NOT NULL default 0, `time_played` int(11) NOT NULL default 0, PRIMARY KEY ( `rank` )) ENGINE = MYISAM;

However I would use the attached .smx pluggin. The exact modifications are as follows:
1. Changed the create tables code
2. Added SOD Stats messages, for when it connects successfully (not just for on fail)
3. Removed onshoot events (this would put far to much pressure on server)

so put the new sodstats.smx in the normal pluggins folder. (modname\addons\sourcemod\plugins)

And you will need to modify your databases.cfg (located in modname\addons\sourcemod\configs\databases.cf g)

To the following (example):

"Databases"
{
"driver_default" "mysql"

"default"
{
"driver" "default"
"host" "XX.XX.XX.XXX"
"database" "database_name"
"user" "mysql_username"
"pass" "mysql_password"
//"timeout" "0"
//"port" "0"
}
"storage-local"
{
"driver" "mysql"
"host" "XX.XX.XX.XXX"
"database" "database_name"
"user" "mysql_username"
"pass" "mysql_password"
}
}


Note for those using an external server (not localhost), you must add the game server's IP address to the mysql servers whitelist.

As for the web interface, the one on my site, is kind of custom built for my site. I am happy to share it, just it uses some of my own custom running functions. However I would be most happy to build a standalone one (that can be easily modified visually) if there is enough interest, Or you could just add me on msn/steam and we can see what we can cook up.

Cheers, Josh

PStar
05-23-2008, 04:05
Does this plugin still work on sqlite?

Jezternz
05-23-2008, 05:39
The plugin is made for sqlite :) not mysql specificly

FrostbyteX
05-23-2008, 09:53
I gotta free up some time to roll this next release out. Still can't figure out how to seamlessly upgrade, but I'll worry about that next release. For now I'm just going to try to add columns to the table, then try to create it after, ignoring errors along the way. It will do the job, but it's definitely a hack!

If I have time tonight, I'll update. If not, I'm going into Boston tomorrow and won't be back until late night or early next morning. So if I can't do it tonight, check again Sunday night and I hope to have something out by then.

Sorry for the wait!

Steve

less
05-24-2008, 15:43
I was wondering is there a way to manually change stats removing or even adding kills, deaths etc to someone?

ottobohn
05-25-2008, 11:27
Duh, but when you run it on sqlite, it lags. It takes more time to que the file in the long run. That is why we've requested it for mysql and have the #s crunched remotely.

Since we use the mysql format, we've had 0 lag with the ranks program. Bravo!

otto

The plugin is made for sqlite :) not mysql specificly

PStar
05-25-2008, 11:55
Is it possibel to have the mysql database on an other server(ftp) instead of the game server?
Cause our server hoster doesn't give normal mysql support to the server.

Warnink
05-25-2008, 15:15
Is it possibel to have the mysql database on an other server(ftp) instead of the game server?
Cause our server hoster doesn't give normal mysql support to the server.

Thats the main idea of using mysql, hence what ottobohn was saying above ;)
But not on a ftp server unless it has a mysql server installed to.

PStar
05-25-2008, 18:14
Thats the main idea of using mysql, hence what ottobohn was saying above ;)
But not on a ftp server unless it has a mysql server installed to.

So the mqsyl server shouldn't be on the game server. That's great i doesn't knew that.

Jezternz
05-26-2008, 01:17
well it could be and would probrably be a bit faster, but It defnitly runs fine for me. I have it on 5 different game servers(in new zealand) all, sending the ranks to a remote mysql db(on a server in the US) and I get no lag problems, and can easily manipulate the data and display it.

PStar
05-26-2008, 05:36
well it could be and would probrably be a bit faster, but It defnitly runs fine for me. I have it on 5 different game servers(in new zealand) all, sending the ranks to a remote mysql db(on a server in the US) and I get no lag problems, and can easily manipulate the data and display it.

Could you help me setting up a mysql server? I found a free site where mysql is supported and can bee used. (Is yes please contact me via [email protected])

ThX in forward

FrostbyteX
05-26-2008, 15:02
Just added new version. See change-log for changes.

Removed pruning since I have a better way to do it now. Next release will have web interface, pruning, and top10 from/into console.

Can someone let me know if this works in custom mods? Not sure how colored text will affect the output... If it breaks anything, I'll add a check for TF2/CSS and revert third party mods to standard coloring.

FrostbyteX
05-26-2008, 15:04
Any more feature requests?

Fenrix
05-26-2008, 16:09
player looking up? eg: rank <player>

cvar to set at map change rank calculations

a way of setting points values and all that kind of stuff

top player has some kind of special effect or something like a crown over thier head but make it toggleable

FrostbyteX
05-26-2008, 16:17
player looking up? eg: rank <player>

cvar to set at map change rank calculations

a way of setting points values and all that kind of stuff

top player has some kind of special effect or something like a crown over thier head but make it toggleable

Those are all quick and easy to add, so I'll try to get to those tonight. I'm going to come out with a few quick releases to add small features.

Steve

Jezternz
05-26-2008, 21:12
yes I can help with any setting up, if you want to add me on msn: Jezternz AT gmail.com or steam me: JosiaMFire2.

I run the stats pluggin in fistfull or frags and pirates, vikings and knights II (source mods). pvk displays ranks fine. fof displays the ranks, but very dimly and unreadable.

Requests:
A: Could you make an option to count the shots fired, hit positions. except do this locally(mabey just in a variable or something) and then when the player dies, query the mysql server with the new stats, instead of an onfire query. This would be sweet but is mysql version focused.
B: Possibly include an "if mysql (not sqllite) then use my mysql query that seemed to work and disable onfire events"
C: Possibly map counts?

Thanks, Josh

PStar
05-26-2008, 21:45
Thx Jeztenz will ad you to steam friend's.

I just installed the new plugin and it look great i like the colored text.

FrostbyteX
05-26-2008, 22:40
Requests:
A: Could you make an option to count the shots fired, hit positions. except do this locally(mabey just in a variable or something) and then when the player dies, query the mysql server with the new stats, instead of an onfire query. This would be sweet but is mysql version focused.

There is no onfire query. I might add the hitbox stats once the web interface is done.

B: Possibly include an "if mysql (not sqllite) then use my mysql query that seemed to work and disable onfire events"

There is no onfire event =).

C: Possibly map counts?

This is coming =D. Gotta refactor database schema tho.

Box Cutter
05-27-2008, 00:00
Is everything supposed to be duplicated in your zip file?

Jezternz
05-27-2008, 00:32
thanks again frostbyte :) I was sure there was a counter for hits, or was that an older version or something?

FrostbyteX
05-27-2008, 00:36
thanks again frostbyte :) I was sure there was a counter for hits, or was that an older version or something?

there is a counter for hits. that only stores the hits once per shot. it only saves whenever a player is killed.

Jezternz
05-27-2008, 00:44
oh sweet, the way it should be!

less
05-28-2008, 11:31
sm_stats_startpoints does not work m8!

FrostbyteX
05-28-2008, 11:33
I fixed the zip file so that it contains only one of each file.

Sorry about the confusion!

FrostbyteX
05-28-2008, 11:33
sm_stats_startpoints does not work m8!

It's a cvar. You have to set it using sm_rcon or sm_cvar.

I.E.
sm_cvar sm_stats_startpoints 2000

Fenrix
05-28-2008, 14:20
current version crashes Zombie Panic: source, Ill look into getting a debug log later, it doesnt work at all and also crashes the server somehow.

could you possibly add functionality to have different teams worth different points, as in zombie panic it is much harder to bring down a human as a zombie than it is to kill zombies as a human?
as by default most humans bring down at least 2 zombies per death, good players can bring down 6-12 on a good run.

FrostbyteX
05-28-2008, 15:26
Fenrix,

It's probably the colored text. I'll remove that tonight for third party mods. Fixing crashes first; adding features later =).

Fenrix
05-28-2008, 16:16
thanks, yeah had a look at the sp to see if there was anything that was causing it and noticed the way colour was done, probably geared for css, hl2mp doesnt support that (dont know why not its not like that would be hard to add)

I can't even get the server to show text as yellow for server type messages, instead im stuck with crappy grey :(

Jezternz
05-28-2008, 18:23
yeh i get the gray on fistfull of frags, and yeh haha I was thinking somehow I managed to duplicate all the files in the zip file lol.

FrostbyteX
05-28-2008, 21:33
I just updated the file to print colored text in TF2 and CSS only.

Working on map stats now =).

Box Cutter
05-28-2008, 23:21
I noticed that when using sm_stats_startpoints 0 the top 3 players on the top10 command still show starting with 1000 points, but if you view it with the command rank it is at 0.

-BC

FrostbyteX
05-28-2008, 23:25
I noticed that when using sm_stats_startpoints 0 the top 3 players on the top10 command still show starting with 1000 points, but if you view it with the command rank it is at 0.

-BC

Fixed =)

Thanks for pointing that out.

HaX0788
05-29-2008, 01:54
hey, how would I keep the stats enabled by default, do I just put sm_stats_enabled 1 in my server.cfg? I can't get the plugin to work. It's in the sm plugins list, but I've tried both sm_rcon sm_stats_enabled 1 and sm_stats_enabled 1 and neither seems to get the plugin working. Thanks in advance

EDIT:

01 "Reserved Slots" (1.0.1.2166) by AlliedModders LLC
02 "Admin Help" (1.0.1.2166) by AlliedModders LLC
03 "Damage report" (1.1.8) by [30+]Gemeni
04 "Map configs" (1.02) by Berni
05 "Basic Ban Commands" (1.0.1.2166) by AlliedModders LLC
06 "Bounty" (1.0.9.0) by Shane A. ^BuGs^ Froebel, FlyingMongoose, and stoic
07 "Simple Teleport" (1.1) by Taco
08 "Admin List" (1.1) by Fredd
09 "Vote Mod" (1.0) by Soloist
10 "Quake Sounds" (1.8) by dalto
11 "Simple Teleport" (1.1) by Taco
12 "Advanced c4 Countdown Timer" (1.4.1) by dalto
13 "AFK Manager" (1.0.2.4) by dubbeh
14 "Basic Votes" (1.0.1.2166) by AlliedModders LLC
15 "Advertisements" (0.5.5) by Tsunami
16 "SM Super Menu" (0.5) by pRED*
17 "Team Bets" (1.4) by ferret
18 "Basic Info Triggers" (1.0.1.2166) by AlliedModders LLC
19 "Nextmap" (1.0.1.2166) by AlliedModders LLC
20 "Basic Commands" (1.0.1.2166) by AlliedModders LLC
21 "LastMan" (1.2.1) by dalto
22 "Death Beam" (1.1) by Peoples Army, AMP
23 "Rock The Vote" (1.0.1.2166) by AlliedModders LLC
24 "Anti-Flood" (1.0.1.2166) by AlliedModders LLC
25 "Admin File Reader" (1.0.1.2166) by AlliedModders LLC
26 "Basic Chat" (1.0.1.2166) by AlliedModders LLC
27 "TeamSwitch" (1.3) by MistaGee
28 "MapChooser" (1.0.1.2166) by AlliedModders LLC
29 "Web Shortcuts" (1.0.1) by James "sslice" Gray
30 "Admin Menu" (1.0.1.2166) by AlliedModders LLC
31 "Basic Comm Control" (1.0.1.2166) by AlliedModders LLC
32 "Admin Sounds" (1.0.1) by dalto
33 "Simple Weapon Restriction" (1.6) by WhiteWolf
34 "SM Super Commands" (0.60) by pRED*
35 "SlapSlay Commands" (1.0.1.2166) by AlliedModders LLC
36 "RandomCycle" (1.0.1.2166) by AlliedModders LLC
37 "Admin loggin" (1.0) by vIr-Dan
38 "Fun Commands" (1.0.1.2166) by AlliedModders LLC
39 "High Ping Kicker" (1.1) by Liam
40 "Fun Votes" (1.0.1.2166) by AlliedModders LLC
41 "SoDStats" (1.0.10) by ]SoD[ Frostbyte

EDIT: I just look at my database.cfg nd it was missing, so I dled the latest SourceMod build and uploaded the Database.cfg

"Databases"
{
"driver_default" "mysql"

"default"
{
"driver" "default"
"host" "localhost"
"database" "sourcemod"
"user" "root"
"pass" ""
//"timeout" "0"
//"port" "0"
}

"storage-local"
{
"driver" "sqlite"
"database" "sourcemod-local"
}
}

less
05-29-2008, 07:45
Thanx buddy that makes sense...

PStar
05-29-2008, 08:59
hey, how would I keep the stats enabled by default, do I just put sm_stats_enabled 1 in my server.cfg? I can't get the plugin to work. It's in the sm plugins list, but I've tried both sm_rcon sm_stats_enabled 1 and sm_stats_enabled 1 and neither seems to get the plugin working. Thanks in advance

EDIT:


You olny need to put all files in the right directories, and it should work.
Command are:
rank ; session, statsme



Wich SM version are you using and on wich game?

FrostbyteX
05-29-2008, 09:24
hey, how would I keep the stats enabled by default, do I just put sm_stats_enabled 1 in my server.cfg? I can't get the plugin to work. It's in the sm plugins list, but I've tried both sm_rcon sm_stats_enabled 1 and sm_stats_enabled 1 and neither seems to get the plugin working. Thanks in advance

Have you deleted or modified the "storage-local" database in your database.cfg? If so, can you post the contents of this file with all usernames/passwords removed?

Thanks,
Steve

HaX0788
05-29-2008, 10:27
10:26:17 SourceMod Version Information:
SourceMod Version: 1.0.1.2166
JIT Version: JIT (x86), 1.0.1.2166
JIT Settings: Generic i686
http://www.sourcemod.net/


EDIT: Database.cfg was missing, I dled the lastest SourceMod build and uploaded this:
"Databases"
{
"driver_default" "mysql"

"default"
{
"driver" "default"
"host" "localhost"
"database" "sourcemod"
"user" "root"
"pass" ""
//"timeout" "0"
//"port" "0"
}

"storage-local"
{
"driver" "sqlite"
"database" "sourcemod-local"
}
}

I'm in CSS and it doesn't work still even after a restart and a map change.

PStar
05-29-2008, 14:54
Did you dowloaded the plugin from the first post?
Try to delet everything from this plugin, redownload, recomplie with your Source Mod and the try again.
Because ther is another atached file wich uses MYSQL insted of SQLite.

HaX0788
05-29-2008, 15:02
I downloaded the plugin from the first post. I'll try and delete, redownload and recompile

edit, it now works (+ karma for PStar and Frost :))

Box Cutter
05-29-2008, 15:21
Fixed =)

Thanks for pointing that out.

Thank you Sir.

FrostbyteX
05-29-2008, 15:27
I downloaded the plugin from the first post. I'll try and delete, redownload and recompile

edit, it now works (+ karma for PStar and Frost :))

Nice. I'm going to fix the db queries to be compliant with SQLite and MySQL. That will be in next version, which will have an optional web interface and map statistics (only if MySQL and web interface are enabled... going to keep default install as lightweight as possible).

HaX0788
05-29-2008, 16:38
Thanks Frostbyte great job :)

Fenrix
05-31-2008, 01:35
how about leveling points given if the person killing another is of a higher rank, eg instead of + 1 pont when 10 ranks lower its +0.5 or something? that way you dont go up as many levels killing newbies?

FrostbyteX
05-31-2008, 10:41
Fenrix, I tried that on my server for a while, and people were getting fed up because they would hit a certain skill level and then start fluctuating erratically. By playing more, they would begin to lose points. It brought the server activity down, actually, because people wanted to keep their rank.

But I can add it back in as an option, if you'd like.

Steve

Fenrix
05-31-2008, 14:47
I dont really mind it that much, just thought it might be interesting, if it didnt work out for you then it probly wouldnt be widely used.


the main thing I would like would be the ability to choose how many points certain things were worth and the ability to set how many points a kill is worth for each team.

a text file/ config file like this would be cool


======================

sm_sod_tk -2 - team killing
sm_sod_su -5 - commiting suicide with kill command or grenade
sm_sod_k1 1 -killing someone on team 1 = +1 point
sm_sod_k2 2 - killing someone on team 2 = +2 points
sm_sod_k3 2 - killing someone on team 3 = +2 points (not sure if any mods have 3 active teams, team 3 usually being spec)

just thought up a nice one for fun, have a command that sets a bounty on one players head, so that when he dies the player who kills them gets the bounty, if the player doesnt die in that round then they keep the bounty as thier own score

sm_sod_bounty 100 - ability to set a points bounty on a particular players head, then you add this :D

FrostbyteX
05-31-2008, 16:44
Fenrix, I wrote the plugin using natives and forwards, so other plugins can hook into it and save custom stats information - or change the points for the stats. If someone else wants to hook into those and add features, then that would be awesome. If not, it will be a couple weeks before I have time for another release.

Right now I'm just looking out for bugs.

Steve

Fenrix
06-01-2008, 03:17
meh im not fussed, ill see if I can get one of my admins to take a look at it, hes just started learning Pawn so mabey he can do it for me.

still a sweet plugin :D

PStar
06-04-2008, 16:56
Somethimes i get these in my error log:
L 06/04/2008 - 21:47:23: [SM] Native "GetClientName" reported: Client 2 is not connected
L 06/04/2008 - 21:47:23: [SM] Debug mode is not enabled for "sodstats.smx"
L 06/04/2008 - 21:47:23: [SM] To enable debug mode, edit plugin_settings.cfg, or type: sm plugins debug 18 on

FrostbyteX
06-04-2008, 17:17
That might have to do with threaded SQL callbacks. Will check it out when I get home from work.

Steve

Box Cutter
06-05-2008, 12:45
I'm not sure if this has already been mentioned but is there anyway to block it so when someone says rank it doesn't show in the chat to everyone? Or am I just seeing everyones rank stats because I am admin?

-BC

FrostbyteX
06-05-2008, 13:09
It does show it to everyone. Next update will have

sm_stats_blockchat [1|0]

Box Cutter
06-05-2008, 16:25
It does show it to everyone. Next update will have

sm_stats_blockchat [1|0]


Awesome. Will that block the command from showing or just the stats themselves? I actually like the command showing because it encourages others to check their stats and helps spread the commands when players see other players typing them. But if it does block that as well it really isn't a big deal.

Thanks for all you do :up:

-BC

FrostbyteX
06-05-2008, 18:37
Awesome. Will that block the command from showing or just the stats themselves? I actually like the command showing because it encourages others to check their stats and helps spread the commands when players see other players typing them. But if it does block that as well it really isn't a big deal.

Thanks for all you do :up:

-BC

There will be multiple settings. "Rank to ALL. Rank to SPECTATORS/DEAD. Rank to self." Then another CVAR for blocking the actual chat text.

Box Cutter
06-05-2008, 21:04
Okay right on. I'll be looking forward to your next release.

-BC

Jezternz
06-06-2008, 19:52
Would you consider? Seperating the mysql table into two tables (with extra rows):

players ~ rank, steamid, total_shots, total_hits, name, active_badge, total_time_played, total_score, total_kills, total_deaths, last_server(ip adress), last_game(eg css), last_connect(time), last_disconnect(time)
kills ~ playerid(or rank, same thing), victimid(or victims rank, same thing), weapon, game, player_name, victim_name, time

This would require 2 more querys and a decent bit of work, but opens huge potential.
The 3 queries would be: adding a kill to the kills table, and adding a death to the victims total_deaths, and adding a kill to the total_kills of the shooter.

If you did it this way, with the correct interface, you coud show all the kills in realtime on the webinterface.
Similar to this: http://www.pvkstats.co.uk/ ,except I woukd write it differenly and using ajax, it would update in realtime :P

Also the active_badge, is that still working? in the version I used, it wasnt doing anything with active badge :S

I will be going to the biggest australasian lan (gaming event where hundreds of people join their computers and play lan games) in around a month, and I would love to have these kinda features ready by then as I plan on hosting 6+ servers all linked using sodstats at the lan (www.xlan.co.nz (http://www.xlan.co.nz)). I also would like to run an intranet at the lan with live stats over the servers, possibly run a competition, however this is only ideas at this point.

cheers, Josh

FrostbyteX
06-06-2008, 20:44
Interestingly enough, I've already split the database similarly for mysql in the next release, since I'm planning on having map statistics. It also lets you do weapon statistics, hitbox statistics, kill streak, etc...

It's going to be fully functional and hopefully a HlstatsX competitor. And for those who care, it will continue to be developed with the same philosophy: ease of use, simple installation and high efficiency.

Steve

Jezternz
06-07-2008, 03:40
I guess what im asking is will you have the kills in a seperate table, including the game and weapon? and would you be able to add fields for las server, last game, last connect ?


Cheers, Josh :D

PStar
06-07-2008, 14:22
HY got this today in my log files:
L 06/07/2008 - 14:24:58: SourceMod error session started
L 06/07/2008 - 14:24:58: Info (map "cs_wolfenstein") (file "errors_20080607.log")
L 06/07/2008 - 14:24:58: [SM] Plugin encountered error 14: Divide by zero
L 06/07/2008 - 14:24:58: [SM] Debug mode is not enabled for "sodstats.smx"
L 06/07/2008 - 14:24:58: [SM] To enable debug mode, edit plugin_settings.cfg, or type: sm plugins debug 20 on
L 06/07/2008 - 14:42:50: Error log file session closed.

Box Cutter
06-07-2008, 21:30
Im getting the error below. Please let me know if you need me to debug to make any sense of it.


L 06/07/2008 - 17:48:35: SourceMod error session started
L 06/07/2008 - 17:48:35: Info (map "fy_iceworld") (file "errors_20080607.log")
L 06/07/2008 - 17:48:35: [SM] Native "GetClientName" reported: Client 4 is not connected
L 06/07/2008 - 17:48:35: [SM] Debug mode is not enabled for "sodstats.smx"
L 06/07/2008 - 17:48:35: [SM] To enable debug mode, edit plugin_settings.cfg, or type: sm plugins debug 20 on



-BC

Box Cutter
06-12-2008, 14:53
Any ideas on the cause of the error above?

Either way I'm still rockin this plugin. The players on my server seem to love it. I'm looking forward to your next release with some of the previously mentioned features.

-BC

FrostbyteX
06-12-2008, 16:04
Any ideas on the cause of the error above?

Either way I'm still rockin this plugin. The players on my server seem to love it. I'm looking forward to your next release with some of the previously mentioned features.

-BC
Yeah. I think it's trying to grab player ID in a SQL callback. If a player disconnects immediately after typing rank, or if the map changes, then you will get this error.

I'm very busy until Sunday night, so I can't test that theory. If you have a few minutes and can attempt that, I can have a fix out earlier. If not, then I'll get to it Sunday.

Steve

Box Cutter
06-12-2008, 16:33
It's not a huge deal. It hasn't affected my server more than just creating the error. I can fully understand being busy, so take care of your business and I'll be on the lookout for your next release when you can get it out.

-BC

FrostbyteX
06-18-2008, 12:51
Is anyone interested in a multilingual release?

Box Cutter
06-19-2008, 15:04
Is anyone interested in a multilingual release?


I'm good. Just excited for the next release :up:. I am really looking forward to the function to block the rank from showing to everyone. it sometimes has a slight delay so people type rank again and it floods the chat.

Still an awesome addition to my server.

-BC

zhelev81
06-21-2008, 09:18
what is the command,for displaying the rank only to the person who type it ?

FrostbyteX
06-21-2008, 11:45
what is the command,for displaying the rank only to the person who type it ?

That will be in the next release.

Keep your eyes open!

- Frostbyte

zhelev81
06-21-2008, 11:48
Great :))

Box Cutter
06-22-2008, 19:24
My eyes are wide open and anxious for it.

-BC

zhelev81
06-23-2008, 16:15
Sodstats is crashing the server ,so i removed it untill fixed :)

:up::up::up:

Looking forward for the guys to fix it :) i love it :)

I'm running the latest sourcemod build :)

Box Cutter
06-23-2008, 17:50
zhelev81, you may want to post the error this is putting off so Frostbyte has an idea of what might be wrong.

-BC

zhelev81
06-23-2008, 18:00
zhelev81, you may want to post the error this is putting off so Frostbyte has an idea of what might be wrong.

-BC

Same like this here,few times a day :)

http://forums.alliedmods.net/showthread.php?p=623721#post623721

bad :)

FrostbyteX
06-23-2008, 18:36
Sodstats is crashing the server ,so i removed it untill fixed :)

:up::up::up:

Looking forward for the guys to fix it :) i love it :)

I'm running the latest sourcemod build :)

It looks like a problem with hooking player_hurt, as Jesternz commented. If you comment out the HookEvent("player_hurt") line, you will lose the accuracy statistic, but the server will not crash.

What mod are you running? If it's third party, can you send me your modevents.res(sp?) file?

Steve

zhelev81
06-23-2008, 18:43
I run :

Listing 6 plugins:
[01] ZombieMod (2.0.0 V) by c0ldfyr3
[02] SourceMod (1.0.2.2236) by AlliedModders LLC
[03] FPS Boost (1.0) by sslice
[04] Country Filter (1.1) by Knagg0
[05] CS:S Tools (1.0.2.2236) by AlliedModders LLC
[06] SDK Tools (1.0.2.2236) by AlliedModders LLC

also Event Scripts and Es-Tools

Tnx for your help :) I hope we gonna find the problem :)

PStar
06-24-2008, 12:12
It would be great if you could ad these commands in the plugin:
topkill > show the top 10 player with most kills
topdeath > show the top 10 player with most deaths
topkpd > show the top 10 player with most kill/death ratio

Rebell
06-28-2008, 10:34
Hi,

prune players would be great.
So players that didnt connect for xxx days will be deleted of the db.

cya

FrostbyteX
06-28-2008, 13:01
Since there is some interest for better MySQL support, a web interface and pruning, those will all be in the next update. "topdeath" and "topkill" and "topkd" may be released as a separate plugin, so as to keep the base plugin as simple as possible.

Expect an update by the end of this week.

Steve

Jezternz
06-29-2008, 08:06
awesome! thats what I wanna hear Frostbyte! :D

spacedkadet
06-29-2008, 11:31
This plugin works fine as is but im trying to get it running with mysql remote host on my webserver. I have the database.cfg set correctly and the plugin can connect to it, however it cant make the tables. I edited the line in the sodstats.sp as posted by Jezternz (http://forums.alliedmods.net/member.php?u=37552) on page 14 and then it made some of the tables but not all (see the error logs below). I believe its because the only remote db i can make on my host is mysql version5.
I would love if someone with more smarts than me could make me (and others that would need it) a sp or smx that works on mysql 5 so i can call it to a website :)

I have a couple of questions too:
Does there have to be a minimum number of players connected to the server before stats start logging?
and
i get this errors in my sourcemod log:


L 06/29/2008 - 15:52:37: [sodstats.smx] [SoD-Stats] SQL_LoadPlayerCallback failure: Unknown column 'headshots' in 'field list'
L 06/29/2008 - 15:54:07: [sodstats.smx] [SoD-Stats] SQL_LoadPlayerCallback failure: Unknown column 'headshots' in 'field list'
L 06/29/2008 - 15:54:44: [sodstats.smx] [SoD-Stats] SQL_LoadPlayerCallback failure: Unknown column 'headshots' in 'field list'
L 06/29/2008 - 15:54:45: [sodstats.smx] [SoD-Stats] SQL_LoadPlayerCallback failure: Unknown column 'headshots' in 'field list'
L 06/29/2008 - 15:58:01: [sodstats.smx] [SoD-Stats] SQL_LoadPlayerCallback failure: Unknown column 'headshots' in 'field list'
L 06/29/2008 - 16:07:08: [sodstats.smx] [SoD-Stats] SQL_LoadPlayerCallback failure: Unknown column 'headshots' in 'field list'




ty, lee.

FrostbyteX
06-29-2008, 19:28
The database schema has changed since 1.09. A new column, "headshots," was added. Use this instead:

CREATE TABLE `gamecent_gcnz`.`players` (
`rank` INT NOT NULL AUTO_INCREMENT ,
`score` INT( 12 ) NOT NULL DEFAULT '0',
`steamid` VARCHAR( 255 ) NOT NULL ,
`kills` INT( 12 ) NOT NULL DEFAULT '0',
`deaths` INT( 12 ) NOT NULL DEFAULT '0',
`shots` INT( 12 ) NOT NULL DEFAULT '0',
`hits` INT( 12 ) NOT NULL DEFAULT '0',
`name` VARCHAR( 255 ) NOT NULL ,
`active_badge` VARCHAR( 255 ) NOT NULL DEFAULT '0',
`time_played` VARCHAR( 11 ) NOT NULL DEFAULT '0',
`headshots` INT( 12 ) NOT NULL DEFAULT '0',
PRIMARY KEY ( `rank` )
)

Sgt-Mess
07-02-2008, 00:51
Is it possible to have the players/clients rank displayed in a module like it is in tf2 for counter strike source.

FrostbyteX
07-02-2008, 09:10
Is it possible to have the players/clients rank displayed in a module like it is in tf2 for counter strike source.

I'm not exactly sure what you mean. Do you have a picture?

ompster
07-02-2008, 23:28
is there anyway to count npc kills and deaths from npc's beacuse the mod im hosting is Zombie Master and you kill NPC's not other players and also die by npc's if you get what i mean, is there anyway to do this with sodstats.

FrostbyteX
07-03-2008, 08:00
is there anyway to count npc kills and deaths from npc's beacuse the mod im hosting is Zombie Master and you kill NPC's not other players and also die by npc's if you get what i mean, is there anyway to do this with sodstats.

That is very simple to change. I'll put that into next release.

sm_stats_botstats [1|0]

FrostbyteX
07-03-2008, 08:01
Well in tf2 when a player types rank it shows it to just you in a menu kinda like an admin menu.

But in counter-strike source it shows you it in text and to everyone.

I'll add displaying rank in menu to the next release.

Steve

Sgt-Mess
07-03-2008, 08:13
I'll add displaying rank in menu to the next release.

Steve

Thanks allot.

ompster
07-03-2008, 14:23
frosybyte your mod is great, i hate having to deal with the setup of HLstatsx and the others cbf with installing all the pear modules and ssh'ing. yours is simple and this next release sounds awesome. any timeframe when its going to be released?
keep up the good work :up:

FrostbyteX
07-03-2008, 15:10
frosybyte your mod is great, i hate having to deal with the setup of HLstatsx and the others cbf with installing all the pear modules and ssh'ing. yours is simple and this next release sounds awesome. any timeframe when its going to be released?
keep up the good work :up:

I'm trying to get it out by this weekend.

The web interface changes are huge, so I may have to delay a bit. Other than that, I'll keep you posted!

Box Cutter
07-05-2008, 02:17
Frostbyte, I believe you are already aware of and addressing this error in your next release but I thought I would post it while I have debug on.

L 07/04/2008 - 23:03:34: [SM] Native "GetClientName" reported: Client 8 is not connected
L 07/04/2008 - 23:03:34: [SM] Displaying call stack trace for plugin "sodstats.smx":
L 07/04/2008 - 23:03:34: [SM] [0] Line 377, H:\Downloads\Counter-Strike Source\Projects\sodstats\addons\sourcemod\scr ipting\sodstats.sp::SQL_CreatePlayerCallback( )

-BC

TEWidowMaker
07-07-2008, 11:27
does this mod record the players time on the server???

FrostbyteX
07-07-2008, 13:05
does this mod record the players time on the server???


yes

ompster
07-09-2008, 07:30
any progress frostbyte?

FrostbyteX
07-09-2008, 16:38
any progress frostbyte?

There is progress, but not much. I literally have 15 minutes at home every day, except for Saturdays. Work is pressing at the moment, with a release coming up in just three weeks.

Steve

spaztaz666
07-09-2008, 16:45
hi
i realise that you don't have much time, but would it be hard to record bots stats too? so bot kills count towards your own rank status

thanks

~Spaz

ompster
07-09-2008, 18:57
i already asked that a few posts up! geez read the forum

spaztaz666
07-10-2008, 05:23
ahh ok sorry, i read a few but there are 23 pages you know :)

ill b patient :) and thanks

~Spaz

Jonesy
07-10-2008, 05:37
We run this on our DOD:S server, and it goes flawlessly. Great plug-in, exactly what we needed, nothing too fancy, just a simple rank and stats tracker. Thanks Frostbyte!

TEWidowMaker
07-10-2008, 08:44
Where is the local storage database located. I want to be able to read the file and parse a few things from it.

Widow

Box Cutter
07-10-2008, 13:38
Where is the local storage database located. I want to be able to read the file and parse a few things from it.

Widow


addons/sourcemod/data/sqlite

-BC

PStar
07-12-2008, 20:22
Could you ad a cvar to it that set a frag count that has to be reached before the player can have a rank?
For example:

sod_frag_limit "1000"

PlayerX with 2301 frag types in "rank", then he would get the original rank display as it is now

PlayerY with 456 frag types in "rank", then he would get something like this:
Currently not ranked, 1000 Frags need to get ranked, <frags>, <deaths>

FrostbyteX
07-13-2008, 15:44
What do you think of having a customizable rank display... Like a config file that allows you to put "Player {name} is ranked {rank} with {kills} kills and {deaths} deaths"? Where {<column-name>} is the syntax so you can put in your own custom stats using the natives, if you want.

FrostbyteX
07-14-2008, 11:34
Just a quick update for anyone who is waiting for the next release ...

I've decided to split off down two paths. This plugin will remain "tiny" and store only a minimal amount of statistics - aimed at the casual server operator who just wants player statistics without headaches. The other branch will developed for servers requiring more detailed statistics and complex features.

Stop. Don't worry. Both plugins will be written with efficiency and ease-of-use in mind. That should

One will just be more feature-rich and heavyweight. They might be merged eventually, if I have time (a novelty of which I am in dire need).

The larger project will be rewritten with an extension as the backend and a sourcemod plugin for the interface. This will allow me to further optimize and program in a more powerful language, and also open up doors for plugin developers to write their own interfaces that use the extension as a backend.

The project as a whole will soon get larger than I can handle as a single developer, so I've created a discussion board and a subversion repository to better accomodate a community. Without the help of other developers and the input of users, this project will not succeed.

Check back on the main post in this thread for a url to the project forum and a link to the subversion repository.

Until next time,

Steve

Guardia Republicano
07-14-2008, 12:31
Why did you add headshot logging only for CS:S?

Having headshot logging for DoD:S would be great because I haven't found plugins for this.

Regards,
Pablo.

FrostbyteX
07-14-2008, 12:46
Why did you add headshot logging only for CS:S?

Having headshot logging for DoD:S would be great because I haven't found plugins for this.

Regards,
Pablo.

I'll look into it when I have a free moment.

Steve

Box Cutter
07-14-2008, 13:18
I am still looking forward to your next release Frostbyte. The feature I am in need the most of right now is to block the chat and rank command from showing to everyone on the server. As soon as one player types rank about half the server follows and it floods the screen.

Thank you!

-BC

coach
07-21-2008, 09:11
Any news on an update. really hoping for the DODS headshot inclusion.

relaxx
07-21-2008, 19:02
just wanna say thanks for this plugin easy to set up and made my servers twice as popular :)!

zhelev81
07-23-2008, 07:58
The new release will be better ,we all waiting :up::up::up:

FrostbyteX
07-23-2008, 08:26
I think I'll do a partial release without database changes ... Too busy to finish everything =(.

Steve

zhelev81
07-24-2008, 09:40
agree :))

ompster
07-24-2008, 22:12
yeh partial release ftw

LastBoomer
07-25-2008, 04:18
Thanks for this great basic stats plugin FrostbyteX, I've been running
it on my CS:S deathmatch server.

I'd like to suggest 3 more features...
1. Pruning interval adjustable via cvar
2. Points decay for inactivity
3. Command to reset individual player stats (purge hacker's stats)

I fixed two bugs:

1. When setting cvar sm_stats_startpoints to 0, new players
cause divide by zero error when using session and statsme commands.

Fix: Check for stats[STAT_KILLS] = 0

session.sp line 44, statsme.sp line 42
if(stats[STAT_HEADSHOTS] > 0 && stats[STAT_KILLS] != 0) // fix
{
DrawPanelItem(panel, "Headshots");
Format(text, sizeof(text), "%i (%i%%)", stats[STAT_HEADSHOTS], (100*stats[STAT_HEADSHOTS]/stats[STAT_KILLS]));
DrawPanelText(panel, text);
}


2. When players connect then quickly disconnect, GetClientName() throws
a player not found error inside SQL_CreatePlayerCallback()

Fix: Check for connected client

sodstats.sp
public SQL_CreatePlayerCallback(Handle:owner, Handle:hndl, const String:error[], any:data)
{
new client = data;

if(hndl != INVALID_HANDLE)
{
if(IsClientConnected(client)) // fix
GetClientName(client, g_name[client], MAX_NAME_LENGTH);
g_kills[client] = 0;

FrostbyteX
07-25-2008, 17:23
Thanks for your help, LastBoomer. I will add your changes and credit you appropriately.

LastBoomer
07-29-2008, 00:16
My pleasure, its a great plugin. I finally got weaned off of Mani Admin
'cuz of this, stats was the only reason I was still using Mani.

BTW i can't figure how a player can get a headshot but not a kill. Either
the game registers a hit in the head as a headshot (1st shot no kill) or
there could be a timing issue with updating the headshot vs kill fields in
the database.

FrostbyteX
07-29-2008, 08:54
My pleasure, its a great plugin. I finally got weaned off of Mani Admin
'cuz of this, stats was the only reason I was still using Mani.

BTW i can't figure how a player can get a headshot but not a kill. Either
the game registers a hit in the head as a headshot (1st shot no kill) or
there could be a timing issue with updating the headshot vs kill fields in
the database.

Headshots are stored only if the kill was a headshot. If you look at the "player_death" event, headshots are incremented just above where the kills are incremented. There is a bug in "session" that shows an incorrect total headshots. That will be fixed in the next version (I plan to do a partial-release tonight...).

Steve