IsPlayerInRangeOfPoint not working.
#6

Quote:
Originally Posted by Schneider
Посмотреть сообщение
I know from experience that Get(Dynamic)ObjectPos does not always work on certain objects, especially when they move. Get(Dynamic)ObjectPos returns the position where it was created, not the actual position after it moved.

Try to debug these coords and see if they are actually close together.

pawn Код:
Float:x, Float:y, Float:z, Float:px, Float:py, Float:pz;
GetDynamicObjectPos(fire[j], x, y, z);
GetPlayerPos(i, px, py, pz);
printf("Objectpos: %.2f, %.2f, %.2f \n Playerpos: %.2f, %.2f, %.2f", x, y, z, px, py, pz);
printf("Distance: %.2f", floatsqroot(((x1-x2)*(x1-x2))+((y1-y2)*(y1-y2))+((z1-z2)*(z1-z2))));
You called it, the Z returned on the fire object was > 2 from the original placement coords. Will adjust accordingly, +rep.
Reply


Messages In This Thread
IsPlayerInRangeOfPoint not working. - by Aerotactics - 15.01.2015, 14:18
Re: IsPlayerInRangeOfPoint not working. - by Michael B - 15.01.2015, 14:30
Re: IsPlayerInRangeOfPoint not working. - by Aerotactics - 15.01.2015, 14:54
Re: IsPlayerInRangeOfPoint not working. - by mahdi499 - 15.01.2015, 14:57
Re: IsPlayerInRangeOfPoint not working. - by Schneider - 15.01.2015, 15:02
Re: IsPlayerInRangeOfPoint not working. - by Aerotactics - 15.01.2015, 15:27

Forum Jump:


Users browsing this thread: 1 Guest(s)