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

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


Post New Thread Reply   
 
Thread Tools Display Modes
Jokker
Junior Member
Join Date: Jun 2013
Old 01-01-2020 , 13:06   Re: [L4D & L4D2] Custom Player Stats v1.4B121
Reply With Quote #1901

Quote:
Originally Posted by Primeas View Post
The Plugin is from Foxhound then the Command for the Menu "!stats" not work then its a plugin error and because this they not safe any data to mysql DB for the Website. You use the Plugin from us? you can check if its installed with the command sm plugins list on the server or in HLSW

Edit: I will test the plugin again right away - If you want you can Add me on Steam: Here
Edit 2: Plugin tested - working
Hmmm... Maybe there are some kind of problem on the gameserver/dbserver connection, this could be a firewall issue blocking the communication between them...

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


L 01/01/2020 - 14:45:05: [l4d_stats.smx] Failed to connect to database: [2002]: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
L 01/01/2020 - 14:45:05: [SM] Exception reported: Connecting to database failed. Read error log for further details.
L 01/01/2020 - 14:45:05: [SM] Blaming: l4d_stats.smx
L 01/01/2020 - 14:45:05: [SM] Call stack trace:
L 01/01/2020 - 14:45:05: [SM] [0] SetFailState
L 01/01/2020 - 14:45:05: [SM] [1] Line 1023, /home/forums/content/files/2/9/3/8/5/0/178998.attach::OnConfigsExecuted
L 01/01/2020 - 14:45:05: [sourcecomms.smx] Connecting to database failed: [2002]: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
L 01/01/2020 - 14:45:05: [SourceSleuth.smx] SourceSleuth: Database connection error: [2002]: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
L 01/01/2020 - 14:45:05: [SM] Exception reported: Failed to connect to SourceBans DB, [2002]: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
L 01/01/2020 - 14:45:05: [SM] Blaming: sbchecker.smx
L 01/01/2020 - 14:45:05: [SM] Call stack trace:
L 01/01/2020 - 14:45:05: [SM] [0] SetFailState
L 01/01/2020 - 14:45:05: [SM] [1] Line 76, sbchecker.sp::OnDatabaseConnected
L 01/01/2020 - 14:45:19: [SM] Exception reported: Invalid database Handle 0 (error: 4)
L 01/01/2020 - 14:45:19: [SM] Blaming: SourceSleuth.smx
L 01/01/2020 - 14:45:19: [SM] Call stack trace:
L 01/01/2020 - 14:45:19: [SM] [0] SQL_TQuery
L 01/01/2020 - 14:45:19: [SM] [1] Line 168, SourceSleuth.sp::OnClientPostAdminCheck
L 01/01/2020 - 14:45:19: [sourcecomms.smx] Connecting to database failed: [2002]: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
Jokker is offline
Alex101192
Senior Member
Join Date: Aug 2018
Old 01-01-2020 , 15:46   Re: [L4D & L4D2] Custom Player Stats v1.4B121
Reply With Quote #1902

Hey, I am using the original version linked in the main post. The database works with no issue, however I am having trouble with setting up the website. I renamed config_example.php to config.php and set it with the right infos. After that I execute install.php and this is what happens:

Fatal error: Uncaught Error: Call to undefined function mysql_connect() in C:\xampp\htdocs\l4dstats\common.php:434 Stack trace: #0 C:\xampp\htdocs\l4dstats\install.php(14): include() #1 {main} thrown in C:\xampp\htdocs\l4dstats\common.php on line 434

Last edited by Alex101192; 01-01-2020 at 15:47.
Alex101192 is offline
Alex101192
Senior Member
Join Date: Aug 2018
Old 01-02-2020 , 08:22   Re: [L4D & L4D2] Custom Player Stats v1.4B121
Reply With Quote #1903

Quote:
Originally Posted by Primeas View Post
It's a Old version but it works with php 5.6 - try the new version it have no errors and based on original version. I know only the original. Version have an error with the install because this muukis uploaded a SQL dump
What's the new version? There is a lot of versions here, can you link me the one you talk about?

