Need Help Pls

Posts 1–2 of 2 · Page 1 of 1
Need Help Pls
My source d3d for CrossFire VN:

Code:
 //      Project : Topblast Menu Base v1.1
//      Author  : Topblast
//      Date    : 25 August 2010
//
//      Credits : 
//              To  :  MPGH, Gellins, Han211, Void, mmbob, Microsoft
//      
//      Tools used:
//              Microsoft Visual Studio 2010 ULTIMATE
//              DirectX9 SDK Update (summer 2004)
//              D3Dfont.cpp / D3dx9.h & d3dx9.lib
//
//  This Base can now support 2 different fonts. switch between dont anytime. 

#include "Main.h"
#include <stdio.h>

#ifdef D3DFont
#include "d3dfont9.cpp"
#endif
#pragma warning(disable:4305)

#define Gernades ((i==6)||(i==7)||(i==8)||(i==64)||(i==100)||(i==126)||(i==135)||(i==209)||(i==210)||(i==240)||(i==263)||(i==272)||(i==338)||(i==382)||(i==383)||(i==384))
#define Num_Max 100000
#define Value -1

int CH_back             = 2;
int CH_wall             = 1;
int CH_memory   = 1;
int CH_about    = 1;
////d3d
int bdz_Nofog                  = 1;
int bdz_SeeGhost               = 1;
int     bdz_Charms                     = 0;
int     bdz_PlayerWall         = 1;
int     bdz_Glasswall          = 0;
int     bdz_GhostCharms        = 0;
int bdz_Phantomcharms  = 0;
int bdz_Wireframe              = 0;
int bdz_Pointframe             = 0;
int     bdz_Wallframe          = 0;
int     bdz_Wallpoint          = 0;
int bdz_Crosshair              = 7;
////weapon
int     bdz_AntiRemover        = 0;
int bdz_speed          = 0;
int     bdz_NoReload           = 0;
int     bdz_NoRecoil           = 0;
int bdz_Noshock                = 0;
int bdz_Superfire              = 0;
int     bdz_Jump                       = 0;
int bdz_Spy                    = 0;
int bdz_Suicide                = 0;
int bdz_Superzoom              = 0;
int bdz_GM                             = 0;
int bdz_Fly                    = 0;
int bdz_WTW                    = 0;
int bdz_STW                    = 0;
int bdz_FixBug                 = 0;
int bdz_OneHit                 = 0;
int bdz_LongKnife              = 0;

char    sFPS[20]        ="xxx FPS";
char    coder[]         ="BDZ";
char    version[]       ="1107";
char    opt_Off[]       ={ "Delete" };
char    opt_Auto[]      ={ "Auto" };
char    *opt_Back[] ={ "Off","20%","40%","60%","80%","Solid" };
char    *opt_Grp[]  ={ "[ + ]","[ - ]" };
char    *opt_OffOn[]={ "OFF","ON" };
char    *opt_Xhair[]={ "OFF","Purple","Blue","Cyan","Green","Yellow","Orange","Red","Rainbow" };
char    *opt_Jump[]     ={ "OFF","Normal","Maximum" };
char    *opt_Shock[]={ "OFF","90%","1 Shot" };

typedef HRESULT(WINAPI* DrawIndexedPrimitive_)(LPDIRECT3DDEVICE9 pDevice, D3DPRIMITIVETYPE Type, INT BaseVertexIndex, UINT MinIndex, UINT NumVertices, UINT StartIndex, UINT PrimitiveCount);
DrawIndexedPrimitive_ pDrawIndexedPrimitive;
LPDIRECT3DTEXTURE9 Red,Yellow,Green,Blue,Purple,Pink,Orange,Black,White;

void DrawCrosshair(IDirect3DDevice9* dev,int Length,int Width,D3DCOLOR dColor)
{

}
HRESULT WINAPI nDrawIndexedPrimitive(LPDIRECT3DDEVICE9 pDevice, D3DPRIMITIVETYPE Type, INT BaseVertexIndex, UINT MinIndex,UINT NumVertices, UINT StartIndex, UINT PrimitiveCount)
{  

  IDirect3DVertexBuffer9* pStreamData = NULL; 
  UINT iOffsetInBytes,iStride;  
  pDevice->GetStreamSource(0,&pStreamData,&iOffsetInBytes,&iStride); 
//// see ghost
     if (  iStride == 44 &&bdz_SeeGhost==1)
         {
                pDevice->SetRenderState(D3DRS_LIGHTING, false);
                pDevice->SetRenderState(D3DRS_AMBIENT,D3DCOLOR_ARGB(255,255,255,255));
         }
//// charms
        if (  iStride == 44 &&bdz_Charms==1)
        {
                pDevice->SetRenderState(D3DRS_ZENABLE,false);
                pDevice->SetRenderState(D3DRS_FILLMODE,D3DFILL_SOLID);
                pDevice->SetRenderState(D3DRS_AMBIENT,0xFFFCA8);
                pDevice->SetTexture(0,NULL);
                pDevice->SetRenderState(D3DRS_ZENABLE, true);
                pDevice->SetRenderState(D3DRS_FILLMODE,D3DFILL_SOLID);
                pDevice->SetRenderState(D3DRS_AMBIENT, 0xFFFCA8);
                pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);
        }
