27.07.2012, 21:42
public CheckGate()
{
new gate_status;
for(new i;i<MAX_PLAYERS;i++)
{
if(!IsPlayerConnected(i)) continue;
if(IsPlayerInRangeOfPoint(i,10.0,-1898.22, 238.45, 35.82))gate_status=1;
else if(gPlayer[i][TEAM_1])gate_status=0;
}
if(gate_status)MoveObject(gate, -1898.22, 238.45, 35.82, 2), MoveObject(gate1, -1918.10, 238.45, 35.82, 2);
else MoveObject(gate, -1903.41, 238.47, 35.82, 2), MoveObject(gate1, -1912.25, 238.47, 35.82, 2);
}
Hi guys, what am i doing wrong here? Thanks for your answer.
BTW, it is compiling but the problem is that if TEAM_1 member is close then the gate doesn't work at all.
{
new gate_status;
for(new i;i<MAX_PLAYERS;i++)
{
if(!IsPlayerConnected(i)) continue;
if(IsPlayerInRangeOfPoint(i,10.0,-1898.22, 238.45, 35.82))gate_status=1;
else if(gPlayer[i][TEAM_1])gate_status=0;
}
if(gate_status)MoveObject(gate, -1898.22, 238.45, 35.82, 2), MoveObject(gate1, -1918.10, 238.45, 35.82, 2);
else MoveObject(gate, -1903.41, 238.47, 35.82, 2), MoveObject(gate1, -1912.25, 238.47, 35.82, 2);
}
Hi guys, what am i doing wrong here? Thanks for your answer.
BTW, it is compiling but the problem is that if TEAM_1 member is close then the gate doesn't work at all.