Mammothz

we're just gamers

[Source Code] DrawHealthBar สำหรับ ESP WorldToScreen

1 ความคิดเห็น 2,949 อ่าน

Dark4CT

สมาชิกทั่วไป

4
กระทู้
0
ความคิดเห็น

287

ระดับสมาชิก: ?
100%

เลื่อนระดับ

ออนไลน์ 10 ชั่วโมง
หมายเลขสมาชิก 1747
โพสต์เมื่อ 7 มิถุนายน 2559 เวลา 14:22 น.
void FillRGB(int x, int y, int w, int h, D3DCOLOR color, IDirect3DDevice9* pDevice)
{
D3DRECT rec = { x, y, x + w, y + h };
pDevice->Clear(1, &rec, D3DCLEAR_TARGET, color, 0, 0);
}
void DrawHealthBar(LPDIRECT3DDEVICE9 pDevice, int x, int y, float health, int w, int h, D3DCOLOR color){

x -= w / 2;
y -= h / 2;
FillRGB(x, y, w, h + 1, D3DCOLOR_ARGB(255, 000, 000, 000), pDevice);
UINT hw = (UINT)(((w - 2) * health) / 100);
FillRGB(x + 1, y + 1, hw, h - 1, color, pDevice);
}

ลักษณะการนำไปใช่
DrawHealthBar(pDevice, x, y, health, width, 5, D3DCOLOR_ARGB(255, 000, 255, 000));


ตัวอย่าง


แก้ไขล่าสุดเมื่อ 7 มิถุนายน 2559 เวลา 14:24 น.

nongarmkab

สมาชิกทั่วไป

6
กระทู้
10
ความคิดเห็น

0

ระดับสมาชิก: 1
100%

เลื่อนระดับ

ออนไลน์ 15 ชั่วโมง
หมายเลขสมาชิก 18814
โพสต์เมื่อ 16 มิถุนายน 2559 เวลา 21:32 น.
ความคิดเห็นที่ 1
สร้างยังไงครับอยากทราบการใส่วางโค้ดครับ

กรุณายืนยันว่าคุณไม่ใช่บอทหรือสแปม