OPENGL不同血量不同颜色显示的代码Information: If you have Good health then the colour will be Green, if health is Medium then the colour will be
Yellow, if health is Low then the colour will be Red.
This can be PureGL as no engine function access is required.
First you need to use any memory searching tool to find the correct integers.
I am not doing a tutorial on this as it is easy to find for yourself but will include the latest values that
correspond with this post date.
Step 1:
4 Integers;
int iHealth;
int iRed;
int iGreen;
int iBlue;
iHealth will store the Health, and the colour integers will show the colour of the HUD;
Then either every frame, or 5th glViewport you need to collect the players health information by doing the
following;
iHealth = *(int*)0x119848;
Then you setup your code;
if(iHealth >= 100)
{
iRed = 100;
iGreen = 255;
iBlue = 50;
}
else if((iHealth >= 50)
{
iRed = 255;
iGreen = 255;
iBlue = 50;
}
else if(iHealth <= 20)
{
iRed = 255;
iGreen = 0;
iBlue = 0;
}
Then with glBlendFunc we do the colouring;
if(dfactor == GL_ONE) { glColor3ub(iRed,iGreen,iBlue); }
Then that is about it, and leaves it upto you to improve.
Below are the latest values fitting in with this post date;
int iCS_Health = *(int*)0x119848;
int iCS_Armor = *(int*)0x1A1D894
lease credit if used:
Code:
LanceVorgin
aiwnjoo
Microsoft
UC
OpenGLThanks!
__________________
Code:
IAT, API, Polymorphism, PEB/TEB, ASM, CAT, ring0 - All the possibilities