so this is actually from dudes cheat (creds to dude).
but its not working anymore...
is the method outdated or am i just retarded?
Code:
studiohdr_t *hdr = g_pModelInfo->GetStudiomodel(pPlayer->model);
if (!hdr)
return -1;
mstudiobone_t* bone;
for (int k = 0; k < hdr->numbones; k++)
{
bone = hdr->pBone(k);
if ((bone && (bone->flags & (BONE_USED_BY_HITBOX)) && (bone->parent != -1)))
{
char* boneName = bone->pszName();
string name(boneName);
size_t found = name.find("Head");
if (found != string::npos)
return k;
}
}
return -1;