Right! I get it now :]

There are probably several ways to do this, but I can't think of any great solution. You could do something like this:
when jumping keep checking move_to_vector.z (this is the speed in z and is constantly being decreased during the jump), when is arond 0 (move_to_vector.z<0.5 && move_to_vector.z>-0.5 , for example) it means it's close to the highest point, then check for key_space again. If space is pressed then move_to_vector = 5 (or something)

The code should look something like this:
if(move_to_vector.z<0.5 && move_to_vector.z>-0.5)
{
if(key_space) move_to_vector.z = 5;
//this is sloppy. Try to come up with a way to know if the player just hit
//space. Or else he could just keep pressing space from the beginning of the
//jump and still be able to double jump.
}