24.08.2009, 13:32
try this
pawn Code:
public CheckGate()
{
for(new i = 0; i < GetMaxPlayers(); i++)
{
if(!IsPlayerConnected(i)) continue;
if(PlayerToPoint(10.0, i, 1543.379150, -1627.431763, 16.002745) && OpenGate == 0)
{
if(gTeam[i] == 4) //>>>>ERROR 1<<<<
{
MoveObject(P_gate, 1543.041870, -1621.382202, 15.827747,5.00);
OpenGate = 1;
}
}
else if(!PlayerToPoint(10.0, i, 1543.379150, -1627.431763, 16.002745) && OpenGate == 1)
{
if(gTeam[i] == 4)//>>>>ERROR 1<<<<
{
MoveObject(P_gate, 1543.041870, -1621.382202, 15.827747,5.00);
OpenGate = 0;
}
}
}
}

