AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   New Plugin Submissions (https://forums.alliedmods.net/forumdisplay.php?f=26)
-   -   qServerinfo [MYSQL] - (v 0.6 / 26-01-2014) (https://forums.alliedmods.net/showthread.php?t=225066)

quark 08-31-2013 12:12

qServerinfo [MYSQL] - (v 0.6 / 26-01-2014)
 
2 Attachment(s)
qServerinfo [MYSQL]
v 0.6 by quark

-> Description

This plugin will insert into a MYSQL Database server information as hostname, map, players/maxplayers and ip.


-> Changelog

< Plugin >
*0.1 - First release.
*0.2 - Fixed bug when change map.
*0.3 - Added server IP Saving.
- Removed Ignore HLTV/BOTS.
- Fixed Player Count. ( I guess. )
* 0.4 - Removed Server ID.
- Set Server IP as Primary key.
- Changed way to get Server IP.
- Added maxplayers.
- Fixed Player count. ( Testing. )
* 0.5 - Added log to amx.
- Fixed server IP.
* 0.6 - Fixed Player count. (Finnaly :D)

< Php Script >
*0.1 - First release.
*0.2 - Added auto-refresh.
*0.3 - Added "connect" button. (steam).
- Fixed split servers by id.
- Removed auto-refresh.
- Removed unnecessary code (style).
*0.4 - Added IP/MaxPlayers.
- Edited button style.
*0.5 - Changed from mysql to mysqli.
- Added Total Servers.
- Small change in style.


-> Cvars

PHP Code:

    /* SQL CONFIGURATION */

qSi_host "localhost" // Host
qSi_user "user" // db username
qSi_pass "password" // db password
qSi_db "db" // db name
qSi_sid "1" // Server ID 


-> Configuration

You can insert the cvars in amxx.cfg or just edit it in plugin.

PHP Code:

//#define IGNORE 

If you uncomment that line, the player counting will ignore HLTV / BOTS.


-> Requirements

PHP Code:

#include <amxmodx>
#include <sqlx> 


-> PHP Script

>>>> Live Preview <<<<

To make it work, you have to edit the following lines:
PHP Code:

$host="localhost"// Host
$username="user"// Mysql username
$password="password"// Mysql password
$db_name="db"// Database name
$tbl_name="qserverinfo"// Table name 

Download qserverinfo.zip in attachments.


-> To-Do
  • Waiting for suggestions.


-> Contacts

* Steam: CANDY
* Mail: [email protected]
* Website: www.joserodrigues.in



sami_spt 08-31-2013 12:13

Re: qServerinfo [MYSQL] - (v 0.1 / 31-08-2013)
 
cool. will test now.


EDIT1: qSi_sid "1" // Server ID

what is that?


EDIT2: When you add a php page, i ill test.

quark 08-31-2013 12:16

Re: qServerinfo [MYSQL] - (v 0.1 / 31-08-2013)
 
Quote:

Originally Posted by sami_spt (Post 2025515)
EDIT1: qSi_sid "1" // Server ID

If you want to add like 10 servers. You make like serverid 1 , serverid 2 , serverid 3, =D

ConnorMcLeod 08-31-2013 12:37

Re: qServerinfo [MYSQL] - (v 0.1 / 31-08-2013)
 
You don't need any addon on server to query server information from website...

quark 08-31-2013 12:46

Re: qServerinfo [MYSQL] - (v 0.1 / 31-08-2013)
 
Quote:

Originally Posted by ConnorMcLeod (Post 2025533)
You don't need any addon on server to query server information from website...

Yeah , but some hosts doesn't allow queries.

ConnorMcLeod 08-31-2013 13:04

Re: qServerinfo [MYSQL] - (v 0.1 / 31-08-2013)
 
Please give1 IP example.

quark 08-31-2013 13:05

Re: qServerinfo [MYSQL] - (v 0.1 / 31-08-2013)
 
Quote:

Originally Posted by ConnorMcLeod (Post 2025570)
Please give1 IP example.

i don't get it :|

UPDATED Php script.

ConnorMcLeod 08-31-2013 14:00

Re: qServerinfo [MYSQL] - (v 0.1 / 31-08-2013)
 
I mean, you can query any servers, else you wouldn't be able to collect IPs in steam browser, or you wouldn't able to see servers in HLSW.

quark 08-31-2013 14:04

Re: qServerinfo [MYSQL] - (v 0.1 / 31-08-2013)
 
Quote:

Originally Posted by ConnorMcLeod (Post 2025614)
I mean, you can query any servers, else you wouldn't be able to collect IPs in steam browser, or you wouldn't able to see servers in HLSW.

What i mean is, in my VPS the query script working fine, but in my website, it doesn't.

That's why i made this.

UPDATED Live Preview Link.

^SmileY 08-31-2013 21:46

Re: qServerinfo [MYSQL] - (v 0.1 / 31-08-2013)
 
Quote:

Originally Posted by ConnorMcLeod (Post 2025614)
I mean, you can query any servers, else you wouldn't be able to collect IPs in steam browser, or you wouldn't able to see servers in HLSW.

He is talking about socket protocol used to query the servers, in same hosts is not allowed to send packets using php sockets like gamequery or other scripts.

Nice idea, is a alternative solution to do this.


All times are GMT -4. The time now is 19:28.

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