Find local player

In order to make a cheat, you need to find the addresses of variables that you want to use. For example health or ammo.
We are going to use Cheat Engine in order to find the local player object, and thanks to this local player, we are going to be able to access to other variables related to the local player with offset use.

After you have attached Cheat Engine process to your game (Assault Cube in this example) we are going to launch a game and scan for health value (100).
Then, decrease your health in game (with grenade or falling) and scan the new health value in Cheat Engine.
Depending on your game version, you can end up with two address with the same value, take both of them and add them in your address list.

Then, right click on one of your address and select “Find out what accesses to this address”, you are going to see something like that :
The two instruction that we see are just for display purpose (this is why the count is so big (every tick)), now we are going to take damage so a new instruction will be displayed
We can see here that the instruction MOV[edx+000000F8],eax is triggered. So, we want to take edx address because this is the local player address (0xF8 is the offset for health).
Now, add an address manually and give it the address of edx (0x00EFA3C8 here).
The next step is to find the static address of the local player, in Cheat Engine there is static address (they are not going to change if you restart the game) and dynamic address (every time you restart the game, the address is going to change)

Ok so now you are going to click on Memory View->Tools->Dissect Data/Structures
In the group 1, paste the local player address (0x00EFA3C8 for me) and click on structure->define new structure and give it the name you want. After that, click on structure options and autoguess offset types, just press enter if something is asked. You should have something like that
This is the offsets of your local player address. Sometimes, the type of the value is wrong, but you can edit it. Ok, so we should be able to find our health value, remember, we found EDX+000000F8, the offset should be F8, if we search it in the structure dissect
we found it.
Let’s say we want to have a static address for the rifle ammunition, first, we need to find the offset of it. Thanks to the structure dissect, it’s easy, you can scroll and search for the value of your ammunition, change the value and see if it works.
Ok, so the rifle ammunition is at offset 0x0150. Now, we want to find the static address for our local player.
Take the address of your current local player and scan for it on Cheat Engine (you need to check Hex)
We can see 3 address in green (static), we are almost done, we can take both of these 3 addresses and test them.

If you double click on one of your address, you can see that it is composed of an .exe + a number
This is because it takes the base address of the module (ac_client.exe) and it adds an offset that will point to the local player. Copy this address.
Add a new address manually and check “Pointer”, paste the address and add the offset for the rifle ammo (0x0150 that we found earlier)
Now, we have an address that is going to point on rifle ammo everytime we restart the game, we can try, restart your game and attach the process again on Cheat Engine (keep the table).
We can see that the value of our rifle ammo is correct and we can modify it and it should work !

Congratulation ! You just found a way to always found and point to the local player even if the game restart.