MoveObject help
#1

Any one know what could cause that ?



and here again.



Ok so basicly the gate should open when I click the 'KEY_CROUCH'.
It used to work once I messed up something.

Codes :
pawn Код:
PDgate1=CreateObject(971,1589.09997559,-1637.90002441,15.00000000,0.00000000,0.00000000,0.00000000); //object(lspd garage gate) (2)
  PDbarrier=CreateObject(968,1544.40002441,-1630.69995117,13.39999962,0.00000000,90.00000000,87.99981689);
pawn Код:
if (newkeys & KEY_CROUCH)
    {
        if((PlayerInfo[playerid][power] >= 10 || PlayerInfo[playerid][playerteam]==COPS ) && IsPlayerInSphere(playerid, 1589.09997559,-1637.90002441,15.00000000,10))
        {
            MoveObject( PDgate1, 1595.5693,-1637.5352,13.7188,2);
            SetTimer("PDgate1close", 10000, false);
        }
        else if((PlayerInfo[playerid][power] >= 10 || PlayerInfo[playerid][playerteam]==COPS ) && IsPlayerInSphere(playerid,1544.40002441,-1630.69995117,13.39999962,10))
        {
            MoveObject( PDbarrier, 1544.1316,-1631.3843,15.9116,2);
            SetTimer("PDbarrierclose", 10000, false);
        }
    }
The object is moving, but for some reason there's another object at the same place.
I searched the script maby it was double object but no.
Can you see a problem?

Thanks in advance, Adam.
Reply
#2

PDgate1 and PDgateBarrier are the objects. Do one thing Cooper. Make a command to MoveObject first. If that works tell us the code here too. Secondly check for any syntax error.
Reply
#3

If your objects are duplicating, you may have created the objects under OnPlayerConnect. Done that loads.
Reply
#4

Found the problem I created the tewice. Thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)