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



Pickups and Massives - C0mBat1ve - 29.08.2014

So, i got a massive ExaclyBizzPickup[MAX_BIZZ],
const MAX_BIZZ = 200;
Everytime a business loads one at a time in a cell
How can i get business pickupid?
if(pickupid == ExaclyBizzPickup[])


Re: Pickups and Massives - Pottus - 29.08.2014

Loop it and find the id.

pawn Код:
GetBizzPickupID(pickupid)
{
    for(new i = 200; i < 200; i++)
    {
        if(pickupid == ExaclyBizzPickup[i]) return i;
    }
}
Returns the array index of the found pickupid


Re: Pickups and Massives - IceCube! - 29.08.2014

You'll need to loop to find the Business with the information your looking for, example your searching for a Business name and your looking for "RC Shop".

pawn Код:
for(new i = 0; i < MAX_BUSINESSES; i++)
{
    if(BizName[i] = "RC Shop")
    {
         return i; // Return's pickup ID, Or whatever code you want here.
     }
}
Obviously I can't be more helpful, as your not being very detailed about what you need it for or are trying to do.
RC Shop would be a string coming from a command, and you could make the alterations and return the Pickup ID if needed as that's what I think you need.


Re: Pickups and Massives - C0mBat1ve - 29.08.2014

Thanks. I used IsPlayerInRangeOfPoint with buisiness position)