08.01.2011, 21:50
pawn Код:
public GateCheck()
{
new InRange;
for(new i=0; i<MAX_PLAYERS; i++) {
if(IsPlayerConnected(i)) {
if(IsPlayerInRangeOfPoint(i, 10.0, 1792.6700439453, -1284.7282714844, 15.406204223633))InRange = 1; //Range Of Closed One
}
}
if(InRange)MoveObject(gate, 1792.6700439453, -1284.7282714844, 8.7312259674072, 3.0); //Opened
else MoveObject(gate, 1792.6700439453, -1284.7282714844, 15.406204223633, 3.0); //Closed
}