SA-MP Forums Archive
How to detect the ground height - 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: How to detect the ground height (/showthread.php?tid=619725)



How to detect the ground height - NeXoR - 21.10.2016

Hey guys, I am planning to make a bombing Rustler system for my Army VS Terrorists mode, my question is, let's say I am on a Rustler on 50 meters from the ground, or 40, or 60, how can I detect the ground height to set the Blow position ?
Can I either send a physical object and blow it when it touches something ? or ?


Re: How to detect the ground height - AbyssMorgan - 21.10.2016

MapAndreas:
https://sampforum.blast.hk/showthread.php?tid=275492

ColAndreas (better):
https://sampforum.blast.hk/showthread.php?tid=586068


Re: How to detect the ground height - NeXoR - 21.10.2016

Quote:
Originally Posted by AbyssMorgan
Посмотреть сообщение
For ColAndreas, the ground Z of the current X and Y is:
PHP код:
CA_FindZ_For2DCoord(Float:xFloat:y, &Float:z
?


Re: How to detect the ground height - AbyssMorgan - 21.10.2016

Quote:
Originally Posted by NeXoR
Посмотреть сообщение
For ColAndreas, the ground Z of the current X and Y is:
PHP код:
CA_FindZ_For2DCoord(Float:xFloat:y, &Float:z
?
yes.


Re: How to detect the ground height - NeXoR - 21.10.2016

Quote:
Originally Posted by AbyssMorgan
Посмотреть сообщение
yes.
Thank you.