How to search for the first open carslot from 2 houses
#1

So i want to make a search for two houses(if player owns 1 house just search through the 1 house) till it finds a free carslot in one or the other house. This is what i got so far:
pawn Код:
for (new HouseSlot; HouseSlot < MAX_HOUSESPERPLAYER; HouseSlot++)
{
    HouseID = APlayerData[playerid][Houses][HouseSlot];
    printf("OnPlayerDisconnect::HouseID = %d", HouseID);
    if (HouseID != 0)
    {
        if (AHouseData[HouseID][VehicleIDs][CarSlot] == 0)
        {
        }
    }
}
Now this i think should work but wouldnt this search trough both houses and not STOP when it finds 1 in the first house. How to do that?
Reply


Messages In This Thread
How to search for the first open carslot from 2 houses - by thimo - 17.07.2013, 21:09
Re: How to search for the first open carslot from 2 houses - by serj009 - 17.07.2013, 21:56
Re: How to search for the first open carslot from 2 houses - by thimo - 17.07.2013, 22:02

Forum Jump:


Users browsing this thread: 2 Guest(s)