- Регистрация
- 9 Дек 2017
- Сообщения
- 306
- Лучшие ответы
- 0
- Репутация
- 2
Проблема с загрузкой владельцев bOwner, загружает только параметр None(goss)
PHP:
function LoadBizes()
{
new fields;
cache_get_data(BIZES,fields,connects);
if(BIZES <= 0)
return printf("Бизнесы не загружены."), mysql_tquery(connects,"SELECT * FROM `house`", "LoadProperty","");
new time = GetTickCount();
string[0] = EOS;
for(new h; h < BIZES; h++)
{
if(h+1 >= 1 && h+1 <= 20) UpdateBusinessData(h+1, "bKrisha", 5);
else if(h+1 >= 21 && h+1 <= 40) UpdateBusinessData(h+1, "bKrisha", 6);
else if(h+1 >= 41 && h+1 <= 61) UpdateBusinessData(h+1, "bKrisha", 14);
BizInfo[h+1][bID] = cache_get_field_content_int(h, "bID", connects);
BizInfo[h+1][EnterBiz][0] = cache_get_field_content_float(h, "EnterX", connects);
BizInfo[h+1][EnterBiz][1] = cache_get_field_content_float(h, "EnterY", connects);
BizInfo[h+1][EnterBiz][2] = cache_get_field_content_float(h, "EnterZ", connects);
BizInfo[h+1][ExitBiz][0] = cache_get_field_content_float(h, "ExitX", connects);
BizInfo[h+1][ExitBiz][1] = cache_get_field_content_float(h, "ExitY", connects);
BizInfo[h+1][ExitBiz][2] = cache_get_field_content_float(h, "ExitZ", connects);
cache_get_field_content(h, "bOwner", BizInfo[h+1][bOwner], connects, strlen(BizInfo[h+1][bOwner]));
BizInfo[h+1][bPrice] = cache_get_field_content_int(h, "bPrice", connects);
BizInfo[h+1][bInt] = cache_get_field_content_int(h, "bInt", connects);
BizInfo[h+1][bVW] = cache_get_field_content_int(h, "bVW", connects);
BizInfo[h+1][bLock] = cache_get_field_content_int(h, "bLock", connects);
cache_get_field_content(h, "bName", BizInfo[h+1][bName], connects, strlen(BizInfo[h+1][bName]));
BizInfo[h+1][bKrisha] = cache_get_field_content_int(h, "bKrisha", connects);
BizInfo[h+1][bPribil] = cache_get_field_content_int(h, "bPribil", connects);
BizInfo[h+1][BarPos][0] = cache_get_field_content_float(h, "BarX", connects);
BizInfo[h+1][BarPos][1] = cache_get_field_content_float(h, "BarY", connects);
BizInfo[h+1][BarPos][2] = cache_get_field_content_float(h, "BarZ", connects);
BizInfo[h+1][bCena][0] = cache_get_field_content_int(h, "bCena1", connects);
BizInfo[h+1][bCena][1] = cache_get_field_content_int(h, "bCena2", connects);
BizInfo[h+1][bCena][2] = cache_get_field_content_int(h, "bCena3", connects);
BizInfo[h+1][bCena][3] = cache_get_field_content_int(h, "bCena4", connects);
BizInfo[h+1][bCena][4] = cache_get_field_content_int(h, "bCena5", connects);
BizInfo[h+1][bCena][5] = cache_get_field_content_int(h, "bCena6", connects);
BizInfo[h+1][bCena][6] = cache_get_field_content_int(h, "bCena7", connects);
BizInfo[h+1][bCena][7] = cache_get_field_content_int(h, "bCena8", connects);
BizInfo[h+1][bCena][8] = cache_get_field_content_int(h, "bCena9", connects);
BizInfo[h+1][bVhod] = cache_get_field_content_int(h, "bVhod", connects);
BizInfo[h+1][bBank] = cache_get_field_content_int(h, "bBank", connects);
BizInfo[h+1][bTypeBiz] = cache_get_field_content_int(h, "bTypeBiz", connects);
BizInfo[h+1][bProd] = cache_get_field_content_int(h,"bProd",connects);
BizInfo[h+1][bProdOrder] = cache_get_field_content_int(h,"bProdOrder",connects);
BizInfo[h+1][bProdOrderPrice] = cache_get_field_content_int(h,"bProdOrderPrice",connects);
BizInfo[h+1][bProdMax] = cache_get_field_content_int(h,"bProdMax",connects);
if(BizInfo[h+1][bTypeBiz] != 9)
{
if(!strcmp( BizInfo[h+1][ bOwner ], "None", true ) )
{
BizInfo[h+1][bPickup] = CreateDynamicPickup(1274, 1, BizInfo[h+1][EnterBiz][0], BizInfo[h+1][EnterBiz][1], BizInfo[h+1][EnterBiz][2],-1,-1,-1,100.0);
format(string, MAX_STR, "{FF7800}%s\n"WHITE"Бизнес находится на продаже\nЦена: {FF7800}%i$", BizInfo[h+1][bName],BizInfo[h+1][bPrice]);
}
else
{
BizInfo[h+1][ bPickup ] = CreateDynamicPickup(19132, 1, BizInfo[h+1][EnterBiz][0], BizInfo[h+1][EnterBiz][1], BizInfo[h+1][EnterBiz][2],-1,-1,-1,100.0);
if(BizInfo[h+1][bVhod] > 0) format(string, BIG_SIZE, "{FF7800}%s\n"WHITE"Владелец:{FF7800} %s\n"WHITE"Цена за вход: {FF7800}$%i\n"WHITE"Контроль: {FF7800}%s", BizInfo[h+1][bName],BizInfo[h+1][bOwner],BizInfo[h+1][bVhod],GetMN(BizInfo[h+1][bKrisha]));
else format(string, BIG_SIZE, "{FF7800}%s\n"WHITE"Владелец: {FF7800}%s\n"WHITE"Контроль:{FF7800} %s", BizInfo[h+1][bName],BizInfo[h+1][bOwner],GetMN(BizInfo[h+1][bKrisha]));
}
}
else
{
BizInfo[h+1][ bPickup ] = CreateDynamicPickup(19132, 1, BizInfo[h+1][EnterBiz][0], BizInfo[h+1][EnterBiz][1], BizInfo[h+1][EnterBiz][2],-1,-1,-1,100.0);
format(string, 160, "{"#cGREEN"}Нарко притон\n"WHITE"Владелец: {"#cGREEN"}%s", GetMN(BizInfo[h+1][bKrisha]));
}
new icon = 0, type = BizInfo[h+1][bTypeBiz];
if(type == 1||type == 10) icon = 17; else if(type == 2) icon = 48; else if(type == 3) icon = 14; else if(type == 4) icon = 49; else if(type == 5) icon = 27; else if(type == 6) icon = 56; else if(type == 7) icon = 45; else if(type == 8) icon = 6; else if(type == 9) icon = 23;
if(icon) BizInfo[h+1][bMapIcon] = CreateDynamicMapIcon( BizInfo[h+1] [EnterBiz][0], BizInfo[h+1] [EnterBiz][1], BizInfo[h+1][EnterBiz][2] , icon , -1 );
BizInfo[h+1][bLabel] = CreateDynamic3DTextLabel(string, 0xC4DAADFF, BizInfo[h+1][EnterBiz][0],BizInfo[h+1][EnterBiz][1],BizInfo[h+1][EnterBiz][2], 15.0,INVALID_PLAYER_ID,INVALID_PLAYER_ID,1,-1,-1,-1,100.0);
BizInfo[h+1][bLab] = CreateDynamicPickup(1239,1,BizInfo[h+1][BarPos][0], BizInfo[h+1][BarPos][1], BizInfo[h+1][BarPos][2],BizInfo[h+1][ bVW ],BizInfo[h+1][ bInt ],-1,100.0);
BizInfo[h+1][bLabelBuy] = CreateDynamic3DTextLabel("Нажмите клавишу\n"SERVER"'N'\n"WHITE"Для покупки", CWHITE, BizInfo[h+1][BarPos][0], BizInfo[h+1][BarPos][1], BizInfo[h+1][BarPos][2], 5.0,INVALID_PLAYER_ID,INVALID_PLAYER_ID,1,BizInfo[h+1][ bVW ],BizInfo[h+1][ bInt ],-1,100.0);
//ИНТЕРЬЕР ОФИСА ПАРАМЕТРЫ
BizInfo[h+1][bObject][0] = CreateDynamicObjectEx(2286,1407.399,-1203.203,158.406,0.000,0.000,0.000,300.000,300.000, BizInfo[h+1][bVW]);
SetDynamicObjectMaterial(BizInfo[h+1][bObject][0], 0, 18646, "matcolours", "grey-93-percent", 0x00000000);
SetDynamicObjectMaterial(BizInfo[h+1][bObject][0], 1, 18646, "matcolours", "grey-93-percent", 0x00000000);
SetDynamicObjectMaterialText(BizInfo[h+1][bObject][0], 0, BizInfo[h+1][bName], 40, "Ariel", 20, 1, 0xFF000000, 0x00000000, 0);
BizInfo[h+1][bObject][1] = CreateDynamicObjectEx(19466,1402.560,-1207.130,157.932,0.000,0.000,-178.500,300.000,300.000, BizInfo[h+1][bVW]);
SetDynamicObjectMaterialText(BizInfo[h+1][bObject][1], 0, BizInfo[h+1][bOwner], 80, "Ariel", 20, 1, 0xFFFFFFFF, 0x00000000, 0);
}
LoadBusinessOffice();
printf("-> Business | Загружено: %i | Time: %i (ms)", BIZES, GetTickCount() - time);
mysql_tquery(connects,"SELECT * FROM `house`", "LoadProperty","");
return 1;
}