Solved Regarding Infintie Ammo

Hexui Undetected CSGO Cheats Sinkicheat PUBG Cheat

TheGreatUnknown

Jr.Coder
Full Member
Nobleman
Dec 20, 2012
58
417
1
I've always thought, seeing as how GTA Vice City has tons of guns. Same for SR when I see infinite ammo did the creator have to use every weapon in finds its base etc.
Or did they use data strctures in some forms? I was told it's do to with one an instructions access that address is the main one address holding the value for them all but I have no idea where I would find this. And that there is usually more than one...

Thanks :)
 
Last edited:

Rake

Cesspool Admin
Administrator
Jan 21, 2014
12,118
78,998
2,392
Well I have had two addys and locked one, and it only locks it for the one addy
If I understand you correctly you're using a program like cheat engine to freeze the values in the the ammo addresses that you found. In most games you will have to find the ammo address for each weapon you have in inventory. In most games the address for weapons you have not picked up yet will not be given a space in memory yet so you can't find the values for these weapons until you acquire them.

The method to make unlimited ammo for all weapons would be to find the function that decrements your ammo each time you fire the weapon. In most games all types of weapon ammo will be decremented by the same function. You would want to delete the part of the decrementing function that reduces your ammo count by overwriting the code in memory using NOPs. NOP is essentially the op code that does nothing therefore, rather than decreasing your ammo it will do nothing. You can do this with ollydbg or cheatengine.
 

Simon-Benyo

Jr.Coder
Full Member
Nobleman
Aug 9, 2013
64
1,498
3
In most of games i saw one instruction or two are responsible for ammo decrease so just noping them would do all the work :)
 

TheGreatUnknown

Jr.Coder
Full Member
Nobleman
Dec 20, 2012
58
417
1
Weird I've tried it and it just nops the ammo for that one weapon :/ perhaps I'm missing something? Should I once I've found the base find out what acesses this address to find the instruction for all weapon ammo?
 

TheGreatUnknown

Jr.Coder
Full Member
Nobleman
Dec 20, 2012
58
417
1
Could anyone help me out? I remember in Metro Last Light military rounds i.e money shares the same address as ammunition. It'd be nice to know how I would find out the same address for all weapons for other games. Sorry bit of a noob in olydb :)
 

Simon-Benyo

Jr.Coder
Full Member
Nobleman
Aug 9, 2013
64
1,498
3
Have you compared two different weapons and seen that the instructions differ ,,, cuz that's really weird ,,, cuz i never tried this game since in CS:S its one instruction :)
 

TheGreatUnknown

Jr.Coder
Full Member
Nobleman
Dec 20, 2012
58
417
1
Well I have had two addys and locked one, and it only locks it for the one addy and not both or all guns. What do you mean by instruction btw sorry for being so slow :)
 

TheGreatUnknown

Jr.Coder
Full Member
Nobleman
Dec 20, 2012
58
417
1
I see, basically fill up all possible weapon slots and locate the address and that will effect (with some exceptions) all other weapons I would pick up. As it is sharing the same memory space?
 

Rake

Cesspool Admin
Administrator
Jan 21, 2014
12,118
78,998
2,392
You're on the right track but
You still need to separate these two things in your head:
1)Data values stored in memory addresses
2)Assembly op codes(instructions) or the executable code that you can view in a disassembler/debugger.

You have mentioned 3 different games. Let's talk about the ONE game you need help with and describe your problem using the correct terminology and in detail so we can understand you.
 

TheGreatUnknown

Jr.Coder
Full Member
Nobleman
Dec 20, 2012
58
417
1
Well it's theory at the moment but I would say GTA Vice City, each weapon is stored in a seperate slot. You would find each address for each weapon which would apply to a new one even if you replaced a gun. Sorry for being nooby, trying to understand the basics of trainers so it helps my understanding of memory hacking/modification. I know about opcodes and calls etc just not a lot about ASM.
 

Rake

Cesspool Admin
Administrator
Jan 21, 2014
12,118
78,998
2,392
each weapon is stored in a seperate slot..
Only one way to learn right!

In one game, Find the memory address for the ammo value for each weapon. Are they all different? Then your theory is correct.

What is your end goal here, to write a trainer in C++?
 

TheGreatUnknown

Jr.Coder
Full Member
Nobleman
Dec 20, 2012
58
417
1
In the end yep, or create one using CE. I am always confused when a game has say 50 weapons and assume each weapons ammo address is seperate. Unless of course they are stored in the inventory slot which is the same for all weapons, finding that one weapon for each say 12 slots would mean you would only need to find 12 weapons to fill the slots and find the static/pointers.
Trying to increase my knowledge so I can learn C++ and use CE more effectivly.
 

Rake

Cesspool Admin
Administrator
Jan 21, 2014
12,118
78,998
2,392
Yeah if you're going to create a script/trainer with Cheat Engine you might as well just NOP the ammo decreasing function and you won't have to find all those addresses. Good luck!
 

TheGreatUnknown

Jr.Coder
Full Member
Nobleman
Dec 20, 2012
58
417
1
Sweet so of course depending on the game the function for DEC ammo will be shared in inventory etc. Cheers! :)
 
Attention! Before you post:

Read the How to Ask Questions Guide
99% of questions are answered in the Beginner's Guide, do it before asking a question.

No Hack Requests. Post in the correct section.  Search the forum first. Read the rules.

How to make a good post:

  • Fill out the form correctly
  • Tell us the game name & coding language
  • Post everything we need to know to help you
  • Ask specific questions, be descriptive
  • Post errors, line numbers & screenshots
  • Post code snippets using code tags
  • If it's a large project, zip it up and attach it

If you do not comply, your post may be deleted.  We want to help, please make a good post and we will do our best to help you.

Community Mods