SA-MP Forums Archive
Pickups - 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: Pickups (/showthread.php?tid=394875)



Pickups - thefatshizms - 24.11.2012

If i make a pickup it will send me to the correct interior, if i make 2 pickups then the first one i created basicly disables itself so when i go over to it it does nothing and the new pickup works as it should.

What have i done wrong?

pawn Код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
    for(new i = 0; i < sizeof(BizInfo);i++)
    {
        if(pickupid == BizInfo[i][pickup])
        {
            SetPlayerInterior(playerid, BizInfo[i][intera]);
        }
    }
    return 1;
}



Re: Pickups - park4bmx - 24.11.2012

are the pickup overlaying each other ?


Re: Pickups - thefatshizms - 24.11.2012

What do you mean by that? Touching each other? if you mean that, no they are not.


Re: Pickups - park4bmx - 24.11.2012

show how you create the pickups


Re: Pickups - thefatshizms - 24.11.2012

pawn Код:
CMD:createbiz(playerid, params[])
{
    new Float:pos[3], inter;
    if(sscanf(params,"i",inter)) return SendClientMessage(playerid, -1, "USAGE: /createbiz");
    GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
    for(new i = 0; i < sizeof(BizInfo);i++)
    {
        BizInfo[i][enterx] = pos[0];
        BizInfo[i][entery] = pos[1];
        BizInfo[i][enterz] = pos[2];
        BizInfo[i][intera] = inter;
        BizInfo[i][pickup] = CreatePickup(1274, 1, BizInfo[i][enterx], BizInfo[i][entery], BizInfo[i][enterz], 0);
    }
    return 1;
}



Re: Pickups - park4bmx - 24.11.2012

you are creating multiple pickup in the same pos!
You loop the same poss with how ever the BizInfo is big.
that will creat many Pickup's in the same positions which when pickedup will get confused.


Re: Pickups - thefatshizms - 24.11.2012

What do you mean in the same position ? Ingame i put them far appart..
I don't understand lol


Re: Pickups - Tamer - 24.11.2012

He is trying to tell you that the pickups are really overlaying eachother. You think you are creating 1,but it creates more than one,but because they are on the same position you see them as a single pickup.


Re: Pickups - thefatshizms - 24.11.2012

Oh, How can i solve this problem


Re: Pickups - Tamer - 24.11.2012

I don't know. Try to make your cmd like PPC housing createhouse cmd. Let me find it.

http://forum.sa-mp.com/showthread.ph...ht=ppc+housing

or the business script:

http://forum.sa-mp.com/showthread.ph...ht=ppc+housing