What gun do you have versus the robber? Does the robber have a friend? Do they have a gun, and which one? Are you facing away or facing the robber? How far away are you from them?
Short answer: It depends of the scene.
Long answer: The context is what determines if someone can “resist” a robbery. If they have the gun squarely at your head, it doesn’t matter if you have the gun in hand if you’re not facing them.