AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [CS:GO / ?] Simple Stats MySQL (https://forums.alliedmods.net/showthread.php?t=299110)

nhnkl159 07-03-2017 10:40

[CS:GO / ?] Simple Stats MySQL
 
SimpleStats

Web Leaderboard added (09-03-2017) :

https://i.imgur.com/UuTh46r.png

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 :

http://hammerjs.github.io/assets/img/github-icon.png

DJPlaya 07-03-2017 10:51

Re: [CS:GO / ?] Simple Stats MySQL
 
Nice Job, finally a fresh Stats Tracker:up:

Here, have some Bacon :bacon!::bacon!::bacon!:

Hallucinogenic Troll 07-03-2017 14:27

Re: [CS:GO / ?] Simple Stats MySQL
 
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)

nhnkl159 07-03-2017 14:46

Re: [CS:GO / ?] Simple Stats MySQL
 
Quote:

Originally Posted by Hallucinogenic Troll (Post 2533197)
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. :3

nhnkl159 07-03-2017 15:25

Re: [CS:GO / ?] Simple Stats MySQL
 
Quote:

Originally Posted by Hallucinogenic Troll (Post 2533197)
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 07-12-2017 18:41

Re: [CS:GO / ?] Simple Stats MySQL
 
Updated few bugs.

Gdk 07-12-2017 19:09

Re: [CS:GO / ?] Simple Stats MySQL
 
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)); 

:lol:

nhnkl159 07-13-2017 05:08

Re: [CS:GO / ?] Simple Stats MySQL
 
Quote:

Originally Posted by Gdk (Post 2534973)
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)); 

:lol:

;)

Obyboby 07-13-2017 05:26

Re: [CS:GO / ?] Simple Stats MySQL
 
Subscribed.
I am not too happy with RankMe and I want to find out if this plugin could be a good replacement. :)

Gdk 07-14-2017 19:08

Re: [CS:GO / ?] Simple Stats MySQL
 
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


All times are GMT -4. The time now is 05:52.

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