【服务器端】RankMe Kento Edition插件的web端使用教程
注意:本文主要面对那些使用了RankMe Kento Edition插件,Centos7系列系统下,并且希望在web端显示用户数据信息的服务器主。Web端读取游戏端RankMe插件数据的前提,是游戏端已安装了Mysql。
- 插件介绍及下载地址:
[CS:GO] RankMe Kento Edition (3.0.3.Kento.25 | 2017-4-4) - 前端
- Original Rankme Web Interface by lokizito
- CSGORankMeWeb by ToxicRevolution
- rankme web 2016 by nguyenbaodanh
- rankme web 2016 PHP 7 / mysqli fix by de_suspect(本文以该web端程序为例介绍)
注意:插件平台sourcemod+metamod的安装不在本文的讨论中,我将视情况决定是否写一个插件平台安装教程
游戏服务器端的设置原文
Install
- Upload smx and translation files to your server.
- Plugin will auto crate config file “cfg/sourcemod/kento_rankme.cfg”.
- If you want to use mysql, change “rankme_mysql” to 1, and add this in your databases.cfg
Code:
"rankme" { "driver" "mysql" "host" "your_host" //填入你的游戏服务器ip "database" "hello" "user" "pig" "pass" "123456" //"timeout" "0" "port" "3306" }
- If mysql is not working for you, please check sourcemod extention “dbi.mysql.ext” is working or not.
简要中文翻译
- 将smx插件放入addons/sourcemod/plugins目录中
- 插件会自动生成”cfg/sourcemod/kento_rankme.cfg”文件
- 修改kento_rankme.cfg文件中的”rankme_mysql” 的值为1(默认值为0)
- 在addons/sourcemod/configs中的databse.cfg文件中加入
"rankme" { "driver" "mysql" "host" "your_host" //填入你的游戏服务器ip (也就是你安装了mysql的游戏服务器ip) "database" "hello" "user" "pig" "pass" "123456" //"timeout" "0" "port" "3306" }
Centos7安装Mysql(注意centos7系统中的mysql不叫mysql,而叫做MariaDB)
安装步骤:
- # yum install mariadb-server -y
- # systemctl start mariadb.service
- # systemctl enable mariadb.service
- # mysql
- 创建插件所需的数据库,我这里以创建名为hello的数据库为例
Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 10 Server version: 5.5.44-MariaDB MariaDB Server Copyright (c) 2000, 2015, Oracle, MariaDB Corporation Ab and others. Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement. MariaDB [(none)]>
- 查看当前数据库:SHOW DATABASES ;(注意后面的分号;)
- 创建新数据库:CREATE DATABASE hello;
- 创建用户:CREATE USER ‘pig’@’%’ IDENTIFIED BY ‘123456’;(表示创建一个叫pig的用户,任意远程主机登陆,密码是123456)
- 用户授权:GRANT ALL ON *.* TO ‘pig’@’%’;(表示赋予用户pig对所有数据库的操作权限)
Web interface配置,以rankme web 2016 PHP 7 / mysqli fix by de_suspect为例
- 修改rankmeweb-mysqli/bd.php,在其中修改为
$bd_user = “pig”; // DATABASE USER
$bd_password = “123456”;// DATABASE PASS
$bd = “hello”;// DATABASE
$host = “游戏服务器ip”; // DATABASE HOST
2.修改rankemeweb-mysqli/config.php,在其中修改为
$sqlite_server = false; // ARE YOUR SERVER RUNNING THE PLUGIN AS SQLITE?
//(IF THE PLUGIN IS RUNNING AS MYSQL, PUT BELOW THE DATA FOR CONNECTING TO THE DATABASE THAT IS BEING USED BY THE PLUGIN)
$bd_user = “pig”; // DATABASE USER
$bd_password = “123456”;// DATABASE PASS
$bd = “hello”;// DATABASE
$host = “游戏服务器ip”; // DATABASE HOST
$bd_table = “rankme”; // DATABASE TABLE BEING USED AT THE PLUGIN. (rankme_sql_table cvar). Default: rankme.
$ftp_server = “游戏服务器ip”; //FTP HOST
$ftp_user_name = ” “; // FTP USER NAME
$ftp_user_pass = “”; // FTP PASS
$ftpDIR = “/home/serverfiles/csgo”; // CSTRIKE FOLDER ON FTP
3.完毕后将rankemeweb-mysqli文件夹内的所有文件上传至web服务器即可
娱乐插件应该去哪里找呢?国外真的是看不懂
sourcemod有很多,不过是英文版的,可以凑合翻译。