Thread: Unlimited Ammo

Results 1 to 4 of 4
  1. #1
    Mathix's Avatar
    Join Date
    Jun 2013
    Gender
    male
    Posts
    2
    Reputation
    10
    Thanks
    0

    Unlimited Ammo

    Hello. I'm in the process of creating a unlimited ammo hack which currently looks like this:

    Code:
    using System;
    using System.Collections.Generic;
    using System.Runtime.InteropServices;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Linq;
    using System.Text;
    using System.Threading;
    using System.Threading.Tasks;
    using System.Windows.Forms;
    using System.Diagnostics;
    using Magic;
    
    namespace CSSUtilities
    {
        public partial class Form1 : Form
        {
            public Form1()
            {
                InitializeComponent();
            }
    
            UInt32 AmmoEnabled;
    
            private void CheckAmmo(BlackMagic process, IntPtr BaseAddress)
            {
                byte ammo = process.ReadByte(0x17E1);
                label1.Text = "Ammo: "+ammo;
    
                if (ammo < 100)
                    FillAmmo(process, BaseAddress);
            }
    
            private void FillAmmo(BlackMagic process, IntPtr BaseAddress)
            {
                UInt32 Ammo = (UInt32)BaseAddress + 0x17E1;
                process.WriteByte(Ammo, 200);
                //CheckAmmo(process, BaseAddress);
            }
    
            private void EnableUnlimitedAmmo(BlackMagic process, IntPtr BaseAddress)
            {
                FillAmmo(process, BaseAddress);
            }
    
            private void button1_Click(object sender, EventArgs e)
            {
                var cssProc = (from Process p in Process.GetProcesses() where p.MainWindowTitle.Contains("Counter-Strike Source") select p.Id).FirstOrDefault();
                BlackMagic css = new BlackMagic();
                css.OpenProcessAndThread(cssProc);
                IntPtr BaseCSS = css.MainModule.BaseAddress;
                EnableUnlimitedAmmo(css, BaseCSS);
            }
        }
    }

    The problem with my hack is when I click button one, nothing happens! I'm pretty sure it's the right address as you can see on the picture below


    Can anyone please help me? :-) Would be much appreciated.

  2. #2
    atom0s's Avatar
    Join Date
    May 2013
    Gender
    male
    Posts
    403
    Reputation
    139
    Thanks
    104
    In the screenshot you have Cheat Engine freezing the value, so your code to alter it wont work since CE is going to just keep rewriting the value you told it to freeze with.
    - Gone; this is another shit forum with children as administrators. Not worth contributing to.

  3. #3
    Mathix's Avatar
    Join Date
    Jun 2013
    Gender
    male
    Posts
    2
    Reputation
    10
    Thanks
    0
    Quote Originally Posted by atom0s View Post
    In the screenshot you have Cheat Engine freezing the value, so your code to alter it wont work since CE is going to just keep rewriting the value you told it to freeze with.
    Correct me if I'm wrong: But I don't think that'd be a problem. The address is what I'm looking for here to write bytes to it. I need to know how to write to the address and make it so it checks in-game. :-)

  4. #4
    atom0s's Avatar
    Join Date
    May 2013
    Gender
    male
    Posts
    403
    Reputation
    139
    Thanks
    104
    CheckAmmo doesn't make use of the base address like it should.
    - Gone; this is another shit forum with children as administrators. Not worth contributing to.

Similar Threads

  1. [tut] unlimited ammo
    By crimetime in forum WarRock - International Hacks
    Replies: 39
    Last Post: 06-29-2007, 03:14 PM
  2. [Tutorial] Unlimited Ammo
    By Spoking in forum WarRock - International Hacks
    Replies: 10
    Last Post: 06-02-2007, 09:17 AM
  3. Tutorial of unlimited ammo, and the God Mode
    By Scottsmith in forum WarRock - International Hacks
    Replies: 22
    Last Post: 05-22-2007, 05:16 AM
  4. help unlimited ammo
    By timtomo in forum WarRock - International Hacks
    Replies: 7
    Last Post: 05-06-2007, 11:38 AM
  5. Unlimited Ammo via Cheat Engine?
    By vega in forum WarRock - International Hacks
    Replies: 9
    Last Post: 11-18-2006, 08:59 PM