SA-MP Forums Archive
I here water? - 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: I here water? (/showthread.php?tid=501041)



I here water? - audriuxxx - 16.03.2014

Hi,

. For ex, i have X and Y coordinates:


Код:
-1547.547,695.545
It'is just example coordaintes. And how to check is this coordinates is above water?


Re: I here water? - BroZeus - 16.03.2014

For checking the coords are above water level(i am not saying in water i am saying level) or not
You need z coords because Z coords are for altitude and if z coords are above 0 then it will be above water


Re: I here water? - iggy1 - 16.03.2014

If you mean check if the position is water or land, it could be difficult.

You could perhaps create a polygon (probably more that 1 polygon) around the land mass, and check if the player is in that polygon. If the player isn't in the polygon they are above/under/in water. This could be expensive and would take a lot of time to get the points for the polygon.

If you just wana know if they are above sea-level, use the method BroZeus said.


Re: I here water? - audriuxxx - 16.03.2014

It'is too hard to make all positions of earth, and still you don't do it accuarate