SA-MP Forums Archive
Car reversing to checkpoint - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Car reversing to checkpoint (/showthread.php?tid=513746)



Car reversing to checkpoint - MacT - 17.05.2014

Hey!

I discussing for driving license how can detect player reversing vehicle to checkpoint.
I know how use GetVehicleZAngle and angle must be 270 +- 5.


pawn Код:
#define Carrangle 270

public OnPlayerEnterRaceCheckpoint(playerid)
{
new Float:carangle
GetVehicleZAngle(vehicleid, carangle);
  {
  if(CarAngle > 265 & CarAngle < 275)
  Show_NextCP;
  }
  {
  else
  DisablePlayerCheckpoint;
  return 1;
  }
}



Re: Car reversing to checkpoint - Abagail - 17.05.2014

I don't get where your confused if you say you know how to detect it with angles... Wheres the issue here?


Re: Car reversing to checkpoint - MacT - 17.05.2014

I confused how make algoritm do detect vehicle rotation in checkpoint. I need little extra help for this. I know but my pawno skill are not good enough.

GetVehicleZAngle is stock that check vehicle rotation in checkpoint or ay location where you vehicle