[help] Gate Closing
#8

You need to Forward the Function closegate, so you can Make the command...

pawn Код:
forward closegate();
Then, You make the Function... You make it to MoveObject the gate to the Original X,Y,Z...
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;
    }
}
And... Done...

For More Info Visit the Wiki

Functions Used:

MoveObject
SetTimer
Reply


Messages In This Thread
[help] Gate Closing - by dclaw - 16.01.2010, 09:57
Re: [help] Gate Closing - by dclaw - 16.01.2010, 10:02
Re: [help] Gate Closing - by pagie1111 - 16.01.2010, 10:03
Re: [help] Gate Closing - by dclaw - 16.01.2010, 10:04
Re: [help] Gate Closing - by dclaw - 16.01.2010, 10:08
Re: [help] Gate Closing - by Klutty - 16.01.2010, 10:10
Re: [help] Gate Closing - by dclaw - 16.01.2010, 10:12
Re: [help] Gate Closing - by CuervO - 16.01.2010, 10:35
Re: [help] Gate Closing - by dclaw - 16.01.2010, 10:54
Re: [help] Gate Closing - by CuervO - 17.01.2010, 05:14

Forum Jump:


Users browsing this thread: 5 Guest(s)