Raised This Month: $51 Target: $400
 12% 

[L4D & L4D2] Custom Player Stats v1.4B121


Post New Thread Reply   
 
Thread Tools Display Modes
muukis
Veteran Member
Join Date: Apr 2009
Old 07-02-2011 , 11:28   Re: [L4D & L4D2] Custom Player Stats v1.4B105
Reply With Quote #1341

Quote:
Originally Posted by Stargate75 View Post
Custom Player Stats: Connecting to database failed. Read error log for further details. WHY?

Code:
SourceMod error session started
L 07/02/2011 - 07:19:11: Info (map "c8m1_apartment") (file "errors_20110702.log")
L 07/02/2011 - 07:19:11: [l4d_stats.smx] Fast query failed! (Error = "Table 'l4dstats.players' doesn't exist") Query = "SELECT * FROM players WHERE 1 = 2"
L 07/02/2011 - 07:19:11: [l4d_stats.smx] Database is missing required table or tables.
L 07/02/2011 - 07:19:11: [SM] Plugin encountered error 25: Call was aborted
L 07/02/2011 - 07:19:11: [SM] Native "SetFailState" reported: Connecting to database failed. Read error log for further details.
L 07/02/2011 - 07:19:11: [SM] Displaying call stack trace for plugin "l4d_stats.smx":
L 07/02/2011 - 07:19:11: [SM]   [0]  Line 996, /home/groups/alliedmodders/forums/files/5/2/0/8/2/80462.attach::OnConfigsExecuted()
It reads right there: Database is missing required table or tables. Make sure the install.php runs through and then check the database that your tables have been generated. There are SQL scripts which you can alternatively run against your database, if your PHP run fails for some reason.
__________________
Monster Hunter

Though certainly not superhuman, the man's prowess inspires an excess of whispered rumors. But those rumors remain in the realm of speculation.
muukis is offline
n3wton
Senior Member
Join Date: Mar 2010
Old 07-03-2011 , 13:52   Re: [L4D & L4D2] Custom Player Stats v1.4B105
Reply With Quote #1342

It would appear that adding more than one game server to the config doesn't work.

I'm using.

$game_addresses[] = array("N3wton and Tillys Server", "91.192.208.80:27020");
$game_addresses[] = array("Jay and Rugbys Server", "109.70.148.24:27018");

but it doesnt work, on the map. Insted of an "s" its a 1 and its zoomed in somewhere random.

if i just use one game_address it works fine tho...

am I doing something wrong?

YOurs
N3wton
n3wton is offline
muukis
Veteran Member
Join Date: Apr 2009
Old 07-04-2011 , 03:18   Re: [L4D & L4D2] Custom Player Stats v1.4B105
Reply With Quote #1343

Quote:
Originally Posted by n3wton View Post
It would appear that adding more than one game server to the config doesn't work.

I'm using.

$game_addresses[] = array("N3wton and Tillys Server", "91.192.208.80:27020");
$game_addresses[] = array("Jay and Rugbys Server", "109.70.148.24:27018");

but it doesnt work, on the map. Insted of an "s" its a 1 and its zoomed in somewhere random.

if i just use one game_address it works fine tho...

am I doing something wrong?

YOurs
N3wton
For me it works just fine: (link)
PHP Code:
// Game server address (adds a Steam connection link over the site name)
// Multiple game server addresses supported
/* THIS LINE: DO NOT MODIFY OR REMOVE */ 
$game_addresses = array();
// Syntax:
//   $game_addresses[] = array(<NAME>, <ADDRESS>);
// Examples:
//   $game_addresses[] = array("Left 4 Dead 2 - Server 1", "my.site.net:27016");
//   $game_addresses[] = array("Kill Them Zombies - Server 2", "100.102.103.104");
$game_addresses[] = array("Stranger's Bakery - L4D2""pilssi.dy.fi");
$game_addresses[] = array("Left 4 Dead - Modded""aftonbladet.se");
$game_addresses[] = array("TEST""cnn.com");
$game_addresses[] = array("-=HERO=- UK Coop 8""217.163.29.127:27015");
$game_addresses[] = array("N3wton and Tillys Server""91.192.208.80:27020");
$game_addresses[] = array("Jay and Rugbys Server""109.70.148.24:27018"); 
__________________
Monster Hunter

Though certainly not superhuman, the man's prowess inspires an excess of whispered rumors. But those rumors remain in the realm of speculation.
muukis is offline
n3wton
Senior Member
Join Date: Mar 2010
Old 07-04-2011 , 05:25   Re: [L4D & L4D2] Custom Player Stats v1.4B105
Reply With Quote #1344

