Results 1 to 11 of 11
  1. #1
    fakeness's Avatar
    Join Date
    Oct 2011
    Gender
    male
    Posts
    26
    Reputation
    10
    Thanks
    0

    Unhappy My hack DC's after you press the menu key :\

    So what is going wrong? The hook is working fine since it runs forever without pressing the menu key. Here's the menu paint code and my present.
    Code:
    void PaintMenu()
    {
    	
    
    	if(Font){
    		Font->Release();
    		Font = NULL;
    		f = false;
    		
    	}
    	if(!f){
    		D3DXCreateFont(pDevice, 14, 6, FW_BOLD, 1, 0, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, ANTIALIASED_QUALITY, DEFAULT_PITCH | FF_DONTCARE, "Arial", &Font);
    		
    		f= true;
    	}
    
    
    if(GetAsyncKeyState(MK)&1){iMenu =! iMenu; }
    if(iMenu && Font){
    
    	pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);
    	
    }
    
    char Timestruct[16] = "hh':'mm':'ss tt";       
    char TimeString[25];                           
    GetTimeFormatA(NULL,NULL,NULL,NULL,Timestruct,15);
    sprintf(TimeString,"%s",Timestruct);
    
    if(iMenu && ((GetAsyncKeyState(VK_UP)&1))){
    ...Go up menu...
    }
    if(iMenu && ((GetAsyncKeyState(VK_DOWN)&1))){
    ...Go Down menu..
    if(iMenu && ((GetAsyncKeyState(VK_RIGHT)&1))){
    if(iMenu){
    ...turns on hacks...
    ....just simple math...
    
    }
    }
    }
    if(iMenu && ((GetAsyncKeyState(VK_LEFT)&1))){
    if(iMenu){
    ....
    Turns off hacks
    just simple math
    ...
    
    }
    }
    }
    
    if(iMenu && Font){
      ...Actually painting Menu here...Just a simple DrawBox and DrawText function
    }
    
    }
    }
    Present:
    Code:
     HRESULT WINAPI gellPresent(LPDIRECT3DDEVICE9 pDevice, CONST RECT *pSourceRect, CONST RECT *pDestRect, HWND stWindowOverride, CONST RGNDATA *pDirtyRegion)
    {
    	_asm pushad;
    	PaintMenu();
    	ActivateHacks();
    	_asm popad;
    	return pPresent(pDevice, pSourceRect, pDestRect, hDestWindowOverride, pDirtyRegion);
    }
    Reset:
    Code:
    HRESULT WINAPI gellReset(LPDIRECT3DDEVICE9 pDevice, D3DPRESENT_PARAMETERS* Parametri)
    {
    Font->OnLostDevice();
    HRESULT kReset = pReset(pDevice, Parametri);
    if(SUCCEEDED(kReset)){Font->OnResetDevice();}
    return kReset;
    }


    Note: It builds fine in release mode so ignore any {/}, definition, and major syntax errors



    I do not know whats wrong, am I using the right render state? Am I supposed to be hooking present? Am I doing the Reset correctly?

    I appreciate any advice.

  2. #2
    flameswor10's Avatar
    Join Date
    Jul 2009
    Gender
    male
    Posts
    12,528
    Reputation
    981
    Thanks
    10,404
    My Mood
    In Love
    there are a lot of things wrong in your source.
    Partially, i dont see how pDevice is called in PaintMenu >_>
    No I do not make game hacks anymore, please stop asking.


    Been MPGH Minion: 6 July 2011 - 1 August 2012

  3. #3
    fakeness's Avatar
    Join Date
    Oct 2011
    Gender
    male
    Posts
    26
    Reputation
    10
    Thanks
    0
    Can you tell me what you see is wrong? And im calling it like(if thats what you mean):
    Code:
    DrawText(300,300,Green,"No Recoil                    On",pDevice);
    //and
    DrawBox(320,320,520,520, Green, Black, pDevice);
    If you want me to paste in those functions I will but they are just the standard ones found in that D3D thread that is stickied.
    Last edited by fakeness; 02-02-2012 at 04:54 PM.

  4. #4
    fakeness's Avatar
    Join Date
    Oct 2011
    Gender
    male
    Posts
    26
    Reputation
    10
    Thanks
    0
    Code:
    void DrawText(int x,int y,DWORD color,char *text, LPDIRECT3DDEVICE9 pDevice){
    RECT rect;
    SetRect( &rect, x, y, x, y );
    Font->DrawTextA(NULL,text,-1,&rect, DT_LEFT|DT_NOCLIP, color);
    }
    Code:
     void DrawRect(int x,int y,int h,int w,DWORD Color,LPDIRECT3DDEVICE9 pDevice){
    D3DRECT rec;
    rec.x1 = x;
    rec.x2 = x + w;
    rec.y1 = y;
    rec.y2 = y + h;
    pDevice->Clear(1,&rec,D3DCLEAR_TARGET,Color,0,0);
    }
    
    void DrawBox(int x,int y,int h,int w,D3DCOLOR Border, D3DCOLOR Fill,LPDIRECT3DDEVICE9 pDevice){
    DrawRect(x,y,h,w,Fill,pDevice);
    DrawRect(x,y,h,1,Border,pDevice);
    DrawRect(x+w,y,h,1,Border,pDevice);
    DrawRect(x,y,1,w, Border,pDevice);
    DrawRect(x,y+h,1,w+1, Border,pDevice);
    DrawRect(x+2,y+2,h-4,2,Border,pDevice);
    DrawRect(x+2,y+2,2,w-4, Border,pDevice);
    DrawRect(x+w-4,y+2,h-4,2,Border,pDevice);
    DrawRect(x+2,y+h-4,2,w-4, Border,pDevice);
    }

  5. #5
    justiniscool6's Avatar
    Join Date
    Aug 2010
    Gender
    male
    Location
    Mpgh
    Posts
    265
    Reputation
    -9
    Thanks
    7
    What fail ...... Check your PaintMenu and the functions in there. And also make sure your detours and hook are updated. Hope i helped have a great day.

  6. #6
    fakeness's Avatar
    Join Date
    Oct 2011
    Gender
    male
    Posts
    26
    Reputation
    10
    Thanks
    0
    Quote Originally Posted by justiniscool6 View Post
    What fail ...... Check your PaintMenu and the functions in there. And also make sure your detours and hook are updated. Hope i helped have a great day.
    They are updated, if you see whats the problem just say it lol.

  7. #7
    Ch40zz-C0d3r's Avatar
    Join Date
    Apr 2011
    Gender
    male
    Posts
    839
    Reputation
    44
    Thanks
    400
    My Mood
    Twisted
    Man. You need to give the PaintMenu function the parameter pDevice.
    As example void PaintMenu(ID3D11Device* pDevice).
    Im using Directx11 pDevice so you need to search whats pDevice declared in DX9.
    Have a nice day and thank me if I helped you plz.

    Progress with my game - "Disbanded"
    • Fixed FPS lag on spawning entities due to the ent_preload buffer!
    • Edit the AI code to get some better pathfinding
    • Fixed the view bug within the sniper scope view. The mirror entity is invisible now!
    • Added a new silencer for ALL weapons. Also fixed the rotation bugs
    • Added a ton of new weapons and the choice to choose a silencer for every weapon
    • Created a simple AntiCheat, noobs will cry like hell xD
    • The name will be Disbanded, the alpha starts on the 18th august 2014



    Some new physics fun (Serversided, works on every client)



    My new AI
    http://www.youtube.com/watch?v=EMSB1GbBVl8

    And for sure my 8 months old gameplay with 2 friends
    http://www.youtube.com/watch?v=Na2kUdu4d_k

  8. #8
    fakeness's Avatar
    Join Date
    Oct 2011
    Gender
    male
    Posts
    26
    Reputation
    10
    Thanks
    0
    Quote Originally Posted by Ch40zz-C0d3r View Post
    Man. You need to give the PaintMenu function the parameter pDevice.
    As example void PaintMenu(ID3D11Device* pDevice).
    Im using Directx11 pDevice so you need to search whats pDevice declared in DX9.
    Have a nice day and thank me if I helped you plz.
    It is naturally being called, like i said there are no definition errors.

    ---------- Post added at 11:58 PM ---------- Previous post was at 10:01 PM ----------

    It seems to be having a hard time reseting, any idea why?

  9. #9
    -Dimensions-'s Avatar
    Join Date
    Jul 2010
    Gender
    male
    Posts
    243
    Reputation
    2
    Thanks
    161
    My Mood
    Aggressive
    First, you want to narrow down what the problem could be. Comment out pointless stuff or just don't use fonts and see what happens.
    Second, try making a better draw function. I'm not sure if the ones I custom made still work since there over 6 months old, but be original, change it up.

    When something like this happened to me I just commented out everything and just drew one box, and if it d/c then I knew something was wrong with that specific function. Then if everything works, then I'll print text, etc. Continue to progress and test.

    Also try a different hook. I don't think Gellin's works
    Last edited by -Dimensions-; 02-09-2012 at 06:23 PM.

  10. #10
    flameswor10's Avatar
    Join Date
    Jul 2009
    Gender
    male
    Posts
    12,528
    Reputation
    981
    Thanks
    10,404
    My Mood
    In Love
    The thinig wrong is.
    the pDevice is fucked
    No I do not make game hacks anymore, please stop asking.


    Been MPGH Minion: 6 July 2011 - 1 August 2012

  11. #11
    -Dimensions-'s Avatar
    Join Date
    Jul 2010
    Gender
    male
    Posts
    243
    Reputation
    2
    Thanks
    161
    My Mood
    Aggressive
    Quote Originally Posted by flameswor10 View Post
    The thinig wrong is.
    the pDevice is fucked
    Yeah, your right about that. Hes not calling pDevice in the functions in his reset. Plus it looks like hes using a really old base.

Similar Threads

  1. Replies: 4
    Last Post: 11-09-2011, 01:32 PM
  2. [Help] Is it possible to change the menu key?
    By iHaxPanties in forum CrossFire Discussions
    Replies: 10
    Last Post: 09-08-2011, 02:02 AM
  3. How do you bind the F key to RIGHTARROW?
    By derpola in forum Team Fortress 2 Hacks
    Replies: 5
    Last Post: 08-06-2011, 09:00 AM
  4. Replies: 2
    Last Post: 06-06-2007, 04:43 PM
  5. Just in case you use the Console Administrator Hack...
    By Rocker1989 in forum Gunz General
    Replies: 9
    Last Post: 05-26-2006, 10:05 AM