testplayer(x, y)
Or you could use the built-in shoot() or my
custom projectile system.
getangle(vecx, vecy) gets the angle from the vecx and vecy in radian form. You can use radtodeg(angle) to get it to degree form.
By the way, 90 (deg) is pi*0.5 (rad), 180 is pi, 270 is pi*1.5, 360 is pi*2 which is also 0.