SA-MP Forums Archive
Auto stop car. - 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: Auto stop car. (/showthread.php?tid=279075)



Auto stop car. - budelis - 25.08.2011

Hi all.Maybe can do that command,which when I'am in vehicle and i start moving to another car,and 2 metres left until i knock i will get stopped,is this possible?


Re: Auto stop car. - =WoR=Varth - 27.08.2011

Use timer.
pawn Код:
stock GetXYInFrontOfVehicle(vehicleid, &Float:x, &Float:y, Float:distance)
{
    new Float:a;
    GetVehiclePos(vehicleid, x, y, a);
    GetVehicleZAngle(vehicleid, a);
    x += (distance * floatsin(-a, degrees));
    y += (distance * floatcos(-a, degrees));
}
GetVehiclePos.
Then make your own IsVehicleInRangeOfPoint.


Re: Auto stop car. - budelis - 27.08.2011

How i can make IsVehicleInRangeOfPoint?


Re: Auto stop car. - Kingunit - 27.08.2011

Quote:
Originally Posted by budelis
Посмотреть сообщение
How i can make IsVehicleInRangeOfPoint?
That doens't exist yet, the 'IsVehicleInRangeOfPoint'