PDA

View Full Version : April 15th Update Changes



ileekor
04-21-2011, 11:41 AM
What changes would I have to make to s0beit's basehook on April 15th Source engine update?
I already moved the CreateMove to 21 and added 2 unknown functions but the game still crashes.

Gumble
04-21-2011, 11:52 AM
oh boy, I dunno about the method s0beit uses. Maybe some sigs are outdates, or you use some NetChannel functions. more information pls

ileekor
04-21-2011, 11:57 AM
Okay, even simpler question. I decided to start my own hook, but I'm utter newbie at this - never even created a cheat before.

can you tell me what's wrong with my code? It crashes everytime i inject.

IGameConsole.h

#include "interface.h"

#pragma once
class IGameConsole : public IBaseInterface
{
public:
virtual void Show() = 0;
virtual void Init() = 0;
virtual void Hide() = 0;
virtual void Clear() = 0;
virtual bool IsShown() = 0;

// ???
virtual void UnknownA() = 0;
virtual void UnknownB() = 0;
};

#define GAMECONSOLE_INTERFACE_VERSION "GameConsole004"

SDK.h

#pragma once

#include <windows.h>
#include "tier0/dbg.h"
#undef CreateThread
#include "interface.h"

#include "IGameConsole.h"

main.cpp

#include "SDK.h"

IGameConsole *g_pIGameConsole=NULL;

void MainThread(void)
{
HMODULE hClient = NULL;
// Wait for the process to load its client.dll, which we'll use for fun.
while(hClient == NULL)
{
hClient = GetModuleHandle("client.dll");
Sleep(100);
}

while(!GetModuleHandle("GameUI.dll") && !GetModuleHandle("engine.dll"))
{
Sleep(100);
}


CreateInterfaceFn ConCreateInterface = (CreateInterfaceFn)GetProcAddress(GetModuleHandle("GameUI.dll"), "CreateInterface");
g_pIGameConsole = (IGameConsole *)ConCreateInterface(GAMECONSOLE_INTERFACE_VERSION, NULL);
if (g_pIGameConsole == NULL) return;
if (g_pIGameConsole->IsShown() == false)
{
g_pIGameConsole->Show();
ConMsg(0, "Hooked!");
}




}

BOOL WINAPI DllMain( HINSTANCE hinstDLL, DWORD dwReason, LPVOID lpReserved )
{
if( dwReason == DLL_PROCESS_ATTACH )
{
CreateThread( NULL, NULL, (LPTHREAD_START_ROUTINE)MainThread, NULL, NULL, NULL);
}
return TRUE;
}

and anyone experienced with source engine hooking please add me to your steam friends list, my id is sciart4885

ileekor
04-21-2011, 02:40 PM
nevermind I were super stupid

freax
04-21-2011, 02:53 PM
Anyway, there's no need to use such a fault-prone reconstructed class. Just use console commands and execute them ("toggleconsole", "cl_showconsole")

ileekor
04-21-2011, 09:39 PM
yeah thats a good idea :)
I was following a tutorial :)