24.08.2010, 11:51
Give the object a name, e.g. and get the position
This must be the general (not in a public function!)
Create a forward
with a public function
Might give some errors but ye, give it a try
This must be the general (not in a public function!)
pawn Код:
new object, objectmovet, Float:x, Float:y, Float:z;
object = CreateObject(...);
objectmovet = SetTimer("ObjectMove", 100, true);
pawn Код:
forward ObjectMove(objectid);
pawn Код:
public ObjectMove(objectid)
{
new bool:moved;
moved = false;
if(GetObjectPos(object, x, y, z) != [the x-y-z coordinates from createobject])
{
moved = true;
}
else moved = false;
return 1;
}