Help! how to close the doors?
#2

Make a variable.

pawn Код:
new Doorsopened;
pawn Код:
public OnPlayerKeyStateChange( playerid, newkeys, oldkeys )
{
    if( PRESSED( KEY_SECONDARY_ATTACK ) )
    {
        if( IsPlayerInRangeOfPoint( playerid, 2.0, 3303.86743164,-1776.77416992,12.91423416 ) )
        {
            if( Doorsopened == 0 )
            {
                Doorsopened = 1;
                MoveObject( mygate, 3304.685546875,-1777.5478515625,8.7626247406006, 4.0 );
                ApplyAnimation( playerid,"HEIST9","Use_SwipeCard",4 .1,0,0,0,1,1,1 );
            }
            else
            {
                Doorsopened = 0;
                //Your code to close the gates, moveobject.
            }
        }
    }
    return 1;
}
UNTESTED.
Reply


Messages In This Thread
Help! how to close the doors? - by arjunaryas - 13.02.2011, 18:51
Re: Help! how to close the doors? - by Mean - 13.02.2011, 19:05
Re: Help! how to close the doors? - by arjunaryas - 13.02.2011, 19:09
Re: Help! how to close the doors? - by Mean - 13.02.2011, 19:10
Re: Help! how to close the doors? - by arjunaryas - 13.02.2011, 19:21
Re: Help! how to close the doors? - by Mean - 13.02.2011, 19:23

Forum Jump:


Users browsing this thread: 2 Guest(s)