How to make the gate close?
#1

How do I make this gate close by using the same command? For example, I walk up to the gate, I type /gate and it will open, when I use the /gate command again it should close.

pawn Код:
if(strcmp(cmd, "/gate", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            if(gPlayerLogged[playerid] == 0)
            {
                SendClientMessage(playerid, COLOR_GREY, "   You are not logged in yet.");
                return 1;
            }
            MoveObject(pdgate, 2338.68, 2450.26, 8.33, 2.00);
            PlayerPlaySound(playerid, 1153, 0.0, 0.0, 0.0);
            return 1;
        }
        return 1;
    }
Here is the code for the closed gate:

pawn Код:
pdgate = CreateObject(971, 2335.14, 2444.29, 8.33,   0.00, 0.00, 60.44);
Reply


Messages In This Thread
How to make the gate close? - by Fredden1993 - 12.12.2011, 16:31
Re: How to make the gate close? - by N0FeaR - 12.12.2011, 16:40
Re: How to make the gate close? - by Fredden1993 - 12.12.2011, 17:10
Re: How to make the gate close? - by Phanto90 - 12.12.2011, 17:27
Re: How to make the gate close? - by PlayHard - 12.12.2011, 18:50

Forum Jump:


Users browsing this thread: 1 Guest(s)