Open team fortress 2 materials.gcf in GCFScape; open the tf/models folder; weapons are under weapons (duh) and hats are under player/items or something. Keep in mind that you'll also need the textures (if you're importing the models into, say, 3dsMax); those are in the same folders but in tf/materials/models.