Do you need to know if all units are out of ammo, or just a certain percentage? For example, you may want them to resupply even if the group's total ammo supply is below 25%. If you only want to have a check for totally out of ammo, then the script is only several lines long. The key line of the script would be:
{! someAmmo vehicle _x)} forEach units group _mysquad
A script checking general ammo supply would be a bit more complex. You would have to see what type of weapon(s) each squad member has and then check the number of shots that are available for each weapon.
Weapons _unit tells what weapons a unit has
Ammo _weapon tells how much ammo the unit has for that weapon.
I could do this script if you want. I can do it this weekend.