Кинь весь лог mysql. Либо традает подключение к БД, либо ты пытаешься работать с данными из таблицы и, при этом, не отправляешь запрос в базу перед этим.
И покажи код загрузок, которые слетают
Вот mysq.log: https://yadi.sk/i/MQnpX2kU3MkPEs
Загрузка домов:
f_public LoadPro(createall)
{
new rows, fields;
TotalHouse = cache_num_rows();
cache_get_data (rows, fields, dbHandle);
if(rows)
{
for(new indexsa = 1; indexsa <= rows; indexsa++)
{
HouseInfo[indexsa][ExitX] = cache_get_field_content_float(indexsa-1, "hExitX");
HouseInfo[indexsa][ExitY] = cache_get_field_content_float(indexsa-1, "hExitY");
HouseInfo[indexsa][ExitZ] = cache_get_field_content_float(indexsa-1, "hExitZ");
HouseInfo[indexsa][ExitIntX] = cache_get_field_content_float(indexsa-1, "hExitIntX");
HouseInfo[indexsa][ExitIntY] = cache_get_field_content_float(indexsa-1, "hExitIntY");
HouseInfo[indexsa][ExitIntZ] = cache_get_field_content_float(indexsa-1, "hExitIntZ");
HouseInfo[indexsa][CarX] = cache_get_field_content_float(indexsa-1, "hCarX");
HouseInfo[indexsa][CarY] = cache_get_field_content_float(indexsa-1, "hCarY");
HouseInfo[indexsa][CarZ] = cache_get_field_content_float(indexsa-1, "hCarZ");
HouseInfo[indexsa][CarA] = cache_get_field_content_float(indexsa-1, "hCarA");
HouseInfo[indexsa][hPrice] = cache_get_field_content_int(indexsa-1, "Price");
cache_get_field_content(indexsa-1, "Owner", HouseInfo[indexsa][hOwner], dbHandle, MAX_PLAYER_NAME+1);
HouseInfo[indexsa][hInt] = cache_get_field_content_int(indexsa-1, "Inter");
HouseInfo[indexsa][hLock] = cache_get_field_content_int(indexsa-1, "Locked");
HouseInfo[indexsa][hCar] = cache_get_field_content_int(indexsa-1, "Car");
HouseInfo[indexsa][hCarColorOne] = cache_get_field_content_int(indexsa-1, "CarColorOne");
HouseInfo[indexsa][hCarColorTwo] = cache_get_field_content_int(indexsa-1, "CarColorTwo");
HouseInfo[indexsa][hOwned] = cache_get_field_content_int(indexsa-1, "Owned");
HouseInfo[indexsa][hUpdate] = cache_get_field_content_int(indexsa-1, "Updates");
HouseInfo[indexsa][hClass] = cache_get_field_content_int(indexsa-1, "Class");
HouseInfo[indexsa][hRentPlata] = cache_get_field_content_int(indexsa-1, "Renta");
HouseInfo[indexsa][hRentTime] = cache_get_field_content_int(indexsa-1, "RentTime");
HouseInfo[indexsa][hWorld] = cache_get_field_content_int(indexsa-1, "World");
HouseInfo[indexsa][StoreX] = cache_get_field_content_float(indexsa-1, "hStoreX");
HouseInfo[indexsa][StoreY] = cache_get_field_content_float(indexsa-1, "hStoreY");
HouseInfo[indexsa][StoreZ] = cache_get_field_content_float(indexsa-1, "hStoreZ");
HouseInfo[indexsa][StoreMetall] = cache_get_field_content_int(indexsa-1, "hStoreMetall");
HouseInfo[indexsa][StoreAmmo] = cache_get_field_content_int(indexsa-1, "hStoreAmmo");
HouseInfo[indexsa][StoreDrugs] = cache_get_field_content_int(indexsa-1, "hStoreDrugs");
HouseInfo[indexsa][StoreSkin] = cache_get_field_content_int(indexsa-1, "hStoreSkin");
HouseInfo[indexsa][StoreGun] = cache_get_field_content_int(indexsa-1, "hStoreGun");
HouseInfo[indexsa][pWheels] = cache_get_field_content_int(indexsa-1, "pWheels");
HouseInfo[indexsa][pNitro] = cache_get_field_content_int(indexsa-1, "pNitro");
HouseInfo[indexsa][pHydrawlic] = cache_get_field_content_int(indexsa-1, "pHydrawlic");
HouseInfo[indexsa][pSpoiler] = cache_get_field_content_int(indexsa-1, "pSpoiler");
HouseInfo[indexsa][pBumper1] = cache_get_field_content_int(indexsa-1, "pBumper1");
HouseInfo[indexsa][pBumper2] = cache_get_field_content_int(indexsa-1, "pBumper2");
HouseInfo[indexsa][pPaintJob] = cache_get_field_content_int(indexsa-1, "pPaintJob");
if(createall)
{
if(HouseInfo[indexsa][hOwned] == 0)
{
HouseInfo[indexsa][hPickup] = CreatePickup(1273, 23, HouseInfo[indexsa][ExitX], HouseInfo[indexsa][ExitY], HouseInfo[indexsa][ExitZ],-1);
HouseInfo[indexsa][hMIcon] = CreateDynamicMapIcon(HouseInfo[indexsa][ExitX], HouseInfo[indexsa][ExitY], HouseInfo[indexsa][ExitZ], 31, -1, 0, -1, -1, 400.0);
}
if(HouseInfo[indexsa][hOwned] == 1)
{
HouseInfo[indexsa][hPickup] = CreatePickup(19522, 23, HouseInfo[indexsa][ExitX], HouseInfo[indexsa][ExitY], HouseInfo[indexsa][ExitZ],-1);
HouseInfo[indexsa][hMIcon] = CreateDynamicMapIcon(HouseInfo[indexsa][ExitX], HouseInfo[indexsa][ExitY], HouseInfo[indexsa][ExitZ], 32, -1, 0, -1, -1, 400.0);
}
CheckHouse(indexsa);
}
if(!createall)
{
UpdateHouse(indexsa);
}
}
printf("[%i] Дома загружены. [Длительность загрузки: %d ms]", TotalHouse, cache_get_query_exec_time(UNIT_MILLISECONDS));
}
return 1;
}
Загрузка гангзон:
f_public LoadTerr()
{
TotalGangZones = cache_num_rows();
if(TotalGangZones)
{
for(new indexsa = 1; indexsa <= TotalGangZones; indexsa++)
{
GZInfo[indexsa][gCoords][0] = cache_get_field_content_float(indexsa-1, "X");
GZInfo[indexsa][gCoords][1] = cache_get_field_content_float(indexsa-1, "Y");
GZInfo[indexsa][gCoords][2] = cache_get_field_content_float(indexsa-1, "XX");
GZInfo[indexsa][gCoords][3] = cache_get_field_content_float(indexsa-1, "YY");
GZInfo[indexsa][gMemberZone] = cache_get_field_content_int(indexsa-1, "Member");
GZInfo[indexsa][gID] = GangZoneCreate(GZInfo[indexsa][gCoords][0], GZInfo[indexsa][gCoords][1], GZInfo[indexsa][gCoords][2], GZInfo[indexsa][gCoords][3]);
GangZoneShowForAll(GZInfo[indexsa][gID], GetGangZoneColor(indexsa));
CheckGhetto(indexsa);
}
printf("Территорий загружено %i. [Длительность загрузки: %d ms]", TotalGangZones, cache_get_query_exec_time(UNIT_MILLISECONDS));
}
return 1;
}
Склады мафий:
f_public OnMafiaStoresLoaded(createText)
{
new rows, fields;
new allsds = 0;
cache_get_data (rows, fields, dbHandle);
if(rows)
{
for(new indexsa = 0; indexsa < rows; indexsa++)
{
Mafia[indexsa][pMoney] = cache_get_field_content_int(indexsa, "Money");
Mafia[indexsa][pMetall] = cache_get_field_content_int(indexsa, "Metall");
Mafia[indexsa][pAmmo] = cache_get_field_content_int(indexsa, "Ammo");
Mafia[indexsa][pAll] = cache_get_field_content_int(indexsa, "Gun");
Mafia[indexsa][pLock] = cache_get_field_content_int(indexsa, "lock");
allsds ++;
}
if(createText)
{
new string[170];
if(Mafia[0][pLock] >= 1)format(string, sizeof(string), "{993366}La Cosa Nostra\n{ffffff}Деньги: {00cc00}%d$\n{ffffff}Патроны: {0099FF}%d шт\n{ffffff}Металл: {0099FF}%d кг\n{FFFFFF}Склад: {FF0000}Закрыт",Mafia[0][pMoney],Mafia[0][pAmmo],Mafia[0][pMetall]);
if(Mafia[0][pLock] == 0)format(string, sizeof(string), "{993366}La Cosa Nostra\n{ffffff}Деньги: {00cc00}%d$\n{ffffff}Патроны: {0099FF}%d шт\n{ffffff}Металл: {0099FF}%d кг\n{FFFFFF}Склад: {00CC00}Открыт",Mafia[0][pMoney],Mafia[0][pAmmo],Mafia[0][pMetall]);
Mafia[0][pText] = Create3DTextLabel(string, 0x993366FF, 1265.9670, -782.3961, 1084.0078+1, 15.0, 94, 1);
if(Mafia[1][pLock] >= 1)format(string, sizeof(string), "{007575}Русская мафия\n{ffffff}Деньги: {00cc00}%d$\n{ffffff}Патроны: {0099FF}%d шт\n{ffffff}Металл: {0099FF}%d кг\n{FFFFFF}Склад: {FF0000}Закрыт",Mafia[1][pMoney],Mafia[1][pAmmo],Mafia[1][pMetall]);
if(Mafia[1][pLock] == 0)format(string, sizeof(string), "{007575}Русская мафия\n{ffffff}Деньги: {00cc00}%d$\n{ffffff}Патроны: {0099FF}%d шт\n{ffffff}Металл: {0099FF}%d кг\n{FFFFFF}Склад: {00CC00}Открыт",Mafia[1][pMoney],Mafia[1][pAmmo],Mafia[1][pMetall]);
Mafia[1][pText] = Create3DTextLabel(string, 0x007575FF, 1265.9670, -782.3961, 1084.0078+1, 15.0, 95, 1);
if(Mafia[2][pLock] >= 1)format(string, sizeof(string), "{bb0000}Yakuza\n{ffffff}Деньги: {00cc00}%d$\n{ffffff}Патроны: {0099FF}%d шт\n{ffffff}Металл: {0099FF}%d кг\n{FFFFFF}Склад: {FF0000}Закрыт",Mafia[2][pMoney],Mafia[2][pAmmo],Mafia[2][pMetall]);
if(Mafia[2][pLock] == 0)format(string, sizeof(string), "{bb0000}Yakuza\n{ffffff}Деньги: {00cc00}%d$\n{ffffff}Патроны: {0099FF}%d шт\n{ffffff}Металл: {0099FF}%d кг\n{FFFFFF}Склад: {00CC00}Открыт",Mafia[2][pMoney],Mafia[2][pAmmo],Mafia[2][pMetall]);
Mafia[2][pText] = Create3DTextLabel(string,0xbb0000FF, 1265.9670, -782.3961, 1084.0078+1, 15.0, 93, 1);
format(string, sizeof(string), "La Cosa Nostra\n{ffff00}Оружейная\n\n{FFFFFF}Всего %d ед. оружия",Mafia[0][pAll]);
Mafia[0][pTextGun] = Create3DTextLabel(string,0x993366FF, 1261.7368, -781.9125, 1084.0078+1, 15.0, 94, 1);
format(string, sizeof(string), "Русская мафия\n{ffff00}Оружейная\n\n{FFFFFF}Всего %d ед. оружия",Mafia[1][pAll]);
Mafia[1][pTextGun] = Create3DTextLabel(string,0x007575FF, 1261.7368, -781.9125, 1084.0078+1, 15.0, 95, 1);
format(string,sizeof(string), "Yakuza\n{ffff00}Оружейная\n\n{FFFFFF}Всего %d ед. оружия",Mafia[2][pAll]);
Mafia[2][pTextGun] = Create3DTextLabel(string, 0xbb0000FF, 1261.7368, -781.9125, 1084.0078+1, 15.0, 93, 1);
}
printf("[%i] Склады мафий - загружены! [Длительность загрузки: %d ms]", allsds, cache_get_query_exec_time(UNIT_MILLISECONDS));
}
return 1;
}
Загрузка бизнесов:
f_public LoadBiz()
{
new rows, fields;
cache_get_data (rows, fields, dbHandle);
if(rows)
{
for(new indexsa = 1; indexsa <= rows; indexsa++)
{
BizInfo[indexsa][ExitX] = cache_get_field_content_float(indexsa-1, "ExitX");
BizInfo[indexsa][ExitY] = cache_get_field_content_float(indexsa-1, "ExitY");
BizInfo[indexsa][ExitZ] = cache_get_field_content_float(indexsa-1, "ExitZ");
BizInfo[indexsa][ExitIntX] = cache_get_field_content_float(indexsa-1, "ExitIntX");
BizInfo[indexsa][ExitIntY] = cache_get_field_content_float(indexsa-1, "ExitIntY");
BizInfo[indexsa][ExitIntZ] = cache_get_field_content_float(indexsa-1, "ExitIntZ");
BizInfo[indexsa][ExitTpX] = cache_get_field_content_float(indexsa-1, "ExitTpX");
BizInfo[indexsa][ExitTpY] = cache_get_field_content_float(indexsa-1, "ExitTpY");
BizInfo[indexsa][ExitTpZ] = cache_get_field_content_float(indexsa-1, "ExitTpZ");
BizInfo[indexsa][ExitTpA] = cache_get_field_content_float(indexsa-1, "ExitTpA");
BizInfo[indexsa][bPrice] = cache_get_field_content_int(indexsa-1, "Price");
cache_get_field_content(indexsa-1, "Owner", BizInfo[indexsa][bOwner], dbHandle, MAX_PLAYER_NAME+1);
BizInfo[indexsa][bInt] = cache_get_field_content_int(indexsa-1, "Inter");
BizInfo[indexsa][bLock] = cache_get_field_content_int(indexsa-1, "Locked");
BizInfo[indexsa][bUpdate] = cache_get_field_content_int(indexsa-1, "Updates");
BizInfo[indexsa][bOwned] = cache_get_field_content_int(indexsa-1, "Owned");
BizInfo[indexsa][bClass] = cache_get_field_content_int(indexsa-1, "Class");
BizInfo[indexsa][bRentPlata] = cache_get_field_content_int(indexsa-1, "RentPlata");
BizInfo[indexsa][bRentTime] = cache_get_field_content_int(indexsa-1, "RentTime");
BizInfo[indexsa][bWorld] = cache_get_field_content_int(indexsa-1, "World");
BizInfo[indexsa][bProd] = cache_get_field_content_int(indexsa-1, "Prod");
BizInfo[indexsa][bCash] = cache_get_field_content_int(indexsa-1, "Cash");
BizInfo[indexsa][bGosRent] = cache_get_field_content_int(indexsa-1, "GosRent");
BizInfo[indexsa][bGotoCena] = cache_get_field_content_int(indexsa-1, "GotoCena");
BizInfo[indexsa][bSellDrugs] = cache_get_field_content_int(indexsa-1, "SellDrugs");
BizInfo[indexsa][bSellCena] = cache_get_field_content_int(indexsa-1, "SellCena");
SetCBiz(indexsa);
TotalBusiness ++;
CheckBusiness(indexsa);
}
printf("Бизнесов загружено %i. [Длительность загрузки: %d ms]", TotalBusiness, cache_get_query_exec_time(UNIT_MILLISECONDS));
}
return 1;
}
Загрузка АЗС:
f_public LoadFuel()
{
new rows, fields;
cache_get_data (rows, fields, dbHandle);
if(rows)
{
for(new indexsa = 1; indexsa <= rows; indexsa++)
{
FuelStInfo[indexsa][FuelX] = cache_get_field_content_float(indexsa-1, "FuelX");
FuelStInfo[indexsa][FuelY] = cache_get_field_content_float(indexsa-1, "FuelY");
FuelStInfo[indexsa][FuelZ] = cache_get_field_content_float(indexsa-1, "FuelZ");
FuelStInfo[indexsa][bPrice] = cache_get_field_content_int(indexsa-1, "Price");
FuelStInfo[indexsa][bRentPlata] = cache_get_field_content_int(indexsa-1, "RentPlata");
FuelStInfo[indexsa][bGosRent] = cache_get_field_content_int(indexsa-1, "GosRent");
FuelStInfo[indexsa][bRentTime] = cache_get_field_content_int(indexsa-1, "RentTime");
FuelStInfo[indexsa][bUpdate] = cache_get_field_content_int(indexsa-1, "Updates");
cache_get_field_content(indexsa-1, "Owner", FuelStInfo[indexsa][bOwner], dbHandle, MAX_PLAYER_NAME+1);
FuelStInfo[indexsa][bOwned] = cache_get_field_content_int(indexsa-1, "Owned");
FuelStInfo[indexsa][bFuel] = cache_get_field_content_int(indexsa-1, "Fuel");
FuelStInfo[indexsa][bPriceFuel] = cache_get_field_content_int(indexsa-1, "FuelPrice");
FuelStInfo[indexsa][bFuelOne] = cache_get_field_content_int(indexsa-1, "FuelOne");
FuelStInfo[indexsa][bCash] = cache_get_field_content_int(indexsa-1, "Cash");
FuelStInfo[indexsa][bLock] = cache_get_field_content_int(indexsa-1, "Locked");
if(FuelStInfo[indexsa][bOwned] == 0)
{
new string[128];
format(string,sizeof(string),"АЗС\n{ffffff}Цена за 10 литров: {ffcb00}%d$\n{ffffff}Заправка продается",FuelStInfo[indexsa][bPriceFuel]);
FuelStInfo[indexsa][FuelInfo] = Create3DTextLabel(string,0x3196FFFF,FuelStInfo[indexsa][FuelX], FuelStInfo[indexsa][FuelY], FuelStInfo[indexsa][FuelZ],25.0,0,1);
FuelStInfo[indexsa][bMap] = CreateDynamicMapIcon(FuelStInfo[indexsa][FuelX], FuelStInfo[indexsa][FuelY], FuelStInfo[indexsa][FuelZ], 47, -1, 0, -1, -1, 70.0);
}
if(FuelStInfo[indexsa][bOwned] == 1)
{
new string[128];
if(FuelStInfo[indexsa][bLock] == 0) format(string,sizeof(string),"АЗС\n{ffffff}Владелец: {6bcf00}%s\n{ffffff}Цена за 10 литров: {ffcb00}%d$",FuelStInfo[indexsa][bOwner],FuelStInfo[indexsa][bPriceFuel]);
if(FuelStInfo[indexsa][bLock] == 1) format(string,sizeof(string),"АЗС\n{ffffff}Владелец: {6bcf00}%s\n{FF6600}Станция закрыта\n{ffffff}Цена за 10 литров: {ffcb00}%d$",FuelStInfo[indexsa][bOwner],FuelStInfo[indexsa][bPriceFuel]);
FuelStInfo[indexsa][FuelInfo] = Create3DTextLabel(string,0x3196FFFF,FuelStInfo[indexsa][FuelX], FuelStInfo[indexsa][FuelY], FuelStInfo[indexsa][FuelZ],25.0,0,1);
FuelStInfo[indexsa][bMap] = CreateDynamicMapIcon(FuelStInfo[indexsa][FuelX], FuelStInfo[indexsa][FuelY], FuelStInfo[indexsa][FuelZ], 47, -1, 0, -1, -1, 70.0);
}
TotalFuelSt ++;
CheckFuels(indexsa);
}
printf("АЗС загружено %i. [Длительность загрузки: %d ms]", TotalFuelSt, cache_get_query_exec_time(UNIT_MILLISECONDS));
}
return 1;
}
Склады банд:
f_public OnGangsStoresLoaded(createText)
{
new rows, fields;
new allgogoas = 0;
cache_get_data (rows, fields, dbHandle);
if(rows)
{
for(new indexsa = 1; indexsa <= rows; indexsa++)
{
StoreInfo[indexsa][oID] = cache_get_field_content_int(indexsa-1, "ID");
cache_get_field_content(indexsa-1, "Name", StoreInfo[indexsa][oName], 24);
StoreInfo[indexsa][oMoney] = cache_get_field_content_int(indexsa-1, "Money");
StoreInfo[indexsa][oAmmo] = cache_get_field_content_int(indexsa-1, "Ammo");
StoreInfo[indexsa][oMetall] = cache_get_field_content_int(indexsa-1, "Metall");
StoreInfo[indexsa][oLock] = cache_get_field_content_int(indexsa-1, "lock");
allgogoas ++;
}
if(createText)
{
new texts[210];
if(StoreInfo[1][oLock] >= 1)format(texts,sizeof(texts),"{FFFFFF}Количество территорий: %d\n\n{00CC00}Grove Street\n{FFFFFF}Наркотики: {FFFAFA}%i / 30000 гр.\n{FFFFFF}Патроны: {FFFAFA}%i / 45000 шт.\n{FFFFFF}Металл: {FFFAFA}%i / 7000 кг.\n{FFFFFF}Склад: {FF0000}Закрыт",GhettoMen[0],StoreInfo[1][oMoney],StoreInfo[1][oAmmo],StoreInfo[1][oMetall]);
if(StoreInfo[1][oLock] == 0)format(texts,sizeof(texts),"{FFFFFF}Количество территорий: %d\n\n{00CC00}Grove Street\n{FFFFFF}Наркотики: {FFFAFA}%i / 30000 гр.\n{FFFFFF}Патроны: {FFFAFA}%i / 45000 шт.\n{FFFFFF}Металл: {FFFAFA}%i / 7000 кг.\n{FFFFFF}Склад: {00CC00}Открыт",GhettoMen[0],StoreInfo[1][oMoney],StoreInfo[1][oAmmo],StoreInfo[1][oMetall]);
StoreGrove = Create3DTextLabel(texts,0xffff00FF,2455.6023,-1706.2034,1014.5078,10.0,1,0);
if(StoreInfo[2][oLock] >= 1)format(texts,sizeof(texts),"{FFFFFF}Количество территорий: %d\n\n{CC00FF}The Ballas\n{FFFFFF}Наркотики: {FFFAFA}%i / 30000 гр.\n{FFFFFF}Патроны: {FFFAFA}%i / 45000 шт.\n{FFFFFF}Металл: {FFFAFA}%i / 7000 кг.\n{FFFFFF}Склад: {FF0000}Закрыт",GhettoMen[1],StoreInfo[2][oMoney],StoreInfo[2][oAmmo],StoreInfo[2][oMetall]);
if(StoreInfo[2][oLock] == 0)format(texts,sizeof(texts),"{FFFFFF}Количество территорий: %d\n\n{CC00FF}The Ballas\n{FFFFFF}Наркотики: {FFFAFA}%i / 30000 гр.\n{FFFFFF}Патроны: {FFFAFA}%i / 45000 шт.\n{FFFFFF}Металл: {FFFAFA}%i / 7000 кг.\n{FFFFFF}Склад: {00CC00}Открыт",GhettoMen[1],StoreInfo[2][oMoney],StoreInfo[2][oAmmo],StoreInfo[2][oMetall]);
StoreBallas = Create3DTextLabel(texts,0xffff00FF,-42.5517,1412.7671,1084.4297,10.0,0,0);
if(StoreInfo[3][oLock] >= 1)format(texts,sizeof(texts),"{FFFFFF}Количество территорий: %d\n\n{00F5FF}Varios Los Aztecas\n{FFFFFF}Наркотики: {FFFAFA}%i / 30000 гр.\n{FFFFFF}Патроны: {FFFAFA}%i / 45000 шт.\n{FFFFFF}Металл: {FFFAFA}%i / 7000 кг.\n{FFFFFF}Склад: {FF0000}Закрыт",GhettoMen[2],StoreInfo[3][oMoney],StoreInfo[3][oAmmo],StoreInfo[3][oMetall]);
if(StoreInfo[3][oLock] == 0)format(texts,sizeof(texts),"{FFFFFF}Количество территорий: %d\n\n{00F5FF}Varios Los Aztecas\n{FFFFFF}Наркотики: {FFFAFA}%i / 30000 гр.\n{FFFFFF}Патроны: {FFFAFA}%i / 45000 шт.\n{FFFFFF}Металл: {FFFAFA}%i / 7000 кг.\n{FFFFFF}Склад: {00CC00}Открыт",GhettoMen[2],StoreInfo[3][oMoney],StoreInfo[3][oAmmo],StoreInfo[3][oMetall]);
StoreAztec = Create3DTextLabel(texts,0xffff00FF,217.7933,1251.2683,1082.1481,10.0,0,0);
if(StoreInfo[4][oLock] >= 1)format(texts,sizeof(texts),"{FFFFFF}Количество территорий: %d\n\n{ffcd00}Los Santos Vagos\n{FFFFFF}Наркотики: {FFFAFA}%i / 30000 гр.\n{FFFFFF}Патроны: {FFFAFA}%i / 45000 шт.\n{FFFFFF}Металл: {FFFAFA}%i / 7000 кг.\n{FFFFFF}Склад: {FF0000}Закрыт",GhettoMen[3],StoreInfo[4][oMoney],StoreInfo[4][oAmmo],StoreInfo[4][oMetall]);
if(StoreInfo[4][oLock] == 0)format(texts,sizeof(texts),"{FFFFFF}Количество территорий: %d\n\n{ffcd00}Los Santos Vagos\n{FFFFFF}Наркотики: {FFFAFA}%i / 30000 гр.\n{FFFFFF}Патроны: {FFFAFA}%i / 45000 шт.\n{FFFFFF}Металл: {FFFAFA}%i / 7000 кг.\n{FFFFFF}Склад: {00CC00}Открыт",GhettoMen[3],StoreInfo[4][oMoney],StoreInfo[4][oAmmo],StoreInfo[4][oMetall]);
StoreVagos = Create3DTextLabel(texts,0xffff00FF,333.3361,1119.1305,1084.8903,10.0,2,0);
if(StoreInfo[5][oLock] >= 1)format(texts,sizeof(texts),"{FFFFFF}Количество территорий: %d\n\n{6666ff}The Rifa\n{FFFFFF}Наркотики: {FFFAFA}%i / 30000 гр.\n{FFFFFF}Патроны: {FFFAFA}%i / 45000 шт.\n{FFFFFF}Металл: {FFFAFA}%i / 7000 кг.\n{FFFFFF}Склад: {FF0000}Закрыт",GhettoMen[4],StoreInfo[5][oMoney],StoreInfo[5][oAmmo],StoreInfo[5][oMetall]);
if(StoreInfo[5][oLock] == 0)format(texts,sizeof(texts),"{FFFFFF}Количество территорий: %d\n\n{6666ff}The Rifa\n{FFFFFF}Наркотики: {FFFAFA}%i / 30000 гр.\n{FFFFFF}Патроны: {FFFAFA}%i / 45000 шт.\n{FFFFFF}Металл: {FFFAFA}%i / 7000 кг.\n{FFFFFF}Склад: {00CC00}Открыт",GhettoMen[4],StoreInfo[5][oMoney],StoreInfo[5][oAmmo],StoreInfo[5][oMetall]);
StoreRifa = Create3DTextLabel(texts,0xffff00FF,-72.1310,1366.9077,1080.2185,10.0,4,0);
}
printf("[%i] Склады банд - загружены. [Длительность загрузки: %d ms]", allgogoas,cache_get_query_exec_time(UNIT_MILLISECONDS));
}
return 1;
}
Шахта:
f_public LoadMiners()
{
new rows, fields;
cache_get_data (rows, fields, dbHandle);
if(rows)
{
for(new indexsa = 1; indexsa <= rows; indexsa++)
{
AllRuda = cache_get_field_content_int(indexsa-1, "AllRuda");
AllMetall = cache_get_field_content_int(indexsa-1, "AllMetall");
}
new texts[100];
format(texts,sizeof(texts),"Руда в обработке: %d кг",AllRuda);
AllRudas = Create3DTextLabel(texts,0xFFFF00FF,-1852.9896,-1612.2748,22.8582,20.0,0,1);
format(texts,sizeof(texts),"Всего металла: %d кг",AllMetall);
AllMetalls = Create3DTextLabel(texts,0xFFFF00FF,-1848.1014,-1622.2008,24.8801,20.0,0,1);
format(texts,sizeof(texts),"Всего металла: %d кг\n{0099FF}Используйте /buym",AllMetall);
MinerBuy = Create3DTextLabel(texts,0xFFFF00FF,-1897.4366,-1671.0118,23.0156+3,20.0,0,1);
printf("Шахта загружена! [Длительность загрузки: %d ms]", cache_get_query_exec_time(UNIT_MILLISECONDS));
}
return 1;
}
Склады армий:
f_public OnArmyStoresLoaded(createText)
{
new rows, fields;
new allsd = 0;
cache_get_data (rows, fields, dbHandle);
if(rows)
{
for(new indexsa = 1; indexsa <= rows; indexsa++)
{
StoreMO[indexsa][oMetall] = cache_get_field_content_int(indexsa-1, "Metall");
StoreMO[indexsa][oAmmo] = cache_get_field_content_int(indexsa-1, "Ammo");
allsd ++;
}
if(createText)
{
format(query,sizeof(query),"Патроны:\n%d из 2000000", StoreMO[1][oAmmo]);
StoresMO[0] = Create3DTextLabel(query, 0xFFFF00FF, 311.7813,-165.9848,1000.6010, 10,50,0);
format(query,sizeof(query),"Патроны:\n%d из 2000000", StoreMO[2][oAmmo]);
StoresMO[1] = Create3DTextLabel(query, 0xFFFF00FF, 311.7813,-165.9848,1000.6010, 10,100,0);
format(query,sizeof(query),"Патроны:\n%d из 2000000", StoreMO[3][oAmmo]);
StoresMO[2] = Create3DTextLabel(query, 0xFFFF00FF, 311.7813,-165.9848,1000.6010, 10,150,0);
new stringas[128];
format(stringas,sizeof(stringas),"Металла на складе: \n{ACCC09}%d кг\n\n{A0AADA}/takem\n{A0AADA}/putm",StoreMO[1][oMetall]);
METALLMO[0] = Create3DTextLabel(stringas,0xFFFFFFFF,141.1719,1875.4633,17.8434+1,15.0,0,1);
format(stringas,sizeof(stringas),"Металла на складе: \n{ACCC09}%d кг\n\n{A0AADA}/takem\n{A0AADA}/putm",StoreMO[2][oMetall]);
METALLMO[1] = Create3DTextLabel(stringas,0xFFFFFFFF,399.8281,2539.5815,16.6796+1,15.0,0,1);
format(stringas,sizeof(stringas),"Металла на складе: \n{ACCC09}%d кг\n\n{A0AADA}/takem\n{A0AADA}/putm",StoreMO[3][oMetall]);
METALLMO[2] = Create3DTextLabel(stringas,0xFFFFFFFF,-2190.0566,2410.2952,4.9615+1,15.0,0,1);
}
printf("[%i] Склады МО - загружены! [Длительность загрузки: %d ms]", allsd, cache_get_query_exec_time(UNIT_MILLISECONDS));
}
return 1;
}
Это все, что загружается при подключении сервера!
- - - Добавлено - - -
Кстати, я не так давно по урокам Vano Glad пробовал оптимизировать. Может тут что накосячил?
stock SaveTwo(playerid)
{
static const fmt_str[] =
"\
UPDATE `accounts` SET\
`Updates` = %d,\
`Drugs` = %d,\
`Business` = %d,\
`Wedding` = '%s',\
`Lip` = '%s',\
`Fuel` = '%d',\
`Gun` = %d,\
`GunAmmo` = %d,\
`COLT45` = %d,\
`SDPISTOL` = %d,\
`DEAGLE` = %d,\
`SHOTGUN` = %d,\
`MP5` = %d,\
`AK47` = %d,\
`M4` = %d,\
`SNIPER` = %d,\
`SAWNOFF` = %d,\
`COMBAT_SG` = %d,\
`MICRO_UZI` = %d,\
`Cash` = %d,\
`Chat` = %d,\
`Award` = '%s',\
`InGameT` = %d \
WHERE `name` = '%s' \
";
new string[sizeof(fmt_str)-2+1-2+4-2+3-2+1-2+16-2+3-2+4-2+4-2+3-2+3-2+3-2+3-2+3-2+3-2+3-2+3-2+3-2+3-2+3-2+11-2+3-2+MAX_PLAYER_NAME+1-2+3-2+MAX_PLAYER_NAME+1];
format(string, sizeof(string), fmt_str
,
PlayerInfo[playerid][pUpdate],
PlayerInfo[playerid][pDrugs],
PlayerInfo[playerid][pBusiness],
PlayerInfo[playerid][pWedding],
PlayerInfo[playerid][pLastIP],
PlayerInfo[playerid][pFuel],
PlayerInfo[playerid][pGun],
PlayerInfo[playerid][pGunAmmo],
PlayerInfo[playerid][pSkill][0],
PlayerInfo[playerid][pSkill][1],
PlayerInfo[playerid][pSkill][2],
PlayerInfo[playerid][pSkill][3],
PlayerInfo[playerid][pSkill][4],
PlayerInfo[playerid][pSkill][5],
PlayerInfo[playerid][pSkill][6],
PlayerInfo[playerid][pSkill][7],
PlayerInfo[playerid][pSkill][8],
PlayerInfo[playerid][pSkill][9],
PlayerInfo[playerid][pSkill][10],
PlayerInfo[playerid][pCash],
PlayerInfo[playerid][pChat],
PlayerInfo[playerid][pAward],
PlayerInfo[playerid][pInGameTime],
PlayerInfo[playerid][pName]
);
mysql_function_query(dbHandle, string, false, "", "");
//mysql_pquery(dbHandle, string);
}
Powered by vBulletin® Version 4.2.0 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. Перевод: zCarot