Mapping a hitbox to a HITGROUP enum

I’m trying to make a NextBot take damage based on what bodypart the player shot at. Normally you would use ScalePlayerDamage or ScaleNPCDamage, but nextbots do not get called in either of them. The NextBot entity still has a http://wiki.garrysmod.com/page/Entity/GetHitBoxBone method, but those are hitboxes instead of hitgroups. Is there some standard way to map a hitbox to a hitgroup? Like is there a rule that for example hitbox zero is always HITGROUP_HEAD, or something like that.

Good luck with sevenswordscc.

Nope there’s currently no Lua binding that gets the hitgroup of an hitbox ( other than using a trace directly on the bone, but that’s hacky as shit ), so you’re gonna have to file a request for both Ent:GetHitBoxGroup and Entity:LastHitGroup ( which is only gonna work on a subset of entities like npcs and nextbots anyway )