AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [ANY] Player Info Database (https://forums.alliedmods.net/showthread.php?t=335363)

akzet1n 11-28-2021 19:25

[ANY] Player Info Database
 
2 Attachment(s)
Player Info Database

Saves certain information of each player that joins your server in a SQL database.

- Name
- Steam ID
- IP Address
- Country Code
- First join
- Last seen
- Number of connections
- Time played

Only tested in Counter-Strike: Global Offensive servers with a MySQL server.

Installation

- Create a MySQL database.
- Add the database information in "playerinfo" into your configuration file (addons/sourcemod/configs/databases.cfg).
- Upload playerinfo.smx into your server.
- Load the plugin or restart the server.

Query Examples

- Get the number of unique Steam ID's
Code:

SELECT COUNT(DISTINCT steamid) FROM data;
- Get the number of unique IP addresses
Code:

SELECT COUNT(DISTINCT address) FROM data;
- Get the players that have joined in the last hour
Code:

SELECT * FROM data WHERE last_seen > NOW() - INTERVAL 1 HOUR;
- Get the player who first joined the server
Code:

SELECT * FROM data ORDER BY first_join ASC LIMIT 1;
- Get the latest player who left the server
Code:

SELECT * FROM data ORDER BY last_seen DESC LIMIT 1;
- Get the player who has connected the most times
Code:

SELECT * FROM data ORDER BY connections DESC LIMIT 1;
- Get the number of players per each country
Code:

SELECT COUNT(DISTINCT steamid), country FROM data GROUP BY country ORDER BY COUNT(DISTINCT steamid) DESC;
- Get the player who has been on the server the longest
Code:

SELECT * FROM data ORDER BY time DESC LIMIT 1;
Links

GitHub
Steam
Discord: akz#1553

Pala4 03-24-2023 16:05

Re: [ANY] Player Info Database
 
And no one has done a web to this plugin? If someone can please make web plugins for this.


All times are GMT -4. The time now is 21:30.

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