Results 1 to 2 of 2
  1. #1
    ITFlyZ's Avatar
    Join Date
    Mar 2013
    Gender
    male
    Posts
    3
    Reputation
    10
    Thanks
    0

    HUD disappears after No Recoil use

    Hi guys,

    Im coding an hack in c# for black ops 2...

    But everytime i use my norecoil

    (Which sets Address: 0x004AF442 to 117)

    my hud disappears.

    Here is my code:
    Code:
    [Flags]
            public enum ProcessAccessFlags : uint
            {
                All = 0x001F0FFF,
                Terminate = 0x00000001,
                CreateThread = 0x00000002,
                VMOperation = 0x00000008,
                VMRead = 0x00000010,
                VMWrite = 0x00000020,
                DupHandle = 0x00000040,
                SetInformation = 0x00000200,
                QueryInformation = 0x00000400,
                Synchronize = 0x00100000
            }
    
            [DllImport("kernel32.dll")]
            private static extern IntPtr OpenProcess(ProcessAccessFlags dwDesiredAccess, [MarshalAs(UnmanagedType.Bool)] bool bInheritHandle, int dwProcessId);
    
            [DllImport("kernel32.dll", SetLastError = true)]
            private static extern bool WriteProcessMemory(IntPtr hProcess, IntPtr lpBaseAddress, byte[] lpBuffer, uint nSize, out int lpNumberOfBytesWritten);
    
            [DllImport("kernel32.dll", SetLastError = true)]
            static extern bool ReadProcessMemory(IntPtr hProcess, IntPtr lpBaseAddress, [Out] byte[] lpBuffer, int dwSize, out int lpNumberOfBytesRead);
    
            [DllImport("kernel32.dll")]
            public static extern Int32 CloseHandle(IntPtr hProcess);
    
            public static bool WriteMemory(Process process, int address, long value, out int bytesWritten)
            {
                IntPtr hProc = OpenProcess(ProcessAccessFlags.All, false, process.Id);
    
                byte[] val = BitConverter.GetBytes(value);
                
                bool worked = WriteProcessMemory(hProc, new IntPtr(address), val, (UInt32)val.LongLength, out bytesWritten);
    
                CloseHandle(hProc);
    
                return worked;
            }
    
            public Form1()
            {
                InitializeComponent();
    
            }
    
            private void Form1_Load(object sender, EventArgs e)
            {
    
            }
    
            private void button1_Click(object sender, EventArgs e)
            {
                Process process = Process.GetProcessesByName("t6mp").FirstOrDefault();
                // No Recoil
                
                int bytesWritten;
                bool worked = WriteMemory(process, 0x004AF442, 117, out bytesWritten);
            }
    Is there something i did wrong?

    (sry 4 bad english)

  2. #2
    Vamphilim's Avatar
    Join Date
    Apr 2015
    Gender
    female
    Location
    Amsterdam
    Posts
    19
    Reputation
    10
    Thanks
    5
    My Mood
    Angelic
    I did it like this:

    Memory.WriteInteger("t6mp", ADDRESS, 1, 4)

    Memory is my Module where I wrote the code for Reading/Writing Memory, WriteIntenger is a Command for it. "t6mp" means the game. At address use your address, and 1 means the Value, it can be any other value too! 4 means it writes a 4-Byte!
    Hope I could help you! :3

Similar Threads

  1. [Solved] Crossfire won't load after trying to use bypass
    By SirKinky in forum CrossFire Help
    Replies: 8
    Last Post: 08-18-2011, 03:12 PM
  2. [HELP] All menus for CAEU disappears after 30 seconds!
    By jd96 in forum Combat Arms EU Help
    Replies: 9
    Last Post: 09-27-2010, 11:01 AM
  3. Fix to menu hacks from disappearing after 1 game
    By machuhoya in forum Combat Arms Discussions
    Replies: 4
    Last Post: 06-27-2010, 05:58 AM
  4. [Info] Would you guys be interested in a no recoil/use it?
    By zmansquared in forum Combat Arms Hacks & Cheats
    Replies: 32
    Last Post: 11-24-2009, 01:45 AM
  5. [Help] CA cant start anymore, after tried to use hack! (Picture)
    By Noxit in forum Combat Arms Europe Hacks
    Replies: 18
    Last Post: 08-07-2009, 09:38 AM