Hmm...

I copyied and pasted your above code, to see if it would work, and now the webpage wont even load...

are you on the latest version of the webstats? (thats what im on)

Yours
N3wton
n3wton is offline
muukis
Veteran Member
Join Date: Apr 2009
Old 07-04-2011 , 08:14   Re: [L4D & L4D2] Custom Player Stats v1.4B105
Reply With Quote #1345

Quote:
Originally Posted by n3wton View Post
Hmm...

I copyied and pasted your above code, to see if it would work, and now the webpage wont even load...

are you on the latest version of the webstats? (thats what im on)

Yours
N3wton
Yes, my web stats are identical to the latest. You did paste the code over your existing Game server address code?

This my config.php (replaced with <blah>):
PHP Code:
<?php
/*
================================================
LEFT 4 DEAD AND LEFT 4 DEAD 2 PLAYER RANK
Copyright (c) 2010 Mikko Andersson
================================================
Configuration file - "config.php"
================================================
*/

// MySQL information for L4D Stats DB
$mysql_server "<blah>";
$mysql_db "<blah>";
$mysql_user "<blah>";
$mysql_password "<blah>";
$mysql_tableprefix "<blah>";

// MySQL information for IP to Country DB
// Fill this if a separate database is used
$mysql_ip2c_server "<blah>";
$mysql_ip2c_db "<blah>";
$mysql_ip2c_user "<blah>";
$mysql_ip2c_password "<blah>";
$mysql_ip2c_tableprefix "<blah>";

// Heading for the stats page. You can add a HTML URL here!
$site_name "Strangers Bakery";

// Game server address (adds a Steam connection link over the site name)
// Multiple game server addresses supported
/* THIS LINE: DO NOT MODIFY OR REMOVE */ 
$game_addresses = array();
// Syntax:
//   $game_addresses[] = array(<NAME>, <ADDRESS>);
// Examples:
//   $game_addresses[] = array("Left 4 Dead 2 - Server 1", "my.site.net:27016");
//   $game_addresses[] = array("Kill Them Zombies - Server 2", "100.102.103.104");
$game_addresses[] = array("Stranger's Bakery - L4D2""pilssi.dy.fi");
$game_addresses[] = array("Left 4 Dead - Modded""aftonbladet.se");
$game_addresses[] = array("TEST""cnn.com");
$game_addresses[] = array("-=HERO=- UK Coop 8""217.163.29.127:27015");
$game_addresses[] = array("N3wton and Tillys Server""91.192.208.80:27020");
$game_addresses[] = array("Jay and Rugbys Server""109.70.148.24:27018");

// Supported game versions
// 0 = Support both L4D1 and L4D2
// 1 = Left 4 Dead 1 (default)
// 2 = Left 4 Dead 2
$game_version 2;

// Template for the stats page.
// Leave empty if the default template is used.
// Usage: "mytemplate" (requires directory ./templates/mytemplate existence)
$site_template "";

// Award definitions file
$award_file "awards.en.php";
$award_l4d2_file "awards.l4d2.en.php";

// Refresh interval (seconds) for the front page (index.php)
// 0 = disabled
$stats_refreshinterval 0;

// Minimum playtime and points required to be eligible for any awards, in minutes
$award_minplaytime 60;
$award_minpointstotal 0;

// Minimum kills, headshots and points to be eligible for "Headshot Ratio" award
$award_minkills 100;
$award_minheadshots 100;
$award_minpoints 1000;

// How many top players would you like to show on the awards page on each award?
// Note! You should set this value to at least 1.
$award_display_players 5;

// Amount of time in minutes between Awards page cache updates.
// 0 to disable cacheing
$award_cache_refresh 60;

// Database time modifier (hours)
// 0 if the db time is the same as the websites
$dbtimemod 0;

// Date format for player last online time
// http://www.php.net/manual/en/function.date.php
$lastonlineformat "M d, Y H:i";

// Show player flags next to their names based on their IP
// 0 to disable
// Installation instructions:
//   1. Download and extract http://www.maxmind.com/download/geoip/database/GeoIPCountryCSV.zip to web stats root (same folder as updatetable.php)
//   2. Execute install.php (use a web browser) - BE PATIENT AND WAIT FOR THE EXECUTION TO FINISH!
//   3. Delete files GeoIPCountryCSV.zip and GeoIPCountryWhois.csv when installation is successful
$showplayerflags 1;

