Skocz do zawartości

[RSS] [CSGO] CounterStats (0.1, Mar 8 2023)


GameNation

Rekomendowane odpowiedzi

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 fitfor 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 its 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 its 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 its enumerator) as they allocate small amounts of memory which is (currently) not freed by CounterStatsas 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 statsnot 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)

Przeczytaj cały wpis na stronie AlliedModders

Odnośnik do komentarza
Udostępnij na innych stronach

Dołącz do dyskusji

Możesz dodać zawartość już teraz a zarejestrować się później. Jeśli posiadasz już konto, zaloguj się aby dodać zawartość za jego pomocą.

Gość
Dodaj odpowiedź do tematu...

×   Wklejono zawartość z formatowaniem.   Usuń formatowanie

  Dozwolonych jest tylko 75 emoji.

×   Odnośnik został automatycznie osadzony.   Przywróć wyświetlanie jako odnośnik

×   Przywrócono poprzednią zawartość.   Wyczyść edytor

×   Nie możesz bezpośrednio wkleić grafiki. Dodaj lub załącz grafiki z adresu URL.

  • Ostatnio przeglądający   0 użytkowników

    • Brak zarejestrowanych użytkowników przeglądających tę stronę.
×
×
  • Dodaj nową pozycję...

Powiadomienie o plikach cookie

Umieściliśmy na Twoim urządzeniu pliki cookie, aby pomóc Ci usprawnić przeglądanie strony. Możesz dostosować ustawienia plików cookie, w przeciwnym wypadku zakładamy, że wyrażasz na to zgodę.