20.11.2015, 01:44
Okay so the problem is simple, the loop will only load "price" and nothing else.
I suck with SQL stuff...
I suck with SQL stuff...
pawn Код:
public OnHouseLoad() {
new rows, fields,string[128];
cache_get_data(rows, fields, mysql);
if(rows > 0) {
for(new i = 1; i <= cache_get_row_count(); i++) {
HouseInfo[i][HousePrice] = cache_get_field_content_int(i,"Price");
HouseInfo[i][EnterX] = cache_get_field_content_float(i,"EnterX");
HouseInfo[i][EnterY] = cache_get_field_content_float(i,"EnterY");
HouseInfo[i][EnterZ] = cache_get_field_content_float(i,"EnterZ");
HouseInfo[i][ExitX] = cache_get_field_content_float(i,"ExitX");
HouseInfo[i][ExitY] = cache_get_field_content_float(i,"ExitY");
HouseInfo[i][ExitZ] = cache_get_field_content_float(i,"ExitZ");
HouseInfo[i][VirtualWorld] = cache_get_field_content_int(i,"VirtualWorld");
HouseInfo[i][Interior] = cache_get_field_content_int(i,"InteriorID");
HouseInfo[i][HPickup] = CreatePickup(1272,1,HouseInfo[i][EnterX],HouseInfo[i][EnterY],HouseInfo[i][EnterZ]);
HousesLoaded++;
}
}
printf("[House System] %i houses were created...", HousesLoaded);
return true;
}

