SA-MP Forums Archive
[HOW-TO?] Get the altitude - For advanced airplane system - 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: [HOW-TO?] Get the altitude - For advanced airplane system (/showthread.php?tid=113413)



[HOW-TO?] Get the altitude - For advanced airplane system - JonyAvati - 13.12.2009

Description
I'm making an Advanced Airplane System, and I need a way to get the altitude of the airplane. I know it's possible, because i've seen a server where in a mission, you need to fly low or the "radar will see you", and a message appears when that happens.

I'm sure that somebody knows.

Edit: I think I know, with Z coord, is that correct?


Re: [HOW-TO?] Get the altitude - For advanced airplane system - Malice - 13.12.2009

That is the z axis.

pawn Код:
new
Float:x,
Float:y,
Float:z;

GetVehiclePos(planeid, x, y, z);

printf("Altitude: %f", z);



Re: [HOW-TO?] Get the altitude - For advanced airplane system - JonyAvati - 13.12.2009

Quote:
Originally Posted by Malice
That is the z axis.

pawn Код:
new
Float:x,
Float:y,
Float:z;

GetVehiclePos(planeid, x, y, z);

printf("Altitude: %f", z);
Thanks , but each Z is 1 feet?? Lol..


Re: [HOW-TO?] Get the altitude - For advanced airplane system - Doppeyy - 13.12.2009

Its a game i doubt that they use real things to measure .

/Artix


Re: [HOW-TO?] Get the altitude - For advanced airplane system - Niixie - 13.12.2009

Samp uses M so each z is one meter


Re: [HOW-TO?] Get the altitude - For advanced airplane system - Dresden - 13.12.2009

Probably closer to a metre like Niixie said but it might require some experimenting to make it feel right.


Re: [HOW-TO?] Get the altitude - For advanced airplane system - JonyAvati - 13.12.2009

Quote:
Originally Posted by Niixie
Samp uses M so each z is one meter
Ah thank you