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

[L4D] Player Stats (Co-op) v1.1.1


Post New Thread Reply   
 
Thread Tools Display Modes
Whosat
Senior Member
Join Date: Nov 2007
Location: Singapore
Old 08-16-2009 , 11:07   Re: [L4D] Player Stats (Co-op) v1.1.1
Reply With Quote #581

Delete the row in the mysql table.

Map stats will probably retain though.

@dominic1:
I sent a PM. Which is your server provider? sgwargames? fragnetics?
__________________
Whosat is offline
dominic1
Junior Member
Join Date: Aug 2009
Old 08-16-2009 , 11:14   Re: [L4D] Player Stats (Co-op) v1.1.1
Reply With Quote #582

Quote:
Originally Posted by ShambleS View Post
it dosent look like you have a database selected, you dont seem to have all the files and the folders in the right places.
and i would imagine you have not set the files to 777 after you uploaded..

You should read the instructions verry carefully and do everything 1 step at a time.
it worked alrdy, i thought it's hard but actually pretty easy.. i was just confused bcoz it's 1st time for me to setup db in msql.

[IMG]http://img33.**************/img33/7339/l4dproblem.jpg[/IMG]

[IMG]http://img411.**************/img411/4308/l4dproblem2.jpg[/IMG]
dominic1 is offline
Whosat
Senior Member
Join Date: Nov 2007
Location: Singapore
Old 08-16-2009 , 11:20   Re: [L4D] Player Stats (Co-op) v1.1.1
Reply With Quote #583

Ah alright glad you got it working
__________________
Whosat is offline
ShambleS
Senior Member
Join Date: Jul 2009
Old 08-17-2009 , 16:22   Re: [L4D] Player Stats (Co-op) v1.1.1
Reply With Quote #584

Quote:
Originally Posted by Whosat View Post
Delete the row in the mysql table.

Map stats will probably retain though.
i dont think i can delete just 1 row...
ShambleS is offline
crazydog
AlliedModders Donor
Join Date: Jan 2006
Old 08-18-2009 , 05:18   Re: [L4D] Player Stats (Co-op) v1.1.1
Reply With Quote #585

Just a quick bug report:
I've noticed that if I have in-game notifications off, people are still shown messages when they save others from hunters/smokers.

Edit:
Line 1790
Code:
    PrintToChat(Savior, "\x04[\x03RANK\x04] \x01You have earned \x04%i \x01points for saving \x05%s\x01 from a \x04%s!", Score, VictimName, SaveFrom);
doesn't have an "if(mode) clause around it, and HunterSmokerSave() doesn't declare Mode.

To anyone who wants to fix it themselves:

1) Go to line 1771 (decl String:SaviorName[MAX_LINE_WIDTH];)
2) Add the following on the previous line: new Mode = GetConVarInt(cvar_AnnounceMode);
3) Go to line 1790
4) Add the following on the previous line: if (Mode)

I've also attached the plugin with that quick change to this post.
Attached Files
File Type: sp Get Plugin or Get Source (l4d_stats.sp - 723 views - 66.2 KB)

Last edited by crazydog; 08-18-2009 at 05:28.
crazydog is offline
muukis
Veteran Member
Join Date: Apr 2009
Old 08-19-2009 , 14:37   Customized version 1.1.1
Reply With Quote #586

I did some modifications to the plugin and some of the PHP-scripts.

Short descriptions:
Writes stats for custom maps (campaigns). The stats for custom maps are readable from the web stats.

Installation:
Overwrite the web stats PHP-scripts and run the updatetable.php before installing the customized plugin.

Technical stuff:
This will not reset any current stats. New field "custom" (bit) was added in table Maps. This will not cause problems when msleeper finally updates the plugin. Everytime the server loads a map in COOP mode, it checks if that map is in the DB. If it is not, it inserts it and sets the "custom" to true (1). The original maps are inserted with "custom" set to false (0). The PHP scripts lists all the custom maps at the bottom of the Campaign Stats -page. I don't know how to detect in which campaign they belong to.

I also included crazydogs "Line 1790" edit.

I hope everything works...

