25.07.2012, 12:59
i have done a script with gates but only the player with highest id can open them
pawn Код:
public AutoTor()
{
for(new i=0; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
/* if(IsPlayerInRangeOfPoint( i, 15,345.27, 1797.73, 19.45))
{
MoveObject(ArmyGate3l,339.28, 1793.84, 18.31, 3, 0.00, 0.00, 33.02);
MoveObject(ArmyGate3r,351.15, 1801.99, 18.31, 3, 0.00, 0.00, 35.95);
}
else
{
MoveObject(ArmyGate3l,342.90, 1796.20, 18.31, 3, 0.00, 0.00, 33.02);
MoveObject(ArmyGate3r,347.55, 1799.39, 18.31, 3, 0.00, 0.00, 35.95);
}*/
if(IsPlayerInRangeOfPoint( i, 15, 286.03, 1820.46, 19.94))
{
MoveObject(ArmyGate1,286.03, 1833.72, 19.94, 3, 0.00, 0.00, 90.00);
}
else
{
MoveObject(ArmyGate1,286.03, 1820.46, 19.94, 3, 0.00, 0.00, 90.00);
}
if(IsPlayerInRangeOfPoint( i, 15, 134.92, 1941.57, 21.64))
{
MoveObject(ArmyGate2, 120.84, 1941.57, 21.62, 3, 0.00, 0.00, 0.00);
}
else
{
MoveObject(ArmyGate2,134.92, 1941.57, 21.64, 3, 0.00, 0.00, 0.00);
}
}
}
return 1;
}