I think that code has nothing to do with player/elev collision. Excuse me for modifying your code - still not solving your problem - but I'd avoid wait() as it's not fast at all and nested while loops are not necessary here.
Code:
Entity* elev;
var operate = 0;
action elevator
{
	elev = my;
	while(1)
	{
		if(operate == 1 && my.z > -72)
			my. z -= 2* time;
		else	
		if(operate == 0 && my.z < 72)
			my.z += 2 * time;
		
		wait(1);
	}
}


And elev pointer is not used grin

I don't understand: is there at least a situation when the player collides with the elevator?
when you say "I walk onto it" does it mean you are raising your z?
"I am able to ride the elevator up" you can stand on the elev. when you jump on it and it's in mid-air?


ERROR in communism.cpp, line 0:
#include<god.h>
was fatally missed.