Coder Social home page Coder Social logo

Accuracy about noxus HOT 18 OPEN

laam4 avatar laam4 commented on August 12, 2024
Accuracy

from noxus.

Comments (18)

melkor217 avatar melkor217 commented on August 12, 2024 1

ReplaceString(weapon_str, 32, "weapon_", "", false);

dis one

from noxus.

laam4 avatar laam4 commented on August 12, 2024 1

No need, it's already there if (weapon_index > -1 && weapon_index < IGNORE_SHOTS_START)

from noxus.

laam4 avatar laam4 commented on August 12, 2024

Isn't it tracked for each player? You might need the superlogs-csgo plugin for it to track the accuracy, I'm not sure.

from noxus.

immahobo avatar immahobo commented on August 12, 2024

I haven't been able to get accuracy to track with both the original hlxce and this version of superlogs. I was hoping this would resolve the issue but my stats page still shows all players with 0.0% accuracy.

from noxus.

laam4 avatar laam4 commented on August 12, 2024

Interesting, something somewhere has changed apparently in some point. Our installation doesn't track it anymore either. I just checked some playerstats and every single one had 0% accuracy for this month. Thanks valve. 👎

from noxus.

hitmany avatar hitmany commented on August 12, 2024

Confirmed on any Hlstatsx version

from noxus.

hitmany avatar hitmany commented on August 12, 2024

Looks like gameme fixed this issue:

3rd January 2016 [V4.7.1]
Fixed: Accuracy tracking for CSGO
We can investigate them plugin
Download here https://www.gameme.com/downloads/gameme_plugin_sourcemod_v4.7.zip

from noxus.

hitmany avatar hitmany commented on August 12, 2024

Here gameme commits
https://github.com/gamemedev/plugin-sourcemod/commits/master

from noxus.

melkor217 avatar melkor217 commented on August 12, 2024

Shouldn't it be done by superlogs plugin?

from noxus.

melkor217 avatar melkor217 commented on August 12, 2024

include/wstatshelper.inc always writes shots=0 to log for each entry:

L 05/24/2016 - 23:09:59: "Mathencence<5908><STEAM_1:1:56240241><CT>" triggered "weaponstats2" (weapon "fiveseven") (head "0") (chest "2") (stomach "1") (leftarm "0") (rightarm "0") (leftleg "0") (rightleg "0")
L 05/24/2016 - 23:10:24: "Beavis<5932><STEAM_1:1:75737392><TERRORIST>" triggered "weaponstats" (weapon "deagle") (shots "0") (hits "5") (kills "3") (headshots "3") (tks "1") (damage "639") (deaths "0")
L 05/24/2016 - 23:10:24: "Beavis<5932><STEAM_1:1:75737392><TERRORIST>" triggered "weaponstats2" (weapon "deagle") (head "3") (chest "0") (stomach "1") (leftarm "0") (rightarm "1") (leftleg "0") (rightleg "0")
L 05/24/2016 - 23:10:30: "Angel Luck...<5914><STEAM_1:1:67633035><CT>" triggered "weaponstats" (weapon "deagle") (shots "0") (hits "2") (kills "1") (headshots "1") (tks "0") (damage "231") (deaths "1")
L 05/24/2016 - 23:10:30: "Angel Luck...<5914><STEAM_1:1:67633035><CT>" triggered "weaponstats2" (weapon "deagle") (head "1") (chest "1") (stomach "0") (leftarm "0") (rightarm "0") (leftleg "0") (rightleg "0")
L 05/24/2016 - 23:10:37: "Beavis<5932><STEAM_1:1:75737392><TERRORIST>" triggered "weaponstats" (weapon "deagle") (shots "0") (hits "4") (kills "2") (headshots "1") (tks "0") (damage "341") (deaths "0")
L 05/24/2016 - 23:10:37: "Beavis<5932><STEAM_1:1:75737392><TERRORIST>" triggered "weaponstats2" (weapon "deagle") (head "1") (chest "1") (stomach "2") (leftarm "0") (rightarm "0") (leftleg "0") (rightleg "0")

from noxus.

hitmany avatar hitmany commented on August 12, 2024

Found code from gameme:

HookEvent("weapon_fire",                  Event_CSGOPlayerFire);
HookEvent("weapon_fire_on_empty",         Event_CSGOPlayerFire);
public Event_CSGOPlayerFire(Handle: event, const String: name[], bool:dontBroadcast)
{
    // "userid"        "short"
    // "weapon"        "string"        // weapon name used

    new userid   = GetClientOfUserId(GetEventInt(event, "userid"));
    if (userid > 0) {
        decl String: weapon_str[32];
        GetEventString(event, "weapon", weapon_str, 32);
        ReplaceString(weapon_str, 32, "weapon_", "", false);
        new weapon_index = get_weapon_index(csgo_weapon_list, MAX_CSGO_WEAPON_COUNT, weapon_str);
        if (weapon_index > -1) {
            if ((weapon_index != 22) && // hegrenade
                (weapon_index != 32) && // inferno
                (weapon_index != 33) && // decoy
                (weapon_index != 34) && // flashbang
                (weapon_index != 35) && // smokegrenade
                (weapon_index != 36) && // molotov
                (weapon_index != 37)) { // incgrenade
                player_weapons[userid][weapon_index][wshots]++;
            }
        }
    }
}

from noxus.

melkor217 avatar melkor217 commented on August 12, 2024

Well, sometimes it returns strange stuff like hits < shots for some reasons.

from noxus.

laam4 avatar laam4 commented on August 12, 2024

Hmm... could this be converted to use actual weapon indexes, I have to tinker with stuff.

from noxus.

melkor217 avatar melkor217 commented on August 12, 2024

Btw, you'll probably need those exceptions for grenades from gameme.

from noxus.

melkor217 avatar melkor217 commented on August 12, 2024

Is hit detection broken atm? Some weapons are recognized wrong for me

usp_silencer, usp_silencer_offf -> p2000
m4a1_silencer, m4a1_silencer_off -> m4a1
cz75a -> ?

from noxus.

laam4 avatar laam4 commented on August 12, 2024

That's why I was thinking to convert it to use actual weapon indexes. Without checking index, usp will be always p2000, m4a1-s will be m4a4 and cz75a is p250 (because when it was introduced it replaced p250, not fiveseven or tec9). That is just csgo in a nutshell. Just like the fact slaying a player when he is hurt will crash the whole server :D

I tinkered something and it seems promising, but now sleep

from noxus.

melkor217 avatar melkor217 commented on August 12, 2024

Btw, why not to check manually hit count for "broken" weapons before incrementing shoot count?

Yea, it's dirty, but i see it reliable and accurate enough for accuracy stats.

from noxus.

melkor217 avatar melkor217 commented on August 12, 2024

Another idea is

  • Remember last primary/secondary weapon used on shot for each player
  • Get weapon type (primary/secondary) on hit, then get remembered value

Idk if sourcemod guarantees to process hit event before shot event, hehe

UPD:

Ofc it would be better to get actual weapon without storing additional data (which could be pre-defined by hands or generated in runtime by other event handlers).

Compatibility also makes a problem. inlude/*.inc stuff was designed to be game-independent and for being used by all superlogs plugins.

from noxus.

Related Issues (20)

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.