Доступ к архиву

Переход в группу "Пользователь"

300.00 ₽
Одноразовый платёж
Быстрый переход в группу "Пользователи", без надобности написания постов и ожидания.

Покупка дает возможность:
Быть полноправным участником форума
Нормальное копирование кода
Создавать темы
Скачивать файлы
Доступ к архиву Pawno-Info

Баг с домами

Статус
В этой теме нельзя размещать новые ответы.

#Michael_Walker

Умник
Ноявилась проблема, при загрузке домов у них неправильные номера, в базе у дома id 0, а он создаётся с 3.

PHP:
publics: LoadProperty()
{
	if(cache_num_rows() > 0)
	{
		for(new he;he < cache_num_rows(); he++)
		{
		    HouseInfo[he][hID] = cache_get_field_content_int(he, "hID");
		    HouseInfo[he][hEntrancex] = cache_get_field_content_float(he, "hEntrancex");
		    HouseInfo[he][hEntrancey] = cache_get_field_content_float(he, "hEntrancey");
		    HouseInfo[he][hEntrancez] = cache_get_field_content_float(he, "hEntrancez");
		    HouseInfo[he][hExitx] = cache_get_field_content_float(he, "hExitx");
		    HouseInfo[he][hExity] = cache_get_field_content_float(he, "hExity");
		    HouseInfo[he][hExitz] = cache_get_field_content_float(he, "hExitz");
            cache_get_field_content(he, "hOwner", HouseInfo[he][hOwner], connects, strlen(HouseInfo[he][hOwner]));
            HouseInfo[he][hValue] = cache_get_field_content_int(he, "hValue");
            HouseInfo[he][hProdz] = cache_get_field_content_int(he, "hProdz");
            HouseInfo[he][hInt] = cache_get_field_content_int(he, "hInt");
            HouseInfo[he][hLock] = cache_get_field_content_int(he, "hLock");
            HouseInfo[he][hOwned] = cache_get_field_content_int(he, "hOwned");
            HouseInfo[he][hTakings] = cache_get_field_content_int(he, "hTakings");
            HouseInfo[he][hKlass] = cache_get_field_content_int(he, "hKlass");
            HouseInfo[he][hCarx] = cache_get_field_content_float(he, "hCarx");
            HouseInfo[he][hCary] = cache_get_field_content_float(he, "hCary");
            HouseInfo[he][hCarz] = cache_get_field_content_float(he, "hCarz");
            HouseInfo[he][hCarc] = cache_get_field_content_float(he, "hCarc");
            HouseInfo[he][hSafe] = cache_get_field_content_int(he, "hSafe");
			HOUSE++;
			if(HouseInfo[he][hOwned] == 0)
			{
				HouseInfo[he][hPickup] = CreatePickupAC(1273, 23, HouseInfo[he][hEntrancex], HouseInfo[he][hEntrancey], HouseInfo[he][hEntrancez],-1);
				HouseInfo[he][hMIcon] = CreateDynamicMapIcon(HouseInfo[he][hEntrancex], HouseInfo[he][hEntrancey], HouseInfo[he][hEntrancez], 31, COLOR_WHITE, 0, -1, -1, 50.0);
			}
			if(HouseInfo[he][hOwned] == 1)
			{
				HouseInfo[he][hPickup] = CreatePickupAC(1272, 23, HouseInfo[he][hEntrancex], HouseInfo[he][hEntrancey], HouseInfo[he][hEntrancez],-1);
				HouseInfo[he][hMIcon] = CreateDynamicMapIcon(HouseInfo[he][hEntrancex], HouseInfo[he][hEntrancey], HouseInfo[he][hEntrancez], 32, COLOR_WHITE, 0, -1, -1, 50.0);
			}
		}
		printf("[Загрузкa]: LoadProperty | Загружено %d",HOUSE);
	}
	else printf("Дома не загружены.");
	return true;
}
 
Статус
В этой теме нельзя размещать новые ответы.
Сверху Снизу