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.