26.09.2012, 15:59
I had an extra bracket, sorry. Think this will do it.
pawn Код:
if ( PRESSED(KEY_LOOK_BEHIND) )
{
if(!IsACop(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You are not an SAPD Oficer.");
else {
if(PlayerToPoint(3.0,playerid,1558.970703125, -1677.9114990234, 1722.1081542969))
{
if(gate1status == 0) {
MoveObject(door1,1558.1387939453, -1677.8883056641, 1722.1081542969,1.50);
MoveObject(door2,1562.7950439453, -1677.8798828125, 1722.1081542969,1.50);
gate1status = 1; }
else if(gate1status == 1) {
MoveObject(door1,1558.970703125, -1677.9114990234, 1722.1081542969,1.50);
MoveObject(door2,1561.9755859375, -1677.8798828125, 1722.1081542969,1.50);
gate1status = 0; }
}
else if(PlayerToPoint(3.0,playerid,1552.7789306641, -1691.4653320313, 1722.1081542969))
{
if(gate2status == 0) {
MoveObject(door3,1549.6147460938, -1691.4772949219, 1722.1081542969,1.50);
MoveObject(door4,1554.2923583984, -1691.4328613281, 1722.1081542969,1.50);
gate2status = 1; }
else if(gate2status == 1) {
MoveObject(door3,1550.4266357422, -1691.5009765625, 1722.1081542969,1.50);
MoveObject(door4,1553.4294433594, -1691.4515380859, 1722.1081542969,1.50);
gate2status = 0; }
}
else if(PlayerToPoint(3.0,playerid,1560.1090087891, -1653.4477539063, 1719.5637207031))
{
if(gate3status == 0) {
MoveObject(door5,1560.1309774200, -1651.7266845703, 1719.5637207031,1.50);
gate3status = 1; }
else if(gate3status == 1) {
MoveObject(door5,1560.1090087891, -1653.4477539063, 1719.5637207031,1.50);
gate3status = 0; }
}
}
return 1;
}