MoveObject help - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: MoveObject help (
/showthread.php?tid=345178)
MoveObject help -
AdamCooper - 24.05.2012
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.
Re: MoveObject help -
Ballu Miaa - 24.05.2012
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.
Re: MoveObject help -
MP2 - 24.05.2012
If your objects are duplicating, you may have created the objects under OnPlayerConnect. Done that loads.
Re: MoveObject help -
AdamCooper - 24.05.2012
Found the problem I created the tewice. Thanks