Вторник, 02.12.2008, 23:41
 
 
Приветствую Вас Проезжий | RSS
[ Новые сообщения · Участники · Правила форума · Поиск! · RSS ]
Статистика Форума
Последние ответы Популярные темы Лучшие пользователи TOP 7
  • Урок BY Ars [Графика и дизайн]
  • GTA 4 уже можно с... [GTA 4]
  • Ищю Godfather [Ищу]
  • Sims:садомазо [Трёп]
  • Литвинко или Литв... [Обо Всём]
  • [FS] Админский до... [Скрипты]
  • Ахмед [Юмор]
  • Вопрос - Ответ (Ответов: 962)
  • Обсуждение мода CityLi... (Ответов: 923)
  • Задавайте сюда ваши во... (Ответов: 921)
  • Помощь новечкам по скр... (Ответов: 613)
  • Пошли всех на хуй тут! (Ответов: 513)
  • Обратный отщёт от 500 (Ответов: 512)
  • GTA 4 уже можно скачат... (Ответов: 465)
  • MiX (Сообщений: 2618)
  • AXE (Сообщений: 2270)
  • OKStyle™ (Сообщений: 1934)
  • fAkm4n (Сообщений: 1728)
  • RockStarGamer (Сообщений: 1608)
  • DarkByte (Сообщений: 1317)
  • MAK (Сообщений: 1295)
  • Страница 1 из 11
    Модератор форума: MAK 
    Форум о GTA Multiplayers. GTA SA-MP, MTA, VC-MP, IV-MP. » San Andreas MultiPlayer » Вопросы и Проблемы » PlayerToPoint (требуется помощь)
    PlayerToPoint
    vikДата: Пятница, 10.10.2008, 23:18 | Сообщение # 1
    Освоившийся

    Группа: Продвинутые
    Сообщений: 82
    Статус: status
    что не так?
    когда я один захожу на серв, работает все отлично, но когда я захожу на серв 2-м или 6-м или еще нитькаким нибудь токо не первым работает но не так как нада, типа выбираю по менюшке телепортнуцца в одну точку, по идее меня сначала телепортирует в одно место потом через несколько сек автоматом в другое, но все отлично работае для игрока с ид0, для других же через меню телепортирует в то место но дальше все, пшык, автомат накрывается, и я зависаю в одном месте и немогу выбрацца.
    помогите может что нада дописать
    с меня плюс.
    вот сам код

    Code
    forward AutoTP(playerid);
    forward PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z);

    public OnFilterScriptInit()

    Code
    SetTimer("AutoTP", 20000, 1);

    Code
    public AutoTP(playerid)
    {
      for(new i = 0; i < MAX_PLAYERS; i++)
         {
         if(IsPlayerConnected(i))
         {
         if(PlayerToPoint(10, playerid,2.384830,33.103397,1199.849976))
         {
              SetPlayerInterior(playerid, 14);
              SetPlayerPos(playerid,-1853.5238,90.2569,1055.1825);  
         }
         }
         if(IsPlayerConnected(i))
         {
         if(PlayerToPoint(10, playerid,-9.84, 27.07, 1199.27))
         {
              SetPlayerInterior(playerid, 14);
              SetPlayerPos(playerid,-1873.3547,68.7789,1055.1825);
         }
         }
         if(IsPlayerConnected(i))
         {
         if(PlayerToPoint(10, playerid,3.03, 6.90, 1199.27))
         {
              SetPlayerInterior(playerid, 14);
              SetPlayerPos(playerid,-1849.8767,68.0816,1055.1825);  
         }
         }
      if(IsPlayerConnected(i))
         {
         if(PlayerToPoint(10, playerid,-10.27, 7.79, 1199.27))
         {
              SetPlayerInterior(playerid, 14);
              SetPlayerPos(playerid,-1873.3547,68.7789,1055.1825);  
         }
         }
         if(IsPlayerConnected(i))
         {
         if(PlayerToPoint(10, playerid,3.34, -16.94, 1199.27))
         {
              SetPlayerInterior(playerid, 14);
              SetPlayerPos(playerid,-1849.8767,68.0816,1055.1825);  
         }
         }
         if(IsPlayerConnected(i))
         {
         if(PlayerToPoint(10, playerid,-10.35, -17.59, 1199.27))
         {
              SetPlayerInterior(playerid, 0);
              SetPlayerPos(playerid,410.6896,2532.9104,19.1484);  
         }
         }
         if(IsPlayerConnected(i))
         {
         if(PlayerToPoint(10, playerid,-24.26, 29.48, 1199.27))
         {
              SetPlayerInterior(playerid, 14);
              SetPlayerPos(playerid,-1885.2983,92.5661,1055.1825);  
         }
         }
         if(IsPlayerConnected(i))
         {
         if(PlayerToPoint(10, playerid,-38.09, 27.85, 1199.27))
         {
              SetPlayerInterior(playerid, 14);
              SetPlayerPos(playerid,-1849.8767,68.0816,1055.1825);  
         }
         }
         if(IsPlayerConnected(i))
         {
         if(PlayerToPoint(10, playerid,-38.31, 55.07, 1199.27))
         {
              SetPlayerInterior(playerid, 0);
              SetPlayerPos(playerid,410.6896,2532.9104,19.1484);  
         }
         }
         if(IsPlayerConnected(i))
         {
         if(PlayerToPoint(10, playerid,-24.38, 53.84, 1199.27))
         {
              SetPlayerInterior(playerid, 14);
              SetPlayerPos(playerid,-1885.2983,92.5661,1055.1825);  
         }
         }
         if(IsPlayerConnected(i))
         {
         if(PlayerToPoint(10, playerid,-9.20, 53.29, 1199.27))
         {
              SetPlayerInterior(playerid, 14);
              SetPlayerPos(playerid,-1873.3547,68.7789,1055.1825);  
         }
         }
         if(IsPlayerConnected(i))
         {
         if(PlayerToPoint(10, playerid,-26.26, 84.07, 1199.27))
         {
              SetPlayerInterior(playerid, 0);
              SetPlayerPos(playerid,410.6896,2532.9104,19.1484);  
              }
              }
         }
    }
    public PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z)
    {
      new Float:oldposx, Float:oldposy, Float:oldposz;
      new Float:tempposx, Float:tempposy, Float:tempposz;
      GetPlayerPos(playerid, oldposx, oldposy, oldposz);
      tempposx = (oldposx -x);
      tempposy = (oldposy -y);
      tempposz = (oldposz -z);
      if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
      {
       return 1;
      }
      return 0;
    }
     
    EakwarpДата: Пятница, 10.10.2008, 23:33 | Сообщение # 2
    Постоялец

    Группа: Продвинутые
    Сообщений: 454
    Город: Москва
    Статус: status
    1. за каким хреном втыкать в каждую проверку ис плеер коннектед?
    2. ты знаеш о таком понятии как или?(else if)
    3. делаешь по этой схеме:

    Code
    public AutoTP(playerid)  
    {
          for(new i = 0; i < MAX_PLAYERS; i++)  
          {  
               if(IsPlayerConnected(i))  
               {  
                    if(PlayerToPoint(10, playerid,2.384830,33.103397,1199.849976))  
                    { }
                    else if(PlayerToPoint(10, playerid,-9.84, 27.07, 1199.27))  
                    { }
               }
          }
    return 1;
    }

    и так далее по примеру.


    Valakas SA-MP Devloper
    Valakas GF > 55555 lines ^^
     
    vikДата: Суббота, 11.10.2008, 00:06 | Сообщение # 3
    Освоившийся

    Группа: Продвинутые
    Сообщений: 82
    Статус: status
    как было так и осталось
    для 0-го ида работает для остальных нет =(
     
    }{i3NДата: Суббота, 11.10.2008, 17:00 | Сообщение # 4
    Местный

    Группа: Продвинутые
    Сообщений: 604
    Город: Los Santos xD
    Статус: status
    вместо playerid там где иф(ПлеерТоПоинт) поставь i . А мне плюс :)


    На одной из моих рандомных аватар, непонятные чёрные точки, это шифр, расшифруешь - молодец пиши мне в асю результат расшифровыания (текст который получился) и получишь семизнак аси :)))
     
    vikДата: Суббота, 11.10.2008, 17:41 | Сообщение # 5
    Освоившийся

    Группа: Продвинутые
    Сообщений: 82
    Статус: status
    поставил бы тебе 100+ с удовольствием если бы помогло.
    опять работает только для игрока с ид 0, для остальный непашет =(
     
    }{i3NДата: Суббота, 11.10.2008, 17:46 | Сообщение # 6
    Местный

    Группа: Продвинутые
    Сообщений: 604
    Город: Los Santos xD
    Статус: status
    хз у меня всё работает, вот так
    public AutoTP(playerid)
    {
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
    if(IsPlayerConnected(i))
    {
    if(PlayerToPoint(10, i,2.384830,33.103397,1199.849976))
    {
    }

    if(PlayerToPoint(10, i,-9.84, 27.07, 1199.27))
    {
    }
    }
    }
    return 1;
    }

    продолжишь копировать иф плеер ту поинт опр количество раз, и всё норм... елсе иф глючит в данном случае...



    На одной из моих рандомных аватар, непонятные чёрные точки, это шифр, расшифруешь - молодец пиши мне в асю результат расшифровыания (текст который получился) и получишь семизнак аси :)))
     
    vikДата: Суббота, 11.10.2008, 20:26 | Сообщение # 7
    Освоившийся

    Группа: Продвинутые
    Сообщений: 82
    Статус: status
    неработает,
    возьми фильтрскрипт и посмотри, тока когда будеш просматривать незаходи на серв первым, для первого игрока все работает а для остальных нет, тоесть кто первый зайдет на серв , тому повезло.
    вход в вокзал найдеш иконку в аэропорту.
    вылаживаю по частям потому что в один пост не влазит
    Code
    #include <a_samp>

    #define COLOR_GOLD 0xF7DFB5AA

    new icon1;
    new icon2;
    new icon3;
    new icon4;
    new icon5;
    new icon6;
    new icon7;
    new icon8;
    new icon9;
    new icon10;

    new gate1;
    new gate2;
    new gate3;
    new gate4;
    new gate5;
    new gate6;

    new Menu:aeroport1;
    new Menu:aeroport2;
    new Menu:aeroport3;
    new Menu:aeroport4;
    new OpenGate[MAX_PLAYERS];

    forward AutoTP(playerid);
    forward PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z);
    forward CheckGate();
    public OnFilterScriptInit()
    {
    SetTimer("AutoTP", 20000, 1);
    SetTimer("CheckGate", 500, true);

    gate1=CreateObject(985, 1965.60, -2189.83, 11.80, 0.00, 0.00, 0.00);
    gate2=CreateObject(985, 1957.70, -2189.81, 11.80, 0.00, 0.00, 0.00);
    gate3=CreateObject(985, -1542.88, -433.43, 6.70, 0.00, 0.00, -45.00);
    gate4=CreateObject(985, -1548.48, -427.90, 6.70, 0.00, 0.00, 135.00);
    gate5=CreateObject(985, 1704.82, 1603.76, 10.70, 0.00, 0.00, -107.00);
    gate6=CreateObject(985, 1707.10, 1611.29, 10.70, 0.00, 0.00, 73.00);

    CreateObject(3971, -1858.65, 87.33, 1056.73, 0.00, 0.00, -180.00);
    CreateObject(16501, -1838.55, 72.16, 1056.40, 0.00, 0.00, -90.00);
    CreateObject(16501, -1845.59, 72.16, 1056.40, 0.00, 0.00, -90.00);
    CreateObject(16501, -1852.52, 72.17, 1056.40, 0.00, 0.00, -90.00);
    CreateObject(16501, -1859.66, 72.17, 1056.40, 0.00, 0.00, -90.00);
    CreateObject(16501, -1866.62, 72.17, 1056.40, 0.00, 0.00, -90.00);
    CreateObject(16501, -1873.67, 72.16, 1056.40, 0.00, 0.00, -90.00);
    CreateObject(16501, -1880.70, 72.16, 1056.40, 0.00, 0.00, -90.00);
    CreateObject(16501, -1887.68, 72.16, 1056.40, 0.00, 0.00, -90.00);
    CreateObject(16501, -1888.96, 74.06, 1056.40, 0.00, 0.00, 0.00);
    CreateObject(16501, -1888.93, 67.01, 1056.40, 0.00, 0.00, 0.00);
    CreateObject(16501, -1888.96, 60.06, 1056.40, 0.00, 0.00, 0.00);
    CreateObject(16501, -1888.93, 52.99, 1056.40, 0.00, 0.00, 0.00);
    CreateObject(16501, -1885.28, 49.37, 1056.40, 0.00, 0.00, -90.00);
    CreateObject(16501, -1878.26, 49.37, 1056.40, 0.00, 0.00, -90.00);
    CreateObject(16501, -1871.21, 49.37, 1056.40, 0.00, 0.00, -90.00);
    CreateObject(16501, -1864.30, 49.37, 1056.40, 0.00, 0.00, -90.00);
    CreateObject(16501, -1857.24, 49.38, 1056.40, 0.00, 0.00, -90.00);
    CreateObject(16501, -1850.15, 49.39, 1056.40, 0.00, 0.00, -90.00);
    CreateObject(16501, -1843.15, 49.41, 1056.40, 0.00, 0.00, -90.00);
    CreateObject(16501, -1836.15, 49.40, 1056.40, 0.00, 0.00, -90.00);
    CreateObject(16501, -1835.09, 52.85, 1056.40, 0.00, 0.00, 0.00);
    CreateObject(16501, -1835.09, 59.90, 1056.40, 0.00, 0.00, 0.00);
    CreateObject(16501, -1835.08, 66.95, 1056.40, 0.00, 0.00, 0.00);
    CreateObject(16501, -1835.10, 73.94, 1056.40, 0.00, 0.00, 0.00);
    CreateObject(3971, -1866.23, 56.13, 1056.73, 0.00, 0.00, 0.00);
    CreateObject(16775, -1842.48, 53.48, 1054.08, -90.00, 0.00, 0.00);
    CreateObject(16775, -1842.51, 61.29, 1054.08, -90.00, 0.00, 0.00);
    CreateObject(16775, -1842.48, 69.20, 1054.08, -90.00, 0.00, 0.00);
    CreateObject(16775, -1857.07, 53.45, 1054.08, -90.00, 0.00, 0.00);
    CreateObject(16775, -1857.03, 61.29, 1054.08, -90.00, 0.00, 0.00);
    CreateObject(16775, -1857.04, 69.10, 1054.08, -90.00, 0.00, 0.00);
    CreateObject(16775, -1871.56, 53.39, 1054.08, -90.00, 0.00, 0.00);
    CreateObject(16775, -1871.60, 61.28, 1054.08, -90.00, 0.00, 0.00);
    CreateObject(16775, -1871.60, 69.21, 1054.08, -90.00, 0.00, 0.00);
    CreateObject(16775, -1885.81, 53.32, 1054.08, -90.00, 0.00, 0.00);
    CreateObject(16775, -1886.09, 61.26, 1054.08, -90.00, 0.00, 0.00);
    CreateObject(16775, -1886.11, 69.11, 1054.08, -90.00, 0.00, 0.00);
    CreateObject(16775, -1842.60, 77.04, 1054.08, -90.00, 0.00, 0.00);
    CreateObject(16775, -1842.58, 84.87, 1054.08, -90.00, 0.00, 0.00);
    CreateObject(16775, -1842.50, 92.29, 1054.08, -90.00, 0.00, 0.00);
    CreateObject(16775, -1856.93, 92.73, 1054.08, -90.00, 0.00, 0.00);
    CreateObject(16775, -1856.84, 84.99, 1054.08, -90.00, 0.00, 0.00);
    CreateObject(16775, -1857.16, 77.00, 1054.08, -90.00, 0.00, 0.00);
    CreateObject(16775, -1871.70, 76.65, 1054.08, -90.00, 0.00, 0.00);
    CreateObject(16775, -1871.48, 84.58, 1054.08, -90.00, 0.00, 0.00);
    CreateObject(16775, -1871.41, 91.96, 1054.08, -90.00, 0.00, 0.00);
    CreateObject(16775, -1885.78, 92.53, 1054.08, -90.00, 0.00, 0.00);
    CreateObject(16775, -1885.28, 84.65, 1054.08, -90.00, 0.00, 0.00);
    CreateObject(16775, -1886.11, 76.70, 1054.08, -90.00, 0.00, 0.00);
    CreateObject(16501, -1888.96, 81.10, 1056.40, 0.00, 0.00, 0.00);
    CreateObject(16501, -1888.94, 88.07, 1056.40, 0.00, 0.00, 0.00);
    CreateObject(16501, -1888.97, 95.03, 1056.40, 0.00, 0.00, 0.00);
    CreateObject(16501, -1885.47, 95.02, 1056.40, 0.00, 0.00, -90.00);
    CreateObject(16501, -1878.46, 95.06, 1056.40, 0.00, 0.00, -90.00);
    CreateObject(16501, -1871.45, 94.99, 1056.40, 0.00, 0.00, -90.00);
    CreateObject(16501, -1864.55, 94.98, 1056.40, 0.00, 0.00, -90.00);
    CreateObject(16501, -1857.66, 94.97, 1056.40, 0.00, 0.00, -90.00);
    CreateObject(16501, -1850.71, 94.99, 1056.40, 0.00, 0.00, -90.00);
    CreateObject(16501, -1843.86, 95.00, 1056.40, 0.00, 0.00, -90.00);
    CreateObject(16501, -1837.02, 95.00, 1056.40, 0.00, 0.00, -90.00);
    CreateObject(16501, -1835.12, 80.80, 1056.40, 0.00, 0.00, 0.00);
    CreateObject(16501, -1835.10, 87.73, 1056.40, 0.00, 0.00, 0.00);
    CreateObject(16501, -1835.08, 94.61, 1056.40, 0.00, 0.00, 0.00);
    CreateObject(3969, -1849.86, 78.36, 1055.09, 0.00, 0.00, -180.00);
    CreateObject(3972, -1862.27, 92.66, 1057.20, 0.00, 0.00, -90.00);
    CreateObject(1572, -1861.20, 75.78, 1054.78, 0.00, 0.00, 115.00);
    CreateObject(1572, -1843.25, 86.82, 1054.78, 0.00, 0.00, 115.00);
    CreateObject(1572, -1874.84, 85.58, 1054.78, 0.00, 0.00, 115.00);
    CreateObject(8168, -1838.98, 92.23, 1055.98, 0.00, 0.00, 17.00);
    CreateObject(8168, -1885.07, 69.32, 1055.98, 0.00, 0.00, 17.00);
    CreateObject(16501, -1864.65, 68.53, 1056.40, 0.00, 0.00, 0.00);
    CreateObject(16501, -1864.65, 61.46, 1056.40, 0.00, 0.00, 0.00);
    CreateObject(16501, -1864.65, 54.44, 1056.40, 0.00, 0.00, 0.00);
    CreateObject(16501, -1864.64, 47.74, 1056.40, 0.00, 0.00, 0.00);
    CreateObject(16501, -1858.86, 68.56, 1056.40, 0.00, 0.00, 0.00);
    CreateObject(16501, -1858.86, 61.58, 1056.40, 0.00, 0.00, 0.00);
    CreateObject(16501, -1858.86, 54.60, 1056.40, 0.00, 0.00, 0.00);
    CreateObject(16501, -1858.85, 47.83, 1056.40, 0.00, 0.00, 0.00);
    CreateObject(8168, -1837.82, 53.39, 1055.98, 0.00, 0.00, -73.00);
    CreateObject(3971, -1866.23, 56.13, 1056.73, 0.00, 0.00, 0.00);
    //****************самалеты интерьеры*********************
    CreateObject(14404, -10.22, 29.88, 1200.34, 0.00, 0.00, 0.00);
    CreateObject(14405, -10.18, 29.80, 1199.27, 0.00, 0.00, 0.00);
    CreateObject(1562, -9.16, 29.60, 1199.27, 0.00, 0.00, 0.00);
    CreateObject(1562, -11.06, 25.51, 1199.27, 0.00, 0.00, -180.00);
    CreateObject(1562, -11.12, 28.07, 1199.27, 0.00, 0.00, -180.00);
    CreateObject(1562, -9.11, 26.43, 1199.27, 0.00, 0.00, -180.00);
    CreateObject(14404, 2.95, 8.60, 1200.34, 0.00, 0.00, 0.00);
    CreateObject(14405, 3.16, 8.25, 1199.27, 0.00, 0.00, 0.00);
    CreateObject(1562, 2.11, 7.64, 1199.27, 0.00, 0.00, -180.00);
    CreateObject(1562, 3.89, 6.17, 1199.27, 0.00, 0.00, 0.00);
    CreateObject(1562, 3.79, 3.92, 1199.27, 0.00, 0.00, 0.00);
    CreateObject(14404, -10.52, 9.34, 1200.34, 0.00, 0.00, 0.00);
    CreateObject(14405, -10.37, 9.13, 1199.27, 0.00, 0.00, 0.00);
    CreateObject(1562, -9.49, 8.98, 1199.27, 0.00, 0.00, -180.00);
    CreateObject(1562, -9.43, 7.15, 1199.27, 0.00, 0.00, -180.00);
    CreateObject(1562, -9.47, 5.20, 1199.27, 0.00, 0.00, -180.00);
    CreateObject(1562, -11.31, 6.23, 1199.27, 0.00, 0.00, 0.00);
    CreateObject(14404, 3.32, -15.42, 1200.34, 0.00, 0.00, 0.00);
    CreateObject(14405, 3.40, -15.95, 1199.27, 0.00, 0.00, 0.00);
    CreateObject(1562, 4.42, -14.80, 1199.27, 0.00, 0.00, 0.00);
    CreateObject(1562, 2.39, -18.05, 1199.27, 0.00, 0.00, 0.00);
    CreateObject(1562, 4.29, -19.98, 1199.27, 0.00, 0.00, 0.00);
    CreateObject(14404, -10.36, -15.19, 1200.34, 0.00, 0.00, 0.00);
    CreateObject(14405, -10.24, -15.87, 1199.27, 0.00, 0.00, 0.00);
    CreateObject(1562, -9.34, -15.32, 1199.27, 0.00, 0.00, 0.00);
    CreateObject(1562, -9.31, -17.45, 1199.27, 0.00, 0.00, 0.00);
    CreateObject(1562, -9.34, -19.75, 1199.27, 0.00, 0.00, 0.00);
    CreateObject(14404, -24.18, 29.68, 1200.34, 0.00, 0.00, 0.00);
    CreateObject(14405, -24.16, 28.99, 1199.27, 0.00, 0.00, 0.00);
    CreateObject(1562, -23.15, 29.91, 1199.27, 0.00, 0.00, 0.00);
    CreateObject(1562, -25.10, 27.96, 1199.27, 0.00, 0.00, 0.00);
    CreateObject(14404, -38.06, 29.39, 1200.34, 0.00, 0.00, 0.00);
    CreateObject(1562, -25.07, 25.63, 1199.27, 0.00, 0.00, 0.00);
    CreateObject(14405, -38.20, 28.91, 1199.27, 0.00, 0.00, 0.00);
    CreateObject(1562, -36.88, 29.59, 1199.27, 0.00, 0.00, 0.00);
    CreateObject(1562, -36.94, 28.24, 1199.27, 0.00, 0.00, -180.00);
    CreateObject(1562, -39.07, 25.74, 1199.27, 0.00, 0.00, -180.00);
    CreateObject(1562, -39.07, 27.60, 1199.27, 0.00, 0.00, 0.00);
    CreateObject(14404, -38.36, 56.35, 1200.34, 0.00, 0.00, 0.00);
    CreateObject(14405, -38.29, 45.93, 1199.27, 0.00, 0.00, 0.00);
    CreateObject(14405, -38.16, 48.24, 1199.27, 0.00, 0.00, 0.00);
    CreateObject(1562, -37.21, 56.19, 1199.27, 0.00, 0.00, -180.00);
    CreateObject(14404, -24.43, 55.52, 1200.34, 0.00, 0.00, 0.00);
    CreateObject(14467, -24.13, 57.91, 1199.00, 0.00, 0.00, 0.00);
    CreateObject(14405, -24.40, 46.63, 1199.27, 0.00, 0.00, 0.00);
    CreateObject(1562, -25.48, 49.48, 1199.27, 0.00, 0.00, -180.00);
    CreateObject(14404, -9.08, 55.05, 1200.34, 0.00, 0.00, 0.00);
    CreateObject(14405, -2.57, 51.93, 1199.27, 0.00, 0.00, 90.00);
    CreateObject(14404, -26.03, 86.20, 1200.34, 0.00, 0.00, 0.00);
    CreateObject(14405, -2.55, 55.49, 1199.27, 0.00, 0.00, 90.00);
    CreateObject(1562, -9.96, 52.23, 1199.27, 0.00, 0.00, -180.00);
    CreateObject(14405, -26.02, 85.39, 1199.27, 0.00, 0.00, 0.00);
    CreateObject(1562, -26.97, 81.01, 1199.27, 0.00, 0.00, -180.00);
    CreateObject(14405, -19.51, 82.44, 1199.27, 0.00, 0.00, 90.00);
    CreateObject(1562, -27.15, 84.78, 1199.27, 0.00, 0.00, -180.00);

    icon1=CreatePickup(1239,23,1685.7478,-2239.3655,13.5469);
    icon2=CreatePickup(1239,23,-1861.86, 73.15, 1054.78);
    icon3=CreatePickup(1239,23,-1420.8496,-287.2844,14.1484);
    icon4=CreatePickup(1239,23,-1873.37, 50.35, 1054.78);
    icon5=CreatePickup(1239,23,1673.7025,1447.6897,10.7847);
    icon6=CreatePickup(1239,23,-1836.15, 61.27, 1054.78);
    icon7=CreatePickup(1239,23,415.0631,2535.5725,19.1484);
    icon8=CreatePickup(1239,23,-1837.0647,89.3981,1055.1825);
    icon9=CreatePickup(1239,23,-1840.6567,51.0844,1055.1825);
    icon10=CreatePickup(1239,23,-1882.7848,66.4646,1055.1825);

    aeroport1 = CreateMenu("CJ Aeroport", 1, 50.0, 180.0, 200.0, 200.0);
    AddMenuItem(aeroport1, 0, "Los Santos");
    AddMenuItem(aeroport1, 0, "San Fiero");
    AddMenuItem(aeroport1, 0, "Las Venturas");

    aeroport2 = CreateMenu("Los Santos", 1, 50.0, 180.0, 200.0, 200.0);
    AddMenuItem(aeroport2, 0, "San Fiero");
    AddMenuItem(aeroport2, 0, "Las Venturas");
    AddMenuItem(aeroport2, 0, "CJ Aeroport");

    aeroport3 = CreateMenu("San Fiero", 1, 50.0, 180.0, 200.0, 200.0);
    AddMenuItem(aeroport3, 0, "Los Santos");
    AddMenuItem(aeroport3, 0, "Las Venturas");
    AddMenuItem(aeroport3, 0, "CJ Aeroport");

    aeroport4 = CreateMenu("Las Venturas", 1, 50.0, 180.0, 200.0, 200.0);
    AddMenuItem(aeroport4, 0, "Los Santos");
    AddMenuItem(aeroport4, 0, "San Fiero");
    AddMenuItem(aeroport4, 0, "CJ Aeroport");

    }
    public CheckGate()
    {
         for(new i = 0; i < MAX_PLAYERS; i++)
         {
             if(IsPlayerConnected(i))
             {
                 if(PlayerToPoint(10.0, i, 1961.8441,-2189.9465,13.5469) && OpenGate[i] == 0)
                 {
                     MoveObject(gate1, 1970.93, -2189.81, 11.80, 1.5);
                     MoveObject(gate2, 1952.37, -2189.88, 11.80, 1.5);
                     OpenGate[i] = 1;
                 }
                 else if(!PlayerToPoint(10.0, i, 1970.93, -2189.81, 11.80) && OpenGate[i] == 1)
                 {
                     OpenGate[i] = 0;
                     MoveObject(gate1, 1965.60, -2189.83, 11.80, 1.5);
                     MoveObject(gate2, 1957.70, -2189.81, 11.80, 1.5);
                 }
             }
             if(IsPlayerConnected(i))
             {
                 if(PlayerToPoint(10.0, i, -1545.8792,-430.9145,6.0000) && OpenGate[i] == 0)
                 {
                     MoveObject(gate3, -1539.81, -436.58, 6.70, 1.5);
                     MoveObject(gate4, -1551.60, -424.80, 6.70, 1.5);
                     OpenGate[i] = 2;
                 }
                 else if(!PlayerToPoint(10.0, i, -1545.8792,-430.9145,6.0000) && OpenGate[i] == 2)
                 {
                     OpenGate[i] = 0;
                     MoveObject(gate3, -1542.88, -433.43, 6.70, 1.5);
                     MoveObject(gate4, -1548.48, -427.90, 6.70, 1.5);
                 }
             }
             if(IsPlayerConnected(i))
             {
                 if(PlayerToPoint(10.0, i, 1706.3188,1607.8315,10.0156) && OpenGate[i] == 0)
                 {
                     MoveObject(gate5, 1703.53, 1599.38, 10.70, 1.5);
                     MoveObject(gate6, 1708.52, 1615.91, 10.70, 1.5);
                     OpenGate[i] = 3;
                 }
                 else if(!PlayerToPoint(10.0, i, 1706.3188,1607.8315,10.0156) && OpenGate[i] == 3)
                 {
                     OpenGate[i] = 0;
                     MoveObject(gate5, 1704.82, 1603.76, 10.70, 1.5);
                     MoveObject(gate6, 1707.10, 1611.29, 10.70, 1.5);
                 }
             }
         }
    }
    public OnFilterScriptExit()
    {
      return 1;
    }

    public AutoTP(playerid)
    {
      for(new i = 0; i < MAX_PLAYERS; i++)
         {
         if(IsPlayerConnected(i))
         {
         if(PlayerToPoint(10, i ,2.384830,33.103397,1199.849976))
         {
              SetPlayerInterior(playerid, 14);
              SetPlayerPos(playerid,-1853.5238,90.2569,1055.1825);  
         }
         if(PlayerToPoint(10, i ,-9.84, 27.07, 1199.27))
         {
              SetPlayerInterior(playerid, 14);
              SetPlayerPos(playerid,-1873.3547,68.7789,1055.1825);
         }
         if(PlayerToPoint(10, i ,3.03, 6.90, 1199.27))
         {
              SetPlayerInterior(playerid, 14);
              SetPlayerPos(playerid,-1849.8767,68.0816,1055.1825);  
         }
         if(PlayerToPoint(10, i ,-10.27, 7.79, 1199.27))
         {
              SetPlayerInterior(playerid, 14);
              SetPlayerPos(playerid,-1873.3547,68.7789,1055.1825);  
         }
         if(PlayerToPoint(10, i ,3.34, -16.94, 1199.27))
         {
              SetPlayerInterior(playerid, 14);
              SetPlayerPos(playerid,-1849.8767,68.0816,1055.1825);  
         }
         if(PlayerToPoint(10, i ,-10.35, -17.59, 1199.27))
         {
              SetPlayerInterior(playerid, 0);
              SetPlayerPos(playerid,410.6896,2532.9104,19.1484);  
         }
         if(PlayerToPoint(10, i ,-24.26, 29.48, 1199.27))
         {
              SetPlayerInterior(playerid, 14);
              SetPlayerPos(playerid,-1885.2983,92.5661,1055.1825);  
         }
         if(PlayerToPoint(10, i ,-38.09, 27.85, 1199.27))
         {
              SetPlayerInterior(playerid, 14);
              SetPlayerPos(playerid,-1849.8767,68.0816,1055.1825);  
         }
         if(PlayerToPoint(10, i ,-38.31, 55.07, 1199.27))
         {
              SetPlayerInterior(playerid, 0);
              SetPlayerPos(playerid,410.6896,2532.9104,19.1484);  
         }
         if(PlayerToPoint(10, i ,-24.38, 53.84, 1199.27))
         {
              SetPlayerInterior(playerid, 14);
              SetPlayerPos(playerid,-1885.2983,92.5661,1055.1825);  
         }
         if(PlayerToPoint(10, i ,-9.20, 53.29, 1199.27))
         {
              SetPlayerInterior(playerid, 14);
              SetPlayerPos(playerid,-1873.3547,68.7789,1055.1825);  
         }
         if(PlayerToPoint(10, i ,-26.26, 84.07, 1199.27))
         {
              SetPlayerInterior(playerid, 0);
              SetPlayerPos(playerid,410.6896,2532.9104,19.1484);  
         }
             }
      }
         return 1;
    }

    Добавлено (11.10.2008, 20:26)
    ---------------------------------------------
    2-я часть

    Code
    public PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z)
    {
      new Float:oldposx, Float:oldposy, Float:oldposz;
      new Float:tempposx, Float:tempposy, Float:tempposz;
      GetPlayerPos(playerid, oldposx, oldposy, oldposz);
      tempposx = (oldposx -x);
      tempposy = (oldposy -y);
      tempposz = (oldposz -z);
      if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
      {
       return 1;
      }
      return 0;
    }

    public OnPlayerConnect(playerid)
    {
      SetPlayerMapIcon(playerid,1,410.6896,2532.9104,19.1484,5,0xF6F6F6F6);
      SetPlayerMapIcon(playerid,2,1685.7478,-2239.3655,13.5469,5,0xF6F6F6F6);
      SetPlayerMapIcon(playerid,3,-1420.8496,-287.2844,14.1484,5,0xF6F6F6F6);
      SetPlayerMapIcon(playerid,4,1673.7025,1447.6897,10.7847,5,0xF6F6F6F6);
      SendClientMessage(playerid, COLOR_GOLD,"На нашем сервере работают аэропорты! (by schped)");
      return 1;
    }
    public OnPlayerPickUpPickup(playerid, pickupid)
    {
    if(pickupid==icon1)
    {
    SetPlayerInterior(playerid, 14);
    SetPlayerPos(playerid,-1861.70, 81.78, 1054.78);
    return 1;
    }
    if(pickupid==icon2)
    {
    SetPlayerInterior(playerid, 0);
    SetPlayerPos(playerid,1685.2574,-2246.6482,13.5428);
    return 1;
    }
    if(pickupid==icon3)
    {
    SetPlayerInterior(playerid, 14);
    SetPlayerPos(playerid,-1881.27, 56.08, 1054.78);
    return 1;
    }
    if(pickupid==icon4)
    {
    SetPlayerInterior(playerid, 0);
    SetPlayerPos(playerid,-1432.8496,-287.2844,14.1484);
    return 1;
    }
    if(pickupid==icon5)
    {
    SetPlayerInterior(playerid, 14);
    SetPlayerPos(playerid,-1844.35, 58.17, 1054.78);
    return 1;
    }
    if(pickupid==icon6)
    {
    SetPlayerInterior(playerid, 0);
    SetPlayerPos(playerid,1685.4272,1447.0859,10.7700);
    return 1;
    }
    if(pickupid==icon7)
    {
    if(IsValidMenu(aeroport1)) ShowMenuForPlayer(aeroport1, playerid);
    TogglePlayerControllable(playerid, 1);
    return 1;
    }
    if(pickupid==icon8)
    {
    if(IsValidMenu(aeroport2)) ShowMenuForPlayer(aeroport2, playerid);
    TogglePlayerControllable(playerid, 1);
    return 1;
    }
    if(pickupid==icon10)
    {
    if(IsValidMenu(aeroport3)) ShowMenuForPlayer(aeroport3, playerid);
    TogglePlayerControllable(playerid, 1);
    return 1;
    }
    if(pickupid==icon9)
    {
    if(IsValidMenu(aeroport4)) ShowMenuForPlayer(aeroport4, playerid);
    TogglePlayerControllable(playerid, 1);
    return 1;
    }
    return 1;
    }

    public OnPlayerSelectedMenuRow(playerid, row)
    {
         new Menu:current;
         current = GetPlayerMenu(playerid);
         if(current == aeroport1)
         {
             switch(row)
             {
                 case 0:{
    {
    if(GetPlayerMoney(playerid) > 2000)
    {
    GivePlayerMoney(playerid,-2000);
    SendClientMessage(playerid,0xFFFF00AA, " Приятного вам полета...");
    SetPlayerInterior(playerid, 1);
    SetPlayerPos(playerid,2.384830,33.103397,1199.849976);
    }else{
    SendClientMessage(playerid,0xAA3333AA," У вас не достаточно денег для покупки билета");
    }
                 }
    return 1;
    }
       case 1:{
    {
    if(GetPlayerMoney(playerid) > 1000)
    {
    GivePlayerMoney(playerid,-1000);
    SendClientMessage(playerid,0xFFFF00AA, " Приятного вам полета...");
    SetPlayerInterior(playerid, 1);
    SetPlayerPos(playerid,-9.84, 27.07, 1199.27);
    }else{
    SendClientMessage(playerid,0xAA3333AA," У вас не достаточно денег для покупки билета");
    }
                 }
    return 1;
    }
                 case 2:{
    {
    if(GetPlayerMoney(playerid) > 500)
    {
    GivePlayerMoney(playerid,-500);
    SendClientMessage(playerid,0xFFFF00AA, " Приятного вам полета...");
    SetPlayerInterior(playerid, 1);
    SetPlayerPos(playerid,3.03, 6.90, 1199.27);
    }else{
    SendClientMessage(playerid,0xAA3333AA," У вас не достаточно денег для покупки билета");
    }
                 }
    return 1;
    }
             }
         }
         if(current == aeroport2)
         {
             switch(row)
             {
                 case 0:{
    {
    if(GetPlayerMoney(playerid) > 1000)
    {
    GivePlayerMoney(playerid,-1000);
    SendClientMessage(playerid,0xFFFF00AA, " Приятного вам полета...");
    SetPlayerInterior(playerid, 1);
    SetPlayerPos(playerid, -10.27, 7.79, 1199.27);
    }else{
    SendClientMessage(playerid,0xAA3333AA," У вас не достаточно денег для покупки билета");
    }
                 }
    return 1;
    }
                 case 1:{
    {
    if(GetPlayerMoney(playerid) > 1000)
    {
    GivePlayerMoney(playerid,-1000);
    SendClientMessage(playerid,0xFFFF00AA, " Приятного вам полета...");
    SetPlayerInterior(playerid, 1);
    SetPlayerPos(playerid,3.34, -16.94, 1199.27);
    }else{
    SendClientMessage(playerid,0xAA3333AA," У вас не достаточно денег для покупки билета");
    }
                 }
    return 1;
    }
                 case 2:{
    {
    if(GetPlayerMoney(playerid) > 2000)
    {
    GivePlayerMoney(playerid,-2000);
    SendClientMessage(playerid,0xFFFF00AA, " Приятного вам полета...");
    SetPlayerInterior(playerid, 1);
    SetPlayerPos(playerid,-10.35, -17.59, 1199.27);
    }else{
    SendClientMessage(playerid,0xAA3333AA," У вас не достаточно денег для покупки билета");
    }
                 }
    return 1;
    }
             }
         }
         if(current == aeroport3)
         {
             switch(row)
             {
                 case 0:{
    {
    if(GetPlayerMoney(playerid) > 1000)
    {
    GivePlayerMoney(playerid,-1000);
    SendClientMessage(playerid,0xFFFF00AA, " Приятного вам полета...");
    SetPlayerInterior(playerid, 1);
    SetPlayerPos(playerid,-24.26, 29.48, 1199.27);
    }else{
    SendClientMessage(playerid,0xAA3333AA," У вас не достаточно денег для покупки билета");
    }
                 }
    return 1;
    }
                 case 1:{
    {
    if(GetPlayerMoney(playerid) > 1000)
    {
    GivePlayerMoney(playerid,-1000);
    SendClientMessage(playerid,0xFFFF00AA, " Приятного вам полета...");
    SetPlayerInterior(playerid, 1);
    SetPlayerPos(playerid,-38.09, 27.85, 1199.27);
    }else{
    SendClientMessage(playerid,0xAA3333AA," У вас не достаточно денег для покупки билета");
    }
                 }
    return 1;
    }
                 case 2:{
    {
    if(GetPlayerMoney(playerid) > 1100)
    {
    GivePlayerMoney(playerid,-1100);
    SendClientMessage(playerid,0xFFFF00AA, " Приятного вам полета...");
    SetPlayerInterior(playerid, 1);
    SetPlayerPos(playerid,-38.31, 55.07, 1199.27);
    }else{
    SendClientMessage(playerid,0xAA3333AA," У вас не достаточно денег для покупки билета");
    }
                 }
    return 1;
    }
             }
         }
         if(current == aeroport4)
         {
             switch(row)
             {
                 case 0:{
    {
    if(GetPlayerMoney(playerid) > 1300)
    {
    GivePlayerMoney(playerid,-1300);
    SendClientMessage(playerid,0xFFFF00AA, " Приятного вам полета...");
    SetPlayerInterior(playerid, 1);
    SetPlayerPos(playerid,-24.38, 53.84, 1199.27);
    }else{
    SendClientMessage(playerid,0xAA3333AA," У вас не достаточно денег для покупки билета");
    }
                 }
    return 1;
    }
                 case 1:{
    {
    if(GetPlayerMoney(playerid) > 1000)
    {
    GivePlayerMoney(playerid,-1000);
    SendClientMessage(playerid,0xFFFF00AA, " Приятного вам полета...");
    SetPlayerInterior(playerid, 1);
    SetPlayerPos(playerid,-9.20, 53.29, 1199.27);
    }else{
    SendClientMessage(playerid,0xAA3333AA," У вас не достаточно денег для покупки билета");
    }
                 }
    return 1;
    }
                 case 2:{
    {
    if(GetPlayerMoney(playerid) > 600)
    {
    GivePlayerMoney(playerid,-600);
    SendClientMessage(playerid,0xFFFF00AA, " Приятного вам полета...");
    SetPlayerInterior(playerid, 1);
    SetPlayerPos(playerid,-26.26, 84.07, 1199.27);
    }else{
    SendClientMessage(playerid,0xAA3333AA," У вас не достаточно денег для покупки билета");
    }
                 }
    return 1;
    }
             }
         }
         return 1;
    }

    public OnPlayerExitedMenu(playerid)
    {
      return 1;
    }
     
    }{i3NДата: Суббота, 11.10.2008, 20:26 | Сообщение # 8
    Местный

    Группа: Продвинутые
    Сообщений: 604
    Город: Los Santos xD
    Статус: status
    нет времени проверить, нет возможности зайти не первым, попробую прям тут по коду...


    На одной из моих рандомных аватар, непонятные чёрные точки, это шифр, расшифруешь - молодец пиши мне в асю результат расшифровыания (текст который получился) и получишь семизнак аси :)))
     
    vikДата: Воскресенье, 12.10.2008, 11:32 | Сообщение # 9
    Освоившийся

    Группа: Продвинутые
    Сообщений: 82
    Статус: status
    а ты делай как я, ботов запустил а потом сам =)

    Добавлено (11.10.2008, 22:11)
    ---------------------------------------------
    так поможет мне кто нить

    Добавлено (12.10.2008, 02:57)
    ---------------------------------------------
    ауу люди, срочно требуется помощь

    Добавлено (12.10.2008, 11:32)
    ---------------------------------------------
    плииз ну помогите
    очень уж сильно нада

     
    VagrantДата: Воскресенье, 12.10.2008, 14:48 | Сообщение # 10
    Уверенный

    Группа: Продвинутые
    Сообщений: 226
    Город: Находка
    Статус: status
    Возился я сегодня с твоим фс хз сколько. Но так и не понял в чём косяк :(

    Живём и Дышим
    Заказать дизайн для сайта своего клана. Быстро и Качественно. Возможны скидки.
    Работы:
    [GM] San Fiero Enigmatic (TDM) V. 1.0 - 35%
    [FS] Clan House V. 1.0 - 100%
    Мой клан:

     
    Форум о GTA Multiplayers. GTA SA-MP, MTA, VC-MP, IV-MP. » San Andreas MultiPlayer » Вопросы и Проблемы » PlayerToPoint (требуется помощь)
    Страница 1 из 11
    Поиск:

    Copyright SAMP-RUS© 2008