Comments (18)
ReplaceString(weapon_str, 32, "weapon_", "", false);
dis one
from noxus.
No need, it's already there if (weapon_index > -1 && weapon_index < IGNORE_SHOTS_START)
from noxus.
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.
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.
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.
Confirmed on any Hlstatsx version
from noxus.
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.
Here gameme commits
https://github.com/gamemedev/plugin-sourcemod/commits/master
from noxus.
Shouldn't it be done by superlogs plugin?
from noxus.
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.
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.
Well, sometimes it returns strange stuff like hits < shots for some reasons.
from noxus.
Hmm... could this be converted to use actual weapon indexes, I have to tinker with stuff.
from noxus.
Btw, you'll probably need those exceptions for grenades from gameme.
from noxus.
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.
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.
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.
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)
- errors HOT 4
- Errors HOT 3
- Last Connect HOT 8
- Sugesstion
- HLstatsX: CE HOT 4
- Strange definition of clan HOT 2
- [SOLVED] Compile plugin HOT 4
- [CS:GO] In-game problem HOT 22
- [CS:GO] mmrank HOT 7
- [CS:GO] Average Ping HOT 1
- empty hlstats_Events_Connects HOT 1
- TS3 fix
- Troubles with importing sql
- elorank errors HOT 1
- PHP 7 HOT 3
- MYSQL Error after Config Edit HOT 2
- Knives
- All weapons
- not work heatmaps
- log apache error
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from noxus.