[ Новые сообщения · Участники · Правила форума · Поиск · RSS ]
  • Страница 1 из 1
  • 1
помогите с командой
Дата: 19.12.2010, Воскресенье, 10:25:06 | Сообщение # $NUMBER
Группа: Пользователи
Сообщений: 27
Репутация: 2+
Привет , кто знает подскажите плиз как к этой команде(v lock(1-3)) поставить анимацию типо набираеш команду и чел открывает авто с анимацией, вот сама команда:

Code
    else if(strcmp(x_nr,"lock1",true) == 0)
          {
                 new keycar = PlayerInfo[playerid][pPcarkey];
                 if(keycar != 999)
                 {
                     new locked[256];
                     locked = strtok(cmdtext, idx);
                     if(CarInfo[keycar][cLock] == 1)
                     {
                      for(new i = 0; i < MAX_PLAYERS; i++)
       {
        if (IsPlayerConnected(i))
        {
         SetVehicleParamsForPlayer(keycar,i,0,0);
        }
       }
       format(string,sizeof(string)," %s *Открывает центральный замок своего транспорта.",sendername);
       ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
       format(string, sizeof(string), "~w~Mashina~n~~g~Otkrita");
       GameTextForPlayer(playerid, string, 4000, 3);
                         CarInfo[keycar][cLock] = 0;
       OnPropUpdate();
       return 1;
      }
      else if(CarInfo[keycar][cLock] == 0)
      {
          for(new i = 0; i < MAX_PLAYERS; i++)
       {
        if (IsPlayerConnected(i))
        {
         SetVehicleParamsForPlayer(keycar,i,0,1);
        }
       }
       format(string,sizeof(string)," %s *Закрывает центральный замок своего транспорта.",sendername);
       ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
       format(string, sizeof(string), "~w~Mashina~n~~r~Zakrita");
       GameTextForPlayer(playerid, string, 4000, 3);
                         CarInfo[keycar][cLock] = 1;
       OnPropUpdate();
       return 1;
      }
                 }
                 else
                 {
                     SendClientMessage(playerid, COLOR_GREY, "  Вы не имеете автомобиля №1");
                     return 1;
                 }
          }
          else if(strcmp(x_nr,"lock2",true) == 0)
          {
                 new keycar = PlayerInfo[playerid][pPcarkey2];
                 if(keycar != 999)
                 {
                     new locked[256];
                     locked = strtok(cmdtext, idx);
                     if(CarInfo[keycar][cLock] == 1)
                     {
                      for(new i = 0; i < MAX_PLAYERS; i++)
       {
        if (IsPlayerConnected(i))
        {
         SetVehicleParamsForPlayer(keycar,i,0,0);
        }
       }
       format(string,sizeof(string)," %s *Открывает центральный замок своего транспорта.",sendername);
       ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
       format(string, sizeof(string), "~w~Mashina~n~~g~Otkrita");
       GameTextForPlayer(playerid, string, 4000, 3);
                         CarInfo[keycar][cLock] = 0;
       OnPropUpdate();
       return 1;
      }
      else if(CarInfo[keycar][cLock] == 0)
      {
          for(new i = 0; i < MAX_PLAYERS; i++)
       {
        if (IsPlayerConnected(i))
        {
         SetVehicleParamsForPlayer(keycar,i,0,1);
        }
       }
       format(string,sizeof(string)," %s *Закрывает центральный замок своего транспорта.",sendername);
       ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
       format(string, sizeof(string), "~w~Mashina~n~~r~Zakrita");
       GameTextForPlayer(playerid, string, 4000, 3);
                         CarInfo[keycar][cLock] = 1;
       OnPropUpdate();
       return 1;
      }
                 }
                 else
                 {
                     SendClientMessage(playerid, COLOR_GREY, "  Вы не имеете автомобиля №2");
                     return 1;
                 }
          }
          else if(strcmp(x_nr,"lock3",true) == 0)
          {
                 new keycar = PlayerInfo[playerid][pPcarkey3];
                 if(keycar != 999)
                 {
                     new locked[256];
                     locked = strtok(cmdtext, idx);
                     if(CarInfo[keycar][cLock] == 1)
                     {
                      for(new i = 0; i < MAX_PLAYERS; i++)
       {
        if (IsPlayerConnected(i))
        {
         SetVehicleParamsForPlayer(keycar,i,0,0);
        }
       }
       format(string,sizeof(string)," %s *Открывает центральный замок своего транспорта.",sendername);
       ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
       format(string, sizeof(string), "~w~Mashina~n~~g~Otkrita");
       GameTextForPlayer(playerid, string, 4000, 3);
       CarInfo[keycar][cLock] = 0;
       OnPropUpdate();
       return 1;
      }
      else if(CarInfo[keycar][cLock] == 0)
      {
          for(new i = 0; i < MAX_PLAYERS; i++)
       {
        if (IsPlayerConnected(i))
        {
         SetVehicleParamsForPlayer(keycar,i,0,1);
        }
       }
       format(string,sizeof(string)," %s *Закрывает центральный замок своего транспорта.",sendername);
       ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
       format(string, sizeof(string), "~w~Mashina~n~~r~Zakrita");
       GameTextForPlayer(playerid, string, 4000, 3);
       CarInfo[keycar][cLock] = 1;
       OnPropUpdate();
       return 1;
      }
                 }
                 else
                 {
                     SendClientMessage(playerid, COLOR_GREY, "  Вы не имеете автомобиля №3");
                     return 1;
                 }
          }
