Moving object won't work... - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Moving object won't work... (
/showthread.php?tid=231502)
Moving object won't work... -
PANNA - 25.02.2011
Hey there,
I've got a problem here, where i don't get out of, since pawno doesn't give any warnings or errors...
pawn Код:
New Pickup8;
public OnGameModeInit()
{
Gate2 = CreateObject(3058, 211.28684997559, 1866.3059082031, 12.823017120361, 0, 0, 24);
return 1;
}
public OnObjectMoved(objectid)
{
if(objectid == Gate1)
Pickup8 = CreatePickup(1317, 8, 211.2209, 1867.2521, 13.1406, -1);
return 1;
}
public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid == Pickup7)
{
MoveObject(Gate1, 209.72979736328, 1874.9516601563, 8.571362495422, 0.50);
ApplyAnimation(playerid, "PED", "BOM_Plant", 3.4, 0, 1, 1, 1, 1);
SendClientMessage(playerid, 0xFFFFFFFF,"The gate opens slowly");
}
if(pickupid == Pickup8)
{
MoveObject(Gate2, 211.28684997559, 1866.3059082031, 9.823017120361, 1.00);
SendClientMessage(playerid, 0xFFFFFFFF,"You've unlocked the beginners gate!");
}
return 1;
}
Now what actually happens, is the pickup shows up, everything what has to happen, but only when i pick up pickup8, the one to open the second gate (Gate2), the pickup goes away, comes back, goes away, comes back and goes away again, and then it won't come back, and also the gate won't open...
Why is the gate not opening and why is the pickup coming back a few times
Thanx,
Panna.
Re: Moving object won't work... -
Stigg - 25.02.2011
Change the pickup line to:
pawn Код:
Pickup8 = CreatePickup(1317, 2, 211.2209, 1867.2521, 13.1406, -1);
That will solve 1 of your probs.
Re: Moving object won't work... -
PANNA - 25.02.2011
well then we have another problem, because it shouldn't come back, once it's picked up, it should go away and never come back untill re-join.
Re: Moving object won't work... -
Stigg - 25.02.2011
Have a look here at pickup types:
https://sampwiki.blast.hk/wiki/PickupTypes