Asteroids ship movement

I am trying to get my ship to move up and down following its nose. I think my problem is in the glTranslatef function.

void drawShip()
{
	glPushMatrix();
	glColor3f(1.0f, 0.0f, 0.0f);
	glTranslatef(50.0f, 0.0f, 0.0f);
	glTranslatef(cos(shipAngle)*thrust, sin(shipAngle)*thrust, 0.0f);
	glBegin(GL_LINE_LOOP);
	float offsets[4][2] = { {0.0f, 0.0f}, {-5.0f, -5.0f}, {0.0f, 10.0f}, {5.0f, -5.0f} };
	float cosA = cos(shipAngle);
	float sinA = sin(shipAngle);
	for (int i = 0; i < 4; i++)
		glVertex3f(offsets[i][0] * cosA - offsets[i][1] * sinA, offsets[i][0] * sinA + offsets[i][1] * cosA, 0.0f);
	glEnd();
	glPopMatrix();
}

I solved my problem. I am going to work on shooting bullets.

I solved my shooting bullets problem as well.