Thanks! Cool, I've got jumping working. One more problem though. The player can only jump once. It seems it is waiting for a variable to change till it allows the user the jump again but I can't figure out what.

There are no animations in my player, so I removed all of the animation checks. Do I have to replace those or something?

Code:
FUNCTION handle_gravity() {

trace_mode = ignore_me+ignore_passable+use_box;
result = trace(vector(my.x,my.y,my.z - my.z_offset),vector(my.x,my.y,my.z - 4000));
IF (result < 3) {
IF (my.jumping_mode == 0) {
my.force_z = -1 * result;
IF (key_space == 0 && space_press == 1) { space_press = 0; }
IF (key_space == 1 && space_press == 0 && my.movement_mode == 0) {
space_press = 1;
my.jumping_mode = 1;
my.force_z = 25;
}
}
IF (my.jumping_mode == 2 || my.jumping_mode == 3) { my.jumping_mode = 0; }
} ELSE {
IF (my.jumping_mode == 2) {
IF (result > 120) {
my.jumping_mode = 3;
} ELSE {
my.jumping_mode = 0;
}
}
IF (my.jumping_mode == 3 && result <= 120) { my.jumping_mode = 0; }
IF (my.jumping_mode == 0 && my.movement_mode == 0) {
IF (result > 120) {
my.jumping_mode = 3;
}
}
my.force_z -= my.gravity * time;
my.force_z = max(-30,my.force_z);
IF (my.movement_mode == 2) { my.force_z = 0; }
}
my.velocity_z += (time * my.force_z) - (min(time*0.7,1) * my.velocity_z);
my.move_z = my.velocity_z * time;
}