Why will this only load one house?
#1

pawn Код:
stock LoadHouses()
{
    new QueryString[128];
    mysql_query( "SELECT id, HouseName, HouseOwner, HouseEntX, HouseEntY, HouseEntZ, HouseIntX, HouseIntY, HouseIntZ, HouseInt, HouseWS1, HouseWA1, HouseWS2, HouseWA2, HouseWS3, HouseWA3, HouseMoney, HouseCS, HousePrice, HouseLock FROM Houses");
    mysql_store_result();
    new x;
    if(mysql_num_rows() >= 1)
    {
        while(mysql_retrieve_row())
        {
            mysql_get_field("id", QueryString);
            x = strval(QueryString);

            mysql_get_field("HouseName", HouseName[x]);
           
            mysql_get_field("HouseOwner", HouseOwner[x]);

            mysql_get_field( "HouseEntX", QueryString);
            HouseEntX[x] = floatstr( QueryString);

            mysql_get_field( "HouseEntY", QueryString);
            HouseEntY[x] = floatstr( QueryString);

            mysql_get_field( "HouseEntZ", QueryString);
            HouseEntZ[x] = floatstr( QueryString);

            mysql_get_field( "HouseIntX", QueryString);
            HouseIntX[x] = floatstr( QueryString);
           
            mysql_get_field( "HouseIntY", QueryString);
            HouseIntY[x] = floatstr( QueryString);

            mysql_get_field( "HouseIntZ", QueryString);
            HouseIntZ[x] = floatstr( QueryString);

            mysql_get_field( "HouseInt", QueryString);
            HouseInt[x] = strval( QueryString);

            mysql_get_field( "HouseWS1", QueryString);
            HouseWS1[x] = strval( QueryString);
           
            mysql_get_field( "HouseWA1", QueryString);
            HouseWA1[x] = strval( QueryString);
           
            mysql_get_field( "HouseWS2", QueryString);
            HouseWS2[x] = strval( QueryString);
           
            mysql_get_field( "HouseWA2", QueryString);
            HouseWA2[x] = strval( QueryString);
           
            mysql_get_field( "HouseWS3", QueryString);
            HouseWS3[x] = strval( QueryString);
           
            mysql_get_field( "HouseWA3", QueryString);
            HouseWA3[x] = strval( QueryString);
           
            mysql_get_field( "HouseMoney", QueryString);
            HouseMoney[x] = strval( QueryString);
           
            mysql_get_field( "HouseCS", QueryString);
            HouseCS[x] = strval( QueryString)                   ;
           
            mysql_get_field( "HousePrice", QueryString);
            HousePrice[x] = strval( QueryString);

            mysql_get_field( "HouseLock", QueryString);
            HouseLock[x] = strval( QueryString);
           
            HousePickup[x] = CreateDynamicPickup(1273, 23, HouseEntX[x], HouseEntY[x], HouseEntZ[x], 0, -1, -1, 100.0);
            CreateDynamic3DTextLabel(HouseName[x], COLOUR_LIGHTBLUE, HouseEntX[x],HouseEntY[x], HouseEntZ[x], 100.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, 0, -1, -1, 50.0);
        }
    }
    mysql_free_result();
    return 1;
}
Reply


Messages In This Thread
Why will this only load one house? - by Dokins - 20.11.2011, 18:04
Re: Why will this only load one house? - by [MG]Dimi - 20.11.2011, 18:15
Re: Why will this only load one house? - by Dokins - 20.11.2011, 18:17
Re: Why will this only load one house? - by Dokins - 20.11.2011, 18:19
Re: Why will this only load one house? - by [MG]Dimi - 20.11.2011, 18:23
Re: Why will this only load one house? - by Dokins - 20.11.2011, 18:24
Re: Why will this only load one house? - by [MG]Dimi - 20.11.2011, 18:25
Re: Why will this only load one house? - by Dokins - 20.11.2011, 18:26
Re: Why will this only load one house? - by Dokins - 20.11.2011, 18:38

Forum Jump:


Users browsing this thread: 1 Guest(s)