20.08.2009, 02:05
Quote:
Originally Posted by *James*
Thanks alot, ive been looking for something like this
![]() only 1 question= i am a newb scripter and i wanted to know where this goes or how to make it a function Code:
stock Float: GetDistanceToPoint(playerid,Float: X2,Float:Y2 ,Float: Z2) { new Float:X,Float:Y,Float:Z; GetPlayerPos(playerid,X,Y,Z); return floatsqroot ( floatpower ( floatabs ( floatsub ( X , X2 ) ) , 2 ) + floatpower ( floatabs ( floatsub ( Y , Y2 ) ) , 2 ) + floatpower ( floatabs ( floatsub ( Z , Z2 ) ) , 2 ) ); } |

P.S: Thanks to you I noticed that I forgot to put the function in the example script
