House system only loading 1 house.
#2

I think the problem is that you returned in 'for'
pawn Код:
for(new h = 1; h < sizeof(HouseInfo); h++)
    {
        format(file, sizeof(file), "RRP/houses/%d.ini", h);
        if(fexist(file))
        {
            if(HouseInfo[h][Owner] == 0)
            {
                new string[128];
                housepickup[h] = CreatePickup(1273, 1, HouseInfo[h][X], HouseInfo[h][Y], HouseInfo[h][Z], 0);
                format(string, sizeof(string), "This house is for sale. Use /buyhouse to buy it. Price: %d", HouseInfo[h][Price]);
                housetext[h] = Create3DTextLabel(string, COLOR_RED, HouseInfo[h][X], HouseInfo[h][Y], HouseInfo[h][Z], 10.0, 0);
            }
            else
            {
                new string[128];
                housepickup[h] = CreatePickup(1273, 1, HouseInfo[h][X], HouseInfo[h][Y], HouseInfo[h][Z], 0);
                format(string, sizeof(string), "This house is owned by %s.", HouseInfo[h][Owner]);
                housetext[h] = Create3DTextLabel(string, COLOR_RED, HouseInfo[h][X], HouseInfo[h][Y], HouseInfo[h][Z], 10.0, 0);
            }
        }
        [b][u]return 1;[/u][/b]
    }
    return 1;
Reply


Messages In This Thread
House system only loading 1 house. - by ricardo178 - 17.02.2012, 21:37
Re: House system only loading 1 house. - by TheGamer! - 17.02.2012, 21:42
Re: House system only loading 1 house. - by milanosie - 17.02.2012, 21:42
Re : House system only loading 1 house. - by ricardo178 - 17.02.2012, 21:55
Re : House system only loading 1 house. - by ricardo178 - 18.02.2012, 11:10
Re: House system only loading 1 house. - by DaRkM - 18.02.2012, 19:53
Re : Re: House system only loading 1 house. - by ricardo178 - 18.02.2012, 21:16
Re : House system only loading 1 house. - by ricardo178 - 18.02.2012, 21:28
Re: House system only loading 1 house. - by DaRkM - 19.02.2012, 06:37

Forum Jump:


Users browsing this thread: 3 Guest(s)