В теме 1 сообщение

Гость
Новичок

Сейчас расскажу как создать ограбление банка.

Начнем:

1. Добавь цвет:

#define COLOR_ME 0xC2A2DAAA

2. Затем переменные:

new redver;
new hrandver;
new vzlomvopros;
new vzlomvopror;
new bankpasword;
new sig;
new banksistem;
new elektrosignal;
new Lom[MAX_PLAYERS];
new chitpaword[MAX_PLAYERS];
new BankRobbed[MAX_PLAYERS];
new BankProbel;
new Rcr;
new Stopenrob[MAX_PLAYERS];
new stopanim[MAX_PLAYERS];

3. Далее добавляем в магазин новый товар(в /buy" тоже не забудьте!):

else if (item == 19 && GetPlayerMoney(playerid) >= 5000)
     {
     Lom[playerid] = 1;
        GivePlayerMoney(playerid, - 5000);
        SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Вы купили набор для взлома ячейки банка");
        SendClientMessage(playerid, COLOR_WHITE, "*Подсказка: теперь ты можешь  /grabbank!");
        SavePlayer(playerid);
     }
     //------------------------------------------------------------------------------
              else if (item == 20 && GetPlayerMoney(playerid) >= 3000)
     {
     chitpaword[playerid] = 1;
        GivePlayerMoney(playerid, - 3000);
        SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Вы купили устройство подбора паролей");
        SendClientMessage(playerid, COLOR_WHITE, "*Подсказка: не разглошается!");
        SavePlayer(playerid);
     }
                 else if(item != 0 && item != 21)
     {
         SendClientMessage(playerid,COLOR_RED,"** У Вас не хватает денег для этого!");
     }

4. Потом добавляем 4 команды:

if(strcmp(cmdtext,"/vzlomr",true) == 0)
     {
     if(PlayerInfo[playerid][pMember]==1||PlayerInfo[playerid][pLeader]==1||PlayerInfo[playerid][pMember]==2||PlayerInfo[playerid][pLeader]==2||PlayerInfo[playerid][pMember]==3||PlayerInfo[playerid][pLeader]==3||PlayerInfo[playerid][pMember]==7||PlayerInfo[playerid][pLeader]==7)
  {
  SetTimer("rehclose",120000,false);
     MoveObject(redver,1435.1789550781,-1009.7760009766,10.696892738342,8.0);//10.696892738342
     return 1;
  }
     if(PlayerToPoint(10.0, playerid,1435.5254,-1007.5117,9.0600))
  {
     if(chitpaword[playerid] == 1)
  {
  vzlomvopros = SetTimerEx("timervzlomr",10,true,"d",playerid);
  ApplyAnimation(playerid,"GANGS","hndshkda",4.1,0,1,1,1,1);
  SetTimerEx("stopamin",30000,false,"d",playerid);
      //vzlomvopros = SetTimer("timervzlomr",10,true);
   }
      }
      else
      {
      SendClientMessage(playerid, COLOR_LIGHTBLUE, "* У вас нет устройства для взло электронного замка!!!");
      }
      return 1;
  }
//=================================================
  if(strcmp(cmdtext,"/vzloms",true) == 0)
     {
     SetTimer("bankclose",30000,false);
     if(PlayerInfo[playerid][pMember]==1||PlayerInfo[playerid][pLeader]==1||PlayerInfo[playerid][pMember]==2||PlayerInfo[playerid][pLeader]==2||PlayerInfo[playerid][pMember]==3||PlayerInfo[playerid][pLeader]==3||PlayerInfo[playerid][pMember]==7||PlayerInfo[playerid][pLeader]==7)
     {
     MoveObject(hrandver,1412.7796630859,-1014.91796875,1.3489612340927,0.1);//1.3489612340927
     return 1;
     }
     if(banksistem == 0)
     {
  SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Тут сильная система защиты от взлома, ее нужно отключить!!");
  return 1;
  }
     if(PlayerToPoint(10.0, playerid,1413.3344,-1013.9662,0.7805))
  {
     if(chitpaword[playerid] != 1)
  {
  SendClientMessage(playerid, COLOR_LIGHTBLUE, "* У вас нет устройства для взло электронного замка!!!");
  return 1;
  }
  vzlomvopror = SetTimerEx("timervzloms",10,true,"d",playerid);
  ApplyAnimation(playerid,"GANGS","hndshkda",4.1,0,1,1,1,1);
  SetTimerEx("stopamin",120000,false,"d",playerid);
     //vzlomvopror = SetTimer("timervzloms",10,true);
  }
     //MoveObject(hrandver,1412.7796630859,-1014.91796875,1.3489612340927,1.0);//1.3489612340927
      return 1;
  }
//=================================================
  if(strcmp(cmdtext,"/elektro",true) == 0)
     {
     if(PlayerToPoint(10.0, playerid,1419.6614,-1012.0810,8.0611))
  {
   if(banksistem == 0)
   {
      SetTimerEx("zvezda",1000,false,"d",playerid);
   banksistem = 1;
      elektrosignal = SetTimer("elektrosig",120000,false);
      SendClientMessage(playerid, COLOR_LIGHTBLUE, "*Система защиты от влома хранилища отключуна!");
     // SetPlayerCriminal(playerid,255, "Отключение системы защиты! Сработала сигнализяция!!! ");
      //WantedPoints[playerid] += 2;
       WantedPoints[playerid]+=2; SetPlayerCriminal(playerid,255, "Отключение системы защиты! Сработала сигнализяция!!! ");
      ProxDetector(30.0, playerid, string,COLOR_ME,COLOR_ME,COLOR_ME,COLOR_ME,COLOR_ME);
      sig = SetTimer("banksignal",30000,true);
      ApplyAnimation(playerid,"CAR_CHAT","car_talkm_out",4.1,0,1,1,1,1);
      SetTimerEx("stopamin",6000,false,"d",playerid);
      format(string, sizeof(string), "Сигнализация: Всем оставаться на своих местах, ближайшие патрули закона уже выехали!!!");
      ProxDetector(5.0, playerid, string,COLOR_ME,COLOR_ME,COLOR_ME,COLOR_ME,COLOR_ME);
      }
      }
      return 1;
  }
//=================================================
  {
        if(BankProbel == 0)
         {
          BankProbel = 1;

       if(BankRobbed[playerid] == 0)
       {
         if(PlayerInfo[playerid][pLevel] >= 3)
      {
        if(PlayerToPoint(10.0, playerid,1402.6705,-1010.2061,0.6685))
     {
        if(Lom[playerid] == 1)
        {
          if(PlayerInfo[playerid][pMember]==1||PlayerInfo[playerid][pLeader]==1||PlayerInfo[playerid][pMember]==2||PlayerInfo[playerid][pLeader]==2||PlayerInfo[playerid][pMember]==3||PlayerInfo[playerid][pLeader]==3||PlayerInfo[playerid][pMember]==3||PlayerInfo[playerid][pLeader]==3||PlayerInfo[playerid][pMember]==4||PlayerInfo[playerid][pLeader]==4||PlayerInfo[playerid][pMember]==7||PlayerInfo[playerid][pLeader]==7||PlayerInfo[playerid][pMember]==11||PlayerInfo[playerid][pLeader]==11)
          {
       SendClientMessage(playerid, COLOR_WHITE, " Cовсеть не позволяет вам совершить преступрение! !");
                      BankProbel = 0;
                      return 1;
       }
                      if(PlayerInfo[playerid][pMember]==0&&PlayerInfo[playerid][pLeader]==0)
                {
       SendClientMessage(playerid, COLOR_WHITE, "Грабить могут только банды!");
                      BankProbel = 0;
                      return 1;
              }
        if(IsACop(playerid) < 2)
                      {
                          SendClientMessage(playerid, COLOR_WHITE, "Запрещенно грабить если на сервере меньше двух законнпиков!!!");
                          BankProbel = 0;
                         return 1;
                        }
             //SetTimer("StopGrab",10000,false);
             SetTimerEx("StopGrab",2000,0,"d",playerid);
                         ApplyAnimation(playerid,"ROB_BANK","CAT_Safe_Rob",4.1,1,1,1,1,1);
                         TogglePlayerControllable(playerid,0);
                         Stopenrob[playerid] = 1;
                      if(Rcr == 0)
                         {
       Rcr = 1;
                         }
                         else
                   {
             SendClientMessage(playerid, COLOR_WHITE, " Банк уже грабят!!!");
                BankProbel = 0;
               }
                         }
               else
                   {
             SendClientMessage(playerid, COLOR_WHITE, " Вы не можете ломать банк руками, вам нужен лом");
                BankProbel = 0;
               }
                         }
             else
             {
                         SendClientMessage(playerid, COLOR_WHITE, " Вы находитесь не в банке");
                         BankProbel = 0;
             }
             }
             else
             {
             SendClientMessage(playerid, COLOR_WHITE, " У вас должен быть уровень 3!");
             BankProbel = 0;
             }
             }
             else
             {
             SendClientMessage(playerid, COLOR_WHITE, " Вы не можете грабить банк так часто, подождите часок");
             BankProbel = 0;
             }
           }
     return 1;
     }

 

Поделиться сообщением


Ссылка на сообщение
Поделиться на другие сайты

Для публикации сообщений создайте учётную запись или авторизуйтесь

Вы должны быть пользователем, чтобы оставить комментарий

Создать учетную запись

Зарегистрируйте новую учётную запись в нашем сообществе. Это очень просто!


Регистрация нового пользователя

Войти

Уже есть аккаунт? Войти в систему.


Войти

  • Последние посетители   0 пользователей онлайн

    Ни одного зарегистрированного пользователя не просматривает данную страницу

  • Похожий контент

    • patrickk
      От patrickk
      Всем привет, решил написать dm сервер и довольно хорошим получился, даже на голову выше Goat dm. Оставил не решенную проблему тем что  у меня есть 4 локации с rp run и cj run ну а как добавить cj бег на те локации не знаю и как эта система работает. Надеюсь мне помогут знающие люди
    • Samolet
      От Samolet
      Здраствуйте, cоздаю копию Arizona на ОМП, опен мультиплеер, загрузил и подключил бд, но сервер не хочет вот лог :[2026-10-20T21:03:32+0300] [Info] Log file reloaded. Starting open.mp server (1.5.8.3079) from commit c6759bd8d265171ae3d86598895a23d5a8d92a3b Loading component $CAPI.so Successfully loaded component C-API (1.5.8.3079) with UID 10467dd8d4c56fc6 Loading component LegacyConfig.so Successfully loaded component LegacyConfig (1.5.8.3079) with UID 24ef6216838f9ffc Loading component NPCs.so Successfully loaded component NPCs (1.5.8.3079) with UID 3d0e59e87f4e90bc Loading component Recordings.so Successfully loaded component Recordings (1.5.8.3079) with UID 871144d399f5f613 Loading component Checkpoints.so Successfully loaded component Checkpoints (1.5.8.3079) with UID 44a937350d611dde Loading component TextDraws.so Successfully loaded component TextDraws (1.5.8.3079) with UID 9b5dc2b1d15c992a Loading component Pawn.so Successfully loaded component Pawn (1.5.8.3079) with UID 78906cd9f19c36a6 Loading component GangZones.so Successfully loaded component GangZones (1.5.8.3079) with UID b3351d11ee8d8056 Loading component Actors.so Successfully loaded component Actors (1.5.8.3079) with UID c81ca021eae2ad5c Loading component Pickups.so Successfully loaded component Pickups (1.5.8.3079) with UID cf304faa363dd971 Loading component Dialogs.so Successfully loaded component Dialogs (1.5.8.3079) with UID 44a111350d611dde Loading component Objects.so Successfully loaded component Objects (1.5.8.3079) with UID 59f8415f72da6160 Loading component Console.so Successfully loaded component Console (1.5.8.3079) with UID bfa24e49d0c95ee4 Loading component TextLabels.so Successfully loaded component TextLabels (1.5.8.3079) with UID a0c57ea80a009742 Loading component Variables.so Successfully loaded component Variables (1.5.8.3079) with UID 75e121848bc01fa2 Loading component Databases.so Successfully loaded component Databases (1.5.8.3079) with UID 80092e7eb5821a96 Loading component LegacyNetwork.so Successfully loaded component RakNetLegacyNetwork (1.5.8.3079) with UID ea9799fd79cf8442 Loading component CustomModels.so Successfully loaded component CustomModels (1.5.8.3079) with UID 15e3cb1e7c77ffff Loading component Menus.so Successfully loaded component Menus (1.5.8.3079) with UID 621e219eb97ee0b2 Loading component Vehicles.so Successfully loaded component Vehicles (1.5.8.3079) with UID 3f1f62ee9e22ab19 Loading component Classes.so Successfully loaded component Classes (1.5.8.3079) with UID 8cfb3183976da208 Loading component Timers.so Successfully loaded component Timers (1.5.8.3079) with UID 2ad8124c5ea257a3 Loaded 22 component(s) from /home/gs113492/components Executing Server Config... [2026-10-20T21:03:33+0300] [Info] Loading plugin: crashdetect.so [2026-10-20T21:03:33+0300] [Info] CrashDetect plugin 4.19 [2026-10-20T21:03:33+0300] [Info] Loading plugin: mapandreas.so [2026-10-20T21:03:33+0300] [Info] Loading plugin: streamer.so [2026-10-20T21:03:33+0300] [Info] *** Streamer Plugin v2.9.4 by Incognito loaded *** [2026-10-20T21:03:33+0300] [Info] Loading plugin: sscanf.so [2026-10-20T21:03:33+0300] [Info] [2026-10-20T21:03:33+0300] [Info] =============================== [2026-10-20T21:03:33+0300] [Info] sscanf plugin loaded. [2026-10-20T21:03:33+0300] [Info] Version: 2.8.3 [2026-10-20T21:03:33+0300] [Info] (c) 2018 Alex "Y_Less" Cole [2026-10-20T21:03:33+0300] [Info] =============================== [2026-10-20T21:03:33+0300] [Info] Loading plugin: TOTP.so [2026-10-20T21:03:33+0300] [Info] TOTP plugin v1.0.1 by Games loaded. [2026-10-20T21:03:33+0300] [Info] Loading plugin: mysql_static.so [2026-10-20T21:03:33+0300] [Info] >> plugin.mysql: R39-6 successfully loaded. [2026-10-20T21:03:33+0300] [Info] Loading plugin: libpawn_json.so [2026-10-20T21:03:34+0300] [Error] Function not registered: YSF_SetTickRate [2026-10-20T21:03:34+0300] [Error] Function not registered: PC_Init [2026-10-20T21:03:34+0300] [Info] [debug] Run time error 19: "File or function is not found" [2026-10-20T21:03:34+0300] [Info] [debug] PC_Init [2026-10-20T21:03:34+0300] [Info] [debug] YSF_SetTickRate [2026-10-20T21:03:34+0300] [Error] File or function is not found [2026-10-20T21:03:34+0300] [Error] Function not registered: PC_RegAlias [2026-10-20T21:03:34+0300] [Error] Function not registered: BS_GetWriteOffset [2026-10-20T21:03:34+0300] [Error] Function not registered: BS_Reset [2026-10-20T21:03:34+0300] [Error] Function not registered: PR_RegHandler [2026-10-20T21:03:34+0300] [Error] Function not registered: BS_Delete [2026-10-20T21:03:34+0300] [Error] Function not registered: BS_New [2026-10-20T21:03:34+0300] [Error] Function not registered: BS_ResetReadPointer [2026-10-20T21:03:34+0300] [Error] Function not registered: BS_SetWriteOffset [2026-10-20T21:03:34+0300] [Error] Function not registered: BS_IgnoreBits [2026-10-20T21:03:34+0300] [Error] Function not registered: PR_Init [2026-10-20T21:03:34+0300] [Error] Function not registered: PR_SendRPC [2026-10-20T21:03:34+0300] [Error] Function not registered: PR_SendPacket [2026-10-20T21:03:34+0300] [Error] Function not registered: BS_WriteValue [2026-10-20T21:03:34+0300] [Error] Function not registered: BS_GetNumberOfBytesUsed [2026-10-20T21:03:34+0300] [Error] Function not registered: BS_ReadValue [2026-10-20T21:03:34+0300] [Error] Function not registered: PC_Init [2026-10-20T21:03:34+0300] [Info] [debug] Run time error 19: "File or function is not found" [2026-10-20T21:03:34+0300] [Info] [debug] PC_Init [2026-10-20T21:03:34+0300] [Info] [debug] BS_ReadValue [2026-10-20T21:03:34+0300] [Info] [debug] BS_GetNumberOfBytesUsed [2026-10-20T21:03:34+0300] [Info] [debug] BS_WriteValue [2026-10-20T21:03:34+0300] [Info] [debug] PR_SendPacket [2026-10-20T21:03:34+0300] [Info] [debug] PR_SendRPC [2026-10-20T21:03:34+0300] [Info] [debug] PR_Init [2026-10-20T21:03:34+0300] [Info] [debug] BS_IgnoreBits [2026-10-20T21:03:34+0300] [Info] [debug] BS_SetWriteOffset [2026-10-20T21:03:34+0300] [Info] [debug] BS_ResetReadPointer [2026-10-20T21:03:34+0300] [Info] [debug] BS_New [2026-10-20T21:03:34+0300] [Info] [debug] BS_Delete [2026-10-20T21:03:34+0300] [Info] [debug] PR_RegHandler [2026-10-20T21:03:34+0300] [Info] [debug] BS_Reset [2026-10-20T21:03:34+0300] [Info] [debug] BS_GetWriteOffset [2026-10-20T21:03:34+0300] [Info] [debug] PC_RegAlias [2026-10-20T21:03:34+0300] [Error] File or function is not found [2026-10-20T21:03:34+0300] [Info] [debug] Run time error 19: "File or function is not found" [2026-10-20T21:03:34+0300] [Info] [debug] PC_Init [2026-10-20T21:03:34+0300] [Info] [debug] YSF_SetTickRate [2026-10-20T21:03:34+0300] [Error] File or function is not found [2026-10-20T21:03:34+0300] [Info] [debug] Run time error 19: "File or function is not found" [2026-10-20T21:03:34+0300] [Info] [debug] PC_Init [2026-10-20T21:03:34+0300] [Info] [debug] BS_ReadValue [2026-10-20T21:03:34+0300] [Info] [debug] BS_GetNumberOfBytesUsed [2026-10-20T21:03:34+0300] [Info] [debug] BS_WriteValue [2026-10-20T21:03:34+0300] [Info] [debug] PR_SendPacket [2026-10-20T21:03:34+0300] [Info] [debug] PR_SendRPC [2026-10-20T21:03:34+0300] [Info] [debug] PR_Init [2026-10-20T21:03:34+0300] [Info] [debug] BS_IgnoreBits [2026-10-20T21:03:34+0300] [Info] [debug] BS_SetWriteOffset [2026-10-20T21:03:34+0300] [Info] [debug] BS_ResetReadPointer [2026-10-20T21:03:34+0300] [Info] [debug] BS_New [2026-10-20T21:03:34+0300] [Info] [debug] BS_Delete [2026-10-20T21:03:34+0300] [Info] [debug] PR_RegHandler [2026-10-20T21:03:34+0300] [Info] [debug] BS_Reset [2026-10-20T21:03:34+0300] [Info] [debug] BS_GetWriteOffset [2026-10-20T21:03:34+0300] [Info] [debug] PC_RegAlias [2026-10-20T21:03:34+0300] [Info] Legacy Network started on ***.**.**.***:2717. Помогите пожалуйста