pawn Код:
//Filterscriptinit
SetTimer("Move", 500, false);
//Somewhere in script
forward Move(objectid);
public Move(objectid)
{
MoveObject(obj1, Float:X, Float:Y, Float:Z, 2.5000);
SetTimer("MoveNext", (MoveObject(obj1, Float:X, Float:Y, Float:Z, 2.5000)), false);//Calculates how long it will take for obj1 to move
}
forward MoveNext(objectid);
public MoveNext(objectid)
{
MoveObject(obj2, Float:X, Float:Y, Float:Z, 2.5000);
SetTimer("MoveNext2", (MoveObject(obj2, Float:X, Float:Y, Float:Z, 2.5000)), false);
}
forward MoveNext2(objectid);
public MoveNext2(objectid)
{
MoveObject(obj3, Float:X, Float:Y, Float:Z, 2.5000);
SetTimer("MoveNext2", (MoveObject(obj3, Float:X, Float:Y, Float:Z, 2.5000)), false);
}
Then keep doing it like that, the example above will do the following:
1. Filterscript starts, sets a 0.5 second timer to start the "Move" function.
2. Timer starts "Move" function wich moves obj1 to X Y Z then sets a timer to start "MoveNext" function when obj1 is finished.
3. Timer starts "MoveNext" function wich moves obj2 to X Y Z then sets a timer to start "MoveNext2" function when obj2 is finished.
4. Timer starts "MoveNext2" function wich moves obj3 to X Y Z then sets a timer to start "MoveNext3" function when obj3 is finished.
5. Then you can keep doing it like that.