Pickups and Massives
#1

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[])
Reply
#2

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
Reply
#3

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

Thanks. I used IsPlayerInRangeOfPoint with buisiness position)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)