18.06.2011, 17:29
Use the PlayerToPoint function, and set a timer onto the door.
Might be some errors, but here you got the ground of it. Just edit / fix it as you like.
pawn Код:
forward doorclose;
public doorclose()
{
MoveObject (open,-700.76788330078, 437.17742919922, 18.92423248291, 1.0);
return 1;
}
if(PlayerToPoint(playerid, X, Y, Z))
{
MoveObject (open,-702.41857910156, 437.17742919922, 18.92423248291, 1.0);
SetTimer("doorclose", 3000, false)
SendClientMessage(playerid, COLOR, "Door will close in 3 seconds.");
return 1;
}