12.06.2012, 20:56
o problema й que quando tem um sу player no server (playerid 0) o portгo abre normalmente mas quando entra + de 1 player ele so abre do id 1 pra cima e nao abre + pro id 0. como arrumo isso?
pawn Код:
#define Function:%1(%2) forward %1(%2); public %1(%2)
#define ForAll(%0,%1) for(new %0 = 0; %0 < %1; ++%0)
new gate_yes1;
gate_yes1 = CreateDynamicObject(8210,2558.19995117,1694.00000000,12.80000019,0.00000000,0.00000000,270.00000000); //object(vgsselecfence12) (1)
SetTimer("MoveYes1",1000,true);
Function:MoveYes1()
{
ForAll(i,MAX_PLAYERS)
{
if(!IsPlayerConnected(i)) continue;
if(IsPlayerInRangeOfPoint(i, 8.0, 2518.1443,1822.8728,10.7555))
{
MoveDynamicObject(gate_yes1, 2518.89990234,1823.59997559,2.59999990, 10);
}else{
MoveDynamicObject(gate_yes1, 2518.89990234,1823.59997559,12.89999962, 10);
}
}
}