Skip to content

Standard stats setup

Sean Lewis edited this page Feb 11, 2015 · 10 revisions

Stats setup

This is a brief overview of how you can setup a stats website for your multi1v1 server. There are other ways you can display and store stats - but this guide is intended for those not interesting in developing their own code to do so.

As such, it assumes the usage of:

You could make other choices for the above 3 options while using the multi1v1 plugin, but it would require custom development.

Setting up MySQL

You need a MySQL server running somewhere. Many web hosting companies provided managed services that include a MySQL server. If you are willing to do some light-command line work, you could get a cheap VPS from a company like Digital Ocean and install MySQL on it. From that you can create a database, create a user, and grant permissions to the user on the database.

If you are using a remote server as your MySQL server, make sure you remote connections are allowed. (by default they aren't, usually you can just edit the bind-address ip in /etc/mysql/my.cnf to do so)

Once your database is set up, you must add a new entry on the CS:GO server to addons/sourcemod/configs/databases.cfg with the name "multi1v1".

Note: if you only want the stats and no website, you could stop here and be done.

Setting up the web server

Extract the contents of the multi1v1_web zip download to where your web server serves pages from (e.g. /var/www/ with Apache2), setup any web server configuration, then edit the includes/config.inc.php file with your database and steam api credentials.

See the web readme for more deatils.

Setting up the game server plugin

The multi1v1 package download included the multi1v1_online_stats_viewer.smx plugin file in the addons/sourcemod/plugins/disabled directory. Move this file up to the addons/sourcemod/plugins directory. Once you do that, that plugin will autogenerate the cfg/sourcemod/multi1v1/multi1v1_online_stats_viewer.cfg file, which you can set cvars in.

In particular, you will need to set sm_multi1v1_stats_url and sm_multi1v1_top_url.

With the stock web interface, you should set these to:

sm_multi1v1_stats_url "http://www.mywebsite.com/1v1stats/redirect.php?id={USER}"
sm_multi1v1_top_url "http://www.mywebsite.com/1v1stats/redirect.php"
Clone this wiki locally