1. Add yourself as unarmed civilian in the editor (and also add a weapons box nearby).
2. Go to the box and take a weapon (but drag it to your inventory/backpack, not the weapon slot directly).
3. Then drag the weapon from your inventory/backpack to the weapon slot.
Steps from closed dupe:
1. Have access to a weapons crate (or a dead body) containing a pistol and ammo.
2. Without accessing the container, drop your weapons on the ground nearby via your own inventory.
3. Access the container, then take a pistol and its ammo.
4. Exit the gear menu.
Your character should be holding the pistol, but acting as if he were unarmed.