How to check what is the distance from the player to the ground? - 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 check what is the distance from the player to the ground? (
/showthread.php?tid=592890)
How to check what is the distance from the player to the ground? -
eyal282 - 30.10.2015
I have been trying to figure out how can I check what is the distance from me to the ground but no success.
Is there a way to check the distance from me to the ground when I'm in the air?
Thanks anyways for helping
Re: How to check what is the distance from the player to the ground? -
AbyssMorgan - 30.10.2015
PHP код:
new Float:mx, Float:my, Float:mz, Float:nz, Float:dist;
GetPlayerPos(playerid,mx,my,mz);
MapAndreas_FindZ_For2DCoord(mx,my,nz);
dist = VectorSize(0.0,0.0,mz-nz);
//edit use MapAndreas_FindZ_For2DCoord
Re: How to check what is the distance from the player to the ground? -
eyal282 - 30.10.2015
What is the include for that?
Re: How to check what is the distance from the player to the ground? -
Crayder - 30.10.2015
That's the MapAndreas plugin.
http://forum.sa-mp.com/archive/index.php/t-275492.html
You could also check out the ColAndreas plugin in my signature for a more advanced plugin, but if you only need it for ground height use MapAndreas.