Код:
public OnGameModeInit()
{
Profiler_Start();
new ipadress[16];
GetServerVarAsString("bind", ipadress, sizeof(ipadress));
if(!strcmp(ipadress, "193.124.183.165"))
{
SendRconCommand("hostname Nevees RP | АДМИНКИ/ЛИДЕРКИ/ХЕЛПЕРКИ");
mysql_connect("127.0.0.1", "gs2", "gs2", "oPxFshVZh4");
}
else
{
SendRconCommand("hostname Nevees RP | АДМИНКИ/ЛИДЕРКИ/ХЕЛПЕРКИ");
mysql_connect("127.0.0.1", "gs2", "gs2", "oPxFshVZh4");
}
if(!mysql_errno()) printf("[!] Подключение к базе успешно [!]");
else printf("[!] Подключение к базе не успешно [!]");
mysql_query(1, "SET NAMES cp1251", false);
mysql_set_charset("cp1251");
if(getDayEx()==2) mysql_query(1, "UPDATE `admin` SET `online_monday`='0',`online_tuesday`='0',`online_wednesday`='0',`online_thursday`='0',`online_friday`='0',`online_saturday`='0',`online_sunday`='0'",false);
for(new i=0;i<sizeof(SALUTEINFOS);i++) SALUTEINFOS[i][SaluteUse] = false;
for(new i;i<20;i++) gDSTurn[i] = INVALID_PLAYER_ID;
SetGameModeText("Samp-Rp | RolePlay");
SendRconCommand("language Russian");
SendRconCommand("sleep 2");
SendRconCommand("chatlogging 0");
SendRconCommand("cookielogging 0");
SendRconCommand("ackslimit 5000");
ShowPlayerMarkers(PLAYER_MARKERS_MODE_GLOBAL);
ShowNameTags(true);
SetNameTagDrawDistance(21.0);
EnableStuntBonusForAll(false);
DisableInteriorEnterExits();
SetWeather(1);
AddPlayerClass(0, 0.0, 0.0, 0.0, 0.0, 0, 0, 0, 0, 0, 0);
Show_RaceTDGlobal();
LoadDrawsInit();
LoadObject();
LoadPickups();
Load3DTexts();
LoadVehicles();
Menu();
antidmarea[0] = CreateDynamicSphere(263.6395,78.5962,1001.0391, 10.0); // ТЮРЬМА ЛСПД
CreateDynamicSphere(221.3200,113.1807,999.0156, 30.0); // ТЮРЬМА СФПД
CreateDynamicSphere(1214.2562, -1310.3021, 13.2000, 50.0); // БОЛЬНИЦА ЛС - УЛИЦА
CreateDynamicSphere(-1772.0950,-2002.8367,1500.7853, 100.0); // БОЛЬНИЦА ЛС - ИНТЕРЬЕР
CreateDynamicSphere(1362.8073,-1278.7048,13.5469, 30.0); // AMMO LS
CreateDynamicSphere(-2045.6793,-108.3653,35.2519, 30.0); // АВТОШКОЛА
CreateDynamicSphere(-23.3630,-63.0777,1019.4539, 30.0); // ПРАВИТЕЛЬСТВО
CreateDynamicSphere(5512.0884,1243.8398,23.1886, 50.0); // ДЕМОРГАН
CreateDynamicSphere(945.6660,-1746.8119,13.2799, 40.0); // АВТОМАСТЕРСКАЯ ЛС
CreateDynamicSphere(1412.2792,1315.8641,1501.0840, 20.0); // БАНК
CreateDynamicSphere(1480.0029,-1789.1702,13.5380, 150.0); // ВОЗЛЕ МЭРИИ
CreateDynamicSphere(218.9245,-1438.6719,12.8093, 15.0); // ВОЕНКОМАТ ЛС
CreateDynamicSphere(829.7184,3.5679,1004.1797, 15.0); // РЕГИСТРАЦИЯ НА МП
CreateDynamicSphere(1781.3978,-1911.6707,13.3903, 100.0); // СПАВН
CreateDynamicSphere(1571.3462,-1567.5875,1001.1030, 100.0); // МЭРИЯ
antidmarea[1] = CreateDynamicSphere(302.3903,-1609.3219,96.5000, 50.0); //СМИ
Urna[0] = CreateDynamicSphere(1584.1431,-1575.5946,1004.6200, 1.5); CreatePickup(1210, 23, 1584.1431,-1575.5946,1004.6200, -1); // Сфера для урны №1
Urna[1] = CreateDynamicSphere(1582.4059,-1574.5624,1004.6200, 1.0); CreatePickup(1239, 23, 1582.4059,-1574.5624,1004.6200, -1); // Сфера помощи
siren_area = CreateDynamicSphere(-1277.4569,478.6797,11.5860, 2.0, 0, 0, -1); CreatePickup(19131,23,-1277.4569,478.6797,11.5860);
prodArea = CreateDynamicSphere(-116.87, -320.27, 1.42, 5.0);
ZonsWar[0] = GangZoneCreate(300.755706, 2402.644531, 468.755706, 2580.644531);
ZonsWar[1] = GangZoneCreate(-855.6808,1891.0676,-519.0121,2128.4995);
ZonsWar[2] = GangZoneCreate(275.881378, 797.211608, 443.881378, 973.211608);
LimitPlayerMarkerRadius(100.0);
ManualVehicleEngineAndLights();
CreateDynamicMapIcon(1172.4338,-1323.2861,15.4029,22,0);//Больница ЛС
CreateDynamicMapIcon(-2654.9731,639.9579,14.4545,22,0);//Больница СФ
CreateDynamicMapIcon(1607.3618,1815.3934,10.8203,22,0);//Больница ЛВ
CreateDynamicMapIcon(-2766.3472,375.6805,6.3347,56,0);//Мэрия СФ
CreateDynamicMapIcon(2388.8289,2466.0425,10.8203,56,0);//Мэрия ЛВ
CreateDynamicMapIcon(2772.5769,-2459.4810,13.2018,38,0);//Армия U.S.A
CreateDynamicMapIcon(-2117.6462,-228.2950,35.3203,60,0);//Стритрейсеры
CreateDynamicMapIcon(2233.9858,-1333.1705,23.9815,21,0); // Работа проститутка
CreateDynamicMapIcon(1932.7750,-2235.5293,13.5469,5,0); // Аэропорт LS
CreateDynamicMapIcon(247.6307,-1881.0348,1.5033,9,0); // Водный транспорт LS
CreateDynamicMapIcon(687.1882,-445.6448,16.3359,56,0); // Грабим байкеры
CreateDynamicMapIcon(1530.2096,751.0746,11.0234,23,0);
CreateDynamicMapIcon(1422.3098,2773.7520,10.8203,23,0);
CreateDynamicMapIcon(960.3505,1685.2932,8.8516,23,0);
CreateDynamicMapIcon(2464.2229,-1331.2528,25.3509,59,0); // баллас
CreateDynamicMapIcon(2850.9971,-1532.5389,11.0991,60,0); // вагос
CreateDynamicMapIcon(2495.3684,-1688.0365,13.5553,62,0); // грув
CreateDynamicMapIcon(2185.9600,-1811.9399,13.5469,58,0); // ацтек
CreateDynamicMapIcon(2776.2354,-1937.9946,13.9518,61,0); // рифа
CreateDynamicMapIcon(-89.2786,-1585.9827,2.6172,24,0); // дровосек
CreateDynamicMapIcon(-2.9803,-363.4466,5.4297,51,0); //
CreateDynamicMapIcon(-1882.5100,866.3918,35.1719,45,0); //clothes sf
CreateDynamicMapIcon(472.4380,-1515.5332,40.5726,45,0); //clothes ls
CreateDynamicMapIcon(542.1437,-1272.3624,51.3059,55,0); //Car ls
CreateDynamicMapIcon(-1948.4501,278.1562,68.9698,55,0); //Car sf
CreateDynamicMapIcon(-1638.6560,1206.3889,68.9698,55,0); //car sf
CreateDynamicMapIcon(1657.0205,2254.5571,10.8203,25,0); //Сasino RIch
CreateDynamicMapIcon(1552.8314,-1675.9022,16.1953,30,0); //!
CreateDynamicMapIcon(1478.8680,-1804.6306,13.5630,56,0); //!
CreateDynamicMapIcon(-2243.8826,-87.9706,35.3203,49,0); //мисти
CreateDynamicMapIcon(2312.4189,-1641.4185,22.3378,49,0); //бар
CreateDynamicMapIcon(1465.1370,-1009.9205,26.8438,52,0);// банк лс
CreateDynamicMapIcon(-2623.7166,1410.6890,7.0938,49,0); //джизз
CreateDynamicMapIcon(212.2816,1812.2374,21.8672,56,0); //точка наблюдения
CreateDynamicMapIcon(1786.7987,-1304.1646,13.7710,47,0); //Central Hotel
CreateDynamicMapIcon(221.6311,-1441.6997,13.2510,46,0); // Voenkom LS
CreateDynamicMapIcon(1168.0460,1367.3354,10.8125,46,0); // Voenkom LV
CreateDynamicMapIcon(-2034.8152,-107.1327,34.8161,36,0); // Автошкола
CreateDynamic3DTextLabel("Войти в бассейн\nКлавиша "SERVER"''ALT''", -1, 2475.0808,2657.0547,1508.7789,9.0,INVALID_PLAYER_ID,INVALID_VEHICLE_ID,1);
CreateDynamic3DTextLabel("Выйти с бассейна\nКлавиша "SERVER"''ALT''", -1, -1051.0314,453.9560,2.0479,9.0,INVALID_PLAYER_ID,INVALID_VEHICLE_ID,1);
CreateDynamic3DTextLabel("Выйти с подвала\nКлавиша "SERVER"''ALT''", -1, 2443.4961,2673.7556,1514.7955,9.0,INVALID_PLAYER_ID,INVALID_VEHICLE_ID,1);
CreateDynamic3DTextLabel("Чтобы выйти из гаража нажмите 'ALT'", COLOR_SERVER, 1769.0474,-1897.8124,498.5519+0.8,9.0,INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1);
CreateDynamic3DTextLabel("Чтобы покинуть гараж\n{"#cGRAY"}Посигнальте 'H'", COLOR_SERVER, 1791.6519,-1903.4984,498.5519+0.8,9.0,INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1);
DMZ = GangZoneCreate(-469, 2170, -341, 2293);
DynamicDMZ = CreateDynamicCube(-469, 2170, -1000, -341, 2293, 1000, 25);
unix = gettime(tmphour, tmpminute, tmpsecond);
getdate(tmpyear,tmpmonth,tmpday);
Iter_Clear(boxPlayer);
Iter_Clear(VehicleGun);
gettime(lasthour, _, _);
SetTimer("UpdateTo1Sec", 1000, 1);
SetTimer("UpdateTo1Min", (1000 * 60), 1);
SetTimer("UpdateTo10Min", (1000 * 60 * 10), 1);
for(new d = 0; d < MAX_DUELS; d++)
{
duel_pvp[d][duel_id] = -1;
duel_pvp[d][duel_to_id] = -1;
duel_pvp[d][duel_last_vw] = 0;
duel_pvp[d][duel_gun] = 0;
duel_pvp[d][duel_timer] = -1;
duel_pvp[d][duel_time]=0;
duel_pvp[d][duel_health_id] = 100.0;
duel_pvp[d][duel_health_to_id] = 100.0;
duel_pvp[d][duel_money]=0;
}
new Cache:cache, rows, time;
cache = mysql_query(1, "SELECT * FROM `bugs`"), rows = cache_num_rows();
if(rows)
{
for(new i, id; i < rows; i++)
{
id = cache_get_field_content_int(i, "id");
cache_get_field_content(i, "name", gBugDataName[id], 1, 25);
cache_get_field_content(i, "text", gBugDataText[id], 1, 128);
cache_get_field_content(i, "date", gBugDataDate[id], 1, 20);
}
}
cache_delete(cache);
cache = mysql_query(1,"SELECT * FROM `instrument`"), rows = cache_num_rows(), time = GetTickCount();
if(rows)
{
TransportCompany_FareTaxi = cache_get_field_content_int(0, "taxi_cash");
House_Fare_Class[0] = cache_get_field_content_int(0, "house0");
House_Fare_Class[1] = cache_get_field_content_int(0, "house1");
House_Fare_Class[2] = cache_get_field_content_int(0, "house2");
House_Fare_Class[3] = cache_get_field_content_int(0, "house3");
House_Fare_Class[4] = cache_get_field_content_int(0, "house4");
House_Fare_Class[5] = cache_get_field_content_int(0, "house5");
Business_Nalog = cache_get_field_content_int(0, "business_nalog");
Gos_Nalog[0] = cache_get_field_content_int(0, "gos_nalog");
Gos_Nalog[1] = cache_get_field_content_int(0, "gos_kazna");
if(Gos_Nalog[1] > 800000000 || Gos_Nalog[1] < 0) Gos_Nalog[1] = ((Gos_Nalog[1] > 800000000) ? (800000000) : (0)), SaveInstrument();
printf("-> Экономика успешно загружена %d ms", GetTickCount()-time);
}
else print("-> Экономика не загружена");
cache_delete(cache);
cache = mysql_query(1,"SELECT * FROM `banners`"), rows = cache_num_rows(), time = GetTickCount();
if(rows)
{
for(new i = 0; i < rows; i++)
{
BannerInfo[i][tID] = cache_get_field_content_int(i, "tID");
cache_get_field_content(i, "tOwner", BannerInfo[i][tOwner], 1, strlen(BannerInfo[i][tOwner]));
cache_get_field_content(i, "tText", BannerInfo[i][tText], 1, strlen(BannerInfo[i][tText]));
BannerInfo[i][tDay] = cache_get_field_content_int(i, "tDay");
BannerInfo[i][tStatus] = bool:cache_get_field_content_int(i, "tStatus");
if(!BannerInfo[i][tStatus]) format(string,sizeof(string),""WHITE"Рекламный баннер №%d\nLos Santos News\nСВОБОДНО",i+1);
else
{
format(string,sizeof(string),""WHITE"%s",BannerInfo[i][tText]);
for(new f, h; f < strlen(string); f++) if(++h >= 20 && string[f] == ' ')
{
h = 0;
strins(string, "\n", f);
}
}
SetDynamicObjectMaterialText(addnews[i], 0, string, 90, "Impact", 24, 0, -32256, -16777216, 1);
}
printf("-> Загружено %d баннеров | %d ms", rows, GetTickCount()-time);
}
else print("-> Баннеры не загружены");
cache_delete(cache);
cache = mysql_query(1,"SELECT * FROM `family_system`"), rows = cache_num_rows(), time = GetTickCount();
if(rows)
{
for (new f; f < rows; f++)
{
family_info[f+1][f_id] = cache_get_field_content_int(f, "fam_id");
cache_get_field_content(f, "fam_name", family_info[f+1][f_name], 1, strlen(family_info[f+1][f_name]));
cache_get_field_content(f, "fam_creator", family_info[f+1][f_creator], 1, strlen(family_info[f+1][f_creator]));
cache_get_field_content(f, "fam_data", family_info[f+1][f_creating_data], 1, strlen(family_info[f+1][f_creating_data]));
family_info[f+1][f_chat_color] = cache_get_field_content_int(f, "fam_chat_color");
family_info[f+1][f_name_color] = cache_get_field_content_int(f, "fam_name_color");
family_info[f+1][f_members_amount] = cache_get_field_content_int(f, "fam_members_amount");
family_info[f+1][f_nationality] = cache_get_field_content_int(f, "fam_nationality");
}
printf("-> Загружено %d семей | %d ms", rows, GetTickCount()-time);
}
else print("-> Семьи не загружены");
cache_delete(cache);
cache = mysql_query(1,"SELECT * FROM `mafiabalance`"), rows = cache_num_rows();
if(rows)
{
cache_get_field_content(0, "lcnjob", string);
sscanf(string, "p<,>a<i>[5]",MafiaJober[5]);
cache_get_field_content(0, "yakjob", string);
sscanf(string, "p<,>a<i>[5]",MafiaJober[6]);
cache_get_field_content(0, "rmjob", string);
sscanf(string, "p<,>a<i>[5]",MafiaJober[14]);
cache_get_field_content(0, "priton", string);
sscanf(string, "p<,>a<i>[5]",PritonNarko);
for(new i; i < 5; i ++)
{
if(PritonNarko[i] < 0) PritonNarko[i] = 0;
else if (PritonNarko[i] > 5000) PritonNarko[i] = 5000;
}
new dobav;
for(new s = 4; s < 15; s++)
{
if(s != 5 && s != 6 && s != 14) continue;
for(new i; i < 5; i++)
{
if(!MafiaJober[s][i]) continue;
dobav = i*2-1;
MafiaBotID[s][MafiaJober[s][i]+dobav] = CreateActor(add_actor[MafiaJober[s][i]+dobav][ActorSkin], add_actor[MafiaJober[s][i]+dobav][ActorX], add_actor[MafiaJober[s][i]+dobav][ActorY], add_actor[MafiaJober[s][i]+dobav][ActorZ], add_actor[MafiaJober[s][i]+dobav][ActorFa]);
SetActorVirtualWorld(MafiaBotID[s][MafiaJober[s][i]+dobav], s);
ApplyActorAnimation(MafiaBotID[s][MafiaJober[s][i]+dobav],add_actor[MafiaJober[s][i]+dobav][Anim1],add_actor[MafiaJober[s][i]+dobav][Anim2],4.1,1,1,1,1,1);
Mafia3D[s][MafiaJober[s][i]+dobav] = Create3DTextLabel(add_actor[MafiaJober[s][i]+dobav][ActorText], -1, add_actor[MafiaJober[s][i]+dobav][ActorX], add_actor[MafiaJober[s][i]+dobav][ActorY], add_actor[MafiaJober[s][i]+dobav][ActorZ]+1.0, 1.5, s, 1);
}
}
print("-> Склад мафий загружен");
}
else print("-> Склад мафий не загружен");
cache_delete(cache);
cache = mysql_query(1,"SELECT * FROM `fractions_store`"), rows = cache_num_rows();
if(rows)
{
for(new a; a < rows; a ++)
{
frac_money[(a==28?(a-1):(a))]=cache_get_field_content_int(a,"frac_money");
frac_materials[a]=cache_get_field_content_int(a,"frac_materials");
}
UpdateText(0), UpdateText(1), UpdateText(2);
printf ("-> Фракционные склады загружены (%d шт)", rows);
}
else print("-> Фракционные склады не загружены");
cache_delete(cache);
cache = mysql_query(1,"SELECT * FROM `filling`"), rows = cache_num_rows();
if(rows)
{
new filling_online;
FILLING_TOTAL = rows;
for(new i; i < FILLING_TOTAL; i++)
{
Filling[i+1][fPrice] = cache_get_field_content_int(i, "fPrice");
Filling[i+1][fLock] = bool:cache_get_field_content_int(i, "fLock");
cache_get_field_content(i, "fOwner",Filling[i+1][fOwner],1,24);
Filling[i+1][fBankMoney] = cache_get_field_content_int(i, "fBankMoney");
Filling[i+1][fBenz] = cache_get_field_content_int(i, "fBenz");
Filling[i+1][fMaxBenz] = cache_get_field_content_int(i, "fMaxBenz");
Filling[i+1][fPriceBenz] = cache_get_field_content_int(i, "fPriceBenz");
Filling[i+1][fPos][0] = cache_get_field_content_float(i, "fPos");
Filling[i+1][fPos][1] = cache_get_field_content_float(i, "fPos1");
Filling[i+1][fPos][2] = cache_get_field_content_float(i, "fPos2");
Filling[i+1][sFuelPos][0] = cache_get_field_content_float(i, "sFuelPos");
Filling[i+1][sFuelPos][1] = cache_get_field_content_float(i, "sFuelPos1");
Filling[i+1][sFuelPos][2] = cache_get_field_content_float(i, "sFuelPos2");
format(string, 300,"{"#cGREEN"}Заправочная станция №%i{FFFFFF}\n\nВладелец: {"#cGREEN"}[%s]{FFFFFF}\nСтатус: {"#cGREEN"}[%s{"#cGREEN"}]\n{FFFFFF}Стоимость: {"#cGREEN"}[%i$]{FFFFFF}\nБензина в цистерне: {"#cGREEN"}[%i/%i литра(-ов)]{FFFFFF}\nЦена за 1 литр: {"#cGREEN"}[%i$]{FFFFFF}",
i+1, Filling[i+1][fOwner], (Filling[i+1][fLock] ? ("{FF0000}Закрыта") : ("Открыта")), Filling[i+1][fPrice], Filling[i+1][fBenz], Filling[i+1][fMaxBenz], Filling[i+1][fPriceBenz]);
if(!strcmp(Filling[i+1][fOwner], "None",true)) format(string,360,"%s\n\nДля покупки введите '/buyfuel'", string);
Filling[i+1][fText] = Create3DTextLabel(string,-1,Filling[i+1][fPos][0], Filling[i+1][fPos][1], Filling[i+1][fPos][2]+1.0,20.0,0,1);
Filling[i+1][sPickup] = CreatePickup(1650,1,Filling[i+1][sFuelPos][0],Filling[i+1][sFuelPos][1],Filling[i+1][sFuelPos][2],0);
filling_online = cache_get_field_content_int(i, "f_online");
if(filling_online > 0 && strcmp(Filling[i+1][fOwner], "None", true) != 0 && getdate() >= filling_online+3)
{
mysql_format(1,string,164,"UPDATE `accounts` SET `pPsbiskey` = '-1',`pText` = '4' WHERE `Name` = '%e'",Filling[i+1][fOwner]);
mysql_tquery(1, string);
mysql_format(1,string,144,"UPDATE `filling` SET `f_online` = '0' WHERE `fOwner` = '%e'",Filling[i+1][fOwner]);
mysql_tquery(1, string);
strmid(Filling[i+1][fOwner], "None", 0, strlen("None"), 255);
}
}
printf("-> Загружено <%i> заправочных станций!", FILLING_TOTAL);
}
else print("-> Заправочные станции не загружены");
cache_delete(cache);
cache = mysql_query(1,"SELECT * FROM `business`"), rows = cache_num_rows(), time = GetTickCount();
if(rows)
{
new b_online;
BIZES = rows;
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");
BizInfo[h+1][EnterBiz][0] = cache_get_field_content_float(h, "EnterX");
BizInfo[h+1][EnterBiz][1] = cache_get_field_content_float(h, "EnterY");
BizInfo[h+1][EnterBiz][2] = cache_get_field_content_float(h, "EnterZ");
BizInfo[h+1][ExitBiz][0] = cache_get_field_content_float(h, "ExitX");
BizInfo[h+1][ExitBiz][1] = cache_get_field_content_float(h, "ExitY");
BizInfo[h+1][ExitBiz][2] = cache_get_field_content_float(h, "ExitZ");
cache_get_field_content(h, "bOwner", BizInfo[h+1][bOwner], 1, strlen(BizInfo[h+1][bOwner]));
BizInfo[h+1][bPrice] = cache_get_field_content_int(h, "bPrice");
BizInfo[h+1][bInt] = cache_get_field_content_int(h, "bInt");
BizInfo[h+1][bVW] = cache_get_field_content_int(h, "bVW");
BizInfo[h+1][bLock] = cache_get_field_content_int(h, "bLock");
cache_get_field_content(h, "bName", BizInfo[h+1][bName], 1, strlen(BizInfo[h+1][bName]));
BizInfo[h+1][bKrisha] = cache_get_field_content_int(h, "bKrisha");
BizInfo[h+1][bPribil] = cache_get_field_content_int(h, "bPribil");
BizInfo[h+1][BarPos][0] = cache_get_field_content_float(h, "BarX");
BizInfo[h+1][BarPos][1] = cache_get_field_content_float(h, "BarY");
BizInfo[h+1][BarPos][2] = cache_get_field_content_float(h, "BarZ");
BizInfo[h+1][bCena][0] = cache_get_field_content_int(h, "bCena1");
BizInfo[h+1][bCena][1] = cache_get_field_content_int(h, "bCena2");
BizInfo[h+1][bCena][2] = cache_get_field_content_int(h, "bCena3");
BizInfo[h+1][bCena][3] = cache_get_field_content_int(h, "bCena4");
BizInfo[h+1][bCena][4] = cache_get_field_content_int(h, "bCena5");
BizInfo[h+1][bCena][5] = cache_get_field_content_int(h, "bCena6");
BizInfo[h+1][bCena][6] = cache_get_field_content_int(h, "bCena7");
BizInfo[h+1][bCena][7] = cache_get_field_content_int(h, "bCena8");
BizInfo[h+1][bCena][8] = cache_get_field_content_int(h, "bCena9");
BizInfo[h+1][bVhod] = cache_get_field_content_int(h, "bVhod");
BizInfo[h+1][bBank] = cache_get_field_content_int(h, "bBank");
BizInfo[h+1][bTypeBiz] = cache_get_field_content_int(h, "bTypeBiz");
BizInfo[h+1][bProd] = cache_get_field_content_int(h,"bProd");
BizInfo[h+1][bProdOrder] = cache_get_field_content_int(h,"bProdOrder");
BizInfo[h+1][bProdOrderPrice] = cache_get_field_content_int(h,"bProdOrderPrice");
BizInfo[h+1][bProdMax] = cache_get_field_content_int(h,"bProdMax");
b_online = cache_get_field_content_int(h, "h_online");
if(b_online > 0 && strcmp(BizInfo[h+1][bOwner], "None", true) != 0 && getdate() >= b_online+3)
{
mysql_format(1,string,164,"UPDATE `accounts` SET `pPbiskey` = '-1',`pText` = '3' WHERE `Name` = '%e'",BizInfo[h+1][bOwner]);
mysql_tquery(1, string);
BizInfo[h+1][bPribil] = 0;
BizInfo[h+1][bLock] = 0;
BizInfo[h+1][bBank] = 0;
strmid(BizInfo[h+1][bOwner], "None", 0, strlen("None"), 255);
mysql_format(1,string,200,"UPDATE `business` SET bPribil=0,bLock=0,bBank=0,bOwner='None',h_online=0 WHERE bID = %d",BizInfo[h+1][bID]);
mysql_tquery(1,string);
}
if(BizInfo[h+1][bTypeBiz] != 9)
{
if(!strcmp( BizInfo[h+1][ bOwner ], "None", true ) )
{
BizInfo[h+1][bPickup] = CreatePickup(1274, 1, BizInfo[h+1][EnterBiz][0], BizInfo[h+1][EnterBiz][1], BizInfo[h+1][EnterBiz][2],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 ] = CreatePickup(19132, 1, BizInfo[h+1][EnterBiz][0], BizInfo[h+1][EnterBiz][1], BizInfo[h+1][EnterBiz][2],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 ] = CreatePickup(19132, 1, BizInfo[h+1][EnterBiz][0], BizInfo[h+1][EnterBiz][1], BizInfo[h+1][EnterBiz][2],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] = Create3DTextLabel(string, 0xC4DAADFF, BizInfo[h+1][EnterBiz][0],BizInfo[h+1][EnterBiz][1],BizInfo[h+1][EnterBiz][2], 15.0,0,1);
BizInfo[h+1][bLab] = CreatePickup(1239,1,BizInfo[h+1][BarPos][0], BizInfo[h+1][BarPos][1], BizInfo[h+1][BarPos][2],BizInfo[h+1][ bVW ]);
BizInfo[h+1][bLabelBuy] = Create3DTextLabel("Нажмите клавишу\n"SERVER"'N'\n"WHITE"Для покупки", CWHITE, BizInfo[h+1][BarPos][0], BizInfo[h+1][BarPos][1], BizInfo[h+1][BarPos][2], 5.0,BizInfo[h+1][ bVW ],1);
//ИНТЕРЬЕР ОФИСА ПАРАМЕТРЫ
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);
}
else print("-> Business не загружены");
cache_delete(cache);
cache = mysql_query(1,"SELECT * FROM `house`"), rows = cache_num_rows(), time = GetTickCount();
if(rows)
{
new h_online, h_online_arendator[2];
TOTAL_HOUSE = rows;
for(new he; he < TOTAL_HOUSE; he++)
{
HouseInfo[he][hID] = cache_get_field_content_int(he, "hID");
HouseInfo[he][hEnter][0] = cache_get_field_content_float(he, "hEntrancex");
HouseInfo[he][hEnter][1] = cache_get_field_content_float(he, "hEntrancey");
HouseInfo[he][hEnter][2] = cache_get_field_content_float(he, "hEntrancez");
HouseInfo[he][hExit][0] = cache_get_field_content_float(he, "hExitx");
HouseInfo[he][hExit][1] = cache_get_field_content_float(he, "hExity");
HouseInfo[he][hExit][2] = cache_get_field_content_float(he, "hExitz");
cache_get_field_content(he, "hOwner", HouseInfo[he][hOwner], 1, strlen(HouseInfo[he][hOwner]));
HouseInfo[he][hValue] = cache_get_field_content_int(he, "hValue");
HouseInfo[he][hHel] = cache_get_field_content_int(he, "hHel");
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][hKlass] = cache_get_field_content_int(he, "hKlass");
HouseInfo[he][hVehSost] = cache_get_field_content_int(he, "hVehSost");
HouseInfo[he][hCar][0] = cache_get_field_content_float(he, "hCarx");
HouseInfo[he][hCar][1] = cache_get_field_content_float(he, "hCary");
HouseInfo[he][hCar][2] = cache_get_field_content_float(he, "hCarz");
HouseInfo[he][hCar][3] = cache_get_field_content_float(he, "hCarc");
HouseInfo[he][hStyle] = cache_get_field_content_int(he, "hStyle");
HouseInfo[he][hSafe] = cache_get_field_content_int(he, "hSafe");
HouseInfo[he][hNarko] = cache_get_field_content_int(he, "hNarko");
HouseInfo[he][hGun][0] = cache_get_field_content_int(he, "hGun1");
HouseInfo[he][hGun][1] = cache_get_field_content_int(he, "hGun2");
HouseInfo[he][hGun][2] = cache_get_field_content_int(he, "hGun3");
HouseInfo[he][hGun][3] = cache_get_field_content_int(he, "hGun4");
HouseInfo[he][hGun][4] = cache_get_field_content_int(he, "hGun5");
HouseInfo[he][hGunAmmo][0] = cache_get_field_content_int(he, "hGunAmmo1");
HouseInfo[he][hGunAmmo][1] = cache_get_field_content_int(he, "hGunAmmo2");
HouseInfo[he][hGunAmmo][2] = cache_get_field_content_int(he, "hGunAmmo3");
HouseInfo[he][hGunAmmo][3] = cache_get_field_content_int(he, "hGunAmmo4");
HouseInfo[he][hGunAmmo][4] = cache_get_field_content_int(he, "hGunAmmo5");
HouseInfo[he][hGarage] = cache_get_field_content_int(he, "hGarage");
HouseInfo[he][hSubsidions] = cache_get_field_content_int(he, "hSubsidions");
HouseInfo[he][hEat][0] = cache_get_field_content_int(he, "hEat1");
HouseInfo[he][hEat][1] = cache_get_field_content_int(he, "hEat2");
HouseInfo[he][hEat][2] = cache_get_field_content_int(he, "hEat3");
HouseInfo[he][hEat][3] = cache_get_field_content_int(he, "hEat4");
HouseInfo[he][hEat][4] = cache_get_field_content_int(he, "hEat5");
cache_get_field_content(he, "hRent", HouseInfo[he][hRent], 1, strlen(HouseInfo[he][hRent]));
cache_get_field_content(he, "hRent1", HouseInfo[he][hRent1], 1, strlen(HouseInfo[he][hRent1]));
HouseInfo[he][hRentHouse] = cache_get_field_content_int(he, "hRentHouse");
switch(HouseInfo[he][hKlass])
{
case 0: HouseInfo[he][hValue] = House_Fare_Class[0];
case 1: HouseInfo[he][hValue] = House_Fare_Class[1];
case 2: HouseInfo[he][hValue] = House_Fare_Class[2];
case 3: HouseInfo[he][hValue] = House_Fare_Class[3];
case 4: HouseInfo[he][hValue] = House_Fare_Class[4];
case 5: HouseInfo[he][hValue] = House_Fare_Class[5];
}
h_online = cache_get_field_content_int(he, "h_online");
h_online_arendator[0] = cache_get_field_content_int(he, "h_online_arendator");
h_online_arendator[1] = cache_get_field_content_int(he, "h_online_arendator_1");
if(h_online_arendator[0] && strcmp(HouseInfo[he][hRent], "-", true) != 0 && getdate() >= h_online_arendator[0]+3)
{
mysql_format(1,string,164,"UPDATE `accounts` SET `pArendaHouse` = '-1',`pText` = '2' WHERE `Name` = '%e'",HouseInfo[he][hRent]);
mysql_tquery(1, string);
mysql_format(1,string,126,"UPDATE `house` SET `h_online_arendator` = '0' WHERE `hID` = '%i'",HouseInfo[he][hID]);
mysql_tquery(1, string);
}
else if(h_online_arendator[1] && strcmp(HouseInfo[he][hRent1], "-", true) != 0 && getdate() >= h_online_arendator[1]+3)
{
mysql_format(1,string,164,"UPDATE `accounts` SET `pArendaHouse` = '-1',`pText` = '2' WHERE `Name` = '%e'",HouseInfo[he][hRent1]);
mysql_tquery(1, string);
mysql_format(1,string,126,"UPDATE `house` SET `h_online_arendator_1` = '0' WHERE `hID` = '%i'",HouseInfo[he][hID]);
mysql_tquery(1, string);
}
else if( h_online > 0 && HouseInfo[he][hOwned] && getdate() >= h_online + (HouseInfo[he][hSubsidions] ? (7) : (3)) )
{
mysql_format(1,string,164,"UPDATE `accounts` SET `pPhousekey` = '-1',`pText` = '1' WHERE `Name` = '%e'",HouseInfo[he][hOwner]);
mysql_tquery(1, string);
strmid(HouseInfo[he][hOwner], "The State", 0, strlen("The State"), 255);
HouseInfo[he][hHel] = 0;
HouseInfo[he][hLock] = 1;
HouseInfo[he][hOwned] = 0;
HouseInfo[he][hVehSost] = 0;
HouseInfo[he][hStyle] = 0;
HouseInfo[he][hGarage] = 0;
HouseInfo[he][hSubsidions] = 0;
for(new d = 0; d != 5; d++) HouseInfo[he][hGun][d] = 0, HouseInfo[he][hGunAmmo][d] = 0;
HouseInfo[he][hSafe] = 0;
mysql_format(1,string,126,"UPDATE `house` SET `h_online` = '0' WHERE `hID` = '%i'",HouseInfo[he][hID]);
mysql_tquery(1, string);
}
HouseInfo[he][LabelText][0] = CreateDynamic3DTextLabel("Выход из дома\nКлавиша: "SERVER"''ALT''", -1,HouseInfo[he][hExit][0],HouseInfo[he][hExit][1],HouseInfo[he][hExit][2]+1,9.0,INVALID_PLAYER_ID,INVALID_VEHICLE_ID,HouseInfo[he][hInt],he+50);
format(string,215,"Номер дома: {79F84B}%d"WHITE"\nГосударственная цена: {79F84B}%i$"WHITE"\nДом: {79F84B}%s"WHITE"",HouseInfo[he][hID],HouseInfo[he][hValue],(HouseInfo[he][hOwned]?("Занят"):("Свободен")));
HouseInfo[he][LabelText][1] = CreateDynamic3DTextLabel(string,-1,HouseInfo[he][hEnter][0],HouseInfo[he][hEnter][1],HouseInfo[he][hEnter][2],9.0,INVALID_PLAYER_ID, INVALID_VEHICLE_ID,0,0);
if(!HouseInfo[he][hOwned])
{
HouseInfo[he][hPickup] = CreatePickup(1273, 23, HouseInfo[he][hEnter][0], HouseInfo[he][hEnter][1], HouseInfo[he][hEnter][2],0);
HouseInfo[he][hMIcon] = CreateDynamicMapIcon(HouseInfo[he][hEnter][0], HouseInfo[he][hEnter][1], HouseInfo[he][hEnter][2], 31, COLOR_WHITE, 0, -1, -1, 200.0);
}
else
{
HouseInfo[he][hPickup] = CreatePickup(19522, 23, HouseInfo[he][hEnter][0], HouseInfo[he][hEnter][1], HouseInfo[he][hEnter][2],0);
HouseInfo[he][hMIcon] = CreateDynamicMapIcon(HouseInfo[he][hEnter][0], HouseInfo[he][hEnter][1], HouseInfo[he][hEnter][2], 32, COLOR_WHITE, 0, -1, -1, 200.0);
}
}
printf("-> LoadProperty | Загружено %d | Time: %d (ms)",TOTAL_HOUSE,GetTickCount() - time);
}
else print("-> Property не загружены");
cache_delete(cache);
cache = mysql_query(1,"SELECT * FROM `gzlogo`"), rows = cache_num_rows(), time = GetTickCount();
if(rows)
{
for(new i = 1; i < rows; i ++)
{
GZLogoInfo[i][gOwner][0] = cache_get_field_content_int(i, "Owner_1");
GZLogoInfo[i][gOwner][1] = cache_get_field_content_int(i, "Owner_2");
GZLogoInfo[i][gID][0] = CreateDynamicObjectEx(19353,GZLogo[i][0],GZLogo[i][1],GZLogo[i][2],0.000,0.000,GZLogo[i][3],300.000);
format(string,144,"Нажмите: "SERVER"ЛКМ\n"WHITE"Для начала закраски граффити!\n%i - ID",i);
GZLogoInfo[i][g3D] = Create3DTextLabel(string, 0xFFFFFFFF, GZLogo[i][0],GZLogo[i][1],GZLogo[i][2], 15.0, 0);
GZLogoInfo[i][gIcon] = CreateDynamicMapIcon(GZLogo[i][0],GZLogo[i][1],GZLogo[i][2], 56, COLOR_SERVER, -1, -1, -1, 100);
switch(GZLogoInfo[i][gOwner][0])
{
case 15: SetDynamicObjectMaterial(GZLogoInfo[i][gID][0], 0, 1490, "tags2_lalae", "grove", 0);
case 12: SetDynamicObjectMaterial(GZLogoInfo[i][gID][0], 0, 1529, "tags_latemple", "temple", 0);
case 18: SetDynamicObjectMaterial(GZLogoInfo[i][gID][0], 0, 1526, "tags_larifa", "rifa", 0);
case 17: SetDynamicObjectMaterial(GZLogoInfo[i][gID][0], 0, 1531, "tags_laazteca", "aztecas", 0);
case 13: SetDynamicObjectMaterial(GZLogoInfo[i][gID][0], 0, 1530, "tags_lavagos", "vagos", 0);
}
TotalGraf[GZLogoInfo[i][gOwner][0]]++;
GZLogoInfo[i][gFinish][0] = 1000;
if(GZLogoInfo[i][gOwner][1])
{
GZLogoInfo[i][gID][1] = CreateDynamicObjectEx(19353,GZLogo[i][0]+(0.5 * floatsin(-GZLogo[i][3], degrees)),GZLogo[i][1]+(0.5 * floatcos(-GZLogo[i][3], degrees)),GZLogo[i][2],0.000,0.000,GZLogo[i][3],300.000);
switch(GZLogoInfo[i][gOwner][1])
{
case 15: SetDynamicObjectMaterial(GZLogoInfo[i][gID][0], 0, 1490, "tags2_lalae", "grove", 0);
case 12: SetDynamicObjectMaterial(GZLogoInfo[i][gID][0], 0, 1529, "tags_latemple", "temple", 0);
case 18: SetDynamicObjectMaterial(GZLogoInfo[i][gID][0], 0, 1526, "tags_larifa", "rifa", 0);
case 17: SetDynamicObjectMaterial(GZLogoInfo[i][gID][0], 0, 1531, "tags_laazteca", "aztecas", 0);
case 13: SetDynamicObjectMaterial(GZLogoInfo[i][gID][0], 0, 1530, "tags_lavagos", "vagos", 0);
}
TotalGraf[GZLogoInfo[i][gOwner][1]]++;
GZLogoInfo[i][gFinish][1] = 1000;
}
}
printf("-> GZLogoInfo | Загружено: %d | Time: %d (ms)", rows, GetTickCount()-time);
}
else print("-> GZLogoInfo не загружен");
cache_delete(cache);
cache = mysql_query(1,"SELECT * FROM `inviters`"), rows = cache_num_rows(), time = GetTickCount();
if(rows)
{
for(new i; i < rows; i ++)
{
FractionInvite[i][fID] = cache_get_field_content_int(i, "fID");
FractionInvite[i][fNumber] = cache_get_field_content_int(i, "fNumber");
FractionInvite[i][fPosActor][0] = cache_get_field_content_float(i, "fPos0");
FractionInvite[i][fPosActor][1] = cache_get_field_content_float(i, "fPos1");
FractionInvite[i][fPosActor][2] = cache_get_field_content_float(i, "fPos2");
FractionInvite[i][fPosActor][3] = cache_get_field_content_float(i, "fPos3");
FractionInvite[i][fActorSkin] = cache_get_field_content_int(i, "fActorSkin");
cache_get_field_content(i, "fInformation", FractionInvite[i][fInformationString], 1, 64);
sscanf(FractionInvite[i][fInformationString], "p<,>iiiii", FractionInvite[i][fInformation][0],FractionInvite[i][fInformation][1],FractionInvite[i][fInformation][2],FractionInvite[i][fInformation][3],FractionInvite[i][fInformation][4]);
cache_get_field_content(i, "fLicenses", FractionInvite[i][fLicensesString], 1, 64);
sscanf(FractionInvite[i][fLicensesString], "p<,>iiii", FractionInvite[i][fLicenses][0],FractionInvite[i][fLicenses][1],FractionInvite[i][fLicenses][2],FractionInvite[i][fLicenses][3]);
cache_get_field_content(i, "fInfoSkill", FractionInvite[i][fInfoSkillString], 1, 64);
sscanf(FractionInvite[i][fInfoSkillString], "p<,>iiiiii", FractionInvite[i][fInfoSkill][0],FractionInvite[i][fInfoSkill][1],FractionInvite[i][fInfoSkill][2],FractionInvite[i][fInfoSkill][3],FractionInvite[i][fInfoSkill][4],FractionInvite[i][fInfoSkill][5]);
FractionInvite[i][fStatus][0] = bool:cache_get_field_content_int(i, "fStatus0");
FractionInvite[i][fStatus][1] = bool:cache_get_field_content_int(i, "fStatus1");
FractionInvite[i][fRangInvite] = cache_get_field_content_int(i, "fRangInvite");
FractionInvite[i][fVirtual] = cache_get_field_content_int(i, "fVirtual");
format(string, 144, ""WHITE"%s"SERVER"\nВзаимодействие: "WHITE"''H''",FractionInfo[FractionInvite[i][fNumber]][fName]);
FractionInvite[i][fActor] = CreateActor(FractionInvite[i][fActorSkin], FractionInvite[i][fPosActor][0],FractionInvite[i][fPosActor][1],FractionInvite[i][fPosActor][2],FractionInvite[i][fPosActor][3]), SetActorVirtualWorld(FractionInvite[i][fActor], FractionInvite[i][fVirtual]);
FractionInvite[i][fText] = Create3DTextLabel(string, COLOR_SERVER,FractionInvite[i][fPosActor][0],FractionInvite[i][fPosActor][1],FractionInvite[i][fPosActor][2]+0.3,7.0,FractionInvite[i][fVirtual],1);
FRACTIONS_TOTAL++;
}
printf("-> LoadFractions | Загружено %d | Время: %d (ms)",FRACTIONS_TOTAL,GetTickCount() - time);
}
else print("-> LoadFractions не загружен");
cache_delete(cache);
cache = mysql_query(1,"SELECT * FROM `zone`"), rows = cache_num_rows(), time = GetTickCount();
if(rows)
{
for(new i; i < rows; i ++)
{
GZInfo[i][gCoords][0] = cache_get_field_content_float(i, "gCoords1");
GZInfo[i][gCoords][1] = cache_get_field_content_float(i, "gCoords2");
GZInfo[i][gCoords][2] = cache_get_field_content_float(i, "gCoords3");
GZInfo[i][gCoords][3] = cache_get_field_content_float(i , "gCoords4");
GZInfo[i][gFrakVlad] = cache_get_field_content_int(i, "gFrakVlad");
GZInfo[i][gID] = GangZoneCreate(GZInfo[i][gCoords][0],GZInfo[i][gCoords][1],GZInfo[i][gCoords][2],GZInfo[i][gCoords][3]);
frac_gangzone[GZInfo[i][gFrakVlad]]++;
}
UpdateStoreGang(12), UpdateStoreGang(13), UpdateStoreGang(15), UpdateStoreGang(17), UpdateStoreGang(18);
printf("-> LoadGangZone | Загружено: %d | Time: %d (ms)", rows, GetTickCount()-time);
}
else print("-> LoadGangZone не загружен");
cache_delete(cache);
cache = mysql_query(1,"SELECT * FROM `mebel`"), rows = cache_num_rows();
if(rows)
{
new Float:pos[4], model, home, type, number;
for(new he; he < rows; he++)
{
model = cache_get_field_content_int(he, "Model");
pos[0] = cache_get_field_content_float(he, "PosX");
pos[1] = cache_get_field_content_float(he, "PosY");
pos[2] = cache_get_field_content_float(he, "PosZ");
pos[3] = cache_get_field_content_float(he, "PosA");
home = cache_get_field_content_int(he, "House");
type = cache_get_field_content_int(he, "Type");
number = cache_get_field_content_int(he, "Number");
HouseMebel[home][type][number] = CreateDynamicObject(model,pos[0],pos[1],pos[2],0,0,pos[3],home+50);
switch(type)
{
case 0: HouseInfo[home][LabelText][4] = CreateDynamic3DTextLabel("Чтобы открыть холодильник, нажмите клавишу:\n"SERVER"''H''", -1,pos[0],pos[1],pos[2]+1,9.0,INVALID_PLAYER_ID,INVALID_VEHICLE_ID,0,home+50);
case 1,3: HouseInfo[home][LabelText][3] = CreateDynamic3DTextLabel("Для просмотра телевизора введите:\n"SERVER"(/tv)",CWHITE,pos[0],pos[1],pos[2]+1,9.0,INVALID_PLAYER_ID,INVALID_VEHICLE_ID,0,home+50);
case 7: HouseInfo[home][LabelText][5] = CreateDynamic3DTextLabel("Чтобы переодеться, нажмите клавишу:\n"SERVER"''H''", -1,pos[0],pos[1],pos[2]+1,9.0,INVALID_PLAYER_ID,INVALID_VEHICLE_ID,0,home+50);
case 8: HouseInfo[home][LabelText][2] = CreateDynamic3DTextLabel("Для того чтобы лечь спать, нажмите клавишу:\n"SERVER"''H''", -1,pos[0],pos[1],pos[2]+1,9.0,INVALID_PLAYER_ID,INVALID_VEHICLE_ID,0,home+50);
}
}
printf("-> Мебель загружена <%i шт>", rows);
}
else print("-> Мебель не загружена");
cache_delete(cache);
cache = mysql_query(1,"SELECT * FROM `autoyar`"), rows = cache_num_rows();
if(rows)
{
for(new i; i < rows; i ++)
{
SellingCar[i][sColor1] = cache_get_field_content_int(i, "sColor1");
SellingCar[i][sColor2] = cache_get_field_content_int(i, "sColor2");
SellingCar[i][sProbeg] = cache_get_field_content_float(i, "sProbeg");
SellingCar[i][sFueling] = cache_get_field_content_float(i, "sFueling");
cache_get_field_content(i, "sName", SellingCar[i][sName], 1,24);
SellingCar[i][sMoney] = cache_get_field_content_int(i, "sMoney");
SellingCar[i][sCarID] = cache_get_field_content_int(i, "sCarID");
SellingCar[i][sellCarStatus] = bool:cache_get_field_content_int(i, "sellCarStatus");
if(strcmp(SellingCar[i][sName], "None", true) != 0)
{
format(string, 300, ""SERVER"Место занято!\n"WHITE"Транспорт: "SERVER"%s\n"WHITE"Цена: "SERVER"%i$\n"WHITE"Продавец: "SERVER"%s", VehicleNames[SellingCar[i][sCarID]-400], SellingCar[i][sMoney], SellingCar[i][sName]);
SellingCar[i][sellVehicle] = CreateVehicle(SellingCar[i][sCarID], CoordSellCars[i][0],CoordSellCars[i][1],CoordSellCars[i][2],CoordSellCars[i][3], SellingCar[i][sColor1], SellingCar[i][sColor2], 10000);
VehInfo[SellingCar[i][sellVehicle]-1][vDrived] = SellingCar[i][sProbeg];
VehInfo[SellingCar[i][sellVehicle]][vFuel] = SellingCar[i][sFueling];
}
else format(string, 128, ""WHITE"Чтобы выставить автомобиль на продажу\nвведите: "SERVER"/autoyar");
SellingCar[i][sText] = Create3DTextLabel(string,-1,CoordSellCars[i][0],CoordSellCars[i][1],CoordSellCars[i][2],15.0,0,1);
}
printf("-> Автоярмарка загружена <%i шт авто.>",rows);
}
else print("-> Автоярмарка не загружена");
cache_delete(cache);
cache = mysql_query(1,"SELECT * FROM `vote`"), rows = cache_num_rows();
if(rows)
{
CreateObject ( 19370 , 511.162567,-1553.589721,15.299374,-0.599999,-83.699966,24.300001 ) ;
for(new i; i < rows; i ++)
{
cache_get_field_content(i, "vote_name", vote_name[i], 1, 24);
vote_count[i] = cache_get_field_content_int(i, "vote_count");
}
print("-> Выборы загружены успешно");
}
else print("-> Выборы не загружены");
cache_delete(cache);
cache = mysql_query(1,"SELECT * FROM `ghetto`"), rows = cache_num_rows();
if(rows)
{
b_Ghetto{0} = bool:cache_get_field_content_int(0, "Grove");
b_Ghetto{1} = bool:cache_get_field_content_int(0, "Aztec");
b_Ghetto{2} = bool:cache_get_field_content_int(0, "Ballas");
b_Ghetto{3} = bool:cache_get_field_content_int(0, "Rifa");
b_Ghetto{4} = bool:cache_get_field_content_int(0, "Vagos");
print("-> Запреты загружены успешно");
}
else print("-> Запреты не загружены");
cache_delete(cache);
cache = mysql_query(1,"SELECT `sum`,`status` FROM `unitpay_payments`"), rows = cache_num_rows();
if(rows)
{
new pay_check,pay_total,pay_dont_total, pay_dont_check;
for(new i; i < rows; i ++)
{
if(cache_get_field_content_int(i, "status"))
{
pay_total ++;
pay_check += cache_get_field_content_int(i, "sum");
}
else pay_dont_total ++, pay_dont_check += cache_get_field_content_int(i, "sum");
}
printf("\nЗаработок за все время: %i рублей | Заработок если бы все приобрели рубли успешно: %i рублей | Вместе: %i рублей", pay_check, pay_dont_check, (pay_check+pay_dont_check));
printf("Успешно приобрели рубли: %i раз | Безуспешно: %i раз | В общем количестве: %i раз", pay_total,pay_dont_total,(pay_total+pay_dont_total));
if(pay_check && pay_total && pay_dont_check && pay_dont_total) printf("Процент успешного заработка за все время: %i % | Безуспешного: %i %", (pay_check/pay_total), (pay_dont_check/pay_dont_total));
printf("Процент спроса на рубли: %i %\n", (pay_total*100)/(pay_total+pay_dont_total));
}
else print("-> Донат статистика не загружена");
cache_delete(cache);
for(new v = 1, j = GetVehiclePoolSize(); v <= j; v++)
{
RentCar[v] = -1;
SetVehicleNumberPlate(v, "« Sgl-Rp »");
}
return 1;
}