// Show player city name next to their flag and country name (player.php) based on their IP (has no effect when $showplayerflags = 0)
// 0 to disable
// Installation instructions:
//   1. Download latest GeoLiteCity_YYYYMMDD.zip from http://www.maxmind.com/app/geolitecity and extract the files to web stats root (same folder as updatetable.php)
//   2. Execute install.php (use a web browser) - BE PATIENT AND WAIT FOR THE EXECUTION TO FINISH!
//   3. Delete files GeoLiteCity_YYYYMMDD.zip, GeoLiteCity-Blocks.csv and GeoLiteCity-Location.csv when installation is successful
$showplayercity 1;

// Google Maps (player.php) additional URL parameters (URL postfix)
// Default: "&t=h&z=5"
//   Examples: (there is more!)
//     t => h = Satellite with labels / k = Satellite without labels / p = Terrain
//     z => Zoom factor
//     lci => com.panoramio.all = Photos / org.wikipedia.en = Wikipedia / com.youtube.all = Videos (combined with comma)
// Try out the usable parameters yourself
$googlemaps_addparam "&t=h&z=5";

// Google Maps (index.php) API key (get yours from http://code.google.com/apis/maps/signup.html)
$googlemaps_apikey "<blah>";

// Show Google Maps (index.php) location for the first # players online (useful when web stats hosts multiple game servers)
// 0 to show all players
$googlemaps_showplayersonlinecount 0;

// Google Maps (index.php) players online additional URL parameters (URL postfix)
// Default: "&size=600x300&maptype=satellite&sensor=false"
$googlemaps_playersonline_addparam "&size=600x300&maptype=satellite&sensor=false";

// Google Maps (index.php) zoom when only one players online (or only server is displayed)
$googlemaps_playersonline_zoom 3;

/*
Population CSV file. This is taken from the United States Census Bureau, you
can download a (possibly) more up-to-date file from this URL:

http://www.census.gov/popest/datasets.html

The file will be about half way down, under "Metropolitan, micropolitan, and
combined statistical area datasets", the CSV file under "Combined
statistical area population and estimated components of change". Or, check
the release thread and I can provide an exact URL for the download.

Keep in mind that the file has been drastically altered from it's original
state, including adding individual States as well as the entire US. If you
want to create your own CSV file, message me on Allied Modders and I will
help and possibly include it in a next release.
*/

$population_file "population.usa.csv";

/*
Only display City results, and not Counties. Note: This will drastically
reduce the uniqueness of the results, cities only make up about 1/3rd of
the list. Set to True to enable. Default is False.

Also note, the minimum kills if you are using only citites needs to be
14000 or else you will get erroneous results! Default is 3000.
*/

$population_minkills 3000;
$population_cities False;

// Show/hide link for the timed maps (also disables the page for parameterless use)
$timedmaps_show_all False;

// Allow reading of player Steam profile (overrides all avatar related if set to False)
// Warning! Setting value to true can slow loading of some pages.
$steam_profile_read True;

// Show/hide player avatars (overrides all other avatar related if set to False)
$players_avatars_show True;

// Show/hide online player avatars
// Warning! Setting value to true will slow down the index page some, depending how
// many players are currently online.
$players_online_avatars_show False;

// Number of players to show additional info at Top 10 -players list (set to 0 to disable)
// Shows player avatar and some other information.
// Warning! Setting a number higher than 0 (zero) will slow every page load a little.
$top10players_additional_info 0;

// Show Message Of The Day in each page
$show_motd True;
?>
__________________
Monster Hunter

Though certainly not superhuman, the man's prowess inspires an excess of whispered rumors. But those rumors remain in the realm of speculation.
muukis is offline
n3wton
Senior Member
Join Date: Mar 2010
Old 07-04-2011 , 09:29   Re: [L4D & L4D2] Custom Player Stats v1.4B105
Reply With Quote #1346

ok, it works with

Quote:
// Game server address (adds a Steam connection link over the site name)
// Multiple game server addresses supported
/* THIS LINE: DO NOT MODIFY OR REMOVE */
$game_addresses = array();
// Syntax:
// $game_addresses[] = array(<NAME>, <ADDRESS>);
// Examples:
// $game_addresses[] = array("Left 4 Dead 2 - Server 1", "my.site.net:27016");
// $game_addresses[] = array("Kill Them Zombies - Server 2", "100.102.103.104");
$game_addresses[] = array("Stranger's Bakery - L4D2", "pilssi.dy.fi");
$game_addresses[] = array("Left 4 Dead - Modded", "aftonbladet.se");
$game_addresses[] = array("TEST", "cnn.com");
$game_addresses[] = array("-=HERO=- UK Coop 8", "217.163.29.127:27015");
$game_addresses[] = array("N3wton and Tillys Server", "91.192.208.80:27020");
$game_addresses[] = array("Jay and Rugbys Server", "109.70.148.24:27018");
but if i use just.
Quote:
// Game server address (adds a Steam connection link over the site name)
// Multiple game server addresses supported
/* THIS LINE: DO NOT MODIFY OR REMOVE */
$game_addresses = array();
// Syntax:
// $game_addresses[] = array(<NAME>, <ADDRESS>);
// Examples:
// $game_addresses[] = array("Left 4 Dead 2 - Server 1", "my.site.net:27016");
// $game_addresses[] = array("Kill Them Zombies - Server 2", "100.102.103.104");
$game_addresses[] = array("N3wton and Tillys Server", "91.192.208.80:27020");
$game_addresses[] = array("Jay and Rugbys Server", "109.70.148.24:27018");
it brakes? here's the stats page http://8v.gamingdeluxe.net/stats/

