Command for near Player
#2

There are some includes or functions that offer a PointToPoint or PlayerToPlayer function. You can look for this, or use this formula to create one yourself

distance = floatsqroot( (px - tx) * (px - tx) - (py - ty) * (py - ty) + (pz - tz) * (pz - tz) )

With px/py/pz beeing the coordinates of player 1 and tx/ty/tz of player 2 (the order does not matter). You would just have to get them with GetPlayerPos.
Reply


Messages In This Thread
Command for near Player - by HardstylerNiko - 05.09.2010, 08:43
Re: Command for near Player - by Mauzen - 05.09.2010, 09:44
Re: Command for near Player - by sickem - 05.09.2010, 09:59
Re: Command for near Player - by HardstylerNiko - 05.09.2010, 10:08

Forum Jump:


Users browsing this thread: 1 Guest(s)