09.03.2013, 00:59
Hello, I want to make these 2 commands into one if that is possible?
and
pawn Код:
if (strcmp("/cellopen", cmdtext, true, 10) == 0)
{
if(IsPlayerConnected(playerid))
{
if(IsAPDMember(playerid) || IsAFreecop(playerid))
{
if(IsPlayerInRangeOfPoint(playerid, 2.0,1491.21484375,-1764.90002441,3284.25048828)) //Cell0
{
MoveDynamicObject(cell0,1491.21484375-1.25,-1764.90002441,3284.25048828,0.50);
SendClientMessage(playerid, 0xFFFFFFFF, "SERVER: Cell0 has been opened.");
}
if(IsPlayerInRangeOfPoint(playerid, 2.0,1494.41210938,-1764.90002441,3284.25048828)) //Cell1
{
MoveDynamicObject(cell1,1494.41210938-1.25,-1764.90002441,3284.25048828,0.50);
SendClientMessage(playerid, 0xFFFFFFFF, "SERVER: Cell1 has been opened.");
}
if(IsPlayerInRangeOfPoint(playerid, 2.0,1497.61132812,-1764.90002441,3284.25048828)) //Cell2
{
MoveDynamicObject(cell2,1497.61132812-1.25,-1764.90002441,3284.25048828,0.50);
SendClientMessage(playerid, 0xFFFFFFFF, "SERVER: Cell2 has been opened.");
}
if(IsPlayerInRangeOfPoint(playerid, 2.0,1500.81445312,-1764.90002441,3284.25048828)) //Cell3
{
MoveDynamicObject(cell3,1500.81445312-1.25,-1764.90002441,3284.25048828,0.50);
SendClientMessage(playerid, 0xFFFFFFFF, "SERVER: Cell3 has been opened.");
}
if(IsPlayerInRangeOfPoint(playerid, 2.0,1500.81994629,-1761.51000977,3284.25048828)) //Cell4
{
MoveDynamicObject(cell4,1500.81994629-1.25,-1761.51000977,3284.25048828,0.50);
SendClientMessage(playerid, 0xFFFFFFFF, "SERVER: Cell4 has been opened.");
}
if(IsPlayerInRangeOfPoint(playerid, 2.0,1491.22094727,-1761.50000000,3284.25048828)) //Cell5
{
MoveDynamicObject(cell5,1491.22094727-1.25,-1761.50000000,3284.25048828,0.50);
SendClientMessage(playerid, 0xFFFFFFFF, "SERVER: Cell5 has been opened.");
}
if(IsPlayerInRangeOfPoint(playerid, 2.0,1494.41894531,-1761.51000977,3284.25048828)) //Cell6
{
MoveDynamicObject(cell6,1494.41894531-1.25,-1761.51000977,3284.25048828,0.50);
SendClientMessage(playerid, 0xFFFFFFFF, "SERVER: Cell6 has been opened.");
}
if(IsPlayerInRangeOfPoint(playerid, 2.0,1497.61999512,-1761.51000977,3284.25048828)) //Cell7
{
MoveDynamicObject(cell7,1497.61999512-1.25,-1761.51000977,3284.25048828,0.50);
SendClientMessage(playerid, 0xFFFFFFFF, "SERVER: Cell7 has been opened.");
}
}
}
return 1;
}
pawn Код:
if (strcmp("/cellclose", cmdtext, true, 10) == 0)
{
if(IsPlayerConnected(playerid))
{
if(IsAPDMember(playerid) || IsAFreecop(playerid))
{
if(IsPlayerInRangeOfPoint(playerid, 2.0,1491.21484375,-1764.90002441,3284.25048828)) //Cell0
{
MoveDynamicObject(cell0,1491.21484375,-1764.90002441,3284.25048828,0.50);
SendClientMessage(playerid, 0xFFFFFFFF, "SERVER: Cell0 has been closed.");
}
if(IsPlayerInRangeOfPoint(playerid, 2.0,1494.41210938,-1764.90002441,3284.25048828)) //Cell1
{
MoveDynamicObject(cell1,1494.41210938,-1764.90002441,3284.25048828,0.50);
SendClientMessage(playerid, 0xFFFFFFFF, "SERVER: Cell1 has been closed.");
}
if(IsPlayerInRangeOfPoint(playerid, 2.0,1497.61132812,-1764.90002441,3284.25048828)) //Cell2
{
MoveDynamicObject(cell2,1497.61132812,-1764.90002441,3284.25048828,0.50);
SendClientMessage(playerid, 0xFFFFFFFF, "SERVER: Cell2 has been closed.");
}
if(IsPlayerInRangeOfPoint(playerid, 2.0,1500.81445312,-1764.90002441,3284.25048828)) //Cell3
{
MoveDynamicObject(cell3,1500.81445312,-1764.90002441,3284.25048828,0.50);
SendClientMessage(playerid, 0xFFFFFFFF, "SERVER: Cell3 has been closed.");
}
if(IsPlayerInRangeOfPoint(playerid, 2.0,1500.81994629,-1761.51000977,3284.25048828)) //Cell4
{
MoveDynamicObject(cell4,1500.81994629,-1761.51000977,3284.25048828,0.50);
SendClientMessage(playerid, 0xFFFFFFFF, "SERVER: Cell4 has been closed.");
}
if(IsPlayerInRangeOfPoint(playerid, 2.0,1491.22094727,-1761.50000000,3284.25048828)) //Cell5
{
MoveDynamicObject(cell5,1491.22094727,-1761.50000000,3284.25048828,0.50);
SendClientMessage(playerid, 0xFFFFFFFF, "SERVER: Cell5 has been closed.");
}
if(IsPlayerInRangeOfPoint(playerid, 2.0,1494.41894531,-1761.51000977,3284.25048828)) //Cell6
{
MoveDynamicObject(cell6,1494.41894531,-1761.51000977,3284.25048828,0.50);
SendClientMessage(playerid, 0xFFFFFFFF, "SERVER: Cell6 has been closed.");
}
if(IsPlayerInRangeOfPoint(playerid, 2.0,1497.61999512,-1761.51000977,3284.25048828)) //Cell7
{
MoveDynamicObject(cell7,1497.61999512,-1761.51000977,3284.25048828,0.50);
SendClientMessage(playerid, 0xFFFFFFFF, "SERVER: Cell7 has been closed.");
}
}
}
return 1;
}