Gate command
#6

Quote:
Originally Posted by Hobod
Посмотреть сообщение
but isnt there a way to combine open and close? i know how to make the seperate commands.
Why not just do something like this:

EDIT: Forgot to add in the create object - but you know how to do it

pawn Код:
new GateStat;
GateStat = 0;
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp("/gatethingblah", cmdtext) == 0)
    {
        if(GateStat = 0) //If gate is closed
        {
            GateStat = 1; //Gate = Open
            MoveObject(blah, blah); //To open
            return 1;
        }
        else if(GateStat = 1) //If gate is open
        {
            GateStat = 0; //Gate = Closed
            MoveObject(blah, blah); //To closed
            return 1;
        }
    }
    return 0;
}
Something like that?

I havent tested it, its just something i thought of - i use it for stepping's of checkpoints on my new script and it works like a beauty
Reply


Messages In This Thread
Gate command - by Hobod - 04.08.2010, 01:09
Re: Gate command - by cofy1 - 04.08.2010, 01:25
Re: Gate command - by Hobod - 04.08.2010, 01:31
Re: Gate command - by Daren_Jacobson - 04.08.2010, 01:37
Re: Gate command - by Hobod - 04.08.2010, 12:44
Re: Gate command - by Ash. - 04.08.2010, 13:02
Re: Gate command - by Hobod - 04.08.2010, 17:37
Re: Gate command - by Daren_Jacobson - 04.08.2010, 18:00
Re: Gate command - by Hobod - 04.08.2010, 20:41
Re: Gate command - by JaTochNietDan - 04.08.2010, 21:36

Forum Jump:


Users browsing this thread: 1 Guest(s)