//// waller
        if (  iStride == 44 &&bdz_PlayerWall==1)
        {
                pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);
        }
//// Ghost Charms
    if (  iStride == 44 &&bdz_GhostCharms==1)
        {
                pDevice->SetRenderState(D3DRS_ALPHABLENDENABLE,true);////
                pDevice->SetRenderState(D3DRS_DESTBLEND,D3DBLEND_INVDESTCOLOR);////
                pDevice->SetRenderState(D3DRS_SRCBLEND,D3DBLEND_INVSRCCOLOR);////
                pDevice->SetRenderState(D3DRS_ZENABLE,false);
                pDevice->SetRenderState(D3DRS_ALPHABLENDENABLE,true);////
                pDevice->SetRenderState(D3DRS_DESTBLEND,D3DBLEND_INVDESTCOLOR);////
                pDevice->SetRenderState(D3DRS_SRCBLEND,D3DBLEND_INVSRCCOLOR);////
                pDevice->SetRenderState(D3DRS_ZENABLE,true);
                pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);
        }
//// wire frame
        if (  iStride == 40 &&bdz_Wireframe==1 )
    {
                pDevice->SetRenderState(D3DRS_FILLMODE, D3DFILL_WIREFRAME);
        }
//// phantom charms
        if (  iStride == 44 &&bdz_Phantomcharms==1)
        {
                pDevice->SetRenderState(D3DRS_ALPHABLENDENABLE,true);
                pDevice->SetRenderState(D3DRS_DESTBLEND,D3DBLEND_INVDESTCOLOR);
                pDevice->SetRenderState(D3DRS_SRCBLEND,D3DBLEND_INVSRCALPHA);
                pDevice->SetRenderState(D3DRS_ZENABLE,false);
                pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);
        }
//// nofog for wall
        if (  iStride == 44 &&bdz_Nofog==1 )
        {
                pDevice->SetRenderState(D3DRS_FOGENABLE, false);
        }
//// wall glass
        if (  iStride == 24 &&bdz_Glasswall==1 )
        {
                pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);
        }
//// point frame
        if (  iStride == 44 &&bdz_Pointframe==1 )
        {
                pDevice->SetRenderState(D3DRS_FILLMODE,D3DFILL_POINT); 
        }
//// wall frame
        if (  iStride == 24 &&bdz_Wallframe==1 )
        {
                pDevice->SetRenderState(D3DRS_FILLMODE, D3DFILL_WIREFRAME);
        }
//// wall point
        if (  iStride == 24 &&bdz_Wallpoint==1 )
        {
                pDevice->SetRenderState(D3DRS_FILLMODE,D3DFILL_POINT); 
        }

   return pDrawIndexedPrimitive(pDevice, Type, BaseVertexIndex, MinIndex, NumVertices, StartIndex, PrimitiveCount);

}

FONT pFont=NULL;
pD3DdeviceX g_pDevice = 0;

oPresent pPresent;
oBeginScene pBeginScene;
oEndScene pEndScene;
oReset pReset;

void PreReset(pD3DdeviceX pDevice)
{
        If pFont Then
                pFont = NULL;
        _End

        If g_pDevice != pDevice Then
        
                g_pDevice = pDevice;
#ifdef D3DFont

#else 
                Try
                        If pFont != 0 Then
                                pFont->Release();
                        _End
                Catch(...) _End
        
#endif
                pFont = NULL;
        _End
}

void PostReset(pD3DdeviceX pDevice)
{
#ifdef D3DFont
        pFont = new CD3DFont("Arial", 10);
        If pFont Then
                pFont->InitDeviceObjects(pDevice);
                pFont->RestoreDeviceObjects();
        _End
#else
        D3DXCreateFontA(pDevice, 20, 10, FW_BOLD, 1, 0, DEFAULT_CHARSET,  OUT_DEFAULT_PRECIS, DEFAULT_QUALITY, FF_MODERN, "Comic Sans MS", &pFont);
#endif
}

