Pin-pointing a location
#1

Could I use the MapAndreas plugin to determine the closest point of land? For example, say a vehicle goes into the water and instead of re-spawning it, I can determine the closest area of land in relation to the vehicle.

If this is possible, HOW?
Reply
#2

You could do some testing, but.. I think your vehicle would be below the Z coordinate 0.0 (sea level), so.. Just detect if they're not moving for a period of time (a couple second timer would be sufficient I suppose) and below sea level. I'm sure you COULD run into bugs doing this, but that's the only solution that comes to mind.
Reply
#3

Quote:
Originally Posted by 2KY
Посмотреть сообщение
You could do some testing, but.. I think your vehicle would be below the Z coordinate 0.0 (sea level), so.. Just detect if they're not moving for a period of time (a couple second timer would be sufficient I suppose) and below sea level. I'm sure you COULD run into bugs doing this, but that's the only solution that comes to mind.
That is true, but it still doesn't do what I need it to. I basically want to determine if the vehicle is in water (which this might work fine with), and if it is, I then need to determine the closest piece of land and set the vehicle to be on land.
Reply
#4

I think it is impossible.

Maybe you could save a lot of positions around places near water, then if the vehicles is in water you would check if the player is in range of a point and set the vehicle's location to that point.
Reply
#5

Quote:
Originally Posted by RealCop228
Посмотреть сообщение
That is true, but it still doesn't do what I need it to. I basically want to determine if the vehicle is in water (which this might work fine with), and if it is, I then need to determine the closest piece of land and set the vehicle to be on land.
Right.. Hmm, you could set a timer for a couple seconds and store their position, then set their position back to it if they are found to be in water (using the steps I mentioned in my post)

Just brainstorming here.
Reply
#6

well detect if the vehicle felt on water, send it to something like -100 z coordinate on its location and it will respawn in land.

eg:
vehicle felt on water in 0 , 0 ,0 (i know that this coordinate is not water lol)
set the vehicle pos to 0 , 0 , -50(or more) and it will respawn on land.
Reply
#7

Quote:
Originally Posted by Moh_
Посмотреть сообщение
well detect if the vehicle felt on water, send it to something like -100 z coordinate on its location and it will respawn in land.

eg:
vehicle felt on water in 0 , 0 ,0 (i know that this coordinate is not water lol)
set the vehicle pos to 0 , 0 , -50(or more) and it will respawn on land.
Are you sure? That just makes me think it's going to set it below sea level even more...?
Reply
#8

yes.
in my stunt server i have speed boost
when i fall in water and i go a bit below the sea level i get respawned in land near the sea.

(edit: i dunno if it will work with empty cars)
when u fall in a gta sa map bug u respawn in the map near the place you felt.
Reply
#9

Quote:
Originally Posted by Moh_
Посмотреть сообщение
well detect if the vehicle felt on water, send it to something like -100 z coordinate on its location and it will respawn in land.

eg:
vehicle felt on water in 0 , 0 ,0 (i know that this coordinate is not water lol)
set the vehicle pos to 0 , 0 , -50(or more) and it will respawn on land.
Clever.

Never thought about that.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)