You set jumpheight to 0, and then immediately in the next while() you subtract 0.5*time_step and then say if jumpheight<=0 break. It's no wonder it's not working. wink

Now I don't know exactly what you were going for with that if(jumpheight<=0) thing but it's obviously short-circuiting your function, so you'll have to change it. Change it to if(my.ANIMATION >= 100) maybe, or better yet, change your whole while loop and move that stuff to after it.

Code:
while (my.ANIMATION > 50 && my.ANIMATION <= 100)
	{
		my.ANIMATION += 10*time_step;
		ent_animate(me,"jump",my.ANIMATION,0);
		jumpheight -= 0.5*time_step;
		c_move(me, nullvector, vector(0,0,jumpheight), GLIDE);

		wait(1);
	}

	// these lines will run after the loop ends.  you don't need break;
	jumpheight = 0;
	my.ANIMATION = 0;
	my.STATE = 1;