PDA

View Full Version : Wallhack Question Plz Help Almost Finish


gigolo
1st August 2002, 01:46
Ok first iam not doing this for quake3, iam doing this for Medal
Of Honor(since is the same engine) i need to know whats rong take
a look at does picture with 2 diffrent code :

=============================================
Wallhack1
=============================================

Picture of WALLHACK1 (http://www3.sympatico.ca/yazmo/on1.JPG) <========== LINK
here is my code for this hack:
_____________________________________________
void WINAPI my_glDrawElements(GLenum mode, GLsizei count, GLenum type, void *data)
{
if(firstdraw) {
firstdraw=0;
org_glClearColor (0.0f, 0.0f, 0.0f, 0.0f);
org_glClear (GL_COLOR_BUFFER_BIT);
}
if(wallhack) {
org_glDisable (GL_DEPTH_TEST);
org_glEnable (GL_BLEND);
org_glBlendFunc (GL_ONE_MINUS_DST_COLOR,GL_ONE);
org_glColor4f (1.0f,1.0f,1.0f,0.5f);
org_glClearColor (0.0f, 0.0f, 0.0f, 0.0f);
}
org_glDrawElements (mode, count, type, data);
}
_____________________________________________
-this one is perfect exept the orange box
=============================================

=============================================
Wallhack2
=============================================

Picture of WALLHACK2 (http://www3.sympatico.ca/yazmo/on2.JPG) <========== LINK
here is my code for this hack:
_____________________________________________
void WINAPI my_glDrawElements(GLenum mode, GLsizei count, GLenum type, void *data)
{
if(firstdraw) {
firstdraw=0;
org_glClearColor (0.0f, 0.0f, 0.0f, 0.0f);
org_glClear (GL_COLOR_BUFFER_BIT);
}
if(wallhack) {
org_glDisable (GL_DEPTH_TEST);
org_glEnable (GL_BLEND);
org_glBlendFunc (GL_SRC_ALPHA,GL_ONE);
org_glColor4f (1.0f,1.0f,1.0f,0.5f);
org_glClearColor (0.0f, 0.0f, 0.0f, 0.0f);
}
org_glDrawElements (mode, count, type, data);
}
_____________________________________________
-this one it's to brightness
=============================================

do my function is correct?
do i need to hook other fuction?
how can i remove or lower brightness from wallhack2"
how can i get rib of those orange box in wallhack1

nu||
1st August 2002, 02:40
well, i dont know how to code, but i must say, i know wallhacks are fun and all, but come on, those things just make the game look god awful ugly

Reaction
1st August 2002, 03:20
i dunno much about the q3 engine but i'll try to help.

to lower the brightness of the second method use glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA) or if that dont work too good try GL_DST_COLOR and GL_SRC_COLOR, also i noticed in the pic's that the game look a bit white, i never played Medal Of Honor but i don't think it's supposed to be like that? To use the 'normal' colors store the original color then just modify the alpha value like this

if(wallhack)
{
float org_Color[4] = { 0 };
glGetFloatv(GL_CURRENT_COLOR, org_Color);

org_glDisable (GL_DEPTH_TEST);
org_glEnable (GL_BLEND);
org_glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
org_Color[3] = 0.5;
org_glColor4fv(org_Color);
org_glClearColor (0.0f, 0.0f, 0.0f, 0.0f);
}

should help.

prozak15
1st August 2002, 04:39
what do you do to get those to work, are they for the opengl32.dll, or is it an ini, how do u use thos commands? sorry im new, all i know is that its opengl stuff.

nu||
1st August 2002, 04:45
okay, you managed to come up with that code and a wallhack, yet you dont know what the above is. i hardly know c++ and i know what thats for

o({})o
1st August 2002, 17:42
check for ambiance factors and see if you can change them, they might be making it too bright....

gigolo
1st August 2002, 22:12
ok thx guys i have a nother question it is possible that it use glColor4ubv instand of glColor4fv?

i say that because i manage to filter gl function of my game with gltrace and this command appear 135 000 (glColor4ubv)time and glColor4fv 56 time?

gigolo
2nd August 2002, 01:13
here is my code :
==============================================
typedef void(APIENTRY *func_glColor4ubv) ( const GLubyte *v);
==============================================
float org_Color[4] = { 0 };
==============================================
void WINAPI my_glDrawElements(GLenum mode, GLsizei count, GLenum type, void *data)
{
if(firstdraw) {
firstdraw=0;
org_glClearColor (0.0f, 0.0f, 0.0f, 0.0f);
org_glClear (GL_COLOR_BUFFER_BIT);
}
if(wallhack) {
org_glGetFloatv(GL_CURRENT_COLOR, org_Color);
org_glDisable (GL_DEPTH_TEST);
org_glEnable (GL_BLEND);
org_glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
org_glColor4ubv(org_Color);
org_glClearColor (0.0f, 0.0f, 0.0f, 0.0f);
}
org_glDrawElements (mode, count, type, data);
}
=============================================
and i get this error:

main.cpp(180) : error C2664: 'void (const unsigned char *)' : cannot convert parameter 1 from 'float [4]' to 'const unsigned char *'

any idee why?

Reaction
3rd August 2002, 02:19
if(wallhack)
{
org_glGetFloatv(GL_CURRENT_COLOR, org_Color);
org_glDisable (GL_DEPTH_TEST);
org_glEnable (GL_BLEND);
org_glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
/**/
org_glColor4ubv((const BYTE*)org_Color);
/**/
org_glClearColor (0.0f, 0.0f, 0.0f, 0.0f);
}

That should do the trick. :)

