Repository navigation
|
Hi! I'm collecting stats from demo and I don't need to store stats from first knife round (for example if a game demo from faceit) I'm detecting is game started to not collect data from warmup but I didn't find any solution to detect knife rounds. Hope I'll find an answer here! |
Answered by
ysomad
Nov 8, 2022
Replies: 2 comments
|
Hey! Knife rounds are generally implemented as what I call "plugin magic" - so there is really no way of detecting it "easily". The best way to check is probably to see if any of the players have any primary or secondary weapons after freezetime ends. If yes: it's a real round |
0 replies
|
Came up with this solution: for _, p := range gs.TeamCounterTerrorists().Members() {
weapons := p.Weapons()
if len(weapons) == 1 && weapons[0].Type == common.EqKnife {
return
}
}I guess it's works, gonna test now, thanks! |
0 replies
Answer selected by
ysomad
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Came up with this solution:
I guess it's works, gonna test now, thanks!