AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [L4D2] Simple In-Game Player Statistics (https://forums.alliedmods.net/showthread.php?t=316621)

thresh0ld 06-01-2019 13:51

[L4D2] Simple In-Game Player Statistics
 
1 Attachment(s)
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.

    https://raw.githubusercontent.com/so...t_announce.png
  • 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.

    https://raw.githubusercontent.com/so...layer_rank.png
  • A display panel showing additional stats such as skeets, levels, boomer pops etc. (disabled by default)

    https://raw.githubusercontent.com/so...ank_extras.png
  • 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.

    https://raw.githubusercontent.com/so...op_players.png
  • A display panel showing the ranks of the players currently present in the server. Each can be selected and preview their details.

    https://raw.githubusercontent.com/so...nks_ingame.png
  • 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

Mr. Man 06-01-2019 14:02

Re: [L4D2] Simple In-Game Player Statistics
 
Nice release. Are you planning on adding a webpanel? If/once that's implemented this will take over Mukkis's version.

thresh0ld 06-01-2019 22:59

Re: [L4D2] Simple In-Game Player Statistics
 
Quote:

Originally Posted by Mr. Man (Post 2653985)
Nice release. Are you planning on adding a webpanel? If/once that's implemented this will take over Mukkis's version.

Possibly in the future, depends on the time I would have.

BlackSabbarh 06-02-2019 01:15

Re: [L4D2] Simple In-Game Player Statistics
 
Does this work with Mysql, web stats? If so, do I need other files for the web server?

thresh0ld 06-02-2019 03:44

Re: [L4D2] Simple In-Game Player Statistics
 
Quote:

Originally Posted by BlackSabbarh (Post 2654041)
Does this work with Mysql, web stats? If so, do I need other files for the web server?

No, this plugin does not come with a web frontend if that is what you are asking

FatalOE71 06-06-2019 19:19

Re: [L4D2] Simple In-Game Player Statistics
 
I tried to compile this with 1.10.0.6245 and get an error.

Fatal error 196 - it states it is deprecated syntax


functag Entity_ChangeOverTimeCallback bool:public(&entity, &Float:interval, &currentCall); - Something is wrong with this statement. It resides in scripting, include,smlib in the entities.inc file line 1773.

Psyk0tik 06-06-2019 21:43

Re: [L4D2] Simple In-Game Player Statistics
 
Quote:

Originally Posted by FatalOE71 (Post 2654649)
I tried to compile this with 1.10.0.6245 and get an error.

Fatal error 196 - it states it is deprecated syntax


functag Entity_ChangeOverTimeCallback bool:public(&entity, &Float:interval, &currentCall); - Something is wrong with this statement. It resides in scripting, include,smlib in the entities.inc file line 1773.

PHP Code:

typedef Entity_ChangeOverTimeCallback = function bool (intentityfloatintervalintcurrentCall); 


FatalOE71 06-07-2019 00:00

Re: [L4D2] Simple In-Game Player Statistics
 
Crasher_3637, thanks man that fixed that error. However there is another error now in a different file.

This time effects.inc under smlib. Say line 69 is deprecated syntax now.

functag EffectCallback public(entity, any:data); -this is line 69 of effects.inc

thresh0ld 06-07-2019 02:53

Re: [L4D2] Simple In-Game Player Statistics
 
Quote:

Originally Posted by FatalOE71 (Post 2654662)
Crasher_3637, thanks man that fixed that error. However there is another error now in a different file.

This time effects.inc under smlib. Say line 69 is deprecated syntax now.

functag EffectCallback public(entity, any:data); -this is line 69 of effects.inc

You should compile this on 1.9.x as it still allows the old syntax.

Psyk0tik 06-07-2019 08:53

Re: [L4D2] Simple In-Game Player Statistics
 
Quote:

Originally Posted by FatalOE71 (Post 2654662)
Crasher_3637, thanks man that fixed that error. However there is another error now in a different file.

This time effects.inc under smlib. Say line 69 is deprecated syntax now.

functag EffectCallback public(entity, any:data); -this is line 69 of effects.inc

PHP Code:

typedef EffectCallback = function void (int entityany data); 



All times are GMT -4. The time now is 15:46.

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