Auto gate close.
#2

All about the timer<

Код:
//on top of your script
forward CloseGate();

//on OnPlayerCommandText
if (strcmp("/hqopen", cmdtext, true, 10) == 0) // OPENS GATE
{
  	if (PlayerToPoint(20.00, playerid, 785.547, -1152.5, 25.3229))
  	{
  		MoveObject(gate1,785.547, -1152.5, 31.1229, 2.0);
  		SendClientMessage(playerid, 0xFFFFFFAA, "Tea House Gate Is Now Opening");
         SetTimer("CloseGate", 5000, false);

	}
	else
	{
  		SendClientMessage(playerid, 0xf01818FF, "Sorry, To Far Away To Open Tea House Gate");
	}
  	return 1;
}

// At a place in your script..
public CloseGate()
{
	MoveObject(gate1, X,Y,Z, 2.0); // gate close pos
	return 1;
}
Reply


Messages In This Thread
Auto gate close. - by balisticore - 02.09.2009, 05:35
Re: Auto gate close. - by Battleman93 - 17.11.2009, 20:05
Re: Auto gate close. - by Stefan-Holland - 28.02.2010, 12:13

Forum Jump:


Users browsing this thread: 1 Guest(s)