@ Alistaire: anyway will be easy than every time place the trigger_if for every weapon you've placed on the map?
There is nothing hard to replace the item id, anyway, less triggers..
You could make an actual Lua script, make it hook to triggerentity, add a trigger like "script_setammo 30 0" to each Env_Item you want to change ammo on then in the hook check the entity(x, y, "trigger") for the REGEX occurence of "script_setammo (.-) (.-)" and set the variables "ammoin" and "ammo" to those values, go through item(0, "table") to find all items with x and y positions supplied by the hook, item(itemID, "dropped") and itemtype supplied by entity(x, y, "intn") {where n is the value of the itemtype supplied by the entity, I'm not sure which it is to be honest}, and setammo with the itemID returned by this loop, the value 0, the ammoin variable and the ammo variable.
This way all you have to do is add "script_setammo 30 0" in the Trigger name field of the entity to change its ammo count.
And because I'm lazy I won't give you the script, I bet someone else has more free time on their hands atm so they might give it.
-------
To autorun this script you can even put it in your maps folder and rename it to *mapname*.lua