More on Accessing Memory [Solved]
Ok, so thanks to Jason and Hassan I understand how to access pointers and stuff in memory. But the problem is I don't know how far to go in some situations. For example I have found the offset of my player's health in assault cube, it is an integer but i tried to access it by this and it didn't work:
I didn't affect the health and it didn't do anything to the gameplay. Then i got the base address of ac_client and then added to that the start of the player struct then the offset like this:
All that did was crash the game.
I don't understand why it's not working so it's hard to fix the problem. Any help is appreciated. Thanks.
Code:
*(int*)(0x4E4DBC(start of player struct) + 0xF4(player health offset)) = 200;
Code:
DWORD base = (DWORD) GetModuleHandleA("ac_client.exe");
*(int*) (base + 0x4E4DBC + 0xF4) = 200;
I don't understand why it's not working so it's hard to fix the problem. Any help is appreciated. Thanks.

your player class fmm. NOPing the ammo calculation is easy though, and if you have godmode on it doesn't matter that the bots have unlimited ammo too 