Open immahobo opened 8 years ago
Isn't it tracked for each player? You might need the superlogs-csgo plugin for it to track the accuracy, I'm not sure.
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.
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. :-1:
Confirmed on any Hlstatsx version
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
Here gameme commits https://github.com/gamemedev/plugin-sourcemod/commits/master
Shouldn't it be done by superlogs plugin?
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")
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]++;
}
}
}
}
ReplaceString(weaponstr, 32, "weapon", "", false);
dis one
Well, sometimes it returns strange stuff like hits < shots for some reasons.
Hmm... could this be converted to use actual weapon indexes, I have to tinker with stuff.
Btw, you'll probably need those exceptions for grenades from gameme.
No need, it's already there if (weapon_index > -1 && weapon_index < IGNORE_SHOTS_START)
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 -> ?
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
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.
Another idea is
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.
Is there a way to get accuracy to track on HLXCE?