Page 1 of 2 12 LastLast
Results 1 to 15 of 25
  1. #1
    Trollaux's Avatar
    Join Date
    Nov 2011
    Gender
    male
    Posts
    2,074
    Reputation
    137
    Thanks
    792

    PaintTraverse hook

    if you cannot figure out how to use this yourself leave the thread



    Code:
    void __fastcall hkPaintTraverse(void *pThis, DWORD dwEDX, VPANEL vguiPanel, bool forceRepaint, bool allowForce) {
    	pPaintTraverse(pThis, vguiPanel, forceRepaint, allowForce); // for this make ur own hook of PaintTraverseFn it isnt hard just use vmttable hooking, the offset is 41
    
    	/*
    	pointers._panel is defined as IPanel *_panel;
    	this->m_pPanel is defined as IPanel *m_pPanel;
    	heres the interfacing code for it
    
    	this->m_pPanel = (IPanel *) VMTHookManager.GetPointer( "vgui2.dll", "VGUI_Panel" ); // pretty sure VGUI_Panel is fine and it doesnt matter, if u are paranoid just look for the actual name defined in the sdk
    	pointers._panel = this->m_pPanel;
    	*/
    
    	static VPANEL OverlayPopupPanel; // VPANEL is just a more fancy version of unsigned int for use in vgui
    	if (OverlayPopupPanel == NULL) { // check if its null (doesnt have a value)
    		const char* panelName = pointers._panel->GetClassName(vguiPanel); // get class name of the panel
    		if (panelName[0] == 'O' && panelName[7] == 'P') { // found this bit on pastebin, it works
    			OverlayPopupPanel = vguiPanel; // set the value of OverlayPopupPanel
    		}
    	}
    	if (vguiPanel == OverlayPopupPanel) { // check if our vguipanel is overlaypopuppanel
    		try { // incase gmod has a sperg attack
    			if (pointers._engine->IsInGame()) { // check if u are in the game (fully connected to a server and not loading and active in the game)
    				// draw stuff
    			}
    		} catch(...) { // incase gmod has a sperg attack
    
    		}
    
    	}
    }
    i posted some vmt hook class a while ago just look for it
    use the isurface library to draw with this where i commented
    d e a d b o y s
    Quote Originally Posted by Dave84311 View Post
    What do you call a troll with shitty jokes?
    Trollaux
    Quote Originally Posted by Kyeran View Post
    Foot job with lots of oil.
    Quote Originally Posted by Kyeran View Post
    If she's 12, I'm 12.

  2. The Following 2 Users Say Thank You to Trollaux For This Useful Post:

    Margen67 (11-01-2014),z346etn56jzd7egth (10-21-2014)

  3. #2
    D3M0L1T10N's Avatar
    Join Date
    May 2012
    Gender
    male
    Posts
    1,364
    Reputation
    19
    Thanks
    656
    or use your own drawing functions?

  4. The Following User Says Thank You to D3M0L1T10N For This Useful Post:

    Color (10-22-2014)

  5. #3
    MeepDarknessMeep's Avatar
    Join Date
    Aug 2012
    Gender
    female
    Posts
    725
    Reputation
    22
    Thanks
    922
    This would work, but be sure to actually define the OverlayPopupPanel. It's good coding practice.

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

    Trollaux (10-22-2014)

  7. #4
    Trollaux's Avatar
    Join Date
    Nov 2011
    Gender
    male
    Posts
    2,074
    Reputation
    137
    Thanks
    792
    Quote Originally Posted by MeepDarknessMeep View Post
    This would work, but be sure to actually define the OverlayPopupPanel. It's good coding practice.
    Just some copypasta for beginners
    d e a d b o y s
    Quote Originally Posted by Dave84311 View Post
    What do you call a troll with shitty jokes?
    Trollaux
    Quote Originally Posted by Kyeran View Post
    Foot job with lots of oil.
    Quote Originally Posted by Kyeran View Post
    If she's 12, I'm 12.

  8. #5
    gayguy911's Avatar
    Join Date
    Nov 2011
    Gender
    male
    Location
    Uranus
    Posts
    133
    Reputation
    10
    Thanks
    378
    My Mood
    Angelic
    Good job, though this should work without 'try'.

    Edit:
    Good job on getting minion.
    Last edited by gayguy911; 10-22-2014 at 03:29 PM.

  9. #6
    Trollaux's Avatar
    Join Date
    Nov 2011
    Gender
    male
    Posts
    2,074
    Reputation
    137
    Thanks
    792
    Quote Originally Posted by gayguy911 View Post
    Good job, though this should work without 'try'.
    it most likely would
    but its just incase
    d e a d b o y s
    Quote Originally Posted by Dave84311 View Post
    What do you call a troll with shitty jokes?
    Trollaux
    Quote Originally Posted by Kyeran View Post
    Foot job with lots of oil.
    Quote Originally Posted by Kyeran View Post
    If she's 12, I'm 12.

  10. #7
    MeepDarknessMeep's Avatar
    Join Date
    Aug 2012
    Gender
    female
    Posts
    725
    Reputation
    22
    Thanks
    922
    also, instead of using the useless DWORD dwEDX you can just make that argument a void pointer with no name.

  11. #8
    gayguy911's Avatar
    Join Date
    Nov 2011
    Gender
    male
    Location
    Uranus
    Posts
    133
    Reputation
    10
    Thanks
    378
    My Mood
    Angelic
    Quote Originally Posted by MeepDarknessMeep View Post
    also, instead of using the useless DWORD dwEDX you can just make that argument a void pointer with no name.
    ^

    Also, you can use:
    Code:
    void __fastcall hkPaintTraverse(void* thisptr, void* EDX, unsigned int vguiPanel, bool forceRepaint, bool allowForce)
    It works for me.

  12. #9
    ExiledStyles's Avatar
    Join Date
    Jan 2014
    Gender
    male
    Posts
    104
    Reputation
    10
    Thanks
    66
    fag dont delete my post, you're supposed to grab the interface for IEngineVGui, so you can draw before the original PaintTraverse is called
    i think you can figure out what func to use

  13. #10
    Trollaux's Avatar
    Join Date
    Nov 2011
    Gender
    male
    Posts
    2,074
    Reputation
    137
    Thanks
    792
    Quote Originally Posted by gayguy911 View Post
    ^

    Also, you can use:
    Code:
    void __fastcall hkPaintTraverse(void* thisptr, void* EDX, unsigned int vguiPanel, bool forceRepaint, bool allowForce)
    It works for me.
    VPANEL is better than unsigned int
    because vguiPanel isnt a unsigned int its a VPANEL
    d e a d b o y s
    Quote Originally Posted by Dave84311 View Post
    What do you call a troll with shitty jokes?
    Trollaux
    Quote Originally Posted by Kyeran View Post
    Foot job with lots of oil.
    Quote Originally Posted by Kyeran View Post
    If she's 12, I'm 12.

  14. #11
    ExiledStyles's Avatar
    Join Date
    Jan 2014
    Gender
    male
    Posts
    104
    Reputation
    10
    Thanks
    66
    uh huh
    namespace vgui
    {
    // handle to an internal vgui panel
    // this is the only handle to a panel that is valid across dll boundaries
    typedef unsigned int VPANEL;

    // handles to vgui objects
    // NULL values signify an invalid value
    typedef unsigned long HScheme;
    typedef unsigned long HTexture;
    typedef unsigned long HCursor;
    typedef unsigned long HPanel;
    const HPanel INVALID_PANEL = 0xffffffff;
    typedef unsigned long HFont;
    const HFont INVALID_FONT = 0; // the value of an invalid font handle
    }

  15. The Following User Says Thank You to ExiledStyles For This Useful Post:

    LordOfGears2 (11-20-2014)

  16. #12
    ehex's Avatar
    Join Date
    Dec 2011
    Gender
    male
    Posts
    150
    Reputation
    22
    Thanks
    555
    use __stdcall to be a pro fuck that other useless shit

  17. The Following 2 Users Say Thank You to ehex For This Useful Post:

    gayguy911 (10-24-2014),Trollaux (10-24-2014)

  18. #13
    MeepDarknessMeep's Avatar
    Join Date
    Aug 2012
    Gender
    female
    Posts
    725
    Reputation
    22
    Thanks
    922
    Quote Originally Posted by ExiledStyles View Post
    uh huh
    namespace vgui
    {
    // handle to an internal vgui panel
    // this is the only handle to a panel that is valid across dll boundaries
    typedef unsigned int VPANEL;

    // handles to vgui objects
    // NULL values signify an invalid value
    typedef unsigned long HScheme;
    typedef unsigned long HTexture;
    typedef unsigned long HCursor;
    typedef unsigned long HPanel;
    const HPanel INVALID_PANEL = 0xffffffff;
    typedef unsigned long HFont;
    const HFont INVALID_FONT = 0; // the value of an invalid font handle
    }

    it's not an unsigned int

  19. #14
    TheyCallMeDaz's Avatar
    Join Date
    May 2013
    Gender
    female
    Location
    Ukraine
    Posts
    367
    Reputation
    58
    Thanks
    279
    My Mood
    Yeehaw
    You can use unsigned int instead of VPANEL, it doesn't make any difference.

    You also don't have to actually check if you're in-game to use painttraverse because afaik it's called in the menu anyway. You can draw your menu in the game's menu by using OPP.

  20. #15
    Trollaux's Avatar
    Join Date
    Nov 2011
    Gender
    male
    Posts
    2,074
    Reputation
    137
    Thanks
    792
    Quote Originally Posted by TheyCallMeDaz View Post
    You can use unsigned int instead of VPANEL, it doesn't make any difference.

    You also don't have to actually check if you're in-game to use painttraverse because afaik it's called in the menu anyway. You can draw your menu in the game's menu by using OPP.
    it doesnt make any difference i dont know why everyone has to fight about a fucking argument

    if someone wants to actually use this then they should be capable of making an else statement so they can draw in the menu
    d e a d b o y s
    Quote Originally Posted by Dave84311 View Post
    What do you call a troll with shitty jokes?
    Trollaux
    Quote Originally Posted by Kyeran View Post
    Foot job with lots of oil.
    Quote Originally Posted by Kyeran View Post
    If she's 12, I'm 12.

Page 1 of 2 12 LastLast

Similar Threads

  1. WR D3D Hook - =o - 03/22/07
    By Dave84311 in forum Hack/Release News
    Replies: 14
    Last Post: 10-06-2007, 09:59 AM
  2. tut How to hook tut 6
    By llvengancell in forum WarRock - International Hacks
    Replies: 1
    Last Post: 06-26-2007, 03:24 PM
  3. D3D hooking tutorial 5 i think
    By llvengancell in forum WarRock - International Hacks
    Replies: 7
    Last Post: 06-26-2007, 03:09 PM
  4. How can i hook the punkbuster?
    By TheRedEye in forum WarRock - International Hacks
    Replies: 5
    Last Post: 05-27-2007, 12:34 PM
  5. New Hacks Announced & Warrock DX Hook Update
    By Dave84311 in forum Hack/Release News
    Replies: 17
    Last Post: 03-02-2007, 03:54 PM