View Single Post
muukis
Veteran Member
Join Date: Apr 2009
Old 01-08-2011 , 10:54   Re: [L4D & L4D2] Custom Player Stats v1.4B101
Reply With Quote #1152

Quote:
Originally Posted by Isador View Post
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]
Your database is not properly installed: It is missing at least players table. You can read that from the server console output you've included in your post. Make sure you have fully prepared the database before running the stats plugin.

Quote:
Originally Posted by Dude View Post
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!
That's pretty neat. I'll include something like that in the next web stats release.

Quote:
Originally Posted by RainMaker View Post
Hi
I am setting up this stats for my l4d2 server.
But i always get this error, and its not working.
The error is :

L 01/08/2011 - 16:23:26: [admin-sql-prefetch.smx] FetchOverrides() query failed: SELECT type, name, flags FROM sm_overrides
L 01/08/2011 - 16:23:26: [admin-sql-prefetch.smx] Query error: Table 'l4dstats.sm_overrides' doesn't exist
L 01/08/2011 - 16:23:26: [admin-sql-prefetch.smx] FetchGroups() query failed: SELECT flags, name, immunity_level FROM sm_groups
L 01/08/2011 - 16:23:26: [admin-sql-prefetch.smx] Query error: Table 'l4dstats.sm_groups' doesn't exist
L 01/08/2011 - 16:23:26: [admin-sql-prefetch.smx] FetchUsers() query failed: SELECT id, authtype, identity, password, flags, name, immunity FROM sm_admins
L 01/08/2011 - 16:23:26: [admin-sql-prefetch.smx] Query error: Table 'l4dstats.sm_admins' doesn't exist

I did install from the web with install.php, and that works fine.

What do i do wrong, i tryed to reinstall 5 times now ;(

Hope you can help me.

Btw its an Debian server.
Those errors do not originate from the stats plugin. That is output of [admin-sql-prefetch.smx] -plugins error logs.
__________________
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