HRESULT WINAPI myReset ( pD3DdeviceX pDevice, D3DPRESENT_PARAMETERS* pPresentationParameters )
{
        PreReset(pDevice);
        return pReset(pDevice, pPresentationParameters);
}

HRESULT WINAPI myPresent (pD3DdeviceX pDevice,CONST RECT *pSourceRect, CONST RECT *pDestRect, HWND hDestWindowOverride, CONST RGNDATA *pDirtyRegion)
{               
        If pFont==NULL Then
            PostReset(pDevice);                 // Create font
        Else 
                DoMenu(pDevice);
        _End

        return pPresent(pDevice, pSourceRect, pDestRect, hDestWindowOverride, pDirtyRegion);
}

HRESULT WINAPI myEndScene ( pD3DdeviceX pDevice )
{
if (pFont==NULL) 
            PostReset(pDevice);                 // Create font
        else 
                DoMenu(pDevice);
        if (bdz_Crosshair ==1)
        {
                float cx = 0.0f;//Horizontal Position 
                float cy = 0.0f;//Vertical Position  
                D3DVIEWPORT9 pViewport;
                pDevice->GetViewport(&pViewport);
                cx = ( float )pViewport.Width / 2;
                cy = ( float )pViewport.Height / 2;
                D3DRECT rec4 = {cx-5 , cy , cx+ 5 , cy+1};
                D3DRECT rec5 = {cx , cy-5 , cx+ 1 , cy+5};  
                pDevice->Clear( 1, &rec4, D3DCLEAR_TARGET, D3DXCOLOR(0.62745098, 0.125490, 0.959999, 1.0), 0,  0 );//purple
                pDevice->Clear( 1, &rec5, D3DCLEAR_TARGET, D3DXCOLOR(0.62745098, 0.125490, 0.959999, 1.0), 0,  0 ); 
        }

        if (bdz_Crosshair ==2)
        {
                float cx = 0.0f;//Horizontal Position 
                float cy = 0.0f;//Vertical Position  
                D3DVIEWPORT9 pViewport;
                pDevice->GetViewport(&pViewport);
                cx = ( float )pViewport.Width / 2;
                cy = ( float )pViewport.Height / 2;
                D3DRECT rec6 = {cx-5 , cy , cx+ 5 , cy+1};
                D3DRECT rec7 = {cx , cy-5 , cx+ 1 , cy+5};  
                pDevice->Clear( 1, &rec6, D3DCLEAR_TARGET, D3DXCOLOR(0.0, 0.0, 1.0, 1.0), 0,  0 );//blue
                pDevice->Clear( 1, &rec7, D3DCLEAR_TARGET, D3DXCOLOR(0.0, 0.0, 1.0, 1.0), 0,  0 ); 
        }

        if (bdz_Crosshair ==3)
        {
                float cx = 0.0f;//Horizontal Position 
                float cy = 0.0f;//Vertical Position  
                D3DVIEWPORT9 pViewport;
                pDevice->GetViewport(&pViewport);
                cx = ( float )pViewport.Width / 2;
                cy = ( float )pViewport.Height / 2;
                D3DRECT rec8 = {cx-5 , cy , cx+ 5 , cy+1};
                D3DRECT rec9 = {cx , cy-5 , cx+ 1 , cy+5};  
                pDevice->Clear( 1, &rec8, D3DCLEAR_TARGET, D3DXCOLOR(0.0, 1.0, 1.0, 1.0), 0,  0 );//cyan
                pDevice->Clear( 1, &rec9, D3DCLEAR_TARGET, D3DXCOLOR(0.0, 1.0, 1.0, 1.0), 0,  0 );
        }

        if (bdz_Crosshair ==4)
        {
                float cx = 0.0f;//Horizontal Position 
                float cy = 0.0f;//Vertical Position  
                D3DVIEWPORT9 pViewport;
                pDevice->GetViewport(&pViewport);
                cx = ( float )pViewport.Width / 2;
                cy = ( float )pViewport.Height / 2;
                D3DRECT rec10 = {cx-5 , cy , cx+ 5 , cy+1};
                D3DRECT rec11 = {cx , cy-5 , cx+ 1 , cy+5};  
                pDevice->Clear( 1, &rec10, D3DCLEAR_TARGET, D3DXCOLOR(0.0, 1.0, 0.0, 1.0), 0,  0 );// green
                pDevice->Clear( 1, &rec11, D3DCLEAR_TARGET, D3DXCOLOR(0.0, 1.0, 0.0, 1.0), 0,  0 );
        }

        if (bdz_Crosshair ==5)
        {
                float cx = 0.0f;//Horizontal Position 
                float cy = 0.0f;//Vertical Position  
                D3DVIEWPORT9 pViewport;
                pDevice->GetViewport(&pViewport);
                cx = ( float )pViewport.Width / 2;
                cy = ( float )pViewport.Height / 2;
                D3DRECT rec12 = {cx-5 , cy , cx+ 5 , cy+1};
                D3DRECT rec13 = {cx , cy-5 , cx+ 1 , cy+5};  
                pDevice->Clear( 1, &rec12, D3DCLEAR_TARGET, D3DXCOLOR(1.0, 1.0, 0.0, 1.0), 0,  0 );// yellow
                pDevice->Clear( 1, &rec13, D3DCLEAR_TARGET, D3DXCOLOR(1.0, 1.0, 0.0, 1.0), 0,  0 );
        }
    
        if (bdz_Crosshair ==6)
        {
                float cx = 0.0f;//Horizontal Position 
                float cy = 0.0f;//Vertical Position  
                D3DVIEWPORT9 pViewport;
                pDevice->GetViewport(&pViewport);
                cx = ( float )pViewport.Width / 2;
                cy = ( float )pViewport.Height / 2;
                D3DRECT rec14 = {cx-5 , cy , cx+ 5 , cy+1};
                D3DRECT rec15 = {cx , cy-5 , cx+ 1 , cy+5};  
                pDevice->Clear( 1, &rec14, D3DCLEAR_TARGET, D3DXCOLOR(1.0, 0.549019608, 0.0, 1.0), 0,  0 );// orange
                pDevice->Clear( 1, &rec15, D3DCLEAR_TARGET, D3DXCOLOR(1.0, 0.549019608, 0.0, 1.0), 0,  0 );
        }

        if (bdz_Crosshair ==7)
        {
                float cx = 0.0f;//Horizontal Position 
                float cy = 0.0f;//Vertical Position  
                D3DVIEWPORT9 pViewport;
                pDevice->GetViewport(&pViewport);
                cx = ( float )pViewport.Width / 2;
                cy = ( float )pViewport.Height / 2;
                D3DRECT rec16 = {cx-5 , cy , cx+ 5 , cy+1};
                D3DRECT rec17 = {cx , cy-5 , cx+ 1 , cy+5};  
                pDevice->Clear( 1, &rec16, D3DCLEAR_TARGET, D3DXCOLOR(1.0, 0.0, 0.0, 1.0), 0,  0 );//red
                pDevice->Clear( 1, &rec17, D3DCLEAR_TARGET, D3DXCOLOR(1.0, 0.0, 0.0, 1.0), 0,  0 );
        }

        if (bdz_Crosshair ==8)
        {
                float cx = 0.0f;//Horizontal Position 
                float cy = 0.0f;//Vertical Position  
                D3DVIEWPORT9 pViewport;
                pDevice->GetViewport(&pViewport);
                cx = ( float )pViewport.Width / 2;
                cy = ( float )pViewport.Height / 2;
                D3DRECT rec4 = {cx-30 , cy , cx+ 30 , cy+1};
                D3DRECT rec5 = {cx , cy-30 , cx+ 1 , cy+30};  
                pDevice->Clear( 1, &rec4, D3DCLEAR_TARGET, D3DXCOLOR(0.62745098, 0.125490, 0.959999, 1.0), 0,  0 );//purple
                pDevice->Clear( 1, &rec5, D3DCLEAR_TARGET, D3DXCOLOR(0.62745098, 0.125490, 0.959999, 1.0), 0,  0 ); 
                D3DRECT rec6 = {cx-25 , cy , cx+ 25 , cy+1};
                D3DRECT rec7 = {cx , cy-25 , cx+ 1 , cy+25};  
                pDevice->Clear( 1, &rec6, D3DCLEAR_TARGET, D3DXCOLOR(0.0, 0.0, 1.0, 1.0), 0,  0 );//blue
                pDevice->Clear( 1, &rec7, D3DCLEAR_TARGET, D3DXCOLOR(0.0, 0.0, 1.0, 1.0), 0,  0 ); 
                D3DRECT rec8 = {cx-20 , cy , cx+ 20 , cy+1};
                D3DRECT rec9 = {cx , cy-20 , cx+ 1 , cy+20};  
                pDevice->Clear( 1, &rec8, D3DCLEAR_TARGET, D3DXCOLOR(0.0, 1.0, 1.0, 1.0), 0,  0 );//cyan
                pDevice->Clear( 1, &rec9, D3DCLEAR_TARGET, D3DXCOLOR(0.0, 1.0, 1.0, 1.0), 0,  0 );
                D3DRECT rec10 = {cx-15 , cy , cx+ 15 , cy+1};
                D3DRECT rec11 = {cx , cy-15 , cx+ 1 , cy+15};  
                pDevice->Clear( 1, &rec10, D3DCLEAR_TARGET, D3DXCOLOR(0.0, 1.0, 0.0, 1.0), 0,  0 );// green
                pDevice->Clear( 1, &rec11, D3DCLEAR_TARGET, D3DXCOLOR(0.0, 1.0, 0.0, 1.0), 0,  0 );
                D3DRECT rec12 = {cx-10 , cy , cx+ 10 , cy+1};
                D3DRECT rec13 = {cx , cy-10 , cx+ 1 , cy+10};  
                pDevice->Clear( 1, &rec12, D3DCLEAR_TARGET, D3DXCOLOR(1.0, 1.0, 0.0, 1.0), 0,  0 );// yellow
                pDevice->Clear( 1, &rec13, D3DCLEAR_TARGET, D3DXCOLOR(1.0, 1.0, 0.0, 1.0), 0,  0 );
                D3DRECT rec14 = {cx-5 , cy , cx+ 5 , cy+1};
                D3DRECT rec15 = {cx , cy-5 , cx+ 1 , cy+5};  
                pDevice->Clear( 1, &rec14, D3DCLEAR_TARGET, D3DXCOLOR(1.0, 0.549019608, 0.0, 1.0), 0,  0 );// orange
                pDevice->Clear( 1, &rec15, D3DCLEAR_TARGET, D3DXCOLOR(1.0, 0.549019608, 0.0, 1.0), 0,  0 );
                D3DRECT rec16 = {cx-2 , cy , cx+ 2 , cy+1};
                D3DRECT rec17 = {cx , cy-2 , cx+ 1 , cy+2};  
                pDevice->Clear( 1, &rec16, D3DCLEAR_TARGET, D3DXCOLOR(1.0, 0.0, 0.0, 1.0), 0,  0 );//red
                pDevice->Clear( 1, &rec17, D3DCLEAR_TARGET, D3DXCOLOR(1.0, 0.0, 0.0, 1.0), 0,  0 );
        }
        return pEndScene(pDevice);
}

