11.06.2012, 17:15
He's using player1 pos and player2 pos to calculate arc tangent (atan), which gives the angle of the tangent (player2posy-player1posy)/(player2posx-player1posx), exactly what you asked for. Z coordinate isn't actually needed, but still you have to use it as GetPlayerPos requires 3 arguments. I wouldn't use floatabs to calculate the angle, though.
Also, this function sets angle for vehicles.
Also, this function sets angle for vehicles.