Here is the draw function which draws the parts of the car, in this function car rims is checked and flag is checked, and i need to rotate the tire rim as i move the car. Someth
In order to rotate a part about its own center, you need to translate it to the origin, rotate it, and translate it back.
So your
glRotatef(45,1,0,0) # rotate 45 deg about x axis (thru the world origin)
needs to be preceded and followed by translations.
See the accepted answer to this question.