The Give Weapons cheat can be used to refill you ammo at any time. It also gives you several weapons for free.
GTA 5 Cheat Codes
You must enter the GTA 5 cheat codes on the gamepad, much like classic GTA games. Use the D-pad to enter the directional commands (LEFT, RIGHT etc.). These codes must be input fairly quickly. A small confirmation will appear above the map and trophies will be disabled.
LEFT, LEFT, L1, R1, L1, RIGHT, LEFT, L1, LEFT – Moon Gravity
R1, R1, CIRCLE, R2, LEFT,…