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

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


Post New Thread Reply   
 
Thread Tools Display Modes
fenghf
Member
Join Date: Apr 2010
Old 12-27-2010 , 03:29   Re: [L4D & L4D2] Custom Player Stats v1.4B101
Reply With Quote #1141

How do I add new map data to the page.
fenghf is offline
fenghf
Member
Join Date: Apr 2010
Old 12-27-2010 , 06:17   Re: [L4D & L4D2] Custom Player Stats v1.4B101
Reply With Quote #1142

I found common.php
Add The Sacrifice map. refresh the page is not displayed.
PHP Code:
if ($game_version == 1)
{
    
$coop_campaigns = array("l4d_hospital" => "(No Mercy)",
                       
"l4d_airport" => "(Dead Air)",
                       
"l4d_smalltown" => "(Death Toll)",
                       
"l4d_farm" => "(Blood Harvest)",
                       
"l4d_garage" => "(Crash Course)",
                       
"l4d_river" => "(The Sacrifice)");

    
$versus_campaigns = array("l4d_vs_hospital" => "(No Mercy)VS",
                       
"l4d_vs_airport" => "(Dead Air)VS",
                       
"l4d_vs_smalltown" => "(Death Toll)VS",
                       
"l4d_vs_farm" => "(Blood Harvest)VS",
                       
"l4d_garage" => "(Crash Course)VS",
                       
"l4d_river" => "(The Sacrifice)");

    
$survival_campaigns = array("l4d_sv_lighthouse" => "Lighthouse",
                       
"l4d_hospital" => "No Mercy - Co-op",
                       
"l4d_airport" => "Dead Air - Co-op",
                       
"l4d_smalltown" => "Death Toll - Co-op",
                       
"l4d_farm" => "Blood Harvest - Co-op",
                         
"l4d_vs_hospital" => "No Mercy - Versus",
                       
"l4d_vs_airport" => "Dead Air - Versus",
                       
"l4d_vs_smalltown" => "Death Toll - Versus",
                       
"l4d_vs_farm" => "Blood Harvest - Versus",
                       
"l4d_garage" => "Crash Course",
                       
"l4d_river" => "(The Sacrifice)");

fenghf is offline
fenghf
Member
Join Date: Apr 2010
Old 12-27-2010 , 10:14   Re: [L4D & L4D2] Custom Player Stats v1.4B101
Reply With Quote #1143

Originally in the database into the new map.
I have to solve the problem.
fenghf is offline
muukis
Veteran Member
Join Date: Apr 2009
Old 12-27-2010 , 11:15   Re: [L4D & L4D2] Custom Player Stats v1.4B101
Reply With Quote #1144

Quote:
Originally Posted by fenghf View Post
Originally in the database into the new map.
I have to solve the problem.
Your Babel fish is killing me!
__________________
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
fenghf
Member
Join Date: Apr 2010
Old 12-27-2010 , 22:36   Re: [L4D & L4D2] Custom Player Stats v1.4B101
Reply With Quote #1145

Quote:
Originally Posted by muukis View Post
Your Babel fish is killing me!
Haha
fenghf is offline
eargosedown
Member
Join Date: Jan 2010
Old 12-30-2010 , 03:01   Re: [L4D & L4D2] Custom Player Stats v1.4B101
Reply With Quote #1146

Getting a crash and server reboot on connect on Linux L4D1 server (Metamod:Source version 1.8.5 SourceMod Version: 1.4.0-dev Dec19 compile)

No other non-default plugins.

Any ideas?
eargosedown is offline
muukis
Veteran Member
Join Date: Apr 2009
Old 12-30-2010 , 04:13   Re: [L4D & L4D2] Custom Player Stats v1.4B101
Reply With Quote #1147

Quote:
Originally Posted by eargosedown View Post
Getting a crash and server reboot on connect on Linux L4D1 server (Metamod:Source version 1.8.5 SourceMod Version: 1.4.0-dev Dec19 compile)

No other non-default plugins.

Any ideas?
I think some Linux distributions are missing some sort of socket module by default? I remember reading something about the issue long time ago. This module is used in database connections by the SourceMod. I have nothing else to give you, I am sorry. I should probably start up my L4D1 server and check if the system is still go? My server is Winblows and thus not properly comparable.
__________________
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
eargosedown
Member
Join Date: Jan 2010
Old 12-31-2010 , 00:41   Re: [L4D & L4D2] Custom Player Stats v1.4B101
Reply With Quote #1148

I fixed it. Apparently it will crash with no error (nor give an error prior) if it cannot connect to the DB. I had the wrong IP for my firewall on remote SQL. Once I fixed that, it worked fine. =]

