17.11.2009, 20:05
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; }