Jump to content

Instance Variables and Function Pointers


1,260 posts in this topic

Recommended Posts

Posted
Just now, Joka said:

Forward Assault

Function pointers and instance variables. The code is spread out across like three hooked functions and there's like 10 function pointers I'm using

Posted
3 minutes ago, Rippin007 said:

how do you know that health is 0x18, ammo is 0x1c etc..How do u create that dump ??

I added a link to the tool at the very top of the hidden content. Also, this:

public class Player : MonoBehaviour // TypeDefIndex: 5545
{
	// Fields
	private float health; // 0x18
	private int ammo; // 0x1c
  	private float moveSpeed; // 0x20
  	private bool isDead; // 0x24
  	private Player playerLastDamaged; // 0x28
  	private bool mine; // 0x30

	// Methods
	public void .ctor(); // 0x100093720
	private void Awake(); // 0x1000937A0
	private void Update(); // 0x1000938FC
	private void InitPlayer(); // 0x100094000
	private void OnDestroy(); // 0x100094AF0
}

Look at the stuff below "// Fields". The fields are the instance variables of the class. Right next to the name of the instance variable is the address where it will be located in memory along with its object.

private float health; // 0x18 <------ this is the location of health in memory (0x18)
private int ammo; // 0x1c <------ this is the location of ammo in memory (0x1c)

 

4 minutes ago, bbReakMe said:

Thank you so much shmoo!

  Hide contents

shmoo.jpg?cb=e6a1cbfdfa2f3b7c4e74d9a3d66

 

haha np

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...

Important Information

We would like to place cookies on your device to help make this website better. The website cannot give you the best user experience without cookies. You can accept or decline our cookies. You may also adjust your cookie settings. Privacy Policy - Guidelines