SA-MP Forums Archive
Get possition - 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: Get possition (/showthread.php?tid=338023)



Get possition - kadaradam - 28.04.2012

Hi.
How can i get center between 2 pos?


Re: Get possition - kadaradam - 28.04.2012

Problem sloved.


Re: Get possition - ViniBorn - 28.04.2012

Example :
pawn Код:
x = 100
y = 200

x2 = 400
y2 = 800

x2 - x = 300 // Distance X
y2 - y = 600 // Distance Y

300 / 2 = 150
CenterX = x + 150 // 450


600 / 2 =  300
CenterY = Y + 300 // 500