View Single Post
Author Message
thresh0ld
Senior Member
Join Date: Sep 2009
Location: Hell
Old 06-01-2019 , 13:51   [L4D2] Simple In-Game Player Statistics
Reply With Quote #1

Features

Note: This is still in alpha, which means anything can be added, changed or removed at a later point in time.
  • Records statistics gathered from human players and saves it to a database. Stats are displayed in-game to the player via a Menu/Panel interface. (No web frontend for stats, yet)

    Quote:
    Note:

    Green= Stats enabled by default
    Red= Stats that requires pstats_enabled to be set. Skill detect plugin is also required for these to work.
    • Survivors Kils - Number of times an infected has killed a survivor
    • Survivors Incapped - Number of times an infected player has incapped a survivor
    • Infected Kills - Number of times a survivor player has killed a Special Infected (Commons not counted)
    • Infected Headshots - Number of times a survivor killed a Special Infected by Headshot
    • Hunter Skeets (Sniper) - Number of hunters skeeted with sniper by a survivor
    • Hunter Skeets (SG) - Number of hunters skeeted with shotgun by a survivor
    • Hunter Skeets (Melee) - Number of hunters skeeted with melee by a survivor
    • Tank Rock Skeets - Number rocks skeeted by a survivor
    • Witch Crown (Standard) - Number of standard witch crowns by a survivor (up close)
    • Witch Crown (Draw) - Number of witch draw crowns by a survivor (chip from a distance and kill up-close)
    • Boomer Pops - Number of boomer pops by a survivor
    • Charger Levels - Number of chargers leveled by a survivor
    • Smoker Tongue Cuts - Number of smoker tongues cut by a survivor
    • Hunter Deadstops - Number of hunter deadstops by a survivor
    • Quad Booms - Number of times survivors have been quad boomed (all 4 boomed)
    • 25 Hunter Pounces - Number of 25 point hunter pounces
    • Death Charges - Number of times a charger has death charged a survivor
    • Tank Rock Hits - Number of times a tank rocked a survivor
  • A customizable connect announce feature. Allows you to display current ranking/steam id/total points of the player. This feature also supports colour coded messages.


  • A display panel showing the player statistics of a user. This can be triggered by issuing sm_rank on the console or by typing !rank in chat.


  • A display panel showing additional stats such as skeets, levels, boomer pops etc. (disabled by default)


  • A display panel showing the top N players sorted by their ranking. This feature also allows the the requesting player to be able to view other player's statistics/ranking on the server.


  • A display panel showing the ranks of the players currently present in the server. Each can be selected and preview their details.


  • A basic points and rankings system is also implemented and can be further customized by modifying the point multipliers from the plugin configuration file (playerstats.cfg)

Requirements
  • A working database system (Mysql/Mariadb 8.0 above)
  • skill_detect plugin. This is only required if you need the extra statistics enabled
  • SourceMod version 1.7 above

ConVars
  • pstats_enabled - Enable/Disable this plugin
  • pstats_debug_enabled - Enable/Disable debug messages
  • pstats_versus_exclusive - If set, the plugin will only work for versus gamemodes
  • pstats_record_bots - Sets whether we should record bots. By default only human players are recorded.
  • pstats_menu_timeout - The timeout value for the player stats panel
  • pstats_max_top_players - The max top N players to display
  • pstats_extras_enabled - Include extra stats to be recorded
  • pstats_display_type - 1 = Display points, 2 = Display the count, 3 = Both points and count
  • pstats_show_rank_onjoin - If set, player rank will be displayed to the user on the start of each map
  • pstats_cannounce_enabled - If set, connect announce will be displayed to chat when a player joins

Commands
  • sm_rank - Display the current stats & ranking of the requesting player. A panel will be displayed to the player.
    sm_top - Display the top N players. A menu panel will be displayed to the requesting player
    sm_ranks - Display the ranks of the players currently playing in the server. A menu panel will be displayed to the requesting player.
    sm_pstats_reload - Reloads plugin configuration. This is useful if you have modified the playerstats.cfg file. This command also synchronizes the modifier values set from the configuration file to the database (This is done by passing 'sync' as an argument)
    sm_pstats_wipe - Reset a player record (all stats set to 0)
    sm_hidestats - This will hide player's the extra stats from public view (except if the viewing user is an admin)

Change Log
  • 1.0.1-alpha - 6/4/2019

    - Bug Fix: Extra stats item from player rank panel does not execute when selected
    - Bug Fix: Error 'Client index is invalid' thrown during player initialization
    - Verify if steamid is valid for ShowInGamePlayerRanks
    - Bug Fix: Views in the database were hardcoded to query from 'playerstats' database. This will not work for those who use a different database name.
    - Added console command 'sm_hidestats'. Allow players to hide their extra stats from others.
    - Bug Fix: Fixed wrong parameter count for Notify().
  • 1.0.0-alpha - 6/1/2019
    - Initial Release

External Resources

GitHub Page (How to Install) - To get the latest updates and for more detailed information about this plugin.

Any suggestions to improve the plugin are always welcome
Attached Files
File Type: zip simpleplayerstats-1.0.1-alpha.zip (147.3 KB, 1232 views)

Last edited by thresh0ld; 07-02-2019 at 02:35. Reason: Updated version to 1.0.1-alpha
thresh0ld is offline