I am working on having a ship, now i want people to be able to enter the ship from the side, and the side only. so if they go in front of it, or back, nothing will happen:

if(M in get_step(src,WEST))
usr << "test"
if(M in get_step(src,EAST))
usr << "test"

this works if the ship is facing either north or south. but not when the ship faces west or east.

So i need something else, i've tryed some other attemts such as using get_dir, however nothing really worked.

How would i go about determening where the players stands in relation to the direction the ship is facing?
You would use get_dir() to get the direction to the player, and turn() to find the two directions that are to the side.
In response to Garthor
thanks for the help, with your suggestion i came up with this:(it works but i'm not sure wheter it is what you aimed at)
var/getdir = get_dir(src,M)
if(getdir == turn(src.dir,90) || getdir == turn(src.dir,-90))
usr << output("Yay","SM")