Bug after for(new i=0,i<MAX_PLAYERS,i++) -
dalkgamler - 20.07.2012
i have a problem i use for(new i=0,i<MAX_PLAYERS,i++) to open gates automatic but just the one with the highest ID can open gates any help?
Re: Bug after for(new i=0,i<MAX_PLAYERS,i++) -
hansen111 - 20.07.2012
Replace commas with semicolon like:
for(new i=0;i<MAX_PLAYERS;i++)
AW: Bug after for(new i=0,i<MAX_PLAYERS,i++) -
dalkgamler - 20.07.2012
ry i have written something what i have had on my mind
pawn Код:
public AutoTor()
{
for(new i=0; i<MAX_PLAYERS; i++)
{
if(!IsPlayerConnected(i))continue;
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;
}
this i have on an other place in the gamemode it is the same
i have this in a filterscript too but it works fine
Re: Bug after for(new i=0,i<MAX_PLAYERS,i++) -
EV007 - 20.07.2012
Is the timer infinite on the callback? If not, then that's the problem.
AW: Bug after for(new i=0,i<MAX_PLAYERS,i++) -
dalkgamler - 20.07.2012
it went but just for the last id like if id 0 and id 1 is connect id 1 can open gates and if id 1 disconnect id 0 can open the gates