Last edited by Alex101192; 01-02-2020 at 08:23.
Alex101192 is offline
Primeas
Junior Member
Join Date: Aug 2019
Old 01-02-2020 , 08:27   Re: [L4D & L4D2] Custom Player Stats v1.4B121
Reply With Quote #1904

Quote:
Originally Posted by Alex101192 View Post
What's the new version? There is a lot of versions here, can you link me the one you talk about?
https://forums.alliedmods.net/showpo...postcount=1894

- Install "Left_4_Dead_(2)_Player_Statistics_v1_1.z ip"
- Follow the Installation Guide
- Make Update with "Update to 1.2.zip" to 1.2

Last edited by Primeas; 09-13-2020 at 06:10.
Primeas is offline
Alex101192
Senior Member
Join Date: Aug 2018
Old 01-02-2020 , 17:49   Re: [L4D & L4D2] Custom Player Stats v1.4B121
Reply With Quote #1905

Quote:
Originally Posted by Primeas View Post
https://forums.alliedmods.net/showpo...postcount=1894

- Install "Left_4_Dead_(2)_Player_Statistics_v1_1.z ip"
- Follow the Installation Guide
- Make Update with "Update to 1.2.zip" to 1.2
Ok I switched to your new version instead. The database is working with no problem and the site is also working. However I have found some small problems with it.

https://l4d2ehnancedvanillastats.000webhostapp.com

In the gameserver bar the right ip is there and the connect button works. However it shows no hostname and map, and player count is always /4. My server is 8 players coop btw and I am using a plugin which automatically names server hostname to current mode and difficulty. I tried removing it, in case it was the issue, but nothing changed.

Last edited by Alex101192; 01-02-2020 at 18:03.
Alex101192 is offline
Alex101192
Senior Member
Join Date: Aug 2018
Old 01-03-2020 , 09:08   Re: [L4D & L4D2] Custom Player Stats v1.4B121
Reply With Quote #1906

Quote:
Originally Posted by Primeas View Post
Your page is installed correctly, congratulations. Thank you for not removing the copyright.

Step 1: Go to "_source/GameQ_info.php" and Edit the File
Step 2: Add Your Server IP : Port

Code:
_source/GameQ_info.php

$servers = array(
    's1' => array('left4dead', '94.250.219.15', 27015),
);

Step 3: Open the URL Here

GameQ should now show you all the server variables, including the hostname, and you can see where the error is.

If the hostname is displayed you probably have a typing error or you not add your server to the Array in the "index_layout.tpl"

Code:
index_layout.tpl

<?php
require_once '_source/GameQ.php';

$servers = array(
    's1' => array('left4dead', '94.250.219.15', 27015),
);

$gq = new GameQ();
$gq->addServers($servers);
$gq->setOption('timeout', 200);
$gq->setFilter('normalise');
$gq->setFilter('sortplayers', 'gq_ping');
$results = $gq->requestData();


And then on the End after the Online Offline Check


<td data-title="IP:">94.250.219.15:27015</td>
<td data-title="Hostname:"><?php $data = $gq->requestData(); print_r($data[s1]['gq_hostname']); ?></td>
<td data-title="Player:"><?php $data = $gq->requestData(); print_r($data[s1]['gq_numplayers']); ?> / <?php $data = $gq->requestData(); print_r($data[s1]['gq_maxplayers']); ?></td>
<td data-title="Map:"><?php $data = $gq->requestData(); print_r($data[s1]['gq_mapname']); ?></td>

As an example you can also view my GameQ_info: Here


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


Your Error is because you not insert your Ip : Port, Add/Change Edit this Lines ->

Code:
index_layout.tpl

<?php
require_once '_source/GameQ.php';

$servers = array(
    's1' => array('left4dead', '94.250.219.15', 27015),
);

$gq = new GameQ();
$gq->addServers($servers);
$gq->setOption('timeout', 200);
$gq->setFilter('normalise');
$gq->setFilter('sortplayers', 'gq_ping');
$results = $gq->requestData();


And then on the End after the Online Offline Check


