10.10.2009, 08:42
public CheckGate4()
{
for(new i = 0; i < GetMaxPlayers(); i++)
if(PlayerInfo[i][pTeam] == 2 || (PlayerInfo[i][pTeam] == 100))
{
if(!IsPlayerConnected(i)) continue;
if(PlayerToPoint(10.0, i, 2335.227, 2443.460, 8.261) && OpenGate[i] == 0)
{
MoveObject(PoliciaLV2, 2335.227, 2443.460, -2.261, 5);
OpenGate[i] = 1;
}
else if(!PlayerToPoint(10.0, i, 1881.8, 2152.2, 10.
&& OpenGate[i] == 0)
{
MoveObject(PoliciaLV2, 2335.227, 2443.460, 8.261, 5);
OpenGate[i] = 0;
}
}
}
{
for(new i = 0; i < GetMaxPlayers(); i++)
if(PlayerInfo[i][pTeam] == 2 || (PlayerInfo[i][pTeam] == 100))
{
if(!IsPlayerConnected(i)) continue;
if(PlayerToPoint(10.0, i, 2335.227, 2443.460, 8.261) && OpenGate[i] == 0)
{
MoveObject(PoliciaLV2, 2335.227, 2443.460, -2.261, 5);
OpenGate[i] = 1;
}
else if(!PlayerToPoint(10.0, i, 1881.8, 2152.2, 10.
![Cool](images/smilies/cool.gif)
{
MoveObject(PoliciaLV2, 2335.227, 2443.460, 8.261, 5);
OpenGate[i] = 0;
}
}
}