forward LoadHouse();
public LoadHouse()
{
static bool:called;
if(called) return 1;
called = true;
new num_fields, num_rows, str[128];
cache_get_data(num_rows,num_fields,dbhandle);
if(num_rows > 0)
{
for(new i = 0; i<num_rows; i++)
{
printf("Lade: %d", i);
HouseInfo[i][h_id] = cache_get_field_content_int(i,"id",dbhandle);
HouseInfo[i][hOwned] = cache_get_field_content_int(i,"Owned",dbhandle);
new tmp_name[MAX_PLAYER_NAME];
cache_get_field_content(i, "Owner", tmp_name, dbhandle);
strmid(HouseInfo[i][hOwner], tmp_name, i, sizeof(tmp_name), sizeof(tmp_name));
//HouseInfo[i][hDescr] =
HouseInfo[i][hEntrx] = cache_get_field_content_float(i,"Enterx",dbhandle);
HouseInfo[i][hEntry] = cache_get_field_content_float(i,"Entery",dbhandle);
HouseInfo[i][hEntrz] = cache_get_field_content_float(i,"Enterz",dbhandle);
HouseInfo[i][hIntx] = cache_get_field_content_float(i,"Intx",dbhandle);
HouseInfo[i][hInty] = cache_get_field_content_float(i,"Inty",dbhandle);
HouseInfo[i][hIntz] = cache_get_field_content_float(i,"Intz",dbhandle);
HouseInfo[i][hInt] = cache_get_field_content_int(i,"hInt",dbhandle);
HouseInfo[i][hRentable] = cache_get_field_content_int(i,"Rentable",dbhandle);
HouseInfo[i][hPrice] = cache_get_field_content_int(i,"Price",dbhandle);
HouseInfo[i][hRent] = cache_get_field_content_int(i,"Rent",dbhandle);
HouseInfo[i][hIntid] = cache_get_field_content_int(i,"Intid",dbhandle);
HouseInfo[i][hLocked] = cache_get_field_content_int(i,"Locked",dbhandle);
HouseInfo[i][hKasse] = cache_get_field_content_int(i,"Kasse",dbhandle);
HouseInfo[i][hDate] = cache_get_field_content_int(i,"Date",dbhandle);
if(!HouseInfo[i][hOwned]) format(str, sizeof str, "%s\nZum Verkauf\nPreis: %d€", HouseInfo[i][hDescr], HouseInfo[i][hPrice]);
else if(HouseInfo[i][hOwned] && HouseInfo[i][hRentable] == 0) format(str, sizeof str, "%s\nBesitzer: %s",HouseInfo[i][hDescr], HouseInfo[i][hOwner]);
else if(HouseInfo[i][hOwned] && HouseInfo[i][hRentable] == 1) format(str, sizeof str, "%s\nBesitzer: %s\nMiete: %d$\n/mieten zum Mieten",HouseInfo[i][hDescr], HouseInfo[i][hOwner], HouseInfo[i][hRent]);
HouseInfo[i][hLabel] = CreateDynamic3DTextLabel(str, COLOR_HOUSELABEL, HouseInfo[i][hEntrx], HouseInfo[i][hEntry], HouseInfo[i][hEntrz], 15, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, -1, -1, -1, 15);
printf("Label %d an %f / %f / %f erstellt.", _:HouseInfo[i][hLabel], HouseInfo[i][hEntrx], HouseInfo[i][hEntry], HouseInfo[i][hEntrz]);
if(!HouseInfo[i][hOwned]) HouseInfo[i][hPick] = CreatePickup(1273, 1,HouseInfo[i][hEntrx], HouseInfo[i][hEntry], HouseInfo[i][hEntrz]);
else HouseInfo[i][hPick] = CreatePickup(19522, 1, HouseInfo[i][hEntrx], HouseInfo[i][hEntry], HouseInfo[i][hEntrz]);
}
}
return 1;
}
Dann sollte es so passen.
Poste gegebenefalls nochmal den Log.