I don't know anything about multiplayer scripting, so all the "local" and "public" things you'll have to ask someone else about. But basically what you're asking for would be easy enough, EXCEPT, it'd require you to remove and then re-add all the ammo "manually" with every reload. This also means that the ammo count displayed on the weapon probably couldn't be made to hold true, but rather the amount of shells left would be virtual.
Something like this:
1)Detect if gun fires (use "fired" eventhandler)
2)Remove all ammo from the gun (removeMagazines "magazine name for cannon")
3)Present the weapon with the appropriate action. In multiplayer you can probably make this appear locally for only the loader or whatever, but in SP at least it'd appear for everyone. Nonetheless, you can simply make it so that unless the person using the action is in the -cargo- position, it will quit.
4) Script the action script to just basically be a timer with a wait/sleep command (maybe play some sounds for effect), at the end of which the action is added again with a different name. Continue until all the phases are complete. Remove one ammo from the "global" ammo counter of the gun (suggest using i.e. setVariable and getVariable to make it local to that cannon).
5) As long as the virtual ammo counter of the gun is > 0, return ammo to the weapon and wait for it to fire again.
This, of course, would also need the appropriate script. But it's not really that hard, and if you look into the commands mentioned above, you should be able to manage it yourself easily enough!
Good luck!
Wolfrug out.
5)