Moving object won't work...
#1

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.
Reply
#2

Change the pickup line to:

pawn Код:
Pickup8 = CreatePickup(1317, 2, 211.2209, 1867.2521, 13.1406, -1);
That will solve 1 of your probs.
Reply
#3

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.
Reply
#4

Have a look here at pickup types:

https://sampwiki.blast.hk/wiki/PickupTypes
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)