public LoadAllHouses()
{
print("*************************");
print("* Häuser werden Geladen *");
print("* *");
new num_rows, num_fields;
cache_get_data(num_rows, num_fields, dbhandle);
if(!num_rows)return print("keine Häuser!");
for(new i=0; i<num_rows; i++)
{
new uid = getFreeHausID();
hInfo[uid][h_status] = cache_get_field_content_int(i,"status",dbhandle);
hInfo[uid][h_db_id] = cache_get_field_content_int(i,"id",dbhandle);
hInfo[uid][h_x] = cache_get_field_content_float(i,"x",dbhandle);
hInfo[uid][h_y] = cache_get_field_content_float(i,"y",dbhandle);
hInfo[uid][h_z] = cache_get_field_content_float(i,"z",dbhandle);
hInfo[uid][h_i_x] = cache_get_field_content_float(i,"ix",dbhandle);
hInfo[uid][h_i_y] = cache_get_field_content_float(i,"iy",dbhandle);
hInfo[uid][h_i_z] = cache_get_field_content_float(i,"iz",dbhandle);
hInfo[uid][h_interior] = cache_get_field_content_int(i,"interior",dbhandle);
hInfo[uid][h_besitzer] = cache_get_field_content_int(i,"besitzer",dbhandle);
hInfo[uid][h_kosten] = cache_get_field_content_int(i,"kosten",dbhandle);
if(hInfo[uid][h_status]==0)
{
new string[164];
format(string,sizeof(string),"Haus ID: %i\nKauf Kosten: %i$\nBesitzer: No_one",hInfo[uid][h_db_id],hInfo[uid][h_kosten]);
hInfo[uid][h_id_x]= CreatePickup(Pickup_Hausfrei,1,hInfo[uid][h_x],hInfo[uid][h_y],hInfo[uid][h_z],0);
hInfo[uid][h_id_y]= Create3DTextLabel(string,rot,hInfo[uid][h_x],hInfo[uid][h_y],hInfo[uid][h_z],20,0);
}
else
if(hInfo[uid][h_status]==1)
{
new string[164];
format(string,sizeof(string),"Haus ID: %i\nBesitzer: %s",hInfo[uid][h_db_id],"No_one");
hInfo[uid][h_id_x]= CreatePickup(Pickup_Hausvergeben,1,hInfo[uid][h_x],hInfo[uid][h_y],hInfo[uid][h_z],0);
hInfo[uid][h_id_y]= Create3DTextLabel(string,grün,hInfo[uid][h_x],hInfo[uid][h_y],hInfo[uid][h_z],20,0);
format(string,sizeof(string),"SELECT * FROM user WHERE id='%i'",hInfo[uid][h_besitzer]);
mysql_function_query(dbhandle,string,true,"UpdateHausText","");
hInfo[uid][h_id_z]= CreatePickup(Pickup_Info,1,hInfo[uid][h_i_x],hInfo[uid][h_i_y],hInfo[uid][h_i_z],0);
}
printf("* Haus %i geladen *",hInfo[uid][h_db_id]);
}
print("* *");
print("* Häuser wurden Geladen *");
print("*************************");
print(".");
print(".");
return 1;
}
ja das habe ich alles überprüft der status ist überall richtig zugewiesen