SA-MP Forums Archive
Detect if player is in under 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: Detect if player is in under water? (/showthread.php?tid=334305)



Detect if player is in under water? - Admigo - 14.04.2012

Heey all,

How can i detect if player is under water?

Thanks Admigo


Re: Detect if player is in under water? - Joe Staff - 14.04.2012

You can detect if a player is swimming in water via their animation, or you can detect if a player is below sea level (X,Y,0.00)


Re: Detect if player is in under water? - ViniBorn - 14.04.2012

Maybe it can help you

http://forum.sa-mp.com/showthread.ph...PlayerSwimming


Re: Detect if player is in under water? - 2KY - 14.04.2012

Quote:
Originally Posted by Joe Staff
Посмотреть сообщение
You can detect if a player is swimming in water via their animation, or you can detect if a player is below sea level (X,Y,0.00)
Or detect both for swimming.

Check if their animation is swimming, and then check their position, if it's below sea level, chances are they're swimming underwater.