Results 1 to 3 of 3
  1. #1
    Hahaz's Avatar
    Join Date
    Sep 2008
    Gender
    male
    Location
    Matrix World
    Posts
    1,170
    Reputation
    64
    Thanks
    4,083
    My Mood
    Bored

    [Help] Still DC at login Screen

    Base.cpp i use, credits: gellin

    Code:
    #include "base.h"
    #include "Defines.h"
    
    cBase Base;
    CDetour m_dPresent, m_dReset;
    
    bool cBase::IsGameReadyForHook(void)
    {
        if( GetModuleHandle( "d3d9.dll"     ) != NULL 
         && GetModuleHandle( "ClientFX.fxd" ) != NULL 
         && GetModuleHandle( "CShell.dll"   ) != NULL )
            return true;
    
        return false;
    }
    
    void __cdecl cBase::PushToConsole( const char* szCommand )
    {
    	DWORD *LTClient = ( DWORD* )( 0x377EFBD8 );
    	void* CONoff = ( void* )*( DWORD* )( *LTClient + 0x208 );
     
    	__asm
    	{
    		push szCommand;
    		call CONoff;
    		add esp, 4;
    	}
    }	
    
    typedef HRESULT ( WINAPI* oReset )( LPDIRECT3DDEVICE9 pDevice, D3DPRESENT_PARAMETERS* pPresentationParameters );
    oReset pReset;
    
    HRESULT WINAPI gellReset(LPDIRECT3DDEVICE9 pDevice, D3DPRESENT_PARAMETERS* pPresentationParameters )
    {
    	Base.pFont->OnLostDevice();
    
    	HRESULT hRet = pReset(pDevice, pPresentationParameters);
    
    	Base.pFont->OnResetDevice();
    
    	return hRet;
    }
    
    typedef HRESULT ( WINAPI* oPresent ) ( LPDIRECT3DDEVICE9 pDevice, CONST RECT *pSourceRect, CONST RECT *pDestRect, HWND hDestWindowOverride, CONST RGNDATA *pDirtyRegion);
    oPresent pPresent;
    
    HRESULT WINAPI gellPresent(LPDIRECT3DDEVICE9 pDevice, CONST RECT *pSourceRect, CONST RECT *pDestRect, HWND hDestWindowOverride, CONST RGNDATA *pDirtyRegion)
    {		
    	if( !Base.bSet.bInit )
    	{
    		D3DXCreateFont(pDevice, 15, 0, FW_BOLD, 1, 0, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH | FF_DONTCARE, "Arial", &Base.pFont);
    		Base.bSet.bInit = true;
    	}
    
    	Base.GetInput();
    
    		//Fly Hack 
    	if( GetAsyncKeyState(FlyKey) < 0)
    		Base.PushToConsole("PlayerGravity 800");
    	else
    		Base.PushToConsole("PlayerGravity -800");
    
    	if( Base.pFont == NULL )
    		D3DXCreateFont(pDevice, 15, 0, FW_BOLD, 1, 0, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH | FF_DONTCARE, "Arial", &Base.pFont);
    	else
    		RenderClass.DrawString(10, 10, D3DCOLOR_ARGB(255, 255, 0, 0), Base.pFont, "FU CA by Gellin For Delta-h And UC Forums ");
    
    	return pPresent(pDevice, pSourceRect, pDestRect, hDestWindowOverride, pDirtyRegion);
    }
    
    void cBase::GetInput(void)
    {
    	if(GetAsyncKeyState(BoxKey)&1)
    		this->bSet****oxes =! this->bSet****oxes;
    
    	if(GetAsyncKeyState(NoFogKey)&1)
    		this->bSet.bNoFog =! this->bSet.bNoFog;
    
    	if(GetAsyncKeyState(TracerKey)&1)
    		this->bSet.bTracers =! this->bSet.bTracers;
    }
    
    void cBase::UpdateConsole(void)
    {
    	while(1)
    	{
    		if( this->bSet****oxes )//3d BoxEsp
    			this->PushToConsole("ModelDebug_DrawBoxes 1");
    		else
    			this->PushToConsole("ModelDebug_DrawBoxes 0");
    
    		if( this->bSet.bNoFog )//No Fog
    			this->PushToConsole("FogEnable 0");
    		else
    			this->PushToConsole("FogEnable 1");
    
    		if( this->bSet.bTracers )//Tracers ( annoying )
    			this->PushToConsole("ShowFirePath 1");
    		else
    			this->PushToConsole("ShowFirePath 0");
    
    		if( this->bSet.bWindowed )//Windowed Defualt ON
    			this->PushToConsole("windowed 1");
    		else
    			this->PushToConsole("windowed 0");
    
    		Sleep(250);
    		//4x per second seems better than every frame so dont ask.
    	}
    }
    
    DWORD cBase::GetPointer(int index)
    {
    	DWORD* devicePtr = ***(DWORD****)0x7E4CE0;
    
    	if( devicePtr == NULL ) 
    		return 0;
    
    	return devicePtr[index];
    }
    
    void cBase::Hook(void)
    {
    	this->bSet.m_dwReset	= this->GetPointer(16);
    	this->bSet.m_dwPresent = this->GetPointer(17);
    
        pReset = (oReset)m_dReset.Create(( BYTE* )this->bSet.m_dwReset, ( BYTE* )gellReset, DETOUR_TYPE_JMP );	
        pPresent = (oPresent)m_dPresent.Create(( BYTE* )this->bSet.m_dwPresent, ( BYTE* )gellPresent, DETOUR_TYPE_JMP );	
    }
    
    DWORD WINAPI dwMainThread(LPVOID)
    {
    	while ( !Base.IsGameReadyForHook() )
    		Sleep(500);
    
    	Base.Hook();
    
    	return 0;
    }
    	
    DWORD WINAPI dwHackThread(LPVOID)
    {
    	while( !Base.IsGameReadyForHook() )
    		Sleep(500);
    
    	Base.UpdateConsole();
    
    	return 0;
    }
    
    BOOL WINAPI DllMain ( HMODULE hDll, DWORD dwReason, LPVOID lpReserved )
    {
    	DisableThreadLibraryCalls(hDll);
    
    	if ( dwReason == DLL_PROCESS_ATTACH )
    	{
    		CreateThread(NULL, NULL, dwMainThread, NULL, NULL, NULL);
    		CreateThread(NULL, NULL, dwHackThread, NULL, NULL, NULL);
    	}
    	return TRUE;
    }
    After compiled it as .dll & injected it, it dc me at login screen, how to fix it? I need some guide so i can fix it in future.

    or the problem isn't at base.cpp ?

    If anyone can help me i 'll appreciate... , all i want is to have my own menu shows in combat arms (it will make me happy xD) & i'll figure out adding the addies & rest later.

  2. #2
    whit's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Posts
    7,170
    Reputation
    490
    Thanks
    2,252
    Your base isnt uptodate
    you gotta up date the detour

  3. The Following User Says Thank You to whit For This Useful Post:

    zmansquared (07-10-2010)

  4. #3
    zmansquared's Avatar
    Join Date
    Oct 2008
    Gender
    male
    Location
    Kickin it at Microsoft
    Posts
    2,088
    Reputation
    36
    Thanks
    221
    My Mood
    Cheerful
    yep, whit knows what he is talking bout

    Need Help With Coding or Something??? MSN me
    zmansquared@hotmail.com


    I am the one and only Microsoft Fag!!!

    Quote:
    Originally Posted by Arhk
    All games should be hacked, if we don't do it someone else will. Hackers force the progress, of better programming methods.
    ~


    Take this Pic everyone!



    next-

Similar Threads

  1. [Solved] Login Screen Mod Help
    By sasuke123 in forum CrossFire Help
    Replies: 2
    Last Post: 10-30-2011, 02:28 PM
  2. [Request] Help Me Make This Login Screen..
    By sen123 in forum CrossFire Mods & Rez Modding
    Replies: 2
    Last Post: 12-10-2010, 01:21 PM
  3. [HELP] how to mod login screen
    By nehebka in forum Combat Arms Mod Discussion
    Replies: 6
    Last Post: 05-26-2010, 11:12 AM
  4. [Help] Help on login screen? plz
    By kunpao in forum CrossFire Mods & Rez Modding
    Replies: 2
    Last Post: 03-02-2010, 11:07 PM
  5. [Help] Need help How crate login screen???
    By ignas2297 in forum CrossFire Mods & Rez Modding
    Replies: 5
    Last Post: 01-29-2010, 03:16 PM