Just a tip, you can also just mount the weapon image to slot 1 instead of 0 when crouching. Then it'll look like they're holding the weapon, but be unable to fire it.
package noShootCrouch {
function Armor::onTrigger(%db, %this, %slot, %pos) {
if(%slot == 3 && isObject(%this.getMountedImage(%pos?1:0))) {
%this.mountImage(%this.getMountedImage(%pos?1:0), %pos?0:1);
%this.unMountImage(%pos?1:0);
}
parent::onTrigger(%db, %this, %slot, %pos);
}
};
activatePackage(noShootCrouch);
It's worth noting that this code won't work with akimbo guns because it already has a gun in slot 1. You could theoretically expand the script to move slot 1 into slot 2.
Then again, now that I think about it if they were to just press q twice it'd mount the weapon in slot 0 again, and even leave the one in slot 1 to boot. You could be holding 2 weapons at once. So it'd require a little more protecting, you'd probably be better off with another method. I just figured I'd add another possibility.