Дата: 19.12.2010, Воскресенье, 20:25:43 | Сообщение # $NUMBER
Группа: Проверенные
Сообщений: 263
Репутация: 242+
Code
  else if(strcmp(x_nr,"lock1",true) == 0)
           {
                  new keycar = PlayerInfo[playerid][pPcarkey];
                  if(keycar != 999)
                  {
                      new locked[256];
                      locked = strtok(cmdtext, idx);
                      if(CarInfo[keycar][cLock] == 1)
                      {
                       for(new i = 0; i < MAX_PLAYERS; i++)
        {
         if (IsPlayerConnected(i))
         {
          SetVehicleParamsForPlayer(keycar,i,0,0);
         }
        }
        format(string,sizeof(string)," %s *Открывает центральный замок своего транспорта.",sendername);
        ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
        ApplyAnimation(playerid,"VENDING","VEND_Drink_P",4.1,0,1,1,0,1);
        format(string, sizeof(string), "~w~Mashina~n~~g~Otkrita");
        GameTextForPlayer(playerid, string, 4000, 3);
                          CarInfo[keycar][cLock] = 0;
        OnPropUpdate();
        return 1;
       }
       else if(CarInfo[keycar][cLock] == 0)
       {
           for(new i = 0; i < MAX_PLAYERS; i++)
        {
         if (IsPlayerConnected(i))
         {
          SetVehicleParamsForPlayer(keycar,i,0,1);
         }
        }
        format(string,sizeof(string)," %s *Закрывает центральный замок своего транспорта.",sendername);
        ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
        ApplyAnimation(playerid,"VENDING","VEND_Drink_P",4.1,0,1,1,0,1);
        format(string, sizeof(string), "~w~Mashina~n~~r~Zakrita");
        GameTextForPlayer(playerid, string, 4000, 3);
                          CarInfo[keycar][cLock] = 1;
        OnPropUpdate();
        return 1;
       }
                  }
                  else
                  {
                      SendClientMessage(playerid, COLOR_GREY, "  Вы не имеете автомобиля №1");
                      return 1;
                  }
           }
           else if(strcmp(x_nr,"lock2",true) == 0)
           {
                  new keycar = PlayerInfo[playerid][pPcarkey2];
                  if(keycar != 999)
                  {
                      new locked[256];
                      locked = strtok(cmdtext, idx);
                      if(CarInfo[keycar][cLock] == 1)
                      {
                       for(new i = 0; i < MAX_PLAYERS; i++)
        {
         if (IsPlayerConnected(i))
         {
          SetVehicleParamsForPlayer(keycar,i,0,0);
         }
        }
        format(string,sizeof(string)," %s *Открывает центральный замок своего транспорта.",sendername);
        ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
        ApplyAnimation(playerid,"VENDING","VEND_Drink_P",4.1,0,1,1,0,1);
        format(string, sizeof(string), "~w~Mashina~n~~g~Otkrita");
        GameTextForPlayer(playerid, string, 4000, 3);
                          CarInfo[keycar][cLock] = 0;
        OnPropUpdate();
        return 1;
       }
       else if(CarInfo[keycar][cLock] == 0)
       {
           for(new i = 0; i < MAX_PLAYERS; i++)
        {
         if (IsPlayerConnected(i))
         {
          SetVehicleParamsForPlayer(keycar,i,0,1);
         }
        }
        format(string,sizeof(string)," %s *Закрывает центральный замок своего транспорта.",sendername);
        ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
        ApplyAnimation(playerid,"VENDING","VEND_Drink_P",4.1,0,1,1,0,1);
        format(string, sizeof(string), "~w~Mashina~n~~r~Zakrita");
        GameTextForPlayer(playerid, string, 4000, 3);
                          CarInfo[keycar][cLock] = 1;
        OnPropUpdate();
        return 1;
       }
                  }
                  else
                  {
                      SendClientMessage(playerid, COLOR_GREY, "  Вы не имеете автомобиля №2");
                      return 1;
                  }
           }
           else if(strcmp(x_nr,"lock3",true) == 0)
           {
                  new keycar = PlayerInfo[playerid][pPcarkey3];
                  if(keycar != 999)
                  {
                      new locked[256];
                      locked = strtok(cmdtext, idx);
                      if(CarInfo[keycar][cLock] == 1)
                      {
                       for(new i = 0; i < MAX_PLAYERS; i++)
        {
         if (IsPlayerConnected(i))
         {
          SetVehicleParamsForPlayer(keycar,i,0,0);
         }
        }
        format(string,sizeof(string)," %s *Открывает центральный замок своего транспорта.",sendername);
        ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
        ApplyAnimation(playerid,"VENDING","VEND_Drink_P",4.1,0,1,1,0,1);
        format(string, sizeof(string), "~w~Mashina~n~~g~Otkrita");
        GameTextForPlayer(playerid, string, 4000, 3);
        CarInfo[keycar][cLock] = 0;
        OnPropUpdate();
        return 1;
       }
       else if(CarInfo[keycar][cLock] == 0)
       {
           for(new i = 0; i < MAX_PLAYERS; i++)
        {
         if (IsPlayerConnected(i))
         {
          SetVehicleParamsForPlayer(keycar,i,0,1);
         }
        }
        format(string,sizeof(string)," %s *Закрывает центральный замок своего транспорта.",sendername);
        ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
        ApplyAnimation(playerid,"VENDING","VEND_Drink_P",4.1,0,1,1,0,1);
        format(string, sizeof(string), "~w~Mashina~n~~r~Zakrita");
        GameTextForPlayer(playerid, string, 4000, 3);
        CarInfo[keycar][cLock] = 1;
        OnPropUpdate();
        return 1;
       }
                  }
                  else
                  {
                      SendClientMessage(playerid, COLOR_GREY, "  Вы не имеете автомобиля №3");
                      return 1;
                  }
           }

Надеюсь анимацию сам знаешь какая тебе нужна.

  • Страница 1 из 1
  • 1
Поиск: