I am going to share this tutorial in 2019. Although official support has been discontinued and there are other paid options to show your game stats, it is still possible to get HLstatsx: CE working for you for free. The reason to post this tutorial is to make life simpler for those who are still interested in it.
Before getting it working, I spent hours and hours watching YouTube tutorials, AlliedModders forum and whatever possible. But one or more things always hampered in the way of successful installation of HLstatsx.
The one of the top reason why it does not work is that installation files shared on official thread https://bitbucket.org/Maverick_of_UC/hlstatsx-community-edition/wiki/Install are not compatible with PHP 7 and above. As PHP 5.6 is almost dead in current time, it makes no sense to downgrade PHP version. Luckily the PHP 7.0 supported version is available. It can be downloaded from here.
This tutorial is meant to track Counter-Strike 1.6 server stats, so I will talk about those files and folders. From the downloaded zip file, we have to consider 4 folders for our installation i.e.
- Amxmodx (This folder contains plugin and scripts for CS 1.6)
- Scripts (It has to be uploaded along with web setup)
- SQL (This folder contains database file to be imported in database interacting with website)
- Web (This folder actually contains website file that you will see at frontend)
Pre-Requisites to Complete Setup
I cannot assure the setup will work in the shared hosting environment as you will need port 27500 working to get script communicating with game-server. Hence, you must have VPS with SSH access. PHPMyAdmin is the second requirement to setup the database. If you know setting up database using command lines that is also fine.
- The first step is to upload all files in the web folder to the public_html folder or sub-folder of the actual domain where you want your HLstatsx to access from. For example if you want to host HLStatsx at www.domain.com you have to upload files accordingly.
- After uploading files, try to access domain. You will see some database connectivity error, as we have not connected website to a database yet.
- It’s time to create a database. I will explain PhpMyAdmin way for non-technical users. If you don’t know to how to create database in PhpMyAdmin please check this tutorial.
- Import the install.sql file in the database.
- Now you will need 4 things to configure the website with database i.e. database host or DB host (usually localhost or 127.0.0.1) , database name (say hlstats), database username (say hlstatsuser) and database password (says hlstatspw).
- Now open config.php file of the hlstats website using any FTP client or file manager from VPS control panel. Fill the appropriate values as mentioned in step 5.
- Now check the domain again and refresh. If everything is done correctly in step 6, you will start seeing HLstatsx website interface, however, it won’t be tracking or showing any information from the game server yet.
I will mention the next steps in my upcoming article. Meanwhile, you got to know everything you need for proper installation.