HRESULT WINAPI myBeginScene ( pD3DdeviceX pDevice ){
                
//      RenderFrame();

        return pBeginScene(pDevice);
}
        
Integer D3D_Hook(void)
{
            char s[1000];
        DWORD offsetBase=0x4FE571A0;
        for(;; Sleep(500))
        {
               offsetBase=(DWORD)GetModuleHandle ("d3d9.dll");
                           if (offsetBase)                         
                                   break;                          
        }

        DWORD a[2];
        a[0]=offsetBase+0x88840; //88830 cho sp2,88840 cho sp3 
        OutputDebugString (s);
        pDrawIndexedPrimitive = (DrawIndexedPrimitive_)DetourFunction((PBYTE)a[0],(PBYTE)nDrawIndexedPrimitive);

        DWORD *vtbl;

        // wait for the d3dx dll
        DWORD hD3D=0;
        do {
                hD3D = (DWORD)GetModuleHandleA("d3d9.dll");
                Sleep(10);
        } while(!hD3D);
        DWORD adr = FindPattern(hD3D, 0x128000, (PBYTE)"\xC7\x06\x00\x00\x00\x00\x89\x86\x00\x00\x00\x00\x89\x86", "xx????xx????xx");
        If adr Then
                memcpy(&vtbl,(void *)(adr+2),4);
                pReset                                  = (oReset)                                      DetourFunction((PBYTE)vtbl[RESET]               , (PBYTE)myReset                );
                pPresent                                = (oPresent)                            DetourFunction((PBYTE)vtbl[PRESENT]             , (PBYTE)myPresent              );
                pBeginScene                             = (oBeginScene)                         DetourFunction((PBYTE)vtbl[BEGINSCENE]  , (PBYTE)myBeginScene   );
                pEndScene                               = (oEndScene)                           DetourFunction((PBYTE)vtbl[ENDSCENE]    , (PBYTE)myEndScene             );
        _End
        CreateThread(NULL, NULL, HACKthread, NULL, NULL, NULL);
        return 0;
}

