Solved Entity Box Color

Hexui Undetected CSGO Cheats Sinkicheat PUBG Cheat

Cristlol

Newbie
Full Member
Nov 25, 2013
22
968
0
How can i make a code change box color like chams when i got spotted and how to fix my boxes size

Example
ypmtgQn.jpg

I have offset for checking spot it's
C++:
m_bSpotted 0x935
offset + address it seems work fine. i just don't know how to change color of box,healbar, I tried to change 'EnemyBrush ' of course it work but every color also change.

C++:
EnemyBrush = CreateSolidBrush(RGB(255, 0, 0));
if who need my healthbar its works but looks sucks lol
C++:
void DrawHealthBar(int X, int Y, int Width, int Height, int Health)
{
	int progress = (int)((float)Health / 100);
	int width = (int)((float)Y / 100 * progress);

	DrawFilledRect(X, Y - 1, Width + 1, Height + 2);
	DrawFilledRect(X + 1, Y, width - 1, Height);
}
C++:
DrawHealthBar(EnemyXY[0] - 220, EnemyXY[1] - 70, PlayerList[i].Health, 5,0);
 

kaz

Coder
Full Member
Nobleman
Apr 3, 2013
160
1,183
7
Anyone know if creating a temporary brush inside of each drawing function would alter the hack performance?


you could do something like::


C++:
void DrawFilledRect(int x, int y, int w,int h, int r,int g,int b,int a)
{
      HBRUSH temporaryBrush = CreateSolidBrush(RGBA(r, g, b, a));  
      //drawing functions

      DeleteObject(temporaryBrush);//i dunno if this is correct
}
 

Cristlol

Newbie
Full Member
Nov 25, 2013
22
968
0
Anyone know if creating a temporary brush inside of each drawing function would alter the hack performance?


you could do something like::


C++:
void DrawFilledRect(int x, int y, int w,int h, int r,int g,int b,int a)
{
      HBRUSH temporaryBrush = CreateSolidBrush(RGBA(r, g, b, a));  
      //drawing functions

      DeleteObject(temporaryBrush);//i dunno if this is correct
}
ah thanks so much it works
 

kaz

Coder
Full Member
Nobleman
Apr 3, 2013
160
1,183
7
ah thanks so much it works
and when you want to change RGB attributes based upon player's team and if they're spotted you could do this


DrawFilledRect(x,y,w,h, Player.team == 2? 0:255 , Player.spotted == 1? 0:255, Player.team == 2? 255:0);
If your class for the entity is called Player and team and spotted are stored in it.

you can also store ints and change their attributes for color later on

C++:
void DrawESPBox(int x,int y, int dist, int team, int spotted)
{
        int r,g,b; //store color values
        if(team == 2){r=255;g=0;b=0;}else{r=0;g=0;b=255;}
        //OR
        if(team != MyPlayer.team){ r=255;g=0;b=0;}else{r=0;g=0;b=255;}
 
        if(spotted)g=255; //if he's on the radar then give him a green color mix to go with the red and blue
}
 

Xenshi

Newbie
Full Member
Jan 24, 2014
6
142
0
a better way to do this all...how i did, either scrap the crappy gdi, do a directx overlay, or a hook using the sdk, and read the m_bspotted as a bool, then return if (spotted), like

bool Spotted = cEng.IfSpotted(CBaseEntity); then etc,
 
Attention! Before you post:

Read the How to Ask Questions Guide
99% of questions are answered in the Beginner's Guide, do it before asking a question.

No Hack Requests. Post in the correct section.  Search the forum first. Read the rules.

How to make a good post:

  • Fill out the form correctly
  • Tell us the game name & coding language
  • Post everything we need to know to help you
  • Ask specific questions, be descriptive
  • Post errors, line numbers & screenshots
  • Post code snippets using code tags
  • If it's a large project, zip it up and attach it

If you do not comply, your post may be deleted.  We want to help, please make a good post and we will do our best to help you.

Community Mods