Denis_Frol
Новичок
Проблема заключается в том что, при заходе на сервер появляется только один дом вместо 3-х, уже не знаю что делать. В БД все заполнено, обновление , загрузка и т.д ниже. Помогите пожалуйста.
PHP:
fpublic HouseLoad()
{
new rows;
new fields;
cache_get_data(rows, fields);
if(rows)
{
for(new h = 0; h < MAX_HOUSE; h++)
{
cache_get_field_content(0, "Name", house[h][hplayer], connect_bd, MAX_PLAYER_NAME);
house[h][hX] = cache_get_field_content_float(0, "X");
house[h][hY] = cache_get_field_content_float(0, "Y");
house[h][hZ] = cache_get_field_content_float(0, "Z");
house[h][hXI] = cache_get_field_content_float(0, "XINT");
house[h][hYI] = cache_get_field_content_float(0, "YINT");
house[h][hZI] = cache_get_field_content_float(0, "ZINT");
house[h][hXC] = cache_get_field_content_float(0, "XCAR");
house[h][hYC] = cache_get_field_content_float(0, "YCAR");
house[h][hZC] = cache_get_field_content_float(0, "ZCAR");
house[h][hangle] = cache_get_field_content_float(0, "CARANGLE");
house[h][hcena] = cache_get_field_content_int(0, "Cena");
house[h][hint] = cache_get_field_content_int(0, "Int");
house[h][hopen] = cache_get_field_content_int(0, "Open");
house[h][hhouse] = cache_get_field_content_int(0, "House");
house[h][hklass] = cache_get_field_content_int(0, "Klass");
house[h][hid] = cache_get_field_content_int(0, "ID");
load++;
}
printf("[Недвижимость]: Домов загружено: %i", load);
}
else
{
print("Дома не загрузились!");
}
return true;
}
stock UpdateHouse()
{
for(new h = 0; h < load; h++)
{
DestroyDynamicMapIcon(house[h][hicon]);
DestroyPickup(house[h][hpickup]);
if(house[h][hhouse] == 0)
{
house[h][hicon] = CreateDynamicMapIcon(house[h][hX], house[h][hY], house[h][hZ], 31, COLOR_WHITE, -1, -1, -1, 100.0);
house[h][hpickup] = CreatePickup(1273, 23, house[h][hX], house[h][hY], house[h][hZ], -1);
}
else
{
house[h][hicon] = CreateDynamicMapIcon(house[h][hX], house[h][hY], house[h][hZ], 32, COLOR_WHITE, -1, -1, -1, 100.0);
house[h][hpickup] = CreatePickup(1272, 23, house[h][hX], house[h][hY], house[h][hZ], -1);
}
}
}
