XCOM 2 ToggleUnlimitedAmmo Command
With this console command, you can enable or disable (toggle) infinite ammunition for both of your squad and the AI. To avoid giving the unlimited ammo, you need to Turn on at the start of your turn, and off at the end.
The syntax for the ToggleUnlimitedAmmo command is given below:
Below you will find the working samples of the ToggleUnlimitedAmmo command.
This is the only way the ToggleUnlimitedAmmo command can be implemented. If you haven't already enabled this command (it is disabled by default), you can type this command into the console and have the AI unlimited ammo - well, ammo won't be used up when guns are fired. Typing this command into the console even as it is enabled will toggle it off (disable it).