Raised This Month: $32 Target: $400
 8% 

[CS:GO / ?] Simple Stats MySQL


Post New Thread Reply   
 
Thread Tools Display Modes
Author
nhnkl159
Senior Member
Join Date: Jul 2012
Location: Israel 3>
Plugin ID:
5685
Plugin Version:
1.0
Plugin Category:
General Purpose
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    This plugin track's players info , play time and show everything in a menu.
    Old 07-03-2017 , 10:40   [CS:GO / ?] Simple Stats MySQL
    Reply With Quote #1

    SimpleStats

    Web Leaderboard added (09-03-2017) :



    Set max players to show at index.php line -> 4;

    Edit your database info at -> 'core/db-config.php';

    The leaderboard is ordered by kills (most kills = 1st).


    Plugin :

    This plugin tracks players info, play time and show everything in a menu.

    Database :
    • SteamID (SteamID64)
    • Name
    • IP
    • Kills
    • Deaths
    • Shots
    • Hits
    • Headshots
    • Assists
    • SecondsOnServer
    • LastConn

    This plugin support's only MySQL, so don't try to use it with SQLite.

    Install :

    If you want to use this plugin you must use MySQL add a database entry in addons/sourcemod/configs/databases.cfg, call it "simplestats".
    Code:
    "Databases"
    {
    	"simplestats"
    	{
    		"driver"         "mysql"
    		"host"           "localhost"
    		"database"       "simplestats"
    		"user"           "root"
    		"pass"           ""
    	}
    }
    Copy the .smx file to your plugins (addons/sourcemod/plugins) folder
    Restart your server.

    Cvars :

    Code:
    // Sets whether or not to record stats
    // -
    // Default: "1"
    sm_ss_enabled "1"
    
    // Minimum players to start record stats
    // -
    // Default: "4"
    sm_ss_minplayers "4"
    
    // Record stats while we are in warmup ?
    // -
    // Default: "1"
    sm_ss_warmup "1"
    
    // Record knife as shot when client slash ?
    // -
    // Default: "1"
    sm_ss_countknife "1"
    
    // Enable the menu with top players?
    // -
    // Default: "1"
    sm_ss_topenabled"1"
    
    // Amount of people to display on sm_top
    // -
    // Default: "10"
    sm_ss_toplimit "10"
    Commands :
    • sm_ssreset <target> - Command for flag z to reset player stats.
    • sm_stats - Command for client to open menu with his stats.
    • sm_top - Command for client to open menu with top kills x players.

    API For Developers :

    Code:
    /**
     * Retrieve the amount of kills.
     *
     * @param client					Client index.
     * @return                          Amount of kills.
     */
    native int SS_GetKillsAmount(int client);
    
    /**
     * Retrieve the amount of deaths.
     *
     * @param client					Client index.
     * @return                          Amount of deaths.
     */
    native int SS_GetDeathsAmount(int client);
    
    /**
     * Retrieve the amount of shots.
     *
     * @param client					Client index.
     * @return                          Amount of shots.
     */
    native int SS_GetShotsAmount(int client);
    
    /**
     * Retrieve the amount of hits.
     *
     * @param client					Client index.
     * @return                          Amount of hits.
     */
    native int SS_GetHitsAmount(int client);
    
    /**
     * Retrieve the amount of headshots.
     *
     * @param client					Client index.
     * @return                          Amount of headshots.
     */
    native int SS_GetHeadshotsAmount(int client);
    
    /**
     * Retrieve the amount of assists.
     *
     * @param client					Client index.
     * @return                          Amount of assists.
     */
    native int SS_GetAssistsAmount(int client);
    
    /**
     * Retrieve the total amount of seconds played on the server.
     *
     * @param client					Client index.
     * @return                          Amount of seconds played.
     */
    native int SS_GetPlayTimeAmount(int client);
    Credits :
    • Me - Creating the plugin.
    • shavitush - few functions

    Download :

    __________________

    Last edited by nhnkl159; 09-03-2017 at 13:47.
    nhnkl159 is offline
    Send a message via Skype™ to nhnkl159
    DJPlaya
    Senior Member
    Join Date: Nov 2014
    Location: Germany
    Old 07-03-2017 , 10:51   Re: [CS:GO / ?] Simple Stats MySQL
    Reply With Quote #2

    Nice Job, finally a fresh Stats Tracker

    Here, have some Bacon
    __________________
    My biggest Projects: Kigen AC Redux, Forlix Floodcheck Redux
    DJPlaya is offline
    Send a message via Skype™ to DJPlaya
    Hallucinogenic Troll
    Senior Member
    Join Date: Apr 2015
    Old 07-03-2017 , 14:27   Re: [CS:GO / ?] Simple Stats MySQL
    Reply With Quote #3

    Is it possible to add natives to this plugin? would be nice to make sub-plugins with that (for example, giving a flag to a person which has more than X hours in a server)
    __________________
    Hallucinogenic Troll is offline
    nhnkl159
    Senior Member
    Join Date: Jul 2012
    Location: Israel 3>
    Old 07-03-2017 , 14:46   Re: [CS:GO / ?] Simple Stats MySQL
    Reply With Quote #4

    Quote:
    Originally Posted by Hallucinogenic Troll View Post
    Is it possible to add natives to this plugin? would be nice to make sub-plugins with that (for example, giving a flag to a person which has more than X hours in a server)
    i will add , TODO LIST HRERE I COME.
    __________________
    nhnkl159 is offline
    Send a message via Skype™ to nhnkl159
    nhnkl159
    Senior Member
    Join Date: Jul 2012
    Location: Israel 3>
    Old 07-03-2017 , 15:25   Re: [CS:GO / ?] Simple Stats MySQL
    Reply With Quote #5

    Quote:
    Originally Posted by Hallucinogenic Troll View Post
    Is it possible to add natives to this plugin? would be nice to make sub-plugins with that (for example, giving a flag to a person which has more than X hours in a server)
    Added api natives for developers
    __________________
    nhnkl159 is offline
    Send a message via Skype™ to nhnkl159
    nhnkl159
    Senior Member
    Join Date: Jul 2012
    Location: Israel 3>
    Old 07-12-2017 , 18:41   Re: [CS:GO / ?] Simple Stats MySQL
    Reply With Quote #6

    Updated few bugs.
    __________________
    nhnkl159 is offline
    Send a message via Skype™ to nhnkl159
    Gdk
    Member
    Join Date: Oct 2014
    Old 07-12-2017 , 19:09   Re: [CS:GO / ?] Simple Stats MySQL
    Reply With Quote #7

    Nice work. I was about to modify some other "simple" rank plugin to what I wanted, this is pretty much what I wanted.

    PHP Code:
    FuckingUpdateThatSHITHeadPlayer(iGetClientTime(i)); 
    Gdk is offline
    nhnkl159
    Senior Member
    Join Date: Jul 2012
    Location: Israel 3>
    Old 07-13-2017 , 05:08   Re: [CS:GO / ?] Simple Stats MySQL
    Reply With Quote #8

    Quote:
    Originally Posted by Gdk View Post
    Nice work. I was about to modify some other "simple" rank plugin to what I wanted, this is pretty much what I wanted.

    PHP Code:
    FuckingUpdateThatSHITHeadPlayer(iGetClientTime(i)); 
    ;)
    __________________
    nhnkl159 is offline
    Send a message via Skype™ to nhnkl159
    Obyboby
    Veteran Member
    Join Date: Sep 2013
    Old 07-13-2017 , 05:26   Re: [CS:GO / ?] Simple Stats MySQL
    Reply With Quote #9

    Subscribed.
    I am not too happy with RankMe and I want to find out if this plugin could be a good replacement.
    __________________
    Obyboby is offline
    Gdk
    Member
    Join Date: Oct 2014
    Old 07-14-2017 , 19:08   Re: [CS:GO / ?] Simple Stats MySQL
    Reply With Quote #10

    I dont have much free time to test but really quickly this is what I found:

    Hits are counted incorrectly. Every time you TAKE damage it counts as a hit.

    Suggestions:
    Add cvar for disabling when there are under certain amount of players connected

    Dont record stats when game is in warmup mode or give cvar option

    Dont count knife slashes as a shot, or make it a separate statistic

    Add heashot percent
    Spoiler


    Im planning to add this stuff when I get some free time
    Gdk is offline
    Reply


    Thread Tools
    Display Modes

    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 10:50.


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