I'm trying to figure out how to explain, knowing the basics is a good start. However, to get anywhere with the snippet you have to know what it is and what you need to do to understand it.
The value of it is not the specific code itself, it's the idea. But, in fact you may not even have to know any programming to implement this. However, you absolutely have to know how to use memory scanners like Cheat Engine and programs like Trainer Maker Kit. A tool maker called L. Spiro had a promising project going on, but I never saw what came out of it:
http://memoryhacking.com/download.phpCould be worth a check, but Cheat Engine and TMK are definitely beginner friendly. That's the first step.
After that you need to know how to make a basic hack like Unlimited Ammo. It's a good exercise and is where everyone starts. Once you have managed to do that, you will know the answer to your question.