Raised This Month: $ Target: $400
 0% 

[L4D] PounceRecord 1.1


Post New Thread Reply   
 
Thread Tools Display Modes
Icettiflow
Senior Member
Join Date: Jan 2009
Old 07-22-2009 , 23:34   Re: [L4D] PounceRecord 1.0
Reply With Quote #11

Quote:
Originally Posted by lekzero View Post
If someone is able to use a free web host (PHP and MYSQL) that running with this plugin let me know please.
I BELIEVE freehostia.com will support it. They have changed a lot since I used them and I don't use free hosting any more...well...I do since I work for my host lol but they're not a free service.

I hope this helps.
Icettiflow is offline
lekzero
Member
Join Date: Jul 2009
Old 07-23-2009 , 10:43   Re: [L4D] PounceRecord 1.0
Reply With Quote #12

Thank you. Now I'm using a paid server the plugin running very well.
I configured to appear in Motd of my server, unfortunately after the upgrade 1.0.1.4 it appears only in early maps of each campaign, someone knows how to set MOTD to appear on all maps again?

Thanks again.


Quote:
Originally Posted by Icettiflow View Post
I BELIEVE freehostia.com will support it. They have changed a lot since I used them and I don't use free hosting any more...well...I do since I work for my host lol but they're not a free service.

I hope this helps.

Last edited by lekzero; 07-23-2009 at 10:47.
lekzero is offline
Icettiflow
Senior Member
Join Date: Jan 2009
Old 07-23-2009 , 13:44   Re: [L4D] PounceRecord 1.0
Reply With Quote #13

Quote:
Originally Posted by lekzero View Post
unfortunately after the upgrade 1.0.1.4 it appears only in early maps of each campaign, someone knows how to set MOTD to appear on all maps again?
I am actually disappointed by this myself. I've noted after the initial pop up you can't even call it by pressing H in some situations.

ALSO - Version 1.2 of the web interface released.

Last edited by Icettiflow; 07-23-2009 at 13:54.
Icettiflow is offline
lekzero
Member
Join Date: Jul 2009
Old 07-23-2009 , 21:33   Re: [L4D] PounceRecord 1.0
Reply With Quote #14

The only way I found was to use the command:

motd_intros 15,l4d_vs_hospital01_apartment,l4d_vs_smallto wn01_caves

put the maps which you want to see the Motd, but is a command and a client level.

Sorry about my poor english.

Quote:
Originally Posted by Icettiflow View Post
I am actually disappointed by this myself. I've noted after the initial pop up you can't even call it by pressing H in some situations.

ALSO - Version 1.2 of the web interface released.

Last edited by lekzero; 07-24-2009 at 15:19.
lekzero is offline
crazydog
AlliedModders Donor
Join Date: Jan 2006
Old 07-25-2009 , 00:34   Re: [L4D] PounceRecord 1.0
Reply With Quote #15

Quick bug.
Quotes aren't escaped, and so people with quotes in their name (at least single quotes) are causing SQL errors, and not getting their pounces recorded.
crazydog is offline
n0limit
Senior Member
Join Date: May 2009
Old 07-25-2009 , 12:07   Re: [L4D] PounceRecord 1.0
Reply With Quote #16

Quote:
Originally Posted by crazydog View Post
Quick bug.
Quotes aren't escaped, and so people with quotes in their name (at least single quotes) are causing SQL errors, and not getting their pounces recorded.
Sorry about that.
Should be fixed now.
Thanks for the report.
n0limit is offline
crazydog
AlliedModders Donor
Join Date: Jan 2006
Old 07-29-2009 , 04:16   Re: [L4D] PounceRecord 1.1
Reply With Quote #17

Here's my release of my customized Web Interface.

Features:
* Fixes bug when there are more than 999 pounces in database
* Lets you choose whether you want to only display pounces made on official maps or not (in config.php).
* Lets you choose whether to show pounces made by bot hunters or not (in config.php).
* Lets users search pounces by name of pouncer or victim or both

Download the zip in the attachment, (or click here) and upload it to your webserver. You will need to reconfigure config.php if you already have the web interface on your server.

Live preview here: http://theelders.clanservers.com/pounces/

===Older two posts merged here===

Here's an addition to the web interface I created and am using.

It lets you choose whether you:
a) Only want to see pounces made on official maps
or
b) See pounces made on any map.