CHEETAH0E
16th August 2002, 08:29
here try this, i will explain it too:

if(wallhack)
{
org_glGetFloatv(GL_CURRENT_COLOR, org_Color);
org_glDisable(GL_DEPTH_TEST);
org_glDisable(GL_BLEND);
org_glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
org_glColor4f(org_Color[0], org_Color[1], org_Color[2], 0.5f);
org_glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
}

do that EXACTLY
and it will look very very NICE.
Having glColor4f(1.0f, 1.0f, 1.0f, 0.5f); like you had simply makes it pure white blended 50% with where the wall was.
And i noticed ur screwing up something else, just check to see if the method isn't equal to GL_TRIANGLES, GL_TRIANGLE_STRIP, GL_TRIANGLE_FAN, GL_QUADS and you will be set, your current version will wallack everything, that will make it walls only :)

CHEETAH0E
16th August 2002, 08:31
oh and another thing, to get rid of the sky, test to see if GL_QUADS is being drawn, if true, hook the glVertex3f function, and return without calling the real glVertex3f, that will remove the sky completely so it doesn't run over your wallhack :) have fun

gigolo
17th August 2002, 01:05
where do i check ambiance factors ?

And also i dont no whats appening but the line in "comment" in the text above dont do s***, i try to remove them 1 by 1 and that dosent do nothing, ............i sure did something rong, but what? i get no error WHEN COMPILLING, the wallhack work but i need to get the colors.....so i can change only the alpha of the RGBA, can someone plzzzzzzzzzz help me with the colors think? thx.


void WINAPI my_glDrawElements(GLenum mode, GLsizei count, GLenum type, void *data)
{
if(firstdraw)
{
firstdraw=1;
//org_glClearColor (0.0f, 0.0f, 0.0f, 0.0f);
//org_glClear (GL_COLOR_BUFFER_BIT);
}
if(wallhack)
{
//org_glGetFloatv(GL_CURRENT_COLOR, org_Color);

org_glDisable (GL_DEPTH_TEST);
org_glEnable (GL_BLEND);
org_glBlendFunc (GL_SRC_ALPHA,GL_ONE);
//org_Color[3] = (0.5);
//org_glColor4ubv(org_Color);
//org_glClearColor (0.0f, 0.0f, 0.0f, 0.0f);
}
org_glDrawElements (mode, count, type, data);
}

CHEETAH0E
17th August 2002, 06:11
try this: should make everything... aok!
::

void WINAPI my_glDrawElements(GLenum mode, GLsizei count, GLenum type, void *data)
{
if(firstdraw)
{
firstdraw=false;
org_glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
org_glClear(GL_COLOR_BUFFER_BIT);
}
if(wallhack)
{
float curCol[4];
org_glGetFloatv(GL_CURRENT_COLOR, curCol);
org_glDisable(GL_DEPTH_TEST);
org_glEnable(GL_BLEND);
org_glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
org_glColor4f(curCol[0], curCol[1], curCol[2], 0.5f);
glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
}
org_glDrawElements(mode, count, type, data);
}

this should make a picture perfect wallhack for you, have fun :)

Tantrum
28th August 2002, 17:35
the links to your screenies are down dude.........