Results 1 to 2 of 2

Thread: Declare address

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Dec 2011
    Posts
    115

    Declare address

    I am using a source from my friend for my game to change bytes.

    It looks like this

    Code:
    		private void WallHackToggle()
    		{
    			if (WallHack) 
    			{
    				if (oM.OpenProcess(GameProcess) &&
                    oM.Write(0x0084444, new byte[] { 0x74, 0x22 }))             
    				{
    					WallHack = false;
    					hListView.Items[1].BackColor = Color.FromArgb(255, 0, 0);
    				}
    			}
    			else 
    			{
    				if (oM.OpenProcess(GameProcess) &&
                       oM.Write(0x00844444, new byte[] { 0xeb, 0x22 })) 
    				{
    					WallHack = true;
    					hListView.Items[1].BackColor = Color.FromArgb(0, 255, 0);
    				}
    			}
    		}
    what I wont to do is declare the address in this case = 0x0084444 somewhere on top of the page so I do not have to search allways when I update something true the codes. How can I do this?

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    110,296

    Re: Declare address

    You simply declare a 'long' variable (or constant) inside your class but outside any method and assign the value to it. You should probably do the same for those 'byte' values. If you have ever declared a variable before then you already know how to do it because this will be no different. If you don't know how to declare a variable then, as it's about the most basic thing you can do in programming, I'd suggest that you need to work through a beginners tutorial to cover the basics first. This is a good one, which will cover far more than declaring variables:

    http://www.homeandlearn.co.uk/csharp/csharp.html

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width