when im working with a rigged object. I use the xray mode to make it easier to see the skeleton inside the object. But if i want the object (which in this case is a human) to hold something, like a weapon. Its kinda hard to see where im supposed to place the weapon in his hand, because the armature is in my way, because i can see the skeleton through the weapon. So how would i make the skeleton only see through for the human?
You can't make object A always be displayed in front of B, but perspectively occluded by C in the current Blender.
The common practice is to create rigs (bones or custom shaped bones) that don't occlude by choosing wireframe shapes. A quick way to achieve this, is to set the Maximum Draw Type (under Properties Panel > Object Tab > Display Section) to Wire. The Armature will always be display as wireframe, making the objects "behind" it easy to see.