Добро пожаловать на Pro Pawn - Портал о PAWN-скриптинге.
Показано с 1 по 3 из 3
  1. #1
    Аватар для edikzver
    Пользователь

    Статус
    Оффлайн
    Регистрация
    30.05.2017
    Сообщений
    1
    Репутация:
    0 ±

    Проблема с созданием бизнеса [Adrenalin]

    Добрый день участники форума у меня возникла проблема при создании бизнеса,(Ранее созданые бизнесы загружаются а новые создать не могу прошу вашей помоши) при создании появляется только лиш название бизнеса самого пикапа вывода информации о бизнесе нет (также входа) в базу данных идёт сохранение бизнеса в котором все кординаты входа выхода равны 0

    https://yadi.sk/i/U4p9CoNV3JNAeh Скриншот базы данных
    Stock Создания бизнесов
    Код HTML:
    stock CreateBizzType(playerid, type)
    {
        CountBusiness++;
            new Float:X[3];
            GetPlayerPos(playerid, X[0], X[1], X[2]);
            switch(type)
            {
                    case 0:
                    {
                        Business[CountBusiness][BarX] = -23.5447;
                        Business[CountBusiness][BarY] = -55.6283;
                        Business[CountBusiness][BarZ] = 1003.55;
                            Business[CountBusiness][ExitX] = -27.069;
                            Business[CountBusiness][ExitY] = -56.3513;
                            Business[CountBusiness][ExitZ] = 1003.55;
                            Business[CountBusiness][ExitR] = 0.657301;
                            Business[CountBusiness][PickupExitX] = -27.2736;
                            Business[CountBusiness][PickupExitY] = -58.2688;
                            Business[CountBusiness][PickupExitZ] = 1003.55;
                            Business[CountBusiness][Interior] = 6;
                            new strings[30];
                            GetPlayer2DZone(playerid, strings, 30);
                            format(stringer, 128,"24/7 %s",strings);
                            strmid(Business[CountBusiness][BizName], stringer,0,64,31);
                            format(stringer, 144, "Вы создали бизнес №%i (Тип: 24/7)",CountBusiness);
                            SCM(playerid, -1, stringer);
     
                    }
                    case 1:
                    {
                        Business[CountBusiness][BarX] = 369.4110;
                        Business[CountBusiness][BarY] = -6.1912;
                        Business[CountBusiness][BarZ] = 1001.8516;
                            Business[CountBusiness][ExitX] = 365.7730;
                            Business[CountBusiness][ExitY] = -9.4730;
                            Business[CountBusiness][ExitZ] = 1001.8516;
                            Business[CountBusiness][ExitR] = 303.6796;
                            Business[CountBusiness][PickupExitX] = 364.8465;
                            Business[CountBusiness][PickupExitY] = -11.7234;
                            Business[CountBusiness][PickupExitZ] = 1001.8516;
                            Business[CountBusiness][Interior] = 9;
                            new strings[30];
                            GetPlayer2DZone(playerid, strings, 30);
                            format(stringer, 128,"Diner %s",strings);
                            strmid(Business[CountBusiness][BizName], stringer,0,64,31);
                            format(stringer, 144, "Вы создали бизнес №%i (Тип: Закусочная)",CountBusiness);
                            SCM(playerid, -1, stringer);
                    }
                    case 2:
                    {
                        Business[CountBusiness][BarX] = 499.9693;
                        Business[CountBusiness][BarY] = -20.6240;
                        Business[CountBusiness][BarZ] = 1000.6797;
                            Business[CountBusiness][ExitX] = 493.3740;
                            Business[CountBusiness][ExitY] = -22.9371;
                            Business[CountBusiness][ExitZ] = 1000.6797;
                            Business[CountBusiness][ExitR] = 5.1918;
                            Business[CountBusiness][PickupExitX] = 493.4803;
                            Business[CountBusiness][PickupExitY] = -24.9556;
                            Business[CountBusiness][PickupExitZ] = 1000.6719;
                            Business[CountBusiness][Interior] = 17;
                            new strings[30];
                            GetPlayer2DZone(playerid, strings, 30);
                            format(stringer, 128,"Club %s",strings);
                            strmid(Business[CountBusiness][BizName], stringer,0,64,31);
                            format(stringer, 144, "Вы создали бизнес №%i (Тип: Club Alhambra)",CountBusiness);
                            SCM(playerid, -1, stringer);
                    }
                    case 3:
                    {
                        Business[CountBusiness][BarX] = -2237.0200;
                        Business[CountBusiness][BarY] = 130.1773;
                        Business[CountBusiness][BarZ] = 1035.414;
                            Business[CountBusiness][ExitX] = -2239.0239;
                            Business[CountBusiness][ExitY] = 135.8528;
                            Business[CountBusiness][ExitZ] = 1035.4141;
                            Business[CountBusiness][ExitR] = 205.7269;
                            Business[CountBusiness][PickupExitX] = -2240.7808;
                            Business[CountBusiness][PickupExitY] = 137.1014;
                            Business[CountBusiness][PickupExitZ] = 1035.4141;
                            Business[CountBusiness][Interior] = 6;
                            new strings[30];
                            GetPlayer2DZone(playerid, strings, 30);
                            format(stringer, 128,"24/7 %s",strings);
                            strmid(Business[CountBusiness][BizName], stringer,0,64,31);
                            format(stringer, 144, "Вы создали бизнес №%i (Тип: 24/7 Гетто)",CountBusiness);
                            SCM(playerid, -1, stringer);
                    }
                    case 4:
                    {
                        Business[CountBusiness][BarX] = 496.1987;
                        Business[CountBusiness][BarY] = -76.0278;
                        Business[CountBusiness][BarZ] = 998.7578;
                            Business[CountBusiness][ExitX] = 501.8000;
                            Business[CountBusiness][ExitY] = -69.6495;
                            Business[CountBusiness][ExitZ] = 998.7578;
                            Business[CountBusiness][ExitR] = 184.1301;
                            Business[CountBusiness][PickupExitX] = 501.9621;
                            Business[CountBusiness][PickupExitY] = -67.5654;
                            Business[CountBusiness][PickupExitZ] = 998.7578;
                            Business[CountBusiness][Interior] = 11;
                            new strings[30];
                            GetPlayer2DZone(playerid, strings, 30);
                            format(stringer, 128,"Бар %s",strings);
                            strmid(Business[CountBusiness][BizName], stringer,0,64,31);
                            format(stringer, 144, "Вы создали бизнес №%i (Тип: Бар)",CountBusiness);
                            SCM(playerid, -1, stringer);
                    }
                    case 5:
                    {
                        Business[CountBusiness][BarX] = 1215.6161;
                        Business[CountBusiness][BarY] = -13.3513;
                        Business[CountBusiness][BarZ] = 1000.9219;
                            Business[CountBusiness][ExitX] = 1207.1459;
                            Business[CountBusiness][ExitY] = -12.2941;
                            Business[CountBusiness][ExitZ] = 1000.9219;
                            Business[CountBusiness][ExitR] = 266.2243;
                            Business[CountBusiness][PickupExitX] = 1204.7218;
                            Business[CountBusiness][PickupExitY] = -13.8522;
                            Business[CountBusiness][PickupExitZ] = 1000.9219;
                            Business[CountBusiness][Interior] = 2;
                            new strings[30];
                            GetPlayer2DZone(playerid, strings, 30);
                            format(stringer, 128,"Клуб %s",strings);
                            strmid(Business[CountBusiness][BizName], stringer,0,64,31);
                            format(stringer, 144, "Вы создали бизнес №%i (Тип: Клуб Pig-Pen)",CountBusiness);
                            SCM(playerid, -1, stringer);
                    }
                    case 6:
                    {
                        Business[CountBusiness][BarX] = 377.0905;
                        Business[CountBusiness][BarY] = -67.4354;
                        Business[CountBusiness][BarZ] = 1001.5078;
                            Business[CountBusiness][ExitX] = 365.5075;
                            Business[CountBusiness][ExitY] = -73.7363;
                            Business[CountBusiness][ExitZ] = 1001.5078;
                            Business[CountBusiness][ExitR] = 299.4379;
                            Business[CountBusiness][PickupExitX] = 362.8647;
                            Business[CountBusiness][PickupExitY] = -75.1627;
                            Business[CountBusiness][PickupExitZ] = 1001.5078;
                            Business[CountBusiness][Interior] = 10;
                            new strings[30];
                            GetPlayer2DZone(playerid, strings, 30);
                            format(stringer, 128,"Burget Shot %s",strings);
                            strmid(Business[CountBusiness][BizName], stringer,0,64,31);
                            format(stringer, 144, "Вы создали бизнес №%i (Тип: Burget Shot)",CountBusiness);
                            SCM(playerid, -1, stringer);
                    }
                    case 7:
                    {
                        Business[CountBusiness][BarX] = -2653.1216;
                        Business[CountBusiness][BarY] = 1410.2064;
                        Business[CountBusiness][BarZ] = 906.2734;
                            Business[CountBusiness][ExitX] = -2637.7576;
                            Business[CountBusiness][ExitY] = 1404.4868;
                            Business[CountBusiness][ExitZ] = 906.4609;
                            Business[CountBusiness][ExitR] = 50.3589;
                            Business[CountBusiness][PickupExitX] = -2636.7241;
                            Business[CountBusiness][PickupExitY] = 1402.4608;
                            Business[CountBusiness][PickupExitZ] = 906.4609;
                            Business[CountBusiness][Interior] = 3;
                            new strings[30];
                            GetPlayer2DZone(playerid, strings, 30);
                            format(stringer, 128,"Jizzy %s",strings);
                            strmid(Business[CountBusiness][BizName], stringer,0,64,31);
                            format(stringer, 144, "Вы создали бизнес №%i (Тип: Клуб Jizzy)",CountBusiness);
                            SCM(playerid, -1, stringer);
                    }
                    case 8:
                    {
                        Business[CountBusiness][BarX] = 447.8055;
                        Business[CountBusiness][BarY] = -83.8058;
                        Business[CountBusiness][BarZ] = 999.5547;
                            Business[CountBusiness][ExitX] = 457.4727;
                            Business[CountBusiness][ExitY] = -87.8666;
                            Business[CountBusiness][ExitZ] = 999.5547;
                            Business[CountBusiness][ExitR] = 59.8761;
                            Business[CountBusiness][PickupExitX] = 460.5545;
                            Business[CountBusiness][PickupExitY] = -88.6418;
                            Business[CountBusiness][PickupExitZ] = 999.5547;
                            Business[CountBusiness][Interior] = 4;
                            new strings[30];
                            GetPlayer2DZone(playerid, strings, 30);
                            format(stringer, 128,"Закусочная %s",strings);
                            strmid(Business[CountBusiness][BizName], stringer,0,64,31);
                            format(stringer, 144, "Вы создали бизнес №%i (Тип: Закусочная #2)",CountBusiness);
                            SCM(playerid, -1, stringer);
                    }
                    case 9:
                    {
                        Business[CountBusiness][BarX] = 375.1557;
                        Business[CountBusiness][BarY] = -118.9464;
                        Business[CountBusiness][BarZ] = 1001.4995;
                            Business[CountBusiness][ExitX] = 372.0233;
                            Business[CountBusiness][ExitY] = -131.1175;
                            Business[CountBusiness][ExitZ] = 1001.4922;
                            Business[CountBusiness][ExitR] = 4.4390;
                            Business[CountBusiness][PickupExitX] = 372.2068;
                            Business[CountBusiness][PickupExitY] = -133.5237;
                            Business[CountBusiness][PickupExitZ] = 1001.4922;
                            Business[CountBusiness][Interior] = 5;
                            new strings[30];
                            GetPlayer2DZone(playerid, strings, 30);
                            format(stringer, 128,"Пиццерия %s",strings);
                            strmid(Business[CountBusiness][BizName], stringer,0,64,31);
                            format(stringer, 144, "Вы создали бизнес №%i (Тип: Пиццерия)",CountBusiness);
                            SCM(playerid, -1, stringer);
                    }
                    case 10:
                    {
                        Business[CountBusiness][BarX] = 294.9584;
                        Business[CountBusiness][BarY] = -80.2174;
                        Business[CountBusiness][BarZ] = 1001.5156;
                            Business[CountBusiness][ExitX] = 287.0477;
                            Business[CountBusiness][ExitY] = -84.2584;
                            Business[CountBusiness][ExitZ] = 1001.5156;
                            Business[CountBusiness][ExitR] = 321.2779;
                            Business[CountBusiness][PickupExitX] = 285.8584;
                            Business[CountBusiness][PickupExitY] = -86.7806;
                            Business[CountBusiness][PickupExitZ] = 1001.5229;
                            Business[CountBusiness][Interior] = 4;
                            new strings[30];
                            GetPlayer2DZone(playerid, strings, 30);
                            format(stringer, 128,"Аммуниция %s",strings);
                            strmid(Business[CountBusiness][BizName], stringer,0,64,31);
                            format(stringer, 144, "Вы создали бизнес №%i (Тип: Аммо)",CountBusiness);
                            SCM(playerid, -1, stringer);
                    }
                    case 11:
                    {
                        Business[CountBusiness][BarX] = 209.7871;
                        Business[CountBusiness][BarY] = -8.3511;
                        Business[CountBusiness][BarZ] = 1005.2109;
                            Business[CountBusiness][ExitX] = 224.6619;
                            Business[CountBusiness][ExitY] = -6.7300;
                            Business[CountBusiness][ExitZ] = 1002.2109;
                            Business[CountBusiness][ExitR] = 61.8120;
                            Business[CountBusiness][PickupExitX] = 227.5020;
                            Business[CountBusiness][PickupExitY] = -8.1617;
                            Business[CountBusiness][PickupExitZ] = 1002.2109;
                            Business[CountBusiness][Interior] = 5;
                            new strings[30];
                            GetPlayer2DZone(playerid, strings, 30);
                            format(stringer, 128,"Магазин Одежды %s",strings);
                            strmid(Business[CountBusiness][BizName], stringer,0,64,31);
                            format(stringer, 144, "Вы создали бизнес №%i (Тип: Магазин Одежды)",CountBusiness);
                            SCM(playerid, -1, stringer);
                    }
                      case 12:
                    {
                        Business[CountBusiness][BarX] = 0.0;
                        Business[CountBusiness][BarY] = 0.0;
                        Business[CountBusiness][BarZ] = 0.0;
                            Business[CountBusiness][ExitX] = 418.6656;
                            Business[CountBusiness][ExitY] = -82.8834;
                            Business[CountBusiness][ExitZ] = 1001.8047;
                            Business[CountBusiness][ExitR] = 342.4989;
                            Business[CountBusiness][PickupExitX] = 418.6482;
                            Business[CountBusiness][PickupExitY] = -84.3686;
                            Business[CountBusiness][PickupExitZ] = 1001.8047;
                            Business[CountBusiness][Interior] = 3;
                            new strings[30];
                            GetPlayer2DZone(playerid, strings, 30);
                            format(stringer, 128,"Магазин аксессуаров %s",strings);
                            strmid(Business[CountBusiness][BizName], stringer,0,64,31);
                            format(stringer, 144, "Вы создали бизнес №%i (Тип: Магазин аксессуаров)",CountBusiness);
                            SCM(playerid, -1, stringer);
                    }
                    case 13:
                    {
                          Business[CountBusiness][BarX] = 0.0;
                        Business[CountBusiness][BarY] = 0.0;
                        Business[CountBusiness][BarZ] = 0.0;
                            Business[CountBusiness][ExitX] = 0.0;
                            Business[CountBusiness][ExitY] = 0.0;
                            Business[CountBusiness][ExitZ] = 0.0;
                            Business[CountBusiness][ExitR] = 0.0;
                            Business[CountBusiness][PickupExitX] = 0.0;
                            Business[CountBusiness][PickupExitY] = 0.0;
                            Business[CountBusiness][PickupExitZ] = 0.0;
                            Business[CountBusiness][Interior] = 3;
                            strmid(Business[CountBusiness][BizName], "Автозаправочная станция",0,64,31);
                            format(stringer, 144, "Вы создали бизнес №%i (Тип: Заправка)",CountBusiness);
                            SCM(playerid, -1, stringer);
                    }
                      case 14:
                    {
                          Business[CountBusiness][BarX] = 0.0;
                        Business[CountBusiness][BarY] = 0.0;
                        Business[CountBusiness][BarZ] = 0.0;
                            Business[CountBusiness][ExitX] = 0.0;
                            Business[CountBusiness][ExitY] = 0.0;
                            Business[CountBusiness][ExitZ] = 0.0;
                            Business[CountBusiness][ExitR] = 4.3954;
                            Business[CountBusiness][PickupExitX] = 1494.3911;
                            Business[CountBusiness][PickupExitY] = 1303.6847;
                            Business[CountBusiness][PickupExitZ] = 1093.2891;
                            Business[CountBusiness][Interior] = 3;
     
                               new strings[30];//1
                            GetPlayer2DZone(playerid, strings, 30);//1
                            format(stringer, 128,"Риэлторское агенство %s",strings);//1
                            strmid(Business[CountBusiness][BizName], stringer,0,64,31);//1
                            format(stringer, 144, "Вы создали бизнес №%i (Тип: Риэлторское агенство)",CountBusiness);//1
                            SCM(playerid, -1, stringer);
                    }
                    case 15:
                    {
                          Business[CountBusiness][BarX] = 0.0;
                        Business[CountBusiness][BarY] = 0.0;
                        Business[CountBusiness][BarZ] = 0.0;
                            Business[CountBusiness][ExitX] = 0.0;
                            Business[CountBusiness][ExitY] = 0.0;
                            Business[CountBusiness][ExitZ] = 0.0;
                            Business[CountBusiness][ExitR] = 21.3026;
                            Business[CountBusiness][PickupExitX] = 1010.4545;
                            Business[CountBusiness][PickupExitY] = -913.3613;
                            Business[CountBusiness][PickupExitZ] = 1086.3500;
                            Business[CountBusiness][Interior] = 4;
     
                               new strings[30];//1
                            GetPlayer2DZone(playerid, strings, 30);//1
                            format(stringer, 128,"Салон связи %s",strings);//1
                            strmid(Business[CountBusiness][BizName], stringer,0,64,31);//1
                            format(stringer, 144, "Вы создали бизнес №%i (Тип: Салон связи)",CountBusiness);//1
                            SCM(playerid, -1, stringer);
                    }
                    case 16:
                    {
                          Business[CountBusiness][BarX] = 0.0;
                        Business[CountBusiness][BarY] = 0.0;
                        Business[CountBusiness][BarZ] = 0.0;
                            Business[CountBusiness][ExitX] = 0.0;
                            Business[CountBusiness][ExitY] = 0.0;
                            Business[CountBusiness][ExitZ] = 0.0;
                            Business[CountBusiness][ExitR] = 21.3026;
                            Business[CountBusiness][PickupExitX] = 771.4412;
                            Business[CountBusiness][PickupExitY] = -2.7885;
                            Business[CountBusiness][PickupExitZ] = 1000.7279;
                            Business[CountBusiness][Interior] = 5;
     
                               new strings[30];//1
                            GetPlayer2DZone(playerid, strings, 30);//1
                            format(stringer, 128,"Спортивный Зал %s",strings);//1
                            strmid(Business[CountBusiness][BizName], stringer,0,64,31);//1
                            format(stringer, 144, "Вы создали бизнес №%i (Тип: Спортзал)",CountBusiness);//1
                            SCM(playerid, -1, stringer);
                    }
                    case 17:
                    {
                          Business[CountBusiness][BarX] = 0.0;
                        Business[CountBusiness][BarY] = 0.0;
                        Business[CountBusiness][BarZ] = 0.0;
                            Business[CountBusiness][ExitX] = 0.0;
                            Business[CountBusiness][ExitY] = 0.0;
                            Business[CountBusiness][ExitZ] = 0.0;
                            Business[CountBusiness][ExitR] = 21.3026;
                            Business[CountBusiness][PickupExitX] = 2018.8470;
                            Business[CountBusiness][PickupExitY] = 1017.7529;
                            Business[CountBusiness][PickupExitZ] = 996.8750;
                            Business[CountBusiness][Interior] = 10;
     
                               new strings[30];//1
                            GetPlayer2DZone(playerid, strings, 30);//1
                            format(stringer, 128,"Казино %s",strings);//1
                            strmid(Business[CountBusiness][BizName], stringer,0,64,31);//1
                            format(stringer, 144, "Вы создали бизнес №%i (Тип: Казино)",CountBusiness);//1
                            SCM(playerid, -1, stringer);
                    }
            }
     
             Business[CountBusiness][PickupEnterX] = X[0];
        Business[CountBusiness][PickupEnterY] = X[1];
        Business[CountBusiness][PickupEnterZ] = X[2];
     
     
            switch(type)
            {
                case 1:Business[CountBusiness][bMapIcon] = CreateDynamicMapIcon(Business[CountBusiness][PickupEnterX], Business[CountBusiness][PickupEnterY], Business[CountBusiness][PickupEnterZ], 14, COLOR_WHITE, 0, -1, -1, 200.0);
                case 2,5,7:Business[CountBusiness][bMapIcon] = CreateDynamicMapIcon(Business[CountBusiness][PickupEnterX], Business[CountBusiness][PickupEnterY], Business[CountBusiness][PickupEnterZ], 48, COLOR_WHITE, 0, -1, -1, 200.0);
                    case 4:Business[CountBusiness][bMapIcon] = CreateDynamicMapIcon(Business[CountBusiness][PickupEnterX], Business[CountBusiness][PickupEnterY], Business[CountBusiness][PickupEnterZ], 49, COLOR_WHITE, 0, -1, -1, 200.0);
                    case 6:Business[CountBusiness][bMapIcon] = CreateDynamicMapIcon(Business[CountBusiness][PickupEnterX], Business[CountBusiness][PickupEnterY], Business[CountBusiness][PickupEnterZ], 10, COLOR_WHITE, 0, -1, -1, 200.0);
            case 8:Business[CountBusiness][bMapIcon] = CreateDynamicMapIcon(Business[CountBusiness][PickupEnterX], Business[CountBusiness][PickupEnterY], Business[CountBusiness][PickupEnterZ], 50, COLOR_WHITE, 0, -1, -1, 200.0);
            case 9:Business[CountBusiness][bMapIcon] = CreateDynamicMapIcon(Business[CountBusiness][PickupEnterX], Business[CountBusiness][PickupEnterY], Business[CountBusiness][PickupEnterZ], 29, COLOR_WHITE, 0, -1, -1, 200.0);
            case 10:Business[CountBusiness][bMapIcon] = CreateDynamicMapIcon(Business[CountBusiness][PickupEnterX], Business[CountBusiness][PickupEnterY], Business[CountBusiness][PickupEnterZ], 6, COLOR_WHITE, 0, -1, -1, 200.0);
            case 11:Business[CountBusiness][bMapIcon] = CreateDynamicMapIcon(Business[CountBusiness][PickupEnterX], Business[CountBusiness][PickupEnterY], Business[CountBusiness][PickupEnterZ], 45, COLOR_WHITE, 0, -1, -1, 200.0);
            case 12:Business[CountBusiness][bMapIcon] = CreateDynamicMapIcon(Business[CountBusiness][PickupEnterX], Business[CountBusiness][PickupEnterY], Business[CountBusiness][PickupEnterZ], 7, COLOR_WHITE, 0, -1, -1, 200.0);
                    case 13:Business[CountBusiness][bMapIcon] = CreateDynamicMapIcon(Business[CountBusiness][PickupEnterX], Business[CountBusiness][PickupEnterY], Business[CountBusiness][PickupEnterZ], 47, COLOR_WHITE, 0, -1, -1, 200.0);
                    case 14:Business[CountBusiness][bMapIcon] = CreateDynamicMapIcon(Business[CountBusiness][PickupEnterX], Business[CountBusiness][PickupEnterY], Business[CountBusiness][PickupEnterZ], 34, COLOR_WHITE, 0, -1, -1, 200.0);
                    case 15:Business[CountBusiness][bMapIcon] = CreateDynamicMapIcon(Business[CountBusiness][PickupEnterX], Business[CountBusiness][PickupEnterY], Business[CountBusiness][PickupEnterZ], 42, COLOR_WHITE, 0, -1, -1, 200.0);
                    case 16:Business[CountBusiness][bMapIcon] = CreateDynamicMapIcon(Business[CountBusiness][PickupEnterX], Business[CountBusiness][PickupEnterY], Business[CountBusiness][PickupEnterZ], 54, COLOR_WHITE, 0, -1, -1, 200.0);
                    case 17:Business[CountBusiness][bMapIcon] = CreateDynamicMapIcon(Business[CountBusiness][PickupEnterX], Business[CountBusiness][PickupEnterY], Business[CountBusiness][PickupEnterZ], 44, COLOR_WHITE, 0, -1, -1, 200.0);
            }
     
            strmid(Business[CountBusiness][Owner], "The State",0,strlen("The State"),10);
     
            format(stringer,200,"INSERT INTO `business`(`ID`) VALUES ('%d')",CountBusiness);
            mysql_tquery(connects, stringer, "", "");
     
        Business[CountBusiness][bType] = type;
            Business[CountBusiness][BuyPrice] = 300000;
            Business[CountBusiness][Bank] = 0;
            Business[CountBusiness][EnterPrice] = 0;
            Business[CountBusiness][Lock] = 0;
            Business[CountBusiness][Mafia] = 0;
            //
            //if(type != 13)
            //{
            //        Business[CountBusiness][AreaX] = CreateDynamicSphere(Business[CountBusiness][PickupExitX],Business[CountBusiness][PickupExitY],Business[CountBusiness][PickupExitZ],1.0,Business[CountBusiness][Virtual],Business[CountBusiness][Interior]);
            //        Business[CountBusiness][AreaE] = CreateDynamicSphere(X[0],X[1],X[2],1.0,0,0);
            //        Business[CountBusiness][AreaB] = CreateDynamicSphere(Business[CountBusiness][BarX], Business[CountBusiness][BarY], Business[CountBusiness][BarZ], 1.0,Business[CountBusiness][Virtual]);
            //}
            if(type != 13)
            {
                    format(stringer, 128, "{FFFF00}%s\n"cWHITE"Бизнес продаётся!", Business[CountBusiness][BizName]);
            }
            else format(stringer, 128, ""cWHITE"%s {7A4134}продаётся\nдля приобретения Используйте команду"cWHITE" /buyfuel", Business[CountBusiness][BizName]);
            Business[CountBusiness][Label] = CreateDynamic3DTextLabel(stringer,COLOR_GREEN,Business[CountBusiness][PickupEnterX], Business[CountBusiness][PickupEnterY], Business[CountBusiness][PickupEnterZ]+0.8, 8.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, 0, 0);
        //
            format(stringer,200,"UPDATE `business` SET `Name` = '%s' WHERE `ID` = '%d' LIMIT 1",Business[CountBusiness][BizName],CountBusiness);
            mysql_tquery(connects, stringer, "", "");
        //SavePositionBizz(CountBusiness);
        SaveBusiness(CountBusiness);
            return 1;
    }
    а вот загрузка бизнесов
    Код HTML:
    public OnBizzLoad()
    {
        new rows, fields;
            cache_get_data(rows, fields);
            if(!rows) return printf("Бизнесы не загружены.");
            for(new i = 0; i < rows; i++)
            {
                Business[i][ID] = cache_get_field_content_int(i,"ID",connects);
                Business[i][Interior] = cache_get_field_content_int(i,"Interior",connects);
                Business[i][PickupEnterX] = cache_get_field_content_float(i,"PickupEnterX",connects);
                Business[i][PickupEnterY] = cache_get_field_content_float(i,"PickupEnterY",connects);
                Business[i][PickupEnterZ] = cache_get_field_content_float(i,"PickupEnterZ",connects);
                Business[i][PickupExitX] = cache_get_field_content_float(i,"PickupExitX",connects);
                Business[i][PickupExitY] = cache_get_field_content_float(i,"PickupExitY",connects);
                Business[i][PickupExitZ] = cache_get_field_content_float(i,"PickupExitZ",connects);
                Business[i][EnterX] = cache_get_field_content_float(i,"EnterX",connects);
                Business[i][EnterY] = cache_get_field_content_float(i,"EnterY",connects);
                Business[i][EnterZ] = cache_get_field_content_float(i,"EnterZ",connects);
                Business[i][EnterR] = cache_get_field_content_float(i,"EnterR",connects);
            Business[i][ExitX] = cache_get_field_content_float(i,"ExitX",connects);
            Business[i][ExitY] = cache_get_field_content_float(i,"ExitY",connects);
            Business[i][ExitZ] = cache_get_field_content_float(i,"ExitZ",connects);
            Business[i][ExitR] = cache_get_field_content_float(i,"ExitR",connects);
                Business[i][BarX] = cache_get_field_content_float(i,"BarX",connects);
                Business[i][BarY] = cache_get_field_content_float(i,"BarY",connects);
                Business[i][BarZ] = cache_get_field_content_float(i,"BarZ",connects);
     
                cache_get_field_content(i, "Name",Business[i][BizName],connects,31);
                cache_get_field_content(i, "Owner",Business[i][Owner],connects,31);
                Business[i][BuyPrice] = cache_get_field_content_int(i,"BuyPrice",connects);
     
                Business[i][Bank] = cache_get_field_content_int(i,"Bank",connects);
                Business[i][EnterPrice] = cache_get_field_content_int(i,"EnterPrice",connects);
                Business[i][Lock] = cache_get_field_content_int(i,"Lock",connects);
                Business[i][Mafia] = cache_get_field_content_int(i,"Mafia",connects);
                Business[i][bType] = cache_get_field_content_int(i,"bType",connects);
                Business[i][bLicenses] = cache_get_field_content_int(i,"bLicenses",connects);
                Business[i][bProd] = cache_get_field_content_int(i,"bProd",connects);
                Business[i][bProdOrder] = cache_get_field_content_int(i,"bProdOrder",connects);
                Business[i][bProdOrderPrice] = cache_get_field_content_int(i,"bProdOrderPrice",connects);
     
                Business[i][bAmount] = cache_get_field_content_int(i,"bAmount",connects);
                Business[i][bAmountHour] = cache_get_field_content_int(i,"bAmountHour",connects);
                Business[i][bCheckPower] = cache_get_field_content_int(i,"bCheckPower",connects);
                Business[i][bHourClose] = cache_get_field_content_int(i,"bHourClose",connects);
                Business[i][bHourProd] = cache_get_field_content_int(i,"bHourProd",connects);
     
                Business[i][bAvtoProd] = cache_get_field_content_int(i,"bAvtoProd",connects);
                Business[i][bProdMax] = cache_get_field_content_int(i,"bProdMax",connects);
                Business[i][bHel] = cache_get_field_content_int(i,"bHel",connects);
     
                    if(Business[i][EnterPrice] > 3000)
                    {
                        Business[i][EnterPrice]=1500;
                    }
     
                    switch(Business[i][bType])
                    {
                        case 0,3:Business[i][bMapIcon] = CreateDynamicMapIcon(Business[i][PickupEnterX], Business[i][PickupEnterY], Business[i][PickupEnterZ], 52, COLOR_WHITE, 0, -1, -1, 200.0);
                        case 1:Business[i][bMapIcon] = CreateDynamicMapIcon(Business[i][PickupEnterX], Business[i][PickupEnterY], Business[i][PickupEnterZ], 14, COLOR_WHITE, 0, -1, -1, 200.0);
                        case 2,5,7:Business[i][bMapIcon] = CreateDynamicMapIcon(Business[i][PickupEnterX], Business[i][PickupEnterY], Business[i][PickupEnterZ], 48, COLOR_WHITE, 0, -1, -1, 200.0);
                            case 4:Business[i][bMapIcon] = CreateDynamicMapIcon(Business[i][PickupEnterX], Business[i][PickupEnterY], Business[i][PickupEnterZ], 49, COLOR_WHITE, 0, -1, -1, 200.0);
                            case 6:Business[i][bMapIcon] = CreateDynamicMapIcon(Business[i][PickupEnterX], Business[i][PickupEnterY], Business[i][PickupEnterZ], 10, COLOR_WHITE, 0, -1, -1, 200.0);
                    case 8:Business[i][bMapIcon] = CreateDynamicMapIcon(Business[i][PickupEnterX], Business[i][PickupEnterY], Business[i][PickupEnterZ], 50, COLOR_WHITE, 0, -1, -1, 200.0);
                    case 9:Business[i][bMapIcon] = CreateDynamicMapIcon(Business[i][PickupEnterX], Business[i][PickupEnterY], Business[i][PickupEnterZ], 29, COLOR_WHITE, 0, -1, -1, 200.0);
                    case 10:Business[i][bMapIcon] = CreateDynamicMapIcon(Business[i][PickupEnterX], Business[i][PickupEnterY], Business[i][PickupEnterZ], 6, COLOR_WHITE, 0, -1, -1, 200.0);
                    case 11:Business[i][bMapIcon] = CreateDynamicMapIcon(Business[i][PickupEnterX], Business[i][PickupEnterY], Business[i][PickupEnterZ], 45, COLOR_WHITE, 0, -1, -1, 200.0);
                    case 12:Business[i][bMapIcon] = CreateDynamicMapIcon(Business[i][PickupEnterX], Business[i][PickupEnterY], Business[i][PickupEnterZ], 7, COLOR_WHITE, 0, -1, -1, 200.0);
                    case 13:Business[i][bMapIcon] = CreateDynamicMapIcon(Business[i][PickupEnterX], Business[i][PickupEnterY], Business[i][PickupEnterZ], 47, COLOR_WHITE, 0, -1, -1, 200.0);
                    case 14:Business[i][bMapIcon] = CreateDynamicMapIcon(Business[i][PickupEnterX], Business[i][PickupEnterY], Business[i][PickupEnterZ], 34, COLOR_WHITE, 0, -1, -1, 200.0);
                    case 15:Business[i][bMapIcon] = CreateDynamicMapIcon(Business[i][PickupEnterX], Business[i][PickupEnterY], Business[i][PickupEnterZ], 42, COLOR_WHITE, 0, -1, -1, 200.0);
                    case 16:Business[i][bMapIcon] = CreateDynamicMapIcon(Business[i][PickupEnterX], Business[i][PickupEnterY], Business[i][PickupEnterZ], 54, COLOR_WHITE, 0, -1, -1, 200.0);
                    case 17:Business[i][bMapIcon] = CreateDynamicMapIcon(Business[i][PickupEnterX], Business[i][PickupEnterY], Business[i][PickupEnterZ], 44, COLOR_WHITE, 0, -1, -1, 200.0);
                    }
                    new model_pickup = 1239;
                    switch(Business[i][bType])
                    {
                            case 0:model_pickup=1239;
                            case 1:model_pickup=1582;
                            case 2:model_pickup=1484;
                            case 3:model_pickup=1239;
                            case 4:model_pickup=1484;
                            case 5:model_pickup=1484;
                            case 6:model_pickup=2768;
                            case 7:model_pickup=1484;
                            case 8:model_pickup=1239;
                            case 9:model_pickup=1239;
                            case 10:model_pickup=2035;
                            case 11:model_pickup=1275;
                            case 12:model_pickup=1275;
                    }
                    if(Business[i][bType] != 13)//
                    {
                            if(!strcmp(Business[i][Owner], "The State"))
                            {
                                format(stringer, 84, "№%d | %s\nБизнес продаётся", i, Business[i][BizName]);
                                Business[i][Label] = CreateDynamic3DTextLabel(stringer, COLOR_GREEN, Business[i][PickupEnterX], Business[i][PickupEnterY], Business[i][PickupEnterZ], 3.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, 0, 0);
                            }
                            else
                            {
                                    if(Business[i][EnterPrice] > 0)
                                    {
                                        format(stringer, 124, "№%d | %s\nВладелец: %s\nЦена за вход: %i$",i,Business[i][BizName],Business[i][Owner],Business[i][EnterPrice]);
                                        Business[i][Label] = CreateDynamic3DTextLabel(stringer, COLOR_GREEN, Business[i][PickupEnterX], Business[i][PickupEnterY], Business[i][PickupEnterZ], 3.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, 0, 0);
                                    }
                                    else
                                    {
                                        format(stringer, 102, "№%d | %s\nВладелец: %s",i,Business[i][BizName],Business[i][Owner]);
                                            Business[i][Label] = CreateDynamic3DTextLabel(stringer, COLOR_GREEN, Business[i][PickupEnterX], Business[i][PickupEnterY], Business[i][PickupEnterZ], 3.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, 0, 0);
                                    }
                            }
                            CreatePickup(19132, 1, Business[i][PickupEnterX], Business[i][PickupEnterY], Business[i][PickupEnterZ],0);
                            CreatePickup(1318, 1, Business[i][PickupExitX], Business[i][PickupExitY], Business[i][PickupExitZ], i + 1);
                            CreatePickup(model_pickup, 1, Business[i][BarX], Business[i][BarY], Business[i][BarZ], i + 1);
                    }
                    else
                    {
                        if(!strcmp(Business[i][Owner], "The State"))
                        {
                                format(stringer, 116, "№%d | %s продаётся\nдля приобретения Используйте команду /buyfuel",i,Business[i][BizName]);
                                Business[i][Label] = CreateDynamic3DTextLabel(stringer, COLOR_GREEN, Business[i][PickupEnterX], Business[i][PickupEnterY], Business[i][PickupEnterZ]+0.5, 8.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, 0, 0);
                            }
                            else
                            {
                                      format(stringer, 232, "№%d | %s\nВладелец: %s\nСтоимость: %i$\nЦена за 1 литр: %i$\n\n{ffffff}Заправиться {ffff00}'NUM 2' {ffffff}или {ffff00}/fill", i, Business[i][BizName], Business[i][Owner],Business[i][BuyPrice],Business[i][EnterPrice]);
                                Business[i][Label] = CreateDynamic3DTextLabel(stringer, COLOR_GREEN, Business[i][PickupEnterX], Business[i][PickupEnterY], Business[i][PickupEnterZ]+0.5, 8.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, 0, 0);
                            }
                    }
                    Business[i][AreaE] = CreateDynamicSphere(Business[i][PickupEnterX], Business[i][PickupEnterY], Business[i][PickupEnterZ],1.0,0,0);
                    Business[i][AreaX] = CreateDynamicSphere(Business[i][PickupExitX], Business[i][PickupExitY], Business[i][PickupExitZ],1.0,i + 1, Business[i][Interior]);
                    Business[i][AreaB] = CreateDynamicSphere(Business[i][BarX], Business[i][BarY], Business[i][BarZ],1.0,i + 1, Business[i][Interior]);
            }
            CountBusiness=rows;
     
            printf("-> Бизнесы загружены (%d штук)", CountBusiness);
     
            return 1;

  2. #2
    Аватар для qwezert
    Пользователь

    Статус
    Оффлайн
    Регистрация
    13.06.2016
    Адрес
    Одесса, Украина
    Сообщений
    281
    Репутация:
    51 ±
    Невероятно убогий код. Его даже читать никто не хочет. Скажу что тебе легче будет написать свою систему бизнесов чем разбирать этот код. Удачи
    Лучше лишний раз показаться глупым и что то узнать, чем вы*бнуться и обосраться.

  3. #3
    Аватар для Long-
    Пользователь

    Статус
    Оффлайн
    Регистрация
    02.11.2016
    Сообщений
    131
    Репутация:
    23 ±
    Или же обратитесь в стол заказов.

 

 

Информация о теме

Пользователи, просматривающие эту тему

Эту тему просматривают: 1 (пользователей: 0 , гостей: 1)

Ваши права

  • Вы не можете создавать новые темы
  • Вы не можете отвечать в темах
  • Вы не можете прикреплять вложения
  • Вы не можете редактировать свои сообщения
  •