I would really like to be able to detect whether the player has a weapon or not. Basically, the idea is that I want the enemy not to shoot at the player when he is unarmed, but when he grabs a rifle, I want them to shoot at him. It would be fine if grenades don't set this off, or just having magazines.
I know you could use the "hasweapon" command, but that only tests for one specific weapon. Same with the "ammo" command. I know they could work, but I would have to set up a trigger for EVERY single weapon the player could possibly grab. Is there an easier way to do this?
Another, similar question is whether there is a way to tell if a unit has their rifle on their back.