Raised This Month: $12 Target: $400
 3% 

[CSGO] CounterStats (0.1, Mar 8 2023)


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Mooshua
New Member
Join Date: Feb 2023
Plugin ID:
8409
Plugin Version:
0.1
Plugin Category:
Technical/Development
Plugin Game:
Counter-Strike: GO
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Developer Kit for working with internal Counter-Strike statistics tracking
    Old 03-08-2023 , 21:23   [CSGO] CounterStats (0.1, Mar 8 2023)
    Reply With Quote #1

    Gamedata Status (Not working? File an issue)

    What Is This?

    Counter-Strike: Global Offensive records lots of player actions for internal stats tracking, such as shots, damage, props broken, headshots, and more. These stats are often used for achievements, the scoreboard, and end-of-round fun facts (“Ace!”, “Counter-Terrorists had an Accuracy of…”).

    This plugin is a low-level wrapper around that statistics functionality, and allows other plugins to easily access a wide variety of statistics without needing a variety of hooks and the mother of all jagged arrays. The fully methodmapped include handles many aspects of statistics collection for you and does most heavy lifting. See some examples here!

    Additionally, Counter-Stats lets you generate fun facts on demand and display them as you see fit—for example, in chat.

    Features
    • Uses internal CS:GO tables and linked lists instead of hardcoding for fast adaptation to updates.
    • Enumerate over all gun-related stat indexes, keyed by gun name: Kills, Shots, Hits, and Damage.
    • Access any stat index for a specific player, and get it’s value for the last few seconds, the current round, or the current match.
    • Enumerate over all fun facts, keyed by ID and localization string.
    • Invoke any fun fact creator and get it’s data values, subject, ID, and localization string.
    • Fully methodmapped API
    • Zero non-sourcemod dependencies
    Counter-Stats is low level and has generally “good” performance (more on that here). However, users should be careful when handling funfacts (and it’s enumerator) as they allocate small amounts of memory which is (currently) not freed by CounterStats—as well as requiring SDKCalls to be compiled (which are subsequently cached).

    Installation
    Download the release .zip file and extract it to your addons/sourcemod directory. The latest release is always available on GitHub.

    Download the Latest Version on GitHub
    …Or check out the source code & documentation

    Commands
    Counter-Stats 0.1 currently has no cvars.
    • cs_enumerate_weapons - List all weapons & stat indexes in the global weapons table
    • cs_enumerate_funfact - List all fun facts in the global fun fact linked list
    • cs_debug_weapon <weapon_name> - List all stats of the given weapon for the current client.
    • cs_debug_funfact <funfact_name> - Evaluate the funfact under the CTWin round end condition and print results.
    • cs_benchmark - Benchmark most non-allocating operations and print results
    • cs_benchmark_leakmemory - Benchmark some allocation operations and print results

    Future Plans
    • Enumeration of all stats—not just for weapons. (Props broken, headshots, etc)
    • Proper fun fact memory handling & freeing
    • Player-to-Player stats (how many times x killed y…)
    • Custom end-of-round fun fact handlers (requires client translations)
    Attached Files
    File Type: zip counterstats_0.1.zip (16.8 KB, 60 views)
    Mooshua 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 15:09.


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