Changes:
Add this to config.php before the ?> at the end of the file:
PHP Code:
// Show pounces made on official maps only? 0=no, 1=yes
$officialonly 1
Replace connect.php with this:
PHP Code:
<?php
/*
-----------------------------------------
    Hunter Top Pounces PHP Module
 Created by Daniel 'Icettiflow' McCall
          [email protected]
-----------------------------------------
|   DATABASE CONNECTION FILE    |
-----------------------------------------
*/
// Connect to DB
mysql_connect($dbhost$dbuser$dbpass) or die ('Error connecting to MySQL');
mysql_select_db($dbname);
// Get SQL Data
$total mysql_query("SELECT * FROM pounces");
$playercount number_format(mysql_num_rows($total));
// Determine possible rows for display
if($showbots==0) {
    if(
$officialonly==1) {
        
$query mysql_query("SELECT * FROM pounces WHERE pounced NOT IN ('Zoey','Francis','Bill','Louis') && map IN ('l4d_vs_hospital01_apartment', 'l4d_vs_hospital02_subway', 'l4d_vs_hospital03_sewers', 'l4d_vs_hospital04_interior', 'l4d_vs_hospital05_rooftop', 'l4d_vs_airport01_greenhouse', 'l4d_vs_airport02_offices', 'l4d_vs_airport03_garage', 'l4d_vs_airport04_terminal', 'l4d_vs_airport05_runway', 'l4d_vs_smalltown01_caves', 'l4d_vs_smalltown02_drainage', 'l4d_vs_smalltown03_ranchhouse', 'l4d_vs_smalltown04_mainstreet', 'l4d_vs_smalltown05_houseboat', 'l4d_vs_farm01_hilltop', 'l4d_vs_farm02_traintunnel', 'l4d_vs_farm03_bridge', 'l4d_vs_farm04_barn', 'l4d_vs_farm05_cornfield') ORDER BY distance DESC");
    }else{
        
$query mysql_query("SELECT * FROM pounces WHERE pounced NOT IN ('Zoey','Francis','Bill','Louis') ORDER BY distance DESC");
    }
}else{
    if(
$officialonly==1) {
        
$query mysql_query("SELECT * FROM pounces WHERE map IN ('l4d_vs_hospital01_apartment', 'l4d_vs_hospital02_subway', 'l4d_vs_hospital03_sewers', 'l4d_vs_hospital04_interior', 'l4d_vs_hospital05_rooftop', 'l4d_vs_airport01_greenhouse', 'l4d_vs_airport02_offices', 'l4d_vs_airport03_garage', 'l4d_vs_airport04_terminal', 'l4d_vs_airport05_runway', 'l4d_vs_smalltown01_caves', 'l4d_vs_smalltown02_drainage', 'l4d_vs_smalltown03_ranchhouse', 'l4d_vs_smalltown04_mainstreet', 'l4d_vs_smalltown05_houseboat', 'l4d_vs_farm01_hilltop', 'l4d_vs_farm02_traintunnel', 'l4d_vs_farm03_bridge', 'l4d_vs_farm04_barn', 'l4d_vs_farm05_cornfield') ORDER BY distance DESC");
    }else{
        
$query mysql_query("SELECT * FROM pounces ORDER BY distance DESC");
    }
}
$listings number_format(mysql_num_rows($query));
if(
$listings<$maxplayers)
     
$displaynumber $listings;
else
     
$displaynumber $maxplayers;
?>
Feel free to include this in the official version.


Also here's a suggestion for notifying players of a record-breaking pounce.
Because pounces beating the highest damage/distance overall won't occur very often, notify players if they break a record for the current map they are on too.


---------------------

Here's a bug fix for an issue occuring when there are more than 999 pounces in the database.


Bug resolved!
number_format() is being run on the number of listings, so if there are 1000 or more, commas are added! This screws up the listings<maxplayers logic later.

Here's how to fix this:

Either download the .zip attached to the post, and upload it to your webserver in the same directory as the default interface (note: this will overwrite my modification above)

or:


1) Open connect.php
2) Find the line $listings = number_format(mysql_num_rows($query));
3) Replace that line with this:
PHP Code:
$listings mysql_num_rows($query); 
Here's a bonus:
To get the display number to show up all nicely with the comma in it, follow these steps:

1)Open template.tpl
2) Find the line "Displaying the top <?=$displaynumber;?> pounces out of a total of <?=$playercount;?> pounces in the database."
3) Replace it with this:
PHP Code:
Displaying the top <?=number_format($displaynumber);?> pounces out of a total of <?=$playercount;?> pounces in the database.
Attached Files
File Type: zip l4dpouncerecord1.2crazy.zip (41.5 KB, 347 views)

Last edited by crazydog; 07-29-2009 at 14:23.
crazydog is offline
n0limit
Senior Member
Join Date: May 2009
Old 07-29-2009 , 13:29   Re: [L4D] PounceRecord 1.1
Reply With Quote #18

Cool! Thanks for the addition crazydog!
n0limit is offline
fpsbrian
Senior Member
Join Date: Feb 2008
Old 08-02-2009 , 23:40   Re: [L4D] PounceRecord 1.1
Reply With Quote #19

I finally got the web interface to work!
Is there a way to get the special characters to display?

This
{ōmgōt}
should be
{ōmgōt}
__________________

Last edited by fpsbrian; 08-03-2009 at 06:37.
fpsbrian is offline
crazydog
AlliedModders Donor
Join Date: Jan 2006
Old 08-03-2009 , 11:26   Re: [L4D] PounceRecord 1.1
Reply With Quote #20

Quote:
Originally Posted by fpsbrian View Post
I finally got the web interface to work!
Is there a way to get the special characters to display?

This
{ōmgōt}
should be
{ōmgōt}
I can't special characters to go into my database through sourcemod. I'm not sure if there's a way. I have my encoding set up right on the SQL end, so I'm not sure why sourcemod doesn't send them right.

This plugin:
http://forums.alliedmods.net/showthread.php?p=571978
makes me think there isn't a way to send unicode characters through sourcemod to SQL
crazydog 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 06:09.


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