Giter Site home page Giter Site logo

simplestats's Introduction

SimpleStats

SimpleStats Plugin

  • OnClientDisconnect update stats.
  • OnRoundEnd update stats.
  • Admin command to reset players stats.
  • Player command to check his stats.
  • Added top x menu players.

Admin Commands

  • sm_ssreset - Command for flag z to reset player stats - ADMFLAG_ROOT

Player Commands

  • sm_stats - Command for client to open menu with his stats.
  • sm_top - - sm_stats - Command for client to open menu with his stats.

Installation:

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

Include File (For Developers) :

--

/**
 * 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);

Database

DB Name : 'players'

  • [0] SteamID (SteamID64)
  • [1] Name
  • [2] IP
  • [3] Kills
  • [4] Deaths
  • [5] Shots
  • [6] Hits
  • [7] Headshots
  • [8] Assists
  • [9] SecondsOnServer
  • [10] LastConn

simplestats's People

Stargazers

Azur Crystal avatar cfpperche avatar Camilo Cueto avatar Andrew DeChristopher avatar Luke  avatar

Watchers

Mordechai Tzarfati avatar Gdk avatar Camilo Cueto avatar

Forkers

kinzs the-doggy

simplestats's Issues

secsonserver * initial connection timestamp bug?

Hi,

Odd issue, I compiled this plugin a few days ago for a couple of our retake servers, the kill tracking and all works fine.

But the secsonserver and the unix timestamp seem to be bugged. Every user has the same connection time no matter when they connected, and the secsonserver is extremely high for some users.

Screenshot:
uhh

Any clue what might be causing this?

Cant use client data.

L 08/09/2018 - 22:45:11: [SimpleStats.smx] [SS] Cant use client data. Reason: �
L 08/09/2018 - 22:45:12: [SimpleStats.smx] [SS] Cant use client data. Reason: �
L 08/09/2018 - 22:45:12: [SimpleStats.smx] [SS] Cant use client data. Reason: �
L 08/09/2018 - 22:45:12: [SimpleStats.smx] [SS] Cant use client data. Reason: �
L 08/09/2018 - 22:46:19: [SimpleStats.smx] [SS] Cant use client data. Reason: �

I cant debug this and I also dont know what is happening.

Thank you

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.