28.08.2012, 12:44
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);
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;
}