SA-MP Forums Archive
Checking object pos - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Checking object pos (/showthread.php?tid=78211)



Checking object pos - Jefff - 17.05.2009

Hi i've a big problem with checking object pos
top
Код:
new something;
init
Код:
something = CreateObject(ID, 2001.3964, 1547.1013, 13.5002, 3.4377, 355.7028, 270.6186);
and public with timer who is checking this object pos
Код:
public Object() {
new Float:OX,Float:OY,Float:OZ;
GetObjectPos(something,OX,OY,OZ);
if(OX != 2001.3964 && OY != 1547.1013) {
SetObjectPos(something,2001.3964, 1547.1013, 13.5002);
SetObjectRot(something, 3.4377, 355.7028, 270.6186);
}
return 1;
}
but if i change pos of this object nothing happend

how to fix this i'm testing with DestroyObject and Create new but nothing too :/


Re: Checking object pos - Weirdosport - 17.05.2009

If it's an object that you push, the GetObjectPos won't work, it will return the position you last set it to.


Re: Checking object pos - Jefff - 18.05.2009

So how to fix this ? I've no idea


Re: Checking object pos - Weirdosport - 18.05.2009

You don't, if a player moves an object as far as the program is concerned it's still where it put it.