Player distance - 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: Player distance (
/showthread.php?tid=508724)
Player distance -
MythicalMarauder - 23.04.2014
I just want to calculate the distance in KM/h between player and a checkpoint or any position. But I have no clue how to do that..
Can anyone help me ?
Re: Player distance -
RajatPawar - 23.04.2014
1) Distance is calculated in KILOMETERS, and NOT KILOMETERS/HOUR (which is for velocity, or speed, as most guys know it (incorrectly))
2) Yes, you can. You can use
distance formula from co-ordinate geometry, or just use
GetPlayerDistanceFromPoint.