Vehicle coordinates (at the back) - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Vehicle coordinates (at the back) (
/showthread.php?tid=270744)
Vehicle coordinates (at the back) -
BuLLeT[LTU] - 21.07.2011
Hello. I wanted to ask, how to get coordinates at the back of vehicle ?
Picture:
/imageshack/img824/4793/samp056u.jpg
But i want to update coords when vehicle move.
Re: Vehicle coordinates (at the back) -
Donya - 21.07.2011
use getxybehindofvehicle with a distance of 1.1
pawn Код:
stock GetXYBehindOfVehicle(vehicleid, &Float:x, &Float:y, Float:distance)
{
new
Float:a;
GetVehiclePos( vehicleid, x, y, a );
GetVehicleZAngle( vehicleid, a );
x += ( distance * floatsin( -a+180, degrees ));
y += ( distance * floatcos( -a+180, degrees ));
}
Re: Vehicle coordinates (at the back) -
BuLLeT[LTU] - 21.07.2011
Thank you