[HELP] Doesn't set the angle with atan?
#1

pawn Код:
if(firstracer[i]==1)
{
firstcar=CreateVehicle(522,RaceCheckpoints[CurrentCheckpoint[i][0] ,RaceCheckpoints[CurrentCheckpoint[i][1],RaceCheckpoints[CurrentCheckpoint[i][2],0,0,0,20);
PutPlayerInVehicle(i,firstcar,0);
SetVehicleZAngle(firstcar,atan((RaceCheckpoints[1][1] - RaceCheckpoints[0][1]) / (RaceCheckpoints[1][0] - RaceCheckpoints[0][0])));
}
It might set start angle of the race ( with atan((y2 - y1) / (x2 - x1)) ), whats wrong here?
Reply
#2

any help?
Reply
#3

use this
atan(floatdiv(y2-y1,x2-x1))
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)