Creating pickups on a new island
#1

Hi,

I've got a problem.
When I create my pickups over land (standard gta sa map), the pickups stay there.

When I create exactly the same pickup on a new island (coordinates: x = 3760.00, y = 573.00, z = 7.00), and we drive to that island, the pickup isn't shown.
I'm using type 1 for the pickup.

When I create a pickup ingame with the exact same command, the new one shows up.

How can I fix this?

This is the function where I create my pickups for refueling a vehicle:

pawn Код:
// This function is used to add refuelling pickups to the map
stock AddRefuelPickup(Float:x, Float:y, Float:z)
{
    // Add the refuel-pickup to the world (type 1: exists always, cannot be picked up)
    new puID = CreatePickup(1244, 1, x, y, z, 0);

    // Add the pickup-id to the ARefuelPickups array
    for (new i; i < sizeof(ARefuelPickups); i++)
    {
        // If an empty array-index is found
        if (ARefuelPickups[i][PickupID] == 0)
        {
            // Store the pickup-id in this empty slot
            ARefuelPickups[i][PickupID] = puID;
            ARefuelPickups[i][pux] = x;
            ARefuelPickups[i][puy] = y;
            ARefuelPickups[i][puz] = z;

            // Stop browsing through the array
            break;
        }
    }
}
This is how I use the function (the first 8 works normally):
pawn Код:
// Add all refuel-pickups to the world
    AddRefuelPickup(-1471.5, 1863.75, 32.7);
    AddRefuelPickup(-1326.5, 2677.5, 50.1);
    AddRefuelPickup(611.5, 1694.5, 7.0);
    AddRefuelPickup(-2249.25, -2559.0, 32.0);
    AddRefuelPickup(-1606.5, -2714.0, 48.6);
    AddRefuelPickup(-93.5, -1175.0, 2.3);
    AddRefuelPickup(1377.5, 457.0, 19.9);
    AddRefuelPickup(651.5, -565.5, 16.4);

    AddRefuelPickup(3760, 573.25, 7.1); // This one doesn't show up, all the others do
And yes, the array ARefuelPickups is large enough to hold 50 of these pickups (only 9 are created and added to this array).

This is all done during OnGameModeInit().

Could it be because they are spawned outside the normal limits of the map?
It's the only reason I can think off why it won't work.



The island's models are defined in a filterscript.
Reply


Messages In This Thread
Creating pickups on a new island - by PowerPC603 - 11.01.2011, 19:03
Re: Creating pickups on a new island - by Babul - 11.01.2011, 19:44
Re: Creating pickups on a new island - by PowerPC603 - 11.01.2011, 20:09
Re: Creating pickups on a new island - by PowerPC603 - 13.01.2011, 14:21

Forum Jump:


Users browsing this thread: 2 Guest(s)