Automatic Gate / Door problem!
#1

Hey! I used one of the newest tutorials for automatic gate.. I used it for door as well..
Everything worked fine.. till I tried to make that only you're using car for gate or only on foot for door the gate/door will open..
and only if you're a cop it will open..
but! after I did that! the gate or the door doesnt move at all!
anyway.. here's the publics:

pawn Код:
public PDdoorcheck()
{
    for(new i; i < MAX_PLAYERS; i++)
    {
        if(GetPlayerState(i) == PLAYER_STATE_ONFOOT)
        {
            if(IsPlayerInRangeOfPoint(i, 2.0, 1584.3352, -1637.8557, 12.3400))
            {
                if (PlayerInfo[i][pMember] == 1 || PlayerInfo[i][pLeader] == 1)
                {
                    if(pddooropen == false)
                    {
                        MoveObject(pddoor, 1582.6152, -1637.8557, 12.3400, 2.0);
                        pddooropen = true;
                    }
                    if(pddooropen == true)
                    {
                        MoveObject(pddoor, 1584.3352, -1637.8557, 12.3400, 2.0);
                        pddooropen = false;
                    }
                }
                else
                {
                    SendClientMessage(i,COLOR_GREY,"You are not a Cop!, You better leave or be arrested!.");
                }
            }
        }
    }
    return 1;
}

public GateCheck()
{
    for(new i; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerInAnyVehicle(i))
        {
            if(IsPlayerInRangeOfPoint(i, 5.0, 1588.5841, -1638.3521, 13.7000))
            {
                if (PlayerInfo[i][pMember] == 1 || PlayerInfo[i][pLeader] == 1)
                {
                    if(gateopen == false)
                    {
                        MoveObject(gate, 1597.4628, -1638.3291, 13.7000, 3.5);
                        gateopen = true;
                    }
                    if(gateopen == true)
                    {
                        MoveObject(gate, 1588.5841, -1638.3521, 13.7000, 3.5);
                        gateopen = false;
                    }
                }
                else
                {
                    SendClientMessage(i,COLOR_GREY,"You are not a Cop!, You better leave or be arrested!.");
                }
            }
        }
    }
    return 1;
}

If someone can help me! THANKS!
Reply


Messages In This Thread
Automatic Gate / Door problem! - by Qur - 16.11.2011, 09:59
Re: Automatic Gate / Door problem! - by Elka_Blazer - 16.11.2011, 10:15
Re: Automatic Gate / Door problem! - by CSSI - 16.11.2011, 10:18
Re: Automatic Gate / Door problem! - by Qur - 16.11.2011, 10:38
Re: Automatic Gate / Door problem! - by Elka_Blazer - 16.11.2011, 10:43
Re: Automatic Gate / Door problem! - by Qur - 16.11.2011, 13:24
Re: Automatic Gate / Door problem! - by Qur - 16.11.2011, 15:22
Re: Automatic Gate / Door problem! - by SmiT - 16.11.2011, 15:25
Re: Automatic Gate / Door problem! - by Qur - 16.11.2011, 16:08
Re: Automatic Gate / Door problem! - by Elka_Blazer - 16.11.2011, 16:20

Forum Jump:


Users browsing this thread: 1 Guest(s)