Try to write
proc_mode = PROC_EARLY;
in your elevator loop.
If that does not help, check when the player is on the elevator (that means inside the elevator's bounding box, above it and vertically close to it) and change his z-position accordingly. Example:

my.z += direction*time_step;
if(player on elevator) player.z += direction*time_step;


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends