Results 1 to 4 of 4
  1. #1
    gcflames12's Avatar
    Join Date
    Aug 2009
    Gender
    male
    Location
    wada
    Posts
    181
    Reputation
    10
    Thanks
    24

    Some Useful D3D Functions ( Must have someknowledge )

    Well ive been reading a book on D3D for a couple weeks now and i wanted to share some stuff i learned with you!

    Well to start off this is my code for soldierfront but can easily be used for Combat Arms.

    My wireFrame this is a simple effect i will go over the what it means in depth:
    Code:
    typedef HRESULT ( WINAPI* oDrawIndexedPrimitive ) ( LPDIRECT3DDEVICE8 pDevice, D3DPRIMITIVETYPE pType, UINT nMinIndex, UINT nNumVertices, UINT nStartIndex, UINT nPrimitiveCount );
    oDrawIndexedPrimitive pDrawIndexedPrimitive, OriginalDrawIndexedPrimitive;
    HRESULT WINAPI myDrawIndexedPrimitive(LPDIRECT3DDEVICE8 pDevice, D3DPRIMITIVETYPE pType, UINT nMinIndex, UINT nNumVertices, UINT nStartIndex, UINT nPrimitiveCount)
    {
     
    if(WireFame)
     
    if(m_Stride == 40)// have to change this!
    { 
     pDevice->SetRenderState(D3DRS_FILLMODE, D3DFILL_WIREFRAME);
    }
    Basically the top is just my call to D3D, here i make a call to DrawIndexedPrimitive wich just renders the vertices basically.

    Code:
    pDevice->SetRenderState(D3DRS_FILLMODE, D3DFILL_WIREFRAME);
    this is where i make the screen only show the wires the game is based off of.

    pDevice - this is our device pointer
    SetRenderState - is where i assign my values to a render state..
    i dont want to go to in depth because i want to move on to my favorite part!!

    Here is my code for fullbright.. it is very simple all u do is color in the ambient colors to the max wich will make everything brighter ( if u want darker just make everything 50)

    Code:
    {
    if(fullbright)
    {
    pDevice->SetRenderState(D3DRS_LIGHTING, false); //direct3d  lighting off
    pDevice->SetRenderState(D3DRS_AMBIENT,D3DCOLOR_ARGB(255,255,255,255)); // use all colors for best effect
    }
    Now we move on to No Fog, another D3D effect

    Code:
    if(nofog) 
    { 
    pDevice->SetRenderState(D3DRS_FOGENABLE, false); 
    }
    Now for the wallhack i wont explain this one because its pretty self explainator if you know what your doing!

    Code:
    pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);
    pDevice->SetRenderState(D3DRS_ZFUNC,D3DCMP_NEVER);
    pDrawIndexedPrimitive(pDevice, pType, nMinIndex, nNumVertices, nStartIndex, nPrimitiveCount);
    pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_TRUE);
    pDevice->SetRenderState(D3DRS_ZFUNC,D3DCMP_LESSEQUAL);
    As you can their are no chams set becuz i am just showing you how to set it to see through walls..

    also i wouldnt give you these without telling you how to set hotkeys of Course just replace this code with the button, and hack you want this to turn on.

    Code:
    if (GetAsyncKeyState(VK_F1)&1) // if we press F1
    { 
    nofog = !nofog; //no fog turns on
    }
    now last my favorite (: asus wallhack:

    Code:
    {
     
    if(AsusWallhack)
     
    if(Model_rec) // this is so we will edit the walls nothing else
          {
    pDevice->SetRenderState( D3DRS_SRCBLEND, 3 );
    pDevice->SetRenderState( D3DRS_DESTBLEND, 4 );
    pDevice->SetRenderState( D3DRS_ALPHABLENDENABLE, true );
          }
    }
    Here is another good one for drawing a crosshair. put this in Globals
    Code:
    float ScreenCenterX = 0.0f;//Horizontal 
      float ScreenCenterY = 0.0f;//Vertical  
      bool crosshair = false; 
      D3DCOLOR redt = D3DCOLOR_XRGB( 255, 0, 0 );
    Now this in SetViewPort:
    Code:
    ScreenCenterX = ( float )pViewport->Width / 2; 
      ScreenCenterY = ( float )pViewport->Height / 2;
    Now for Endscene:
    Code:
    if(crosshair) 
         { 
           D3DRECT rec2 = {ScreenCenterX-20, ScreenCenterY, ScreenCenterX+ 20, ScreenCenterY+2}; 
        D3DRECT rec3 = {ScreenCenterX, ScreenCenterY-20, ScreenCenterX+ 2,ScreenCenterY+20}; 
                                     
        m_pD3Ddev->Clear(1, &rec2, D3DCLEAR_TARGET,redt, 0,  0); 
        m_pD3Ddev->Clear(1, &rec3, D3DCLEAR_TARGET,redt, 0,  0); 
        }
    Basically this isnt a full tutorial becuase i dont want to spoon feed anything to noobs but if you know what you are doing you will be able to include these D3D functions in your hacks !

  2. The Following User Says Thank You to gcflames12 For This Useful Post:

    infidel_ (08-19-2010)

  3. #2
    ToJaMleko's Avatar
    Join Date
    Mar 2010
    Gender
    male
    Posts
    2,078
    Reputation
    13
    Thanks
    258
    My Mood
    Bored
    i think that will be usefull for coders if its true xD i hope they will do aimbot or 500hp shot hack xD (to not kill by 1 shot mutants) AND BIG THX 2 YOU can u give me a title of the book ?

  4. #3
    gcflames12's Avatar
    Join Date
    Aug 2009
    Gender
    male
    Location
    wada
    Posts
    181
    Reputation
    10
    Thanks
    24
    Search Game Engine Programing: third edition on amazon

  5. #4
    TheFallenOwns's Avatar
    Join Date
    Oct 2009
    Gender
    male
    Posts
    149
    Reputation
    10
    Thanks
    43
    Quote Originally Posted by robmaster12 View Post
    i think that will be usefull for coders if its true xD i hope they will do aimbot or 500hp shot hack xD (to not kill by 1 shot mutants) AND BIG THX 2 YOU can u give me a title of the book ?
    not really because code should already know this ...>_>
    also to add onto this
    Drunken hyeana and Direct3dtutorail.com is where i learned my D3D
    and yes this works but youll need to hook the D3D functions and do this
    pretty much strides are how you identify the object and D3DRSFILL_WIREFRAME is like a define on 1 i think and it is a flag the tells the render device to enable the debug feature wireframe
    also like chams it turns off the z axis for the certain stride and makes it a color then it turns back on the z axis and makes it a diffrent color since this happens so fast you get that effects
    so for instance if you wanted chams to only show when behind walls you could turn off the z axis(or depth in 3d space) and color them then turn back on the z axis so in a way it would look as if when behind a wall theyd be a certain color else they would look normal
    and if you couldnt guess a wall hack is chams just you turn off the z axis and.... thats it lol

    but yeah if you are a HACKER and dont know these then your not a hacker your ethier a leech or a person who thinks using PTC takes skill aka leech
    however for a leaner this is great information but if you having learned about DIP and strides and such like that in D3D yet dont listen to this tut youll confuse yourself also to the thread creator
    delta black hawk down is a good game to learn hacking its D3D8 no game guard and you can use a starter kit its how i got started with hacking anyways yeah thats it

  6. The Following User Says Thank You to TheFallenOwns For This Useful Post:

    MiNT (09-05-2010)

Similar Threads

  1. [Release] Class library with some useful functions.
    By t7ancients in forum C# Programming
    Replies: 8
    Last Post: 05-17-2011, 04:41 AM
  2. Some Useful D3D Functions ( Must have someknowledge )
    By gcflames12 in forum Combat Arms Hack Coding / Programming / Source Code
    Replies: 22
    Last Post: 08-19-2010, 08:28 AM
  3. Some Useful Tools
    By yahagashi in forum WarRock - International Hacks
    Replies: 32
    Last Post: 12-17-2007, 09:38 PM
  4. [Release] Unleashed v3 [Must-Have]
    By phire in forum WarRock - International Hacks
    Replies: 28
    Last Post: 11-18-2007, 02:50 PM
  5. Windows XP Software Bundle Pack V1.0 (A Must Have)
    By masta_pupa in forum Hardware & Software Support
    Replies: 4
    Last Post: 01-09-2007, 02:15 PM