Wallhack source

PollDid This Helped you?
13 votes
Posts 1–11 of 11 · Page 1 of 1
Wallhack source
This is Wallhack source it was used for another game but maybe can help in crossfire too

Code:
//nightvision wall hack


  if  (!(mode==GL_TRIANGLES||mode==GL_TRIANGLE_STRIP||mode==GL_TRIANGLE_FAN||mode==GL_QUADS)) 
    { 
         ColorEntry* c = colorList.get(31); 
         glColor3f(c->onebased_r, c->onebased_g, c->onebased_b); 
         float curcolor[4]; 
         glGetFloatv(GL_CURRENT_COLOR, curcolor); 
         glDisable(GL_DEPTH_TEST); 
         glEnable (GL_BLEND); 
         glBlendFunc(1,2),(GL_DEPTH_TEST, GL_ONE_MINUS_SRC_ALPHA, GL_SRC_ALPHA_SATURATE); 
         glColor4f(0.0,1.0,0.0,.40); 
         glClearColor(0.0,1.0,0.0,.40); 
      }












//1. Model hack
if (cvar.model)//cvar.model :-)
if(mode == GL_TRIANGLE_STRIP)
{
glDisable(GL_DEPTH_TEST);
}
//End of Modelhack
---------------------------------
case 1:   // Doesnt mess up the gun when used like xqz style does 
   if (!(mode==GL_TRIANGLE_STRIP||mode==GL_TRIANGLE_FAN||mode==GL_QUADS)) 
      { 
         ColorEntry* c = colorList.get(51); 
         p_fnglColor3f( c->onebased_r, c->onebased_g, c->onebased_b); 
         float curcolor[4]; 
         p_fnglGetFloatv(GL_CURRENT_COLOR, curcolor); 
         p_fnglDisable(GL_DEPTH_TEST); 
         p_fnglEnable (GL_BLEND); 
         oglBlendFunc(GL_ONE_MINUS_SRC_ALPHA, GL_SRC_ALPHA_SATURATE); 
         oglColor4f(curcolor[0], curcolor[1], curcolor[2], .2 ); 
         cvar.nosky=1; 
         cvar.trans=0; 
         cvar.tran_team=0; 
      } 
      else if(mode==GL_TRIANGLES || mode==GL_TRIANGLE_STRIP || mode==GL_TRIANGLE_FAN) 
      { 
         p_fnglEnable(GL_DEPTH_TEST); 
         p_fnglDisable(GL_BLEND); 
      } 
   } 


now just change Code: 
ColorEntry* c = colorList.get(51); 


to any number (you don't have to use 51) and then when u put a different number go to color.cpp and add this Code: 
add("wallhack" ,255,0,0      ); // index:51 


and then in game go into console and type color wallhack blah blah blah and blah blah blah is standing for the color numbers u want..hope u enjoy!
---------------------------


-----------------------------------------------------------
//4. Special Wallhack
if (cvar.wall)
if(!(mode==GL_TRIANGLES||mode==GL_TRIANGLE_STRIP||mode==GL_TRIANGLE_FAN||mode==GL_QUADS))
{
GLfloat curcol[4];
glGetFloatv(GL_CURRENT_COLOR, curcol); 
glDisable(GL_DEPTH_TEST);
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA);
glColor4f(curcol[0],curcol[1],curcol[2],0.5f);			
glClearColor(0.0f,0.0f,0.0f,0.0f);
}
---------------
dunno if it wrks

wireframe with no color

void APIENTRY pglClear(GLbitfield mask) 
{ 
mask = GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT; 
glClearColor(0.0f, 0.0f, 0.0f, 0.0f); 
oglClear(mask); 
}


---------------------------------------
azorbix wall

bool bWalls = false;
int iDrawn = 0;
float origin[] = {0.0f, 0.0f, 0.0f};
float GetDistance(const float *src, const float *dst);


void APIENTRY my_glBegin(GLenum mode)
{
    if(mode != GL_TRIANGLES && mode != GL_TRIANGLE_STRIP && mode != GL_TRIANGLE_FAN && mode != GL_QUADS)
    {
        bWalls = true;
        glDisable(GL_DEPTH_TEST);
        glEnable(GL_BLEND);
        glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
    }
    else
    {
        bWalls = false;
    }

    glBegin(mode);
}

void APIENTRY my_glViewport(GLint x, GLint y, GLsizei width, GLsizei height)
{
    iDrawn++;

    glViewport(x, y, width, height);
}

void APIENTRY my_glTranslatef(GLfloat x, GLfloat y, GLfloat z)
{
    if(iDrawn == 2 && (x != 0 || y != 0 || z != 0))
    { //get our origin on the world
        origin[0] = x*-1;
        origin[1] = y*-1;
        origin[2] = z*-1;
    }

    glTranslatef(x, y, z);
}

void APIENTRY my_glVertex3fv(const GLfloat *v)
{
    if(bWalls)
    {
        float dist = GetDistance(v, origin);
    
        dist /= 3000;
    
        if(dist > 1.0f)            dist = 1.0f;
        else if(dist < 0.1f)    dist = 0.1f;

        dist = 1.0f - dist; //comment this if you want to change how it blends (farther or closer)
    
        glColor4f(1.0f, 1.0f, 1.0f, dist);
    }

    glVertex3fv(v);
}

void APIENTRY my_wglSwapBuffers(HDC hDC)
{
    iDrawn = 0;

    wglSwapBuffers(hDC);
}

float GetDistance(const float *src, const float *dst)
{
    float ang[3] =
    {
        dst[0] - src[0],
        dst[1] - src[1],
        dst[2] - src[2]
    };

    return (float)sqrt(ang[0]*ang[0] + ang[1]*ang[1] + ang[2]*ang[2]);
}
that wont work, or it will drop fps, i got a proper private wallhack, cant release ^^_^^ i give you clue, it got to odo with PsectorRender
Quote Originally Posted by Genkidesu View Post
@al3xman c+ped much? at least give credits.. :/

@mohamed09
i always pm you xD, whatss wrong? ill pm you now xD this is %10 of the full code pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_TRUE );
Simple Source
Code:
if(wallhack)
{
if(iStride==44 ||iStride==40)
{
pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE );
pDevice->SetRenderState(D3DRS_ZFUNC,   D3DCMP_NEVER);
}}
wtf.. disabling Z buffer doesnt need +200 lines of codes
xD this isn't even d3d, this is OpenGL
Quote Originally Posted by derh.acker View Post
xD this isn't even d3d, this is OpenGL
lol you are right.. didnt try to read lol
lmfao wdf are you doing with opengl on CrossFire :P

@derh.acker you posted it first
Wtf :| i think its just again a f*** leecher noob who posted opengl crap.. Hahah
Copy and paste much
Posts 1–11 of 11 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us