EDIT(1): Uploaded a version with an improved map detection.
EDIT(2): Uploaded modified player.php. Requested by Whosat.
EDIT(3): Uploaded modified maps.php. Added some checks that hopefully prevents occurance of some PHP-errors and if not then give a more detailed error message.
Attached Thumbnails
Click image for larger version

Name:	stats_1.JPG
Views:	526
Size:	66.6 KB
ID:	47851   Click image for larger version

Name:	stats_2.JPG
Views:	418
Size:	19.2 KB
ID:	47852   Click image for larger version

Name:	stats_3.JPG
Views:	449
Size:	42.3 KB
ID:	47853  
Attached Files
File Type: sp Get Plugin or Get Source (l4d_stats.sp - 1001 views - 67.5 KB)
File Type: zip l4d_stats_web_updates.zip (7.8 KB, 284 views)

Last edited by muukis; 08-23-2009 at 15:14. Reason: Improved the map check
muukis is offline
poli21
New Member
Join Date: Aug 2009
Old 08-19-2009 , 21:09   Re: [L4D] Player Stats (Co-op) v1.1.1
Reply With Quote #587

another great program, but its a pain in the ass for me to install this can someone make a vid tut on how to do this ? would be fantastic!
poli21 is offline
Whosat
Senior Member
Join Date: Nov 2007
Location: Singapore
Old 08-20-2009 , 06:03   Re: [L4D] Player Stats (Co-op) v1.1.1
Reply With Quote #588

Hey muukis

Could you add support for weird-character names as well, by using UTF-8 as the encoding?

This was mentioned in the PounceRecord plugin and here, here's the main fix in the sp, and this is for the web frontend.

And also when viewing a specific player's stats, there's a typo at the bottom, City Buster achivement. "That is alomst more than..."
And in that same section I guess its more right to use "<Playername> has killed more zombies than the entire population" than "You have killed more zombies than the entire population", because the person viewing the stats profile may not be the owner of the profile himself.

Will be most grateful
__________________
Whosat is offline
muukis
Veteran Member
Join Date: Apr 2009
Old 08-20-2009 , 08:43   Re: [L4D] Player Stats (Co-op) v1.1.1
Reply With Quote #589

Quote:
Originally Posted by Whosat View Post
...
That UTF-8 encoding is already in there. Maybe you have set the browser or your web server incorrectly?
PHP Code:
public ConnectDB()
{
    if (
SQL_CheckConfig("l4dstats"))
    {
        new 
String:Error[256];
        
db SQL_Connect("l4dstats"trueErrorsizeof(Error));

        if (
db == INVALID_HANDLE)
            
LogError("Failed to connect to database: %s"Error);
        else
            
SendSQLUpdate("SET NAMES 'utf8'");
    }
    else
        
LogError("Database.cfg missing 'l4dstats' entry!");

About the rest of the stuff you mentioned... Download the attachment and overwrite the older file.

I will not take over the support or the development of this plugin. I just wanted to upload some improvements I sought useful for me atleast. SPeaking of which... I uploaded an improved version of the customized plugin right back HERE. If you already downloaded the customized plugin, please redownload the new one.

EDIT: uploaded player.php
Attached Files
File Type: zip player.zip (1.8 KB, 231 views)

Last edited by muukis; 08-20-2009 at 09:00. Reason: player.php
muukis is offline
pF.VoOdoO
Junior Member
Join Date: Feb 2009
Old 08-22-2009 , 07:43   Re: [L4D] Player Stats (Co-op) v1.1.1
Reply With Quote #590

@ muukis

Installed your modified files, ran updatetable.php, deleted updatetable.php and createtable.php, then installed the plugin.

I'm getting this error on the Campaign page

Code:
Warning:  mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /public_html/l4d/maps.php on line 50
and again at

Code:
Warning:  mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /public_html/l4d/maps.php on line 103
And it looks like it's wiped the total kills too

I have backups, but would rather resolve the issue

Edit - Just occured to me, reason for this is likely that we've not played any games with new stats as yet (shouldn't take long, all we play these days is custom maps) I'll leave this message as is incase I'm wrong or someone else has the same issue.

Last edited by pF.VoOdoO; 08-22-2009 at 08:01.
pF.VoOdoO 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:07.


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