google-site-verification: googlebaca44933768a824.html Engine Chams - Old Royal Hack Forum

Announcement

Collapse
No announcement yet.

Engine Chams

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Engine Chams

    I've got a little problem with engine chams.
    If I start CS:S and join/create a server, everything works fine. But as soon as I leave the server and join/create another one, CS:S crashes.
    Does anybody have a solution for this?

    ?dit:
    I setup the hook in HudUpdate, whether it's necessary or not.
    Code:
    if(g_pModelRender)
    		{
    			gDrawModelEx.Hook((DWORD)&new_DrawModelEx,(PDWORD)g_pModelRender,19);
    			_log->con("DrawModelEx Hooked: 0x%.8X",gDrawModelEx.FunctionAddress());
    		}

    #2
    Originally posted by iHakk
    I've got a little problem with engine chams.
    If I start CS:S and join/create a server, everything works fine. But as soon as I leave the server and join/create another one, CS:S crashes.
    Does anybody have a solution for this?

    ?dit:
    I setup the hook in HudUpdate, whether it's necessary or not.
    Code:
    if(g_pModelRender)
            {
                gDrawModelEx.Hook((DWORD)&new_DrawModelEx,(PDWORD)g_pModelRender,19);
                _log->con("DrawModelEx Hooked: 0x%.8X",gDrawModelEx.FunctionAddress());
            }
    normally you hook it once and only not on each frame.
    wait for lawgiver or avitamin to reply for more info incase u did it correctly.






    gibs coins @
    1KatP9B8KG7mvcoFhdLGua1isG88nYZE8C

    Comment


      #3
      Exactly, no need to call it every frame. Now you are checking if( g_pModelRender ) and if everything works as should it's true all the time and hook + logging get's called all the time. You should call it at your main hooking function (the one that is one parameter of CreateThread in DLLMain ).

      What i mean:

      Code:
      DWORD WINAPI Hookenz( LPVOID lpArgs )
      {
         // do stuff
         gDrawModelEx.Hook((DWORD)&new_DrawModelEx,(PDWORD)g_pModelRender,19);
      }
      
      DLLMain:
      
      CreateThread( NULL, NULL, (LPTHREAD_START_ROUTINE)&Hookenz , NULL, NULL, NULL);
      Last edited by mencore; 09-09-2009, 09:16 AM.
      lolmaoman: Germans are born with a lifetime x22 login engraved into their birth certificates. True story.
      I DONT HAVE TEAMVIEWER AND IM NOT GOING TO GIVE ANY 24/7 ONLINE SUPPORT VIA STEAM, XFIRE OR OTHER IM PROGRAMS SO DONT BOTHER ASKING. THANKS.

      Comment


        #4
        I call it in HudUpdate only once, like the console output so I can check all functions have been hooked correctly.

        Code:
        #define DO_ONCE( func )\
        	static bool once= false;\
        	if( once == false ) \
        {\
        	once = true;\
        	func\
        }
        so all functions are just called once when everything is initialized.

        €dit:
        I thought about that what mencore said and created a class for hooking a function with another class (if I said it right) and hook DrawModelEx where I hook g_pModelRender:
        Code:
        . . .
        	{
        		g_pModelRender = (IVModelRender*)EngineFactory(VENGINE_HUDMODEL_INTERFACE_VERSION, NULL);//VENGINE_HUDMODEL_INTERFACE_VERSION
        		_log->con( "g_pModelRender: [0x%.8X]", (DWORD)g_pModelRender);	
        		hook.DrawModelX.Hook((DWORD)&new_DrawModelEx,(PDWORD)g_pModelRender,19);
        		_log->con("DrawModelEx Hooked: 0x%.8X",hook.DrawModelX.FunctionAddress());
        	}
        . . .
        but still crashing when I try to create another server.
        Last edited by iHakk; 09-09-2009, 11:35 AM.

        Comment


          #5
          Uh, why can't you fix things yourself? Debug, it isn't difficult...

          Comment


            #6
            d?j?-vu.
            I just asked if someone does know how to fix it/why the crash appears. It's completely the same code as aVitamin posted, I just changed the offsets to ->GetHealth() and ->GetTeamNumber() because I like the way w/o offsets.

            Comment


              #7
              EDIT: I looked at your source and decided against helping you.
              Last edited by badsta; 09-11-2009, 06:38 PM.

              Comment


                #8
                Originally posted by badsta View Post
                EDIT: I looked at your source and decided against helping you.
                uhm. okay. I didn't know I posted my Source code anywhere.

                Comment


                  #9
                  Well that epically failed, ok I am a retard. But basically what I was going to say was, make sure you only change the materials whilst ingame. Also I believe you only need to edit them once per load.

                  I got you mixed up with somebody else, my bad...

                  Comment


                    #10
                    I can load the textures and apply them on the players.
                    but if I uncomment this

                    Code:
                    //if(g_pTextureGreen->GetMaterialVarFlag(MATERIAL_VAR_IGNOREZ) == FALSE)
                    //	g_pTextureGreen->SetMaterialVarFlag(MATERIAL_VAR_IGNOREZ, TRUE);
                    or
                    Code:
                    pTexture = g_pTextureRed;
                    pWallHackTexture = g_pTextureYellow;
                    //pWallHackTexture->SetMaterialVarFlag(MATERIAL_VAR_IGNOREZ,true);
                    just for example, it instantly crashes. any ideas?

                    Comment

                    Working...
                    X