really weird... gonna have a mess around, see if reordering the servers hakes a difference...

Yours
N3wton
n3wton is offline
n3wton
Senior Member
Join Date: Mar 2010
Old 07-04-2011 , 09:36   Re: [L4D & L4D2] Custom Player Stats v1.4B105
Reply With Quote #1347

cock, i am an idiot!

It works fine. the servers have the same geoip location. so thats why it looks like theres only one server, and its zoomed in too much, so i can change that.

really sorry, and thanks for your help

Yours
N3wton
n3wton is offline
muukis
Veteran Member
Join Date: Apr 2009
Old 07-04-2011 , 09:38   Re: [L4D & L4D2] Custom Player Stats v1.4B105
Reply With Quote #1348

Quote:
Originally Posted by n3wton View Post
ok, it works with


but if i use just.


it brakes? here's the stats page http://8v.gamingdeluxe.net/stats/

really weird... gonna have a mess around, see if reordering the servers hakes a difference...

Yours
N3wton
This works for me: (link)
PHP Code:
// Game server address (adds a Steam connection link over the site name)
// Multiple game server addresses supported
/* THIS LINE: DO NOT MODIFY OR REMOVE */ 
$game_addresses = array();
// Syntax:
//   $game_addresses[] = array(<NAME>, <ADDRESS>);
// Examples:
//   $game_addresses[] = array("Left 4 Dead 2 - Server 1", "my.site.net:27016");
//   $game_addresses[] = array("Kill Them Zombies - Server 2", "100.102.103.104");
//$game_addresses[] = array("Stranger's Bakery - L4D2", "pilssi.dy.fi");
//$game_addresses[] = array("Left 4 Dead - Modded", "aftonbladet.se");
//$game_addresses[] = array("TEST", "cnn.com");
//$game_addresses[] = array("-=HERO=- UK Coop 8", "217.163.29.127:27015");
$game_addresses[] = array("N3wton and Tillys Server""91.192.208.80:27020");
$game_addresses[] = array("Jay and Rugbys Server""109.70.148.24:27018"); 
Edit: My GeoIpCsv is as old as the release of the functionality in web stats, so maybe the geolocation of those IPs have changed a bit? This is because I see two different locations for your servers at my web stats.
__________________
Monster Hunter

Though certainly not superhuman, the man's prowess inspires an excess of whispered rumors. But those rumors remain in the realm of speculation.

Last edited by muukis; 07-04-2011 at 09:41.
muukis is offline
n3wton
Senior Member
Join Date: Mar 2010
Old 07-05-2011 , 07:43   Re: [L4D & L4D2] Custom Player Stats v1.4B105
Reply With Quote #1349

WEll thanks for your help, got it all working...

however it does seem to take a long time to load... what could be causing this?

http://8v.gamingdeluxe.net/stats/

Yours
N3wton
n3wton is offline
muukis
Veteran Member
Join Date: Apr 2009
Old 07-05-2011 , 14:46   Re: [L4D & L4D2] Custom Player Stats v1.4B105
Reply With Quote #1350

Quote:
Originally Posted by n3wton View Post
WEll thanks for your help, got it all working...

however it does seem to take a long time to load... what could be causing this?

http://8v.gamingdeluxe.net/stats/

Yours
N3wton
First of all, the flags functionality could use some tuning and optimization. Depending on your database speed and the amount of players online, the location query can be very hard on your system. Also the country flags query can be a bit pain, but a lot less compared to the location query. Try taking off the google maps functionality and try to find the bottle neck of your system. You may have to set some functionality off, to have a working environment - Sorry.
__________________
Monster Hunter

Though certainly not superhuman, the man's prowess inspires an excess of whispered rumors. But those rumors remain in the realm of speculation.
muukis 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 03:42.


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