Raised This Month: $51 Target: $400
 12% 

[ANY] Player Info Database


Post New Thread Reply   
 
Thread Tools Display Modes
Author
akzet1n
New Member
Join Date: Nov 2021
Plugin ID:
7870
Plugin Version:
v2.1
Plugin Category:
All
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Saves certain information of each player that joins your server in a SQL database.
    Old 11-28-2021 , 19:25   [ANY] Player Info Database
    Reply With Quote #1

    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
    Attached Files
    File Type: smx playerinfo.smx (4.7 KB, 77 views)
    File Type: sp Get Plugin or Get Source (playerinfo.sp - 167 views - 3.8 KB)

    Last edited by akzet1n; 08-28-2022 at 21:27. Reason: typo
    akzet1n is offline
    Pala4
    Senior Member
    Join Date: Dec 2007
    Old 03-24-2023 , 16:05   Re: [ANY] Player Info Database
    Reply With Quote #2

    And no one has done a web to this plugin? If someone can please make web plugins for this.
    Pala4 is offline
    Reply



    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off

    Forum Jump


    All times are GMT -4. The time now is 16:57.


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