Results 1 to 6 of 6
  1. #1
    phooj's Avatar
    Join Date
    Sep 2010
    Gender
    male
    Location
    .................:::::::::::::::::::::::::|||||||||||||||||||||||||||||||||||||||||||||||!!!!!!!!!!!
    Posts
    75
    Reputation
    7
    Thanks
    3

    Help: HotKey Wont work!

    Everytime i Run my Hotkey as .DLL and inject it it crashes when i enter a game help?



    SOURCE CODE:

    /*Includes*/
    #include <windows.h>
    #include <Winuser.h>
    #include <stdio.h>
    #include <fstream>
    #include <stdio.h>

    /*Hacks*/
    int nofog = 0;
    int showfps = 0;
    int aim = 0;

    /*Don't Change This*/
    int hack[50];//To Reduce Lag

    /*Defines*/
    #define EngLtc 0x485FA0 //Here The Address of Engine LTC
    #define GameStatus 0x377B11B0 //Defining "GameStatus" - Used to check if you're in-game, in lobby, etc etc.

    /*Defining SuperBullets Address*/
    #define SuperBullets 0x373F9C36

    /*Defining WeaponRange Addresses*/
    #define WeaponRange1 0x373FF219
    #define WeaponRange2 0x373FF599

    /*Defining Rapid Fire Address*/
    #define RapidTest 0x373FFC8E

    /*Defining No Recoil Addresses*/
    #define Recoil1 0x3738B890
    #define Recoil2 0x374AAE09
    #define Recoil3 0x3738B8A4
    #define Recoil4 0x3738B8A7


    void __cdecl PassCMD(const char* cCommand)//PassCMDToConsole (PTC) Function
    {
    void* vSetVar = (void*)EngLtc;
    _asm
    {
    Push cCommand
    call vSetVar
    add esp, 4
    }
    }

    bool Memory( void * pDest, char * szPatch, size_t sSize )//Function to modify memory address (NOP)
    {

    DWORD dwOrgProtect = NULL;
    if ( !VirtualProtect ( pDest, sSize, PAGE_EXECUTE_READWRITE, &dwOrgProtect ))
    return FALSE;

    memcpy( pDest, szPatch, sSize );
    VirtualProtect( pDest, sSize, dwOrgProtect, NULL );
    return TRUE;
    }

    /*Reduce Lag*/
    bool doNXChamOnce = true;
    bool doOnce = true;

    //Hacks Below
    void Hack()
    {
    if(*(BYTE*)GameStatus == 1){

    //PTC Hacks Below

    if(GetAsyncKeyState(VK_NUMPAD1) &1) //Just C+P This and change the Key and Hack
    {

    if(doNXChamOnce) //NX Chams
    {
    PassCMD("SkelModelStencil 1");
    doNXChamOnce = false;
    }
    }else{
    PassCMD("SkelModelStencil 0");
    doNXChamOnce = true;
    }

    if(GetAsyncKeyState(VK_NUMPAD2) &1)//No Fog
    {
    if (hack[6] != nofog)
    PassCMD("FogEnable 0");
    hack[6] = nofog;
    } else {
    if (hack[6] != nofog)
    PassCMD("FogEnable 1");
    hack[6] = nofog;
    }

    if(GetAsyncKeyState(VK_NUMPAD3) &1)//Show FPS
    {
    if (hack[8] != showfps)
    PassCMD("ShowFps 1");
    hack[8] = showfps;
    } else {
    if (hack[8] != showfps)
    PassCMD("ShowFps 0");
    hack[8] = showfps;
    }


    if(GetAsyncKeyState(VK_NUMPAD4) &1)//Aim Correction
    {
    if (hack[11] != aim)
    PassCMD("WeaponSway 0.000000" );
    PassCMD("PerturbRotationEffect 0.000000" );
    PassCMD("PerturbIncreaseSpeed 0.000000" );
    PassCMD("PerturbWalkPercent 0.000000" );
    PassCMD("PerturbFiringIncreaseSpeed 0.000000" );
    PassCMD("CamDamage 0" );
    Memory((LPVOID)Recoil1, "\x90\x90\x90", 3);
    Memory((LPVOID)Recoil2, "\x90\x90\x90", 3);
    Memory((LPVOID)Recoil3, "\x90\x90\x90", 3);
    Memory((LPVOID)Recoil4, "\x90\x90\x90", 3);
    hack[11] = aim;

    } else {

    if (hack[11] != aim)
    PassCMD("WeaponSway 1.000000" );
    PassCMD("PerturbRotationEffect 3.000000" );
    PassCMD("PerturbIncreaseSpeed 3.000000" );
    PassCMD("PerturbWalkPercent 0.500000" );
    PassCMD("PerturbFiringIncreaseSpeed 3.000000" );
    PassCMD("CamDamage 1" );
    PassCMD("CamDamagePitch 0");
    PassCMD("CamDamageRoll 0");
    PassCMD("CamDamageTime1 0");
    PassCMD("CamDamageTime2 0");
    PassCMD("CamDamageMinPitchVal 0");
    PassCMD("CamDamageMaxPitchVal 0");
    PassCMD("CamDamageMinRollVal 0");
    PassCMD("CamDamageMaxRollVal 0");
    PassCMD("CamDamagePitchMin 0");
    PassCMD("CamDamageRollMin 0");
    Memory((LPVOID)Recoil1, "\xD8\x66\x58", 3);
    Memory((LPVOID)Recoil2, "\xD9\x46\x54", 3);
    Memory((LPVOID)Recoil3, "\xD9\x5E\x58", 3);
    Memory((LPVOID)Recoil4, "\xD9\x5E\x4C", 3);
    hack[11] = aim;
    }
    }


    //Memory Hacks Below

    if(GetAsyncKeyState(VK_NUMPAD5) &1 && *(BYTE*)GameStatus == 1)//SuperBullets
    {
    Memory((LPVOID)SuperBullets, "\x33\xC0\x90", 3);
    doOnce = false;

    } else {

    Memory((LPVOID)SuperBullets, "\x0F\x94\xC0", 3);
    doOnce = true;
    }


    if (GetAsyncKeyState(VK_NUMPAD6) &1 && *(BYTE*)GameStatus == 1)//Weapon Range
    {
    Memory((LPVOID)WeaponRange1, "\xB8\x00\x00\x00\x10\x90", 6);
    Memory((LPVOID)WeaponRange2, "\xB8\x00\x00\x00\x10\x90", 6);
    doOnce = false;
    }else{
    Memory((LPVOID)WeaponRange1, "\x8B\x80\xC8\x02\x00\x00", 6);
    Memory((LPVOID)WeaponRange2, "\x8B\x80\xC8\x02\x00\x00", 6);
    doOnce = true;
    }

    if(GetAsyncKeyState(VK_NUMPAD7) &1 && *(BYTE*)GameStatus == 1)//Rapid Fire
    {

    Memory((LPVOID)RapidTest, "\x90\x90", 2);
    doOnce = false;

    } else {

    Memory((LPVOID)RapidTest, "\x74\x3E", 2);
    doOnce = true;
    }


    }


    bool IsGameReadyForHook(void)//Checks to see if the game is ready for Hook
    {
    if( GetModuleHandleW( L"CShell.dll" ) != NULL )
    return true;

    return false;
    }

    DWORD WINAPI dwHackThread(LPVOID)
    {
    while( !IsGameReadyForHook() )
    Sleep(100);
    Hack();
    return 0;
    }


    BOOL WINAPI DllMain ( HMODULE hDll, DWORD dwReason, LPVOID lpReserved )
    {
    DisableThreadLibraryCalls(hDll);

    if ( dwReason == DLL_PROCESS_ATTACH )

    MessageBoxA( NULL, "Do you hate PhoojsXProjects" , "", MB_YESNO| MB_ICONWARNING);

    {

    CreateThread(NULL, NULL, dwHackThread, NULL, NULL, NULL);
    }
    return TRUE;

    }


    PLEASE HELP ASAP! '



    NO NO LEEECH PLOX!

  2. #2
    flameswor10's Avatar
    Join Date
    Jul 2009
    Gender
    male
    Posts
    12,528
    Reputation
    981
    Thanks
    10,404
    My Mood
    In Love
    All of your code is virtually wrong in every way...
    No I do not make game hacks anymore, please stop asking.


    Been MPGH Minion: 6 July 2011 - 1 August 2012

  3. #3
    phooj's Avatar
    Join Date
    Sep 2010
    Gender
    male
    Location
    .................:::::::::::::::::::::::::|||||||||||||||||||||||||||||||||||||||||||||||!!!!!!!!!!!
    Posts
    75
    Reputation
    7
    Thanks
    3
    can you find me a C++ fixer please thanks <3

  4. #4
    FailHacker's Avatar
    Join Date
    Sep 2010
    Gender
    male
    Posts
    444
    Reputation
    8
    Thanks
    49
    did u really c+p this code, then create a new thread asking someone to fix the errors! /fp
    Legen...wait for it...dary







  5. The Following User Says Thank You to FailHacker For This Useful Post:

    [MPGH]flameswor10 (08-06-2011)

  6. #5
    kibbles18's Avatar
    Join Date
    Oct 2008
    Gender
    male
    Location
    US
    Posts
    860
    Reputation
    5
    Thanks
    124
    Lol 50 int array reduces lag? Wtf
    @phooj You must hook a d3d function and make the calls in that
    Last edited by kibbles18; 08-06-2011 at 05:33 PM.

  7. #6
    flameswor10's Avatar
    Join Date
    Jul 2009
    Gender
    male
    Posts
    12,528
    Reputation
    981
    Thanks
    10,404
    My Mood
    In Love
    Quote Originally Posted by FailHacker View Post
    did u really c+p this code, then create a new thread asking someone to fix the errors! /fp
    Actually, it's more like

    Code:
    did u really c+p this code, then create a new thread asking someone to fix the errors and then tell everyone not to leach
    No I do not make game hacks anymore, please stop asking.


    Been MPGH Minion: 6 July 2011 - 1 August 2012

  8. The Following User Says Thank You to flameswor10 For This Useful Post:

    FailHacker (08-06-2011)

Similar Threads

  1. [Help Request] CROSSFIRE BYPASS WONT WORK (HELP)
    By colbol9 in forum CrossFire Help
    Replies: 2
    Last Post: 08-03-2011, 03:29 PM
  2. need help hacks wont work in game
    By solomonjo0 in forum CrossFire Help
    Replies: 14
    Last Post: 07-12-2011, 12:25 PM
  3. HELP! Modloader wont work.
    By zanskrila in forum Call of Duty Modern Warfare 2 Help
    Replies: 18
    Last Post: 08-24-2010, 09:05 AM
  4. help ca wont work
    By pepsi233 in forum Combat Arms Help
    Replies: 2
    Last Post: 11-13-2009, 08:33 AM
  5. HELP, plz the crozfire hack wont work
    By booyah990 in forum CrossFire Hacks & Cheats
    Replies: 9
    Last Post: 06-02-2009, 08:51 PM