Try getting the range of the player before closing the gate
something like this but not exactly.
something like this but not exactly.
Code Select
if(!IsPlayerInRangeOfPoint(i, 8.0, GatePos[a][3], GatePos[a][4], GatePos[a][5]))
{
if(!open[i])
{
MoveObject(Gate[a], GatePos[a][0],GatePos[a][1],GatePos[a][2], 5.00, GatePos[a][3], GatePos[a][4], GatePos[a][5]);
open[i] = false;
}
}