Problems with gates
#1

When I do the /gate command, the gates don't open. They don't even move. They're the toll-booth barriers..

GATE OPEN
CreateObject(2920, 1534.39, -1602.27, 13.27, 0.00, 0.00, 89.94);

GATECLOSED
CreateObject(2920, 1534.39, -1602.27, 13.27, -90.60, 360.06, 89.94);

pawn Код:
new PDGate1


forward PDGateMove();


command(gate, playerid, params[])
{
    if(IsPlayerInRangeOfPoint(playerid, 25.0, 1531.2126,-1603.6033,13.3828))
    {
        if(Player[playerid][Faction] == 1)
        {
            if(GateOpen == 0)
            {
                MoveDynamicObject(PDGate1, 1534.39, -1602.27, 13.27, 2.0, 0.0, 0.0, 89.94); // /gate opens the gate
                GateOpen = 1;
            }
            else
            {
                MoveDynamicObject(PDGate1, 1534.39, -1602.27, 13.27, 2.0, -90.60, 360.06, 89.94); // /gate closes the gate
                GateOpen = 0;
            }
        }
    }
        return 1;
}

stock LoadObjects() // loads the gate in the CLOSED position
{
    // SCPD Gates
    PDGate1 = CreateObject(2920, 1534.39,-1602.27,13.27,-90.60,360.06,89.94);
    return 1;
}

public PDGateMove() // moves the gate to the OPEN position when player does /gate
{
    MoveDynamicObject(PDGate1, 1534.39,-1602.27,13.27,0.00,0.00,89.94);
    return 1;
}
Reply


Messages In This Thread
Problems with gates - by Luke_James - 28.08.2012, 12:44
Re: Problems with gates - by RicaNiel - 28.08.2012, 12:50
Re: Problems with gates - by Luke_James - 28.08.2012, 12:52
Re: Problems with gates - by _Khaled_ - 28.08.2012, 14:10
Re: Problems with gates - by Luke_James - 28.08.2012, 14:48
Re: Problems with gates - by Luke_James - 28.08.2012, 15:18
Re: Problems with gates - by avivelkayam - 28.08.2012, 16:31
Re: Problems with gates - by Hyperfire - 28.08.2012, 20:52
Re: Problems with gates - by RedFusion - 28.08.2012, 20:54
Re: Problems with gates - by mamorunl - 28.08.2012, 21:05

Forum Jump:


Users browsing this thread: 1 Guest(s)