Glad to have this going again, always loved this mod!
eargosedown is offline
Isador
New Member
Join Date: Dec 2010
Old 01-01-2011 , 13:54   Re: [L4D & L4D2] Custom Player Stats v1.4B101
Reply With Quote #1149

Hello i have problem. I want rank on my server but dont want (or need) have showed it anywhere on websites. Just want to type !rank in game and see how much points and what rank i have.


So i downloaded this , extract and have problems with running.
When i want to load this plugin it say i missing clientprefs.ext and clientprefs.txt

Where i should get this files? Please can somebody help me ?

when i type "sm plugins list" its says

<FAILED> "Custom Player Stats"

And when i try to load it manualy. I type "sm plugins load l4d_stats.smx" and than it say:

- [SM] Plugin l4d_stats.smx failed to load. Required extension "Client Preferences" file
<"clientprefs.ext"> not running.



----- Edit (hour later)
Well it now load successfully. But when someone log in on server it will crash! (just custom player status plugin)

there is picture what it say when i try load it manualy back.

[IMG]http://img52.**************/img52/2623/errorfk.png[/IMG]

Suggestions ?
[IMG]http://img52.**************/i/errorfk.png/[/IMG]
__________________
Excuse my English

Last edited by Isador; 01-01-2011 at 15:42.
Isador is offline
Dude
Junior Member
Join Date: Dec 2010
Old 01-05-2011 , 06:16   Player steam avatar on stats site (WEB! not game!)
Reply With Quote #1150

Hi all!

I thank the author for this great addition (stats)!

If you want players steamcommunity avatars, ranking etc. on your own stats web site like this:

player php sample

find in player.php this:

PHP Code:
if (mysql_num_rows($result) > 0)
{
    
$playername htmlentities($row['name'], ENT_COMPAT"UTF-8");
    
    
$timesrow mysql_fetch_array(mysql_query("SELECT COUNT(*) AS times FROM " $mysql_tableprefix "timedmaps WHERE steamid = '" $id "'"));
    
$times $timesrow['times']; 
and just after put this code:
PHP Code:
$xml simplexml_load_file('http://steamcommunity.com/profiles/'.getfriendid($row['steamid']).'?xml=1');

foreach (
$xml->avatarMedium as $foo
    {
    
$Avatar "<img src=".$foo."> ";
    }

foreach (
$xml->steamRating as $foo
    {
    
$SRank "</br><small><small><b>Steam Rating:</b> $foo </small></small>";
    }
    
$xml simplexml_load_file('http://steamcommunity.com/profiles/'.getfriendid($row['steamid']).'/stats/L4D2/?xml=1');

foreach (
$xml->stats->lifetime as $foo
    {
    
$TTima "&nbsp;&nbsp;<small><small><b>Total time played:</b> $foo->timeplayed</small></small>";
    }

foreach (
$xml->stats->lifetime as $foo
    {
    
$PHour "&nbsp;&nbsp;<small><small><b>Kills per hour:</b> $foo->killsperhour</small></small>";
    } 

then replace lines:

PHP Code:
    $tpl->set("title""Viewing Player: " $playername); // Window title
    
$tpl->set("page_heading""Viewing Player: " $playername); // Page header 
with this:
PHP Code:
    $tpl->set("title""Viewing Player: " $playername); // Window title
    
$tpl->set("page_heading""" $Avatar $playername $SRank $TTima $PHour); // Page header 
Enjoy!
__________________
Gamers Community: gamesteams.com/Dude.html
Dudeists Steam Gropup server with stats http://left4bowl.clanservers.com

Last edited by Dude; 01-05-2011 at 06:25.
Dude is offline
Reply


Thread Tools
Display Modes

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 08:22.


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