Results 1 to 7 of 7
  1. #1
    Skaterforeva1's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    Up your ass
    Posts
    936
    Reputation
    32
    Thanks
    485
    My Mood
    Psychedelic

    Basics Of coding

    Ok so i cant figure out what im doing wroung with this code. Please help me
    Code:
    #include <windows.h>
    #define OneNoRecoil 0x37238E99
    #define RECOIL1 0x3746CD60
    #define RECOIL2 0x3745CB99
    #define RECOIL3 0x3746CD74
    #define RECOIL4 0x3746CD77
    #define RECOIL5 0x3746CD80
    bool IsGameReadyForHook()
    {
    if( GetModuleHandleA( "d3d9.dll" ) != NULL
    && GetModuleHandleA( "ClientFX.fxd" ) != NULL
    && GetModuleHandleA( "CShell.dll" ) != NULL )
    return true;
    return false;
    }
    typedef bool (*IsConnected_t)(void);
    
    bool IsIngame()
    {
    DWORD* LTBase = (DWORD*)0x3780CB90;
    IsConnected_t pConnected = *(IsConnected_t*)(*LTBase + 0x8C);
    return pConnected();
    } 
    
    void main()
    {
    while(true)
    {
    bool CH_NoRecoil = false;
    if(GetAsyncKeyState(VK_NUMPAD1)){
    	CH_NoRecoil = true;
    if(CH_NoRecoil && IsIngame())
    {
    memcpy((LPVOID)OneNoRecoil , "\x90\x90\x90\x90", 4);
    Sleep(200);
    }else{
    	int CH_NoRecoil = false;
    if(!IsIngame()){
    memcpy((LPVOID)OneNoRecoil , "\9\x44\x24\x10", 4);
    Sleep(200);
    }
    }
    }
    }
    }
    I am using zik24 addresses and functions im trying to learn but i cant figure out what im doing wroung. I inject it into ca and it says file or archive is corrupt but i know its not that because i can play without hacks

  2. #2
    NOOB's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Posts
    3,843
    Reputation
    425
    Thanks
    8,616

  3. #3
    Skaterforeva1's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    Up your ass
    Posts
    936
    Reputation
    32
    Thanks
    485
    My Mood
    Psychedelic
    well... I thought i was making cookies ooops my bad. Please explain

  4. #4
    Dead 4 Real's Avatar
    Join Date
    Aug 2010
    Gender
    male
    Location
    Canada
    Posts
    336
    Reputation
    11
    Thanks
    83
    My Mood
    Relaxed
    Hmm, well im not a "pro" at this but that wont work, also why not try whit's Combined base v2

    it still works and yea, you just need to update it, and yea.

  5. #5
    whit's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Posts
    7,159
    Reputation
    490
    Thanks
    2,253
    Problem one in this line
    memcpy((LPVOID)OneNoRecoil , "\9\x44\x24\x10", 4);

  6. #6
    Skaterforeva1's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    Up your ass
    Posts
    936
    Reputation
    32
    Thanks
    485
    My Mood
    Psychedelic

    well whats wroung

    Quote Originally Posted by whit View Post
    Problem one in this line
    memcpy((LPVOID)OneNoRecoil , "\9\x44\x24\x10", 4);
    O thanks could you give me some pointers on how to fix it???

  7. #7
    kotentopf's Avatar
    Join Date
    Nov 2009
    Gender
    male
    Posts
    602
    Reputation
    26
    Thanks
    251
    Code:
    void cMisc::HEXMemory(PVOID address, void* val, int bytes)
    {
        DWORD d, ds;
        VirtualProtect(address, bytes, PAGE_EXECUTE_READWRITE, &d);
        memcpy(address, val, bytes);
        VirtualProtect(address,bytes,d,&ds);
    }
    /////////////////////////////////////
    			if(NoRecoil.Enabled && Hack.Readys.IsIngame() && !NoRecoil.Check){
    				Hack.Misc.HEXMemory((void*)Hack.Addresses.Recoil,"\x90\x90\x90\x90",4);
    				NoRecoil.Check = true;
    			}else if(!Hack.Readys.IsIngame() && Hack.Readys.WasIngame || !NoRecoil.Enabled && NoRecoil.Check){
    				Hack.Misc.HEXMemory((void*)Hack.Addresses.Recoil,"\xD9\x44\x24\x10",4);
    				NoRecoil.Check = false;
    			}
    and if it is doing nothing: DLLMain
    The Internet SHOULD Be Illegal

    When you say
    "Java is a great programming language because it works on all platforms"
    it is just like
    "anal sex is great because it works on all genders"

    Are YOU a Troll?

Tags for this Thread