//// inject thread to process
BOOL WINAPI DllMain ( HMODULE hDll, DWORD dwReason, LPVOID lpReserved )
{
        DisableThreadLibraryCalls(hDll);
        if (dwReason == DLL_PROCESS_ATTACH)
                CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)D3D_Hook, NULL, NULL, NULL);
                return TRUE;
}

//// end of inject
D3DMenu         *pMenu=NULL;
D3DMenu         *text=NULL;
//// design + make menu
void MakeMenu(void)
{
        pMenu->AddItem("BackGround"                                             ,&CH_back                       ,opt_Back, 6);

        pMenu->AddGroup("[Player - Wall Function]"              ,&CH_wall                       , opt_Grp);
        if (CH_wall)
        {
                pMenu->AddItem(("- No Fog For Wall Mode")               ,&bdz_Nofog            , opt_OffOn);
                pMenu->AddItem(("- Wall Normal Hack")                   ,&bdz_PlayerWall       , opt_OffOn);
                pMenu->AddItem(("- Wall Wire Frame Hack")               ,&bdz_Wallframe        , opt_OffOn);
                pMenu->AddItem(("- Wall Point Frame Hack")      ,&bdz_Wallpoint        , opt_OffOn);
                pMenu->AddItem(("- Wall Glass Mode Hack")               ,&bdz_Glasswall        , opt_OffOn);
                pMenu->AddItem(("- Players Full Bright")                ,&bdz_SeeGhost         , opt_OffOn);
                pMenu->AddItem(("- Players All Charms")         ,&bdz_Charms           , opt_OffOn);
                pMenu->AddItem(("- Players Ghost Charms")               ,&bdz_GhostCharms      , opt_OffOn);
                pMenu->AddItem(("- Players Phantom Charms")     ,&bdz_Phantomcharms, opt_OffOn);
                pMenu->AddItem(("- Players Wire Frame")         ,&bdz_Wireframe        , opt_OffOn);
                pMenu->AddItem(("- Players Point Frame")                ,&bdz_Pointframe       , opt_OffOn);
                pMenu->AddItem(("- CrossHair Point")                    ,&bdz_Crosshair        , opt_Xhair, 9);
        }

        pMenu->AddGroup(("[Weapon - Memory Function]")  ,&CH_memory                     , opt_Grp);
        if (CH_memory)
        {
                pMenu->AddItem(("- Hack Tool Remover")          ,&bdz_AntiRemover      , opt_OffOn);
                pMenu->AddItem(("- No Reload Ammo")                     ,&bdz_NoReload         , opt_OffOn);
                pMenu->AddItem(("- No Recoil Sniper")                   ,&bdz_NoRecoil         , opt_OffOn);
                pMenu->AddItem(("- No Shock Mode")                      ,&bdz_Noshock          , opt_Shock, 3);
                pMenu->AddItem(("- Super Fire Mode")                    ,&bdz_Superfire        , opt_OffOn);
                pMenu->AddItem(("- High Jump Mode")                     ,&bdz_Jump                     , opt_Jump, 3);
                pMenu->AddItem(("- Spy Mode [ F - V ]")         ,&bdz_Spy                      , opt_OffOn);
                pMenu->AddItem(("- Suicide Mode")                               ,&bdz_Suicide          , opt_OffOn);
                pMenu->AddItem(("- Super Zoombie Mode")         ,&bdz_Superzoom        , opt_OffOn);
                pMenu->AddItem(("- Ghost Master Mode")          ,&bdz_GM                       , opt_OffOn);
                pMenu->AddItem(("- Fly Mode")                                   ,&bdz_Fly                      , opt_OffOn);
                pMenu->AddItem(("- Walk Through Wall Mode")     ,&bdz_WTW                      , opt_OffOn);
                pMenu->AddItem(("- Sit Through Wall Mode")      ,&bdz_STW                      , opt_OffOn);
                pMenu->AddItem(("- One Hit Mode")                               ,&bdz_OneHit           , opt_OffOn);
                pMenu->AddItem(("- Long Knife Mode")                    ,&bdz_LongKnife        , opt_OffOn);
                pMenu->AddText(("- Fix Bug Lost Blood Mode")    ,opt_Auto);
                pMenu->AddText(("- Disable All Function")               ,opt_Off);
        }

        pMenu->AddGroup(("[Information]")                               ,&CH_about                      , opt_Grp);
        if (CH_about)
        {
                pMenu->AddText(("Framerate")                            ,sFPS);
                pMenu->AddText(("Coder")                                        ,coder);
                pMenu->AddText(("Version")                                      ,version);
        }
}

