Need help with a Gate.
#1

Hi,
I'm planning on making a gate open (It'll open going into the ground) with one command. I've scripted most of it, but everytime I test it in-game the gate moves South, and it never stops. I just want it to go into the ground when I do the command /gate and go back up when I do the command /gate.

What's wrong with the code?
pawn Код:
new Gate, bool:GateClosed = true;
Gate = CreateObject(971, 1620.69995117, -1882.40002441, 15.30000019, 0.00000000, 0.00000000, 179.99993896, 100.0); // Gate closed


CMD:gate(playerid, params[])
{
    if(GateClosed){
        if(IsPlayerInRangeOfPoint(playerid, 15.0, 1620.69995117, -1882.40002441, 15.30000019)){
            GateClosed = false;
            MoveObject(Gate, 1620.69995117, 69995117, -1882.40002441, 3.0, 0.00000000, 0.00000000, 179.99993896);
            return 1;
        }
    }
    else{
        if(IsPlayerInRangeOfPoint(playerid, 15.0, 1620.69995117, -1882.40002441, 15.30000019)){
            GateClosed = true;
            MoveObject(Gate, 1620.69995117, -1882.40002441, 15.30000019, 3.0, 0.0, 0.0, 179.99993896);
           
        }
    }   return 1;
}
Thanks for your help.
Reply


Messages In This Thread
Need help with a Gate. - by rangerxxll - 21.02.2012, 23:18
Re: Need help with a Gate. - by ReneG - 21.02.2012, 23:26
Re: Need help with a Gate. - by rangerxxll - 21.02.2012, 23:36
Re: Need help with a Gate. - by ReneG - 21.02.2012, 23:40
Re: Need help with a Gate. - by rangerxxll - 21.02.2012, 23:53
Re: Need help with a Gate. - by JhnzRep - 21.02.2012, 23:55
Re: Need help with a Gate. - by rangerxxll - 21.02.2012, 23:56
Re: Need help with a Gate. - by JhnzRep - 21.02.2012, 23:57
Re: Need help with a Gate. - by rangerxxll - 22.02.2012, 00:01
Re: Need help with a Gate. - by JhnzRep - 22.02.2012, 00:03

Forum Jump:


Users browsing this thread: 1 Guest(s)