IsPointInWater - 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: IsPointInWater (
/showthread.php?tid=320039)
IsPointInWater -
zgintasz - 21.02.2012
Hi,
I need function, that checks, if point is in water. Example: IsPointInWater( Float
, Float:y, Float:z ). I really need this.
Thanks : ).
Re: IsPointInWater -
[HK]Ryder[AN] - 21.02.2012
hey,
All the water z locations are 0.0 so i don't think there is any problem.If the z is 0 it is in water.
Thanks.
Re: IsPointInWater -
zgintasz - 21.02.2012
Hm, I want to check, if boat is in water, because players can with AirBreak go to other location... If I print position, ir gives
-0.497320(and etc.) to
Z :/. This checking is very inaccurate.
Re: IsPointInWater -
Vince - 21.02.2012
You
could possibly extract all water areas from the water.dat data file for a thorough checking. I don't believe that there's any water above a Z height of 1.0 either, except maybe a few swimming pools.
Re: IsPointInWater -
Christopher - 21.02.2012
Yea I would try the method of using the data from the water.dat file. I've PasteBin'd it for you here:
http://pastebin.com/m2sL6vS3
Re: IsPointInWater -
zgintasz - 21.02.2012
Quote:
processed
-1584.0 -1826.0 0.00000 0.00000 0.00000 0.05100 0.10200 -1360.0 -1826.0 0.00000 0.00000 0.00000 0.05100 0.10200 -1584.0 -1642.0 0.00000 0.00000 0.00000 0.05100 0.10200 -1360.0 -1642.0 0.00000 0.00000 0.00000 0.05100 0.10200 1
-3000.0 354.0 0.00000 0.00000 0.00000 1.00000 0.00000 -2832.0 354.0 0.00000 0.00000 0.00000 0.19900 0.24100 -3000.0 2942.0 0.00000 0.00000 0.00000 1.00000 0.00000 -2832.0 2942.0 0.00000 0.00000 0.00000 0.98244 0.00528 1
-2832.0 1296.0 0.00000 0.00000 0.00000 0.48416 0.15520 -2704.0 1296.0 0.00000 0.00000 0.00000 0.19900 0.24100 -2832.0 2192.0 0.00000 0.00000 0.00000 0.75540...
|
U mad O_o? I think there should be a function with area checking. Maybe somebody has made that function and can give to us : ).
Re: IsPointInWater -
zgintasz - 22.02.2012
Guys, I really need this ;/...