car's trunk coordonate - 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's trunk coordonate (
/showthread.php?tid=306224)
car's trunk coordonate -
fordawinzz - 25.12.2011
How can I get the car trunk's coordonate? Is there any function or anything else?
Re: car's trunk coordonate -
TheArcher - 25.12.2011
I think exist a way. You should be very accurate to find only the trunk coords. I don't remeber exactily but Ryder found the gas can one. So you can try to ask him.
Re: car's trunk coordonate -
silvan - 26.12.2011
I use this functioni and then play with the Z cordinates of it.
Код:
stock Float: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));
return a;
}
I use Z as 3.5
I hope this will suit your needs. + rep if this helped.