GetPlayerDistanceFromPoint in 0.3c RC3?
#8

Quote:
Originally Posted by ikkentim
Посмотреть сообщение
pawn Код:
stock Float:GetPlayerDistanceFromPoint(playerid, Float:X, Float:Y, Float:Z)
{
   new Float:pPos[3];
   GetPlayerPos(playerid);
   return floatsqroot(floatpower(floatsub(X, pPos[0]), 2.0) + floatpower(floatsub(Y, pPos[1]), 2.0) + floatpower(floatsub(Z, pPos[2]), 2.0));
}
Is that what you mean?
That is what I mean, thank you!

Sascha, your code has a tag mismatch on the return.
Reply


Messages In This Thread
GetPlayerDistanceFromPoint in 0.3c RC3? - by Jack_Leslie - 01.11.2011, 23:09
Re: GetPlayerDistanceFromPoint in 0.3c RC3? - by ikkentim - 01.11.2011, 23:18
Re: GetPlayerDistanceFromPoint in 0.3c RC3? - by Jack_Leslie - 01.11.2011, 23:20
Re: GetPlayerDistanceFromPoint in 0.3c RC3? - by ikkentim - 01.11.2011, 23:23
Re: GetPlayerDistanceFromPoint in 0.3c RC3? - by Jack_Leslie - 01.11.2011, 23:25
Re: GetPlayerDistanceFromPoint in 0.3c RC3? - by ikkentim - 01.11.2011, 23:40
Re: GetPlayerDistanceFromPoint in 0.3c RC3? - by Sascha - 01.11.2011, 23:40
Re: GetPlayerDistanceFromPoint in 0.3c RC3? - by Jack_Leslie - 02.11.2011, 00:21
Re: GetPlayerDistanceFromPoint in 0.3c RC3? - by Joe Staff - 02.11.2011, 02:37

Forum Jump:


Users browsing this thread: 2 Guest(s)