The only way I can think of going about this, is if you were able to check for ammunition before hand. Unfortunately, KotOR doesn't have an onStartRound event, or something similar. KotOR does however have an onEndRound event, but I can't see a way of using that as the script fires too late.
I won't say that its impossible to do, there's generally a way around everything
But I can't see anyway to do this effectively.