16.01.2010, 10:35
You need to Forward the Function closegate, so you can Make the command...
Then, You make the Function... You make it to MoveObject the gate to the Original X,Y,Z...
Once, You can make the command... You set the timer... (1000 Milliseconds = 1 Second)
And... Done...
For More Info Visit the Wiki
Functions Used:
MoveObject
SetTimer
pawn Код:
forward closegate();
pawn Код:
public closegate()
{
MoveObject(gate,X,Y,Z, 1.5000);
return 1;
}
Once, You can make the command... You set the timer... (1000 Milliseconds = 1 Second)
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmd, "/opengate", true) == 0)
{
MoveObject(gate,-293.828,1507.450,76.070,1.5000);
SetTimer("closegate", 7000, false);
return 1;
}
}
For More Info Visit the Wiki
Functions Used:
MoveObject
SetTimer