Raised This Month: $ Target: $400
 0% 

SoD Player Stats


Post New Thread Reply   
 
Thread Tools Display Modes
Jezternz
Junior Member
Join Date: May 2008
Location: New Zealand - Auckland
Old 05-10-2008 , 04:12   Re: SoD Player Stats
Reply With Quote #111

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

Last edited by Jezternz; 05-10-2008 at 23:37.
Jezternz is offline
Send a message via MSN to Jezternz Send a message via Skype™ to Jezternz
ottobohn
Senior Member
Join Date: Sep 2007
Old 05-11-2008 , 10:35   Re: SoD Player Stats
Reply With Quote #112

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
ottobohn is offline
FrostbyteX
Senior Member
Join Date: Dec 2007
Old 05-12-2008 , 12:45   Re: SoD Player Stats
Reply With Quote #113

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
FrostbyteX is offline
Jezternz
Junior Member
Join Date: May 2008
Location: New Zealand - Auckland
Old 05-12-2008 , 18:21   Re: SoD Player Stats
Reply With Quote #114

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
Code:
"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:
Code:
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

Last edited by Jezternz; 05-12-2008 at 19:33.
Jezternz is offline
Send a message via MSN to Jezternz Send a message via Skype™ to Jezternz
Box Cutter
SourceMod Donor
Join Date: Dec 2006
Location: Arizona
Old 05-12-2008 , 19:12   Re: SoD Player Stats
Reply With Quote #115

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
Box Cutter is offline
Jezternz
Junior Member
Join Date: May 2008
Location: New Zealand - Auckland
Old 05-12-2008 , 21:15   Re: SoD Player Stats
Reply With Quote #116

For anyone who in the future has the same table creation problem. I modified the create player tables query to
Code:
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

Last edited by Jezternz; 05-13-2008 at 01:54.
Jezternz is offline
Send a message via MSN to Jezternz Send a message via Skype™ to Jezternz
Box Cutter
SourceMod Donor
Join Date: Dec 2006
Location: Arizona
Old 05-13-2008 , 12:43   Re: SoD Player Stats
Reply With Quote #117

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
Box Cutter is offline
FrostbyteX
Senior Member
Join Date: Dec 2007
Old 05-13-2008 , 13:34   Re: SoD Player Stats
Reply With Quote #118

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
FrostbyteX is offline
Box Cutter
SourceMod Donor
Join Date: Dec 2006
Location: Arizona
Old 05-13-2008 , 15:17   Re: SoD Player Stats
Reply With Quote #119

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
Box Cutter is offline
FrostbyteX
Senior Member
Join Date: Dec 2007
Old 05-13-2008 , 15:34   Re: SoD Player Stats
Reply With Quote #120

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 ;).
FrostbyteX is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 22:19.


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