[AJUDA] MoveGate
#1

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);
        }
    }
}
Reply
#2

pawn Код:
#define ForAll(%0,%1) for(new %0 = 0; %0 < %1; ++%0)
Se nгo me engano esse loop estб incorreto!

Use minha include hLoop!

https://sampforum.blast.hk/showthread.php?tid=333324

pawn Код:
#define Function:%1(%2) forward %1(%2); public %1(%2)

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()
{
    hLoop_Player(i)
    {
        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);
        }
    }
}
Reply
#3

Quote:
Originally Posted by Mr.Hardy
Посмотреть сообщение
pawn Код:
#define ForAll(%0,%1) for(new %0 = 0; %0 < %1; ++%0)
Se nгo me engano esse loop estб incorreto!

Use minha include hLoop!

https://sampforum.blast.hk/showthread.php?tid=333324

pawn Код:
#define Function:%1(%2) forward %1(%2); public %1(%2)

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()
{
    hLoop_Player(i)
    {
        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);
        }
    }
}
nem deu :/ continuou igual :S
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)