<td data-title="IP:">94.250.219.15:27015</td>
<td data-title="Hostname:"><?php $data = $gq->requestData(); print_r($data[s1]['gq_hostname']); ?></td>
<td data-title="Player:"><?php $data = $gq->requestData(); print_r($data[s1]['gq_numplayers']); ?> / <?php $data = $gq->requestData(); print_r($data[s1]['gq_maxplayers']); ?></td>
<td data-title="Map:"><?php $data = $gq->requestData(); print_r($data[s1]['gq_mapname']); ?></td>
I did everything you said and I noticed a line was missing at index layout. Now it's fixed, however hostname, player count and map are still not showing. This is the example script

https://l4d2ehnancedvanillastats.000...GameQ_info.php

Last edited by Alex101192; 01-03-2020 at 09:14.
Alex101192 is offline
Alex101192
Senior Member
Join Date: Aug 2018
Old 01-03-2020 , 14:12   Re: [L4D & L4D2] Custom Player Stats v1.4B121
Reply With Quote #1907

Quote:
Originally Posted by Primeas View Post
stream_socket_client() has been disabled for security reasons
Remove the stream_socket_client string from the disable_functions at php.ini

--

Your webspace is free. It does not support this function and you cant change this option.
Ok ok thank you for your help. I might upgrade to pro later in the future. By the way there is something else I found that I am not sure if it's supposed to be working that way. If you go to the ranking survival page of my site the top 3 players displayed with their image are not the actually top 3 players of survival, but they are the ones who are top 3 on coop. You also see the same top 3 guys from coop on all other modes too, even the ones which have no data in record. Is it supposed to be this way or is there a problem?

Last edited by Alex101192; 01-03-2020 at 14:13.
Alex101192 is offline
Alex101192
Senior Member
Join Date: Aug 2018
Old 01-03-2020 , 15:05   Re: [L4D & L4D2] Custom Player Stats v1.4B121
Reply With Quote #1908

Quote:
Originally Posted by Primeas View Post
1. If you need Webspace i can give you a Webspace for free with Admin Access and Webinterface on my Root Server. (coast nothing)

2. The Top3 are based on all Gamemodes, Foxhound working on a Feature to give Top3 Players a Reward on the Server.
1. Wow you would really give me a free webspace? That's very cool man but I can't accept it.

2. Ah ok.

Another problem I have is that when I put site links on the motd as it was said in the guide, the site would not appear in the motd. Instead you would see the links.

Last edited by Alex101192; 01-03-2020 at 15:08.
Alex101192 is offline
Jokker
Junior Member
Join Date: Jun 2013
Old 01-03-2020 , 15:09   Re: [L4D & L4D2] Custom Player Stats v1.4B121
Reply With Quote #1909

Updated to version 1.2, looks very cool. Primeas was incredibly helpful and helped me solve all the problems that came up (my fault, all of them). The least we can do besides thanking him is to keep the copyright banner in place. Great job!

My Custom Stats Site:
https://b4st4rds.clanservers.com/stats/
Jokker is offline
Alex101192
Senior Member
Join Date: Aug 2018
Old 01-03-2020 , 16:25   Re: [L4D & L4D2] Custom Player Stats v1.4B121
Reply With Quote #1910

Quote:
Originally Posted by Primeas View Post
https not working because its a 10years old game - then you see the link in orange color if you use https

Try to use only http, i do the same and its https webspace

Code:
http://www.your-url.tld/l4d_stats/ranking/motd.php - All Stats
http://www.your-url.tld/l4d_stats/ranking/motd.php?type=coop - Coop Stats
http://www.your-url.tld/l4d_stats/ranking/motd.php?type=realism - Realism Stats
http://www.your-url.tld/l4d_stats/ranking/motd.php?type=versus - Versus Stats
http://www.your-url.tld/l4d_stats/ranking/motd.php?type=scavenge - Scavenge Stats
http://www.your-url.tld/l4d_stats/ranking/motd.php?type=survival - Survival Stats
http://www.your-url.tld/l4d_stats/ranking/motd.php?type=realismversus - Realism Versus Stats
http://www.your-url.tld/l4d_stats/ranking/motd.php?type=mutations - Mutations Stats
ok now it shows page but page has error

http://www.l4d2ehnancedvanillastats..../motd.php?type
Alex101192 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 14:17.


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