Jump to content

Checking if coordinates are near water


SparkzZ

Recommended Posts

That wouldn't work as there are many water sources and their area could be huge and distance between points won't be as accurate as I want it to be..

also I know there isn't a function that achieves that easily, am asking for a method or and idea that may accomplish what I need,

actually I myself had idea of test lines against water from all directions but figured that won't work too because there may be obstacles in the ways of the lines.

Link to comment
Colshapes are elements right? Put a colsphere on the player and use IsElementInWater to check whether the colsphere is hitting water.

Wouldn't work, isElementInWater doesn't work with colshapes.

As far as I tried it only works with players and peds.

Link to comment

I guess I resolved it, I took the coordinate and tested it against water from all directions and to ensure there is no obstacles I added 500 to the z value.

I am still testing it to make sure that it is 100% accurate, but as far it seems working well.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...