SA-MP Forums Archive
[HELP] Distance from land - 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: [HELP] Distance from land (/showthread.php?tid=362490)



[HELP] Distance from land - Marusa - 24.07.2012

Is there any way to check player distance from land ?


Re: [HELP] Distance from land - Babul - 24.07.2012

do you mean the map boundaries from -3000,-3000 to 3000,3000 ? or do you want to detect the distance to the closest beach on a river/sea?
its possible to detect a player on land by checking the animation/height (and save that position on a timer/update/command/keypress), and restore the players' position if hes too far away while hes swimming/on z-ccordinates close to 0.0


Re: [HELP] Distance from land - Marusa - 24.07.2012

I would like to have Z coords of neares solid ground under the position..
https://sampwiki.blast.hk/wiki/SetPlayerPosFindZ - this is the function to port nearest solid ground...

Can I get this coords without port player with this function .. (sry for bad eng)