Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (isPlayer)
- {
- int HEALTH = pEntity->m_Table->pTable->m_HpRow->Health;
- if (HEALTH <= 0)continue;
- D3DXVECTOR3 PosEnt = pEntity->GetDecryptedEnemyPos(), Out;
- float dist = DrawFunc::Distance3D(LocalPos.x, LocalPos.y, LocalPos.z, PosEnt.x, PosEnt.y, PosEnt.z);
- dist = dist / (70.0 / 1.8);
- char dst[255];
- sprintf(dst, "[%2.fm]", dist);
- char strN[255];
- sprintf(strN, "%s", pEntity->m_Table->pTable->pNickName->Nickname);
- Model* model_entity = 0;
- Animator* pAnimator_entity = 0;
- ModelSkeletal* ModelSkeletal_entity = 0;
- float mindist = 100000000;
- for (auto model : pModelFac->pModelList)
- {
- if (!model)continue;
- Animator* pAnimator = model->pAnimator;
- if (!pAnimator)continue;
- ModelSkeletal* Skeletal = pAnimator->pModelSkeletal;
- if (!Skeletal)continue;
- if (!Skeletal->GetSpaceNode)continue;
- if (strstr(model->pAnimator->CharacterType, "dataosha_female") == nullptr
- && strstr(model->pAnimator->CharacterType, "dataosha_male") == nullptr)continue;
- D3DXVECTOR3 vec = (Skeletal->GetSpaceNode->Max2 + Skeletal->GetSpaceNode->Min2) / 2;
- float d = DrawFunc::Distance3D(vec.x, vec.y, vec.z, PosEnt.x, PosEnt.y, PosEnt.z);
- if (d < mindist)
- {
- mindist = d;
- model_entity = model;
- pAnimator_entity = pAnimator;
- ModelSkeletal_entity = Skeletal;
- }
- }
- if (!model_entity)continue;
- if (!pAnimator_entity)continue;
- if (!ModelSkeletal_entity)continue;
- if (!ModelSkeletal_entity->GetSpaceNode)continue;
- /*char tt[255];
- sprintf(tt, " model_entity: %x | minDist: %f", model_entity, mindist);
- OutputDebugString(tt);*/
- DrawFunc::Skeleton(pGame, pAnimator_entity, model_entity, Color::colCyan, 2);
- float w[4];
- if (DrawFunc::GetBoneEsp(PosEnt, ModelSkeletal_entity->GetSpaceNode->Max2, ModelSkeletal_entity->GetSpaceNode->Min2, w, pGame))
- {
- BGUI::DrawRect(w[0], w[1], w[2] - w[0], w[3] - w[1], 2, Color::colCyan);
- MENU::EspFont.Draw(strN, w[0] + (w[2] - w[0]) / 2.0 - MENU::EspFont.GetTextWidth(strN, 20) / 2.0, w[1] - 20, 20, Color::colCyan, 0, 0, 0);
- MENU::EspFont.Draw(dst, w[0] + (w[2] - w[0]) / 2.0 - MENU::EspFont.GetTextWidth(dst, 20) / 2.0, w[3], 20, Color::colCyan, 0, 0, 0);
- }
- }
- if (isRobot)
- {
- int HEALTH = pEntity->m_Table->pTable->m_Hpbot->Health;
- if (HEALTH <= 0)continue;
- D3DXVECTOR3 Pos = pEntity->GetDecryptedEnemyPos(), Out;
- DrawFunc::Skeleton(pGame, pAnimator_entity, model_entity, Color::colCyan, 2);
- char str2[255];
- sprintf(str2, "BOT[ %d ]", HEALTH);
- if (pGame->WorldToScreen(&Pos, &Out))
- {
- MENU::EspFont.Draw(str2, Out.x, Out.y, 20, Color::colRed, 0, 0, 0);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement