SA-MP Forums Archive
Get Nearest (Z coordinate) object - 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: Get Nearest (Z coordinate) object (/showthread.php?tid=563399)



Get Nearest (Z coordinate) object - Banditukas - 15.02.2015

Hi,

Player can edit object. I want that object go down to the nearest object or on ground, for ex if player edit object and makes him coordinate in air.


Re: Get Nearest (Z coordinate) object - JoaoPedro - 15.02.2015

I think it's exactly what you're looking for: https://sampwiki.blast.hk/wiki/SetPlayerPosFindZ


Re: Get Nearest (Z coordinate) object - Banditukas - 15.02.2015

It's for player i need for object.


Re: Get Nearest (Z coordinate) object - JoaoPedro - 15.02.2015

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


Re: Get Nearest (Z coordinate) object - Banditukas - 15.02.2015

Can show me how it look there?


Re: Get Nearest (Z coordinate) object - JoaoPedro - 16.02.2015

Quote:

native MapAndreas_FindZ_For2DCoord(Float:X, Float:Y, &Float:Z); // return highest Z point (ground level) for the provided X,Y co-ordinate.

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

Just read it.