Rotating Objects (Gates)
#1

Apparently I need to add the rotation co-ordinates in, but I'm not sure where'd they go. Do they get substituted in where the 2.0 co-ordinates are? If I just add them in after X, Y and Z then I just get a compiling error, (arguments do not match the definition or something).

Here's the pawno & the co-ordinates;

pawn Код:
new PDGate1, PDGate2


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.23, -1602.30, 13.40, 2.0, 0.0, 0.0, 0.0); // open
                MoveDynamicObject(PDGate2, 1534.40, -1724.08, 13.39, 2.0, 0.0, 0.0, 0.0); // open
                PlayerPlaySound(playerid, 1035, 0, 0, 0);
                GateOpen = 1;
            }
            else
            {
                MoveDynamicObject(PDGate1, 1534.34, -1602.28, 13.40, 2.0, 0.0, 0.0, 0.0); // closed
                MoveDynamicObject(PDGate2, 1534.60, -1724.08, 13.39, 2.0, 0.0, 0.0, 0.0); // closed
                GateOpen = 0;
            }
        }
    }
        return 1;
}

stock LoadObjects()
{
    // SCPD Gates
    PDGate1 = CreateDynamicObject(2920, 1534.34, -1602.28, 13.40,   -92.16, -2.04, 88.62);
        PDGate2 = CreateDynamicObject(2920, 1534.60, -1724.08, 13.39,  -91.62, 1.56, 91.62);
    return 1;
}

public PDGateMove()
{
    MoveDynamicObject(PDGate1, 1534.23, -1602.30, 13.40, 2.0, 0.0, 0.0, 0.0);
    MoveDynamicObject(PDGate2, 1534.40, -1724.08, 13.39, 2.0, 0.0, 0.0, 0.0);
    return 1;
}
Co-ordinates

PDGate1

Open: CreateObject(2920, 1534.23, -1602.30, 13.40, 0.00, 0.00, 87.24);
Closed: CreateObject(2920, 1534.34, -1602.28, 13.40, -92.16, -2.04, 88.62);

PDGate2

Open: CreateObject(2920, 1534.40, -1724.08, 13.39, 0.00, 0.00, 91.62);
Closed: CreateObject(2920, 1534.60, -1724.08, 13.39, -91.62, 1.56, 91.62);
Reply


Messages In This Thread
Rotating Objects (Gates) - by Luke_James - 26.08.2012, 16:41
Re: Rotating Objects (Gates) - by Luke_James - 27.08.2012, 13:20
Re: Rotating Objects (Gates) - by mrsamp - 27.08.2012, 13:40
Re: Rotating Objects (Gates) - by Ranama - 27.08.2012, 13:42
Re: Rotating Objects (Gates) - by mrsamp - 27.08.2012, 13:50
Re: Rotating Objects (Gates) - by Luke_James - 27.08.2012, 13:57
Re: Rotating Objects (Gates) - by Luke_James - 27.08.2012, 14:20

Forum Jump:


Users browsing this thread: 1 Guest(s)