30.11.2010, 00:24
Have you tried doing it with a timer?
pawn Код:
forward MoveGates();
public OnGamemodeInit()
{
SetTimer("MoveGates", 2000, true); //2000 is 2 seconds, which means it will check every 2 seconds. Change it to whatever you want.
}
public MoveGates()
{
if(IsPlayerInRangeOfPoint(playerid, 15.0, -1136.44543457, -987.37402344, 148.59642029))
{
MoveObject(ob1 , -1136.44543457, -987.37402344, 130, 3.1);
MoveObject(ob2 , -1136.31091309,-991.23712158, 160, 3.1);
}
else
{
MoveObject(ob1 , -1136.44543457, -987.37402344, 148.59642029, 3.1);
MoveObject(ob2 , -1136.31091309,-991.23712158, 150.75749207, 3.1);
}
return 1;
}