// --- simple FPS vars and function
int       FPScounter = 0;
float FPSfLastTickCount = 0.0f;
float FPSfCurrentTickCount;

void FPScheck(char *str, char *format)
{
        FPSfCurrentTickCount = clock() * 0.001f;
        FPScounter++;

        if((FPSfCurrentTickCount - FPSfLastTickCount) > 1.0f) {
            FPSfLastTickCount = FPSfCurrentTickCount;
                sprintf(str,format,FPScounter);
            FPScounter = 0;
        } 
}

// Draw a background
void DrawGui(pD3DdeviceX pDevice, DWORD col)
{
        if (CH_back==5)                                 // solid
                col|=0xff000000;
        else
                col|=CH_back*0x30000000;        // transparency
        DrawBox(pDevice,pMenu->x-3,pMenu->y-2,pMenu->totwidth+6,pMenu->totheight+4  ,col);
        DrawBox(pDevice,pMenu->x-3,pMenu->y-2,pMenu->totwidth+6,pMenu->titleheight+1,col|0xFFFFFF00);
}

// called with every EndScene
void DoMenu(pD3DdeviceX pDevice)
{
        if (pMenu==0) {                                                                                                         // first time , create the menu
            pMenu = new D3DMenu(".::[-:- CFVNMODZ Ver 1.0 -:-]::.",100,200);// title, maxitems,width
                pMenu->visible=1;                                                                                               // make it visible
                pMenu->col_title=0xffff00b3;                                                                    // change title color to white
        } else {
                FPScheck(sFPS,"%d FPS");
                If pMenu->noitems==0 Then 
                        MakeMenu();
                _End
                if (pMenu->visible && CH_back) DrawGui(pDevice,0x000000);
            pMenu->Show(pFont, pDevice);
                pMenu->Nav();
        }
}
//// memory hack
DWORD WINAPI HACKthread( LPVOID param )
{
        while(1)
        {
DWORD CShellBase = (DWORD)GetModuleHandleA( "CShell.dll" ); //Process day hehe
DWORD dwPlayerPointer = *(DWORD*)( CShellBase + 0x305BC8 );//base scan
PDWORD p1 = (PDWORD)(CShellBase + 0x305BC8);//base 0x3049E8
DWORD dwWeapon = *(DWORD*)( CShellBase + 0xA3D800 );
PDWORD p = (PDWORD)(CShellBase+0xA3D800);//base Cshell
////longknife
if (bdz_LongKnife == 1)
{
        {
                while (!(*p)) Sleep(10);
        }
        for (int i=0;i<440;i++)
        {
                PDWORD pp = (PDWORD)(*p+0x4*i);
                if (*pp)
                {
                        PFLOAT pf = (PFLOAT)(*pp+0x7EC);//pointer Of base address
                        if (*pf) *pf = Num_Max;// Search Numax #Define
                        PFLOAT pf1 = (PFLOAT)(*pp+0xA15);//pointer Of base address
                        if (*pf1) *pf1 = Num_Max;// Search Numax #Define
                }
        }
}
////onehit              
if (bdz_OneHit == 1) //1hit x0
{
        {
                while (!(*p)) Sleep(100);
        }
        for (int i=0 ; i<440 ; i++)
        {
                PWORD pp = *(PWORD*)(*p+0x4*i);
                if(*pp)
                {
                        PFLOAT pf = (PFLOAT)(*pp+0x7FB);//pointer Of base address
                        if (*pf) *pf = Num_Max;// Search Numax #Define
                }
        }
}
////speed
if (bdz_speed == 1 )
{
        {
                if(dwPlayerPointer != 0)
                *(DWORD*)(dwPlayerPointer+ 0x48C) = 0;
        }
        for (int i=0 ; i<440 ; i++)
        {
                PDWORD pp = (PDWORD)(*p+0x4*i);
                if (*pp)
                {
                        PFLOAT pf = (PFLOAT)(*pp+0x21D8);//pointer
                        if (*pf) *pf = Value;
                }
        }
}
////anti hack tool
if (bdz_AntiRemover == 1) 
{
        PFLOAT pp1 = (PFLOAT)(CShellBase + 0x31D1EC);
        if (*pp1) *pp1 = (float)(3.0828566215146E-44);
        PFLOAT ppa = (PFLOAT)(CShellBase+  0x31D1EC);
        if (*ppa) *ppa = (float)(3.0828566215146E-44);
}
////noreload
if (bdz_NoReload == 1 )
{
        if(dwPlayerPointer != 0)
        *(DWORD*)(dwPlayerPointer + 0x2F0) = 12;
}
////norecoil sniper
if (bdz_NoRecoil == 1 ) 
{
        if(dwPlayerPointer != 0)
        *(DWORD*)(dwPlayerPointer + 0x304) = 1;
}
////no shock 90%
if (bdz_Noshock == 1 )
{
        if(dwPlayerPointer != 0)
        *(DWORD*)(dwPlayerPointer + 0x22B) = 1;
}
////no shock 1 shot
if (bdz_Noshock == 2 )
{
        if(dwPlayerPointer != 0)
        *(DWORD*)(dwPlayerPointer + 0x4F4) = 1;
}
////super fire
if (bdz_Superfire == 1 )
{
        if(dwPlayerPointer != 0)
        *(DWORD*)(dwPlayerPointer + 0x220) = 0;
}
////jump normal
if (bdz_Jump == 1 )
{
        if(dwPlayerPointer != 0)
        *(DWORD*)(dwPlayerPointer + 0x249) = 0;
}
////jump max
if (bdz_Jump == 2 ) 
{
        if(dwPlayerPointer != 0)
        *(DWORD*)(dwPlayerPointer + 0x278) = 0;
}
////on spy
if (GetAsyncKeyState('F'))
        bdz_Spy = 1;
{
        if (bdz_Spy == 1 )
        {
                if(dwPlayerPointer != 0)
                *(DWORD*)(dwPlayerPointer + 0x48C) = 0;
        }
}
////off spy
if (GetAsyncKeyState('V'))
{
        bdz_Spy = 0;
}
////suicide
if (bdz_Suicide == 1 )
{
        if(dwPlayerPointer != 0)
        *(DWORD*)(dwPlayerPointer + 0x25E) = 70000;
}
////super zoombie
if (bdz_Superzoom == 1 )
{
        if(dwPlayerPointer != 0)
        *(DWORD*)(dwPlayerPointer + 0x1F0) = 1;
}
////ghost master
if (bdz_GM == 1 )
{
        if(dwPlayerPointer != 0)
        *(DWORD*)(dwPlayerPointer + 0x1B0) = 0;
}
////fly
if (bdz_Fly == 1 )
{
        if(dwPlayerPointer != 0)
        *(DWORD*)(dwPlayerPointer + 0x38C) = 1;
}
////walk through wall
if (bdz_WTW == 1 )
{
        PFLOAT wtw1 = (PFLOAT)( *p1 + 0x1BC );
        PFLOAT wtw2 = (PFLOAT)( *p1 + 0x1C0 );
        PFLOAT wtw3 = (PFLOAT)( *p1 + 0x1C4 );
        if (*wtw1) *wtw1 = -5;
        if (*wtw2) *wtw2 = 140;
        if (*wtw3) *wtw3 = -5;
}
////sit through wall
if (bdz_STW == 1 )
{
        PFLOAT stw1 = (PFLOAT)( *p1 + 0x1C0 );
        if (*stw1) *stw1 = -1;
        Sleep(500);
        PFLOAT stw2 = (PFLOAT)( *p1 + 0x1C0 );
        if (*stw2) *stw2 = 140;
        Sleep(500);
        bdz_STW = 0;
}
////fix bug blood
if (bdz_FixBug == 0 )
{
        PFLOAT fixbug1 = (PFLOAT)( CShellBase + 0x2B32B0 );
        PFLOAT fixbug2 = (PFLOAT)( CShellBase + 0x2AE60C );
        if (*fixbug1) *fixbug1 = -5;
        if (*fixbug2) *fixbug2 = 0;
}
////off function to fix diss
if (GetAsyncKeyState(VK_DELETE))
{
////d3d
        bdz_Nofog                      = 0;
        bdz_SeeGhost           = 0;
        bdz_Charms                     = 0;
        bdz_PlayerWall         = 0;
        bdz_Glasswall          = 0;
        bdz_GhostCharms        = 0;
        bdz_Phantomcharms      = 0;
        bdz_Wireframe          = 0;
        bdz_Pointframe         = 0;
        bdz_Wallframe          = 0;
        bdz_Wallpoint          = 0;
        bdz_Crosshair          = 0;
////weapon
        bdz_AntiRemover        = 0;
        bdz_NoReload           = 0;
        bdz_NoRecoil           = 0;
        bdz_Noshock            = 0;
        bdz_Superfire          = 0;
        bdz_Jump                       = 0;
        bdz_Spy                        = 0;
        bdz_Suicide            = 0;
        bdz_Superzoom          = 0;
        bdz_GM                         = 0;
        bdz_Fly                        = 0;
        bdz_WTW                        = 0;
        bdz_STW                        = 0;
}
        Sleep(10);
        }
}
When i inject this in to crossfire and i get xtrap error :



Please tell me how to fix it

sorry for my bad english

---------- Post added at 09:43 PM ---------- Previous post was at 08:11 PM ----------

any one help me pls
Posts 1–2 of 2 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us