This console command enables and disables (toggles) unlimited ammunition for both your squad and the AI. Turn on at the start of your turn, and off at the end, to avoid giving the AI unlimited ammo.
The syntax for the ToggleUnlimitedAmmo command is as follows:
Find below working examples of the ToggleUnlimitedAmmo command.
This is the only way the ToggleUnlimitedAmmo command can be executed. If you haven't already enabled this command (it is disabled by default), typing this command into the console will give you and the AI unlimited ammo - well, ammo won't be used up when guns are fired. Typing this command into the console whilst it is enabled will toggle it off (disable it).