03.12.2012, 17:40
Using a timer.
pawn Код:
new ELSpeed,
ELTimer;
ELTimer = SetTimer("ElevatorSpeed", 1000, true);
forward ElevatorSpeed();
public ElevatorSpeed()
{
ELSpeed ++;
if(ELSpeed == 1)
{
// Set your elevators object Speed
}
else if(ELSpeed == 6) // after 6 seconds
{
// Set your elevators object speed
}
else if(ELSpeed == 10) // after 10 seconds
{
// Stop elevator
KillTimer(ELTimer);
ELSpeed = 0;
}
return 1;
}