well.im posting mine
void Interface:
rawHP()
{
VAngle Angle;
int PosX, PosY, LifeProgress;
for (int MonsterViewPort = 0; MonsterViewPort < 30; MonsterViewPort++)
{
lpViewObj lpObj = &*(ObjectPreview*)pGetPreviewStruct(pPreviewThis(), MonsterViewPort);
DWORD CurrentTick = GetTickCount();
DWORD Delay = (CurrentTick - gObjUser.m_TargetUpdateTick);
if (!lpObj || lpObj->m_Model.ObjectType == emNPC || !lpObj->m_Model.Unknown4)
{
continue;
}
PMSG_TARGETDATA_REQ pRequest;
pRequest.h.set((LPBYTE)&pRequest, 0xFB, 7, sizeof(pRequest));
pRequest.aIndex = lpObj->aIndex;
if (Delay >= 75)
{
gProtocol.DataSend((LPBYTE)&pRequest, pRequest.h.size);
}
Angle.X = lpObj->m_Model.VecPosX;
Angle.Y = lpObj->m_Model.VecPosY;
Angle.Z = lpObj->m_Model.VecPosZ + lpObj->m_Model.Unknown216.Z + 100.0;
float BarWidth = (64.5f / 100.0f) * gObjUser.m_TargetLifePercent[lpObj->aIndex];
float LifeBarWidth = 65.0f;
pGetPosFromAngle(&Angle, &PosX, &PosY);
PosX -= (int)floor(LifeBarWidth / (double)2.0);
if (gObjUser.m_TargetLifePercent[lpObj->aIndex] <= 0.1f || !lpObj->IsLiveObject)
{
continue;
}
// Player HP Bar
if (lpObj->m_Model.ObjectType == emPlayer)
{
pDrawGUI(0x7B3F, (float)PosX - 1.2, (float)PosY - 1.5, 66.95, 6);
pDrawGUI(0x7B40, (float)PosX, (float)PosY, BarWidth, 3);
}
// Monster HP Bar
else if(lpObj->m_Model.ObjectType == emMonster)
{
glColor4f(0.0, 0.0, 0.0, 0.7);
pDrawBarForm((float)(PosX - 1.2), (float)(PosY - 1.5), 66.95, 4.4, 0.0, 0);
pGLSwitchBlend();
glColor3f(1.0, 0.2, 0.0);
pDrawBarForm((float)(PosX), (float)(PosY), BarWidth, 2.1, 0.0, 0);
pDrawText(pTextThis(), PosX - 1, PosY - 11, " ", 67, 0, (LPINT)0, 0);
pDrawText(pTextThis(), PosX + 0.5 * (66.95 - (4.35 * float(strlen(lpObj->Name)))), PosY - 11, lpObj->Name, (4.35 * float(strlen(lpObj->Name))), 0, (LPINT)0, 0);
}
if ((int)(gObjUser.m_TargetLifePercent[lpObj->aIndex] / 10) > 10)
{
LifeProgress = 10;
}
else
{
LifeProgress = (int)(gObjUser.m_TargetLifePercent[lpObj->aIndex] / 10);
}
}
}
void Protocol::SetTargetData(PMSG_TARGETDATA_ANS * aRecv)
{
gObjUser.m_TargetLifePercent[aRecv->aIndex] = 0.0f;
gObjUser.m_TargetLifePercent[aRecv->aIndex] = aRecv->TargetLifePercent;
gObjUser.m_TargetUpdateTick = GetTickCount();
}
#pragma pack(push, 1)
struct PMSG_TARGETDATA_ANS
{
PBMSG_HEAD2 h;
int aIndex;
int PlayerObject;
/*
float TargetLife;
float TargetMaxLife;
int TargetLevel;
int TargetReset;*/
float TargetLifePercent;
};
#pragma pack(pop)
ServerSide:
void TargetDataRequest(int aIndex, PMSG_TARGETDATA_REQ * Request)
{
PMSG_TARGETDATA_ANS pMsg;
pMsg.h.set((LPBYTE)&pMsg, 0xFB, 7, sizeof(pMsg));
if( gObj[Request->aIndex].Live != FALSE )
{
pMsg.MonsterIndex = gObj[Request->aIndex].m_Index;
#ifdef TARGET_HP_BAR
pMsg.TargetLife = gObj[Request->aIndex].Life;
pMsg.TargetMaxLife = gObj[Request->aIndex].MaxLife + gObj[Request->aIndex].AddLife;
pMsg.TargetLevel = gObj[Request->aIndex].Level;
pMsg.TargetReset = gObj[Request->aIndex].Reset;
#endif
pMsg.TargetLifePercent = (gObj[Request->aIndex].Life / (gObj[Request->aIndex].MaxLife + gObj[Request->aIndex].AddLife)) * 100.0f;
DataSend(aIndex, (LPBYTE)&pMsg, sizeof(pMsg));
}
}
if you guys cant get it works. then you are too dumb