04.10.2009, 18:41
pawn Код:
public CheckGate()
{
for(new i = 0; i < GetMaxPlayers(); i++)
if (gTeam[i] == TEAM_COP)
{
if(PlayerToPoint(10.0, i, 1937.5629882813, 2152.091796875, 11.5703125) && OpenGate == 0)
{
MoveObject(c_gate, 1937.5629882813, 2152.091796875, -11.5703125, 1);
OpenGate = 1;
}
else if(!PlayerToPoint(10.0, i, 1937.5629882813, 2152.091796875, 11.5703125) && OpenGate == 1)
{
MoveObject(c_gate, 1937.5629882813, 2152.091796875, 11.5703125, 1);
OpenGate = 0;
}
}
}

