Advertisement
MrFoxPro

Untitled

Feb 25th, 2021 (edited)
681
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 18.89 KB | None | 0 0
  1. local GREEN = 'зёлен'
  2. local BLACK = 'чёрн'
  3. local WHITE = 'бел'
  4. local WHITENESS = 'белоснежного'
  5. local GREY = 'сер'
  6. local BEZHEV = 'бежев'
  7. local RED = 'красн'
  8. local AQUA = 'бирюзов'
  9. local ORANGE = 'оранжев'
  10. local SEREBRIST = 'серебрист'
  11. local DARKRED = 'бордов'
  12. local PURPLE = 'розов'
  13. local PURPURN = 'пурпурн'
  14. local BLUE = 'син'
  15. local LIGHTBLUE = 'голуб'
  16. local SANDLY = 'песочн'
  17. local BROWN = 'коричнев'
  18. local YELLOW = 'жёлт'
  19. local PINK = 'розов'
  20. local GOLDEN = 'золот'
  21. function darkly(c)
  22.     return 'темно-' .. c
  23. end
  24. function brightly(c)
  25.     return 'ярко-' .. c
  26. end
  27. function lightly(c)
  28.     return 'светло-' .. c
  29. end
  30. function poison(c)
  31.     return 'ядовито-' .. c
  32. end
  33. function bluely(c)
  34.     return 'сине-' .. c
  35. end
  36. function greily(c)
  37.     return 'серо-' .. c
  38. end
  39.  
  40. local colorNames = {
  41.     [0] = BLACK,
  42.     [1] = WHITE,
  43.     [2] = AQUA,
  44.     [3] = RED,
  45.     [4] = darkly(GREEN),
  46.     [5] = PURPLE,
  47.     [6] = YELLOW,
  48.     [7] = BLUE,
  49.     [8] = BEZHEV,
  50.     [9] = GREY,
  51.     [10] = greily(BLUE),
  52.     [11] = SEREBRIST,
  53.     [12] = LIGHTBLUE,
  54.     [13] = GREY,
  55.     [14] = WHITE,
  56.     [15] = SEREBRIST,
  57.     [16] = GREEN,
  58.     [17] = RED,
  59.     [18] = PURPLE,
  60.     [19] = SEREBRIST,
  61.     [20] = greily(BLUE),
  62.     [21] = lightly(RED),
  63.     [22] = PURPURN,
  64.     [23] = BEZHEV,
  65.     [24] = GREY,
  66.     [25] = GREY,
  67.     [26] = BEZHEV,
  68.     [27] = GREY,
  69.     [28] = greily(BLUE),
  70.     [29] = BEZHEV,
  71.     [30] = RED,
  72.     [31] = darkly(RED),
  73.     [32] = WHITE,
  74.     [33] = BEZHEV,
  75.     [34] = BEZHEV,
  76.     [35] = BEZHEV,
  77.     [36] = darkly(GREY),
  78.     [37] = GREEN,
  79.     [38] = 'салатн',
  80.     [39] = SEREBRIST,
  81.     [40] = BLACK,
  82.     [41] = BEZHEV,
  83.     [42] = RED,
  84.     [43] = RED,
  85.     [44] = GREEN,
  86.     [45] = DARKRED,
  87.     [46] = lightly(YELLOW),
  88.     [47] = SANDLY,
  89.     [48] = BEZHEV,
  90.     [49] = WHITE,
  91.     [50] = GREY,
  92.     [51] = GREEN,
  93.     [52] = greily(GREEN),
  94.     [53] = BLUE,
  95.     [54] = greily(BLUE),
  96.     [55] = BEZHEV,
  97.     [56] = SEREBRIST,
  98.     [57] = GOLDEN,
  99.     [58] = RED,
  100.     [59] = greily(BLUE),
  101.     [60] = BEZHEV,
  102.     [61] = GOLDEN,
  103.     [62] = RED,
  104.     [63] = WHITE,
  105.     [64] = WHITE,
  106.     [65] = YELLOW,
  107.     [66] = BROWN,
  108.     [67] = GREY,
  109.     [68] = brightly(GOLDEN),
  110.     [69] = BEZHEV,
  111.     [70] = RED,
  112.     [71] = GREY,
  113.     [72] = darkly(GREY),
  114.     [73] = lightly(YELLOW),
  115.     [74] = DARKRED,
  116.     [75] = BLACK,
  117.     [76] = 'светло-бежев',
  118.     [77] = YELLOW,
  119.     [78] = RED,
  120.     [79] = BLUE,
  121.     [80] = PURPURN,
  122.     [81] = 'желто-зелён',
  123.     [82] = RED,
  124.     [83] = 'темно-сер',
  125.     [84] = BROWN,
  126.     [85] = BROWN,
  127.     [86] = GREEN,
  128.     [87] = greily(BLUE),
  129.     [88] = DARKRED,
  130.     [89] = BEZHEV,
  131.     [90] = WHITE,
  132.     [91] = GREY,
  133.     [92] = GREY,
  134.     [93] = AQUA,
  135.     [94] = AQUA,
  136.     [95] = GREY,
  137.     [96] = BEZHEV,
  138.     [97] = SEREBRIST,
  139.     [98] = AQUA,
  140.     [99] = SANDLY,
  141.     [100] = LIGHTBLUE,
  142.     [101] = BLACK,
  143.     [102] = SANDLY,
  144.     [103] = LIGHTBLUE,
  145.     [104] = BEZHEV,
  146.     [105] = GREY,
  147.     [106] = BLUE,
  148.     [107] = GOLDEN,
  149.     [108] = LIGHTBLUE,
  150.     [109] = GREY,
  151.     [110] = SANDLY,
  152.     [111] = SEREBRIST,
  153.     [112] = GREY,
  154.     [113] = BROWN,
  155.     [114] = GREEN,
  156.     [115] = PURPURN,
  157.     [116] = greily(BLUE),
  158.     [117] = RED,
  159.     [118] = WHITENESS,
  160.     [119] = BEZHEV,
  161.     [120] = BEZHEV,
  162.     [121] = DARKRED,
  163.     [122] = GREY,
  164.     [123] = BROWN,
  165.     [124] = RED,
  166.     [125] = BLUE,
  167.     [126] = PURPLE,
  168.     [127] = BLACK,
  169.     [128] = brightly(GREEN),
  170.     [129] = BROWN,
  171.     [130] = AQUA,
  172.     [131] = BROWN,
  173.     [132] = 'красно-коричнев',
  174.     [133] = GREEN,
  175.     [134] = PURPLE,
  176.     [135] = 'кораллов',
  177.     [136] = PURPLE,
  178.     [137] = lightly(GREEN),
  179.     [138] = BEZHEV,
  180.     [139] = lightly(PURPLE),
  181.     [140] = BEZHEV,
  182.     [141] = SANDLY,
  183.     [142] = GOLDEN,
  184.     [143] = PINK,
  185.     [144] = PURPLE,
  186.     [145] = GOLDEN,
  187.     [146] = PURPLE,
  188.     [147] = PURPLE,
  189.     [148] = darkly(GREEN),
  190.     [149] = BROWN,
  191.     [150] = greily(GREEN),
  192.     [151] = GREEN,
  193.     [152] = LIGHTBLUE,
  194.     [153] = GREEN,
  195.     [154] = brightly(GREEN),
  196.     [155] = AQUA,
  197.     [156] = SANDLY,
  198.     [157] = WHITE,
  199.     [158] = ORANGE,
  200.     [159] = BROWN,
  201.     [160] = GREEN,
  202.     [161] = PURPLE,
  203.     [162] = BLUE,
  204.     [163] = AQUA,
  205.     [164] = darkly(GREEN),
  206.     [165] = AQUA,
  207.     [166] = AQUA,
  208.     [167] = PURPLE,
  209.     [168] = PURPLE,
  210.     [169] = PURPLE,
  211.     [170] = PURPLE,
  212.     [171] = PURPLE,
  213.     [172] = 'зелено-золот',
  214.     [173] = BROWN,
  215.     [174] = BROWN,
  216.     [175] = RED,
  217.     [176] = PURPLE,
  218.     [177] = PURPLE,
  219.     [178] = PURPLE,
  220.     [179] = PURPLE,
  221.     [180] = GOLDEN,
  222.     [181] = RED,
  223.     [182] = ORANGE,
  224.     [183] = ORANGE,
  225.     [184] = 'бледно-розов',
  226.     [185] = BEZHEV,
  227.     [186] = darkly(GREEN),
  228.     [187] = darkly(GREEN),
  229.     [188] = GREEN,
  230.     [189] = GREEN,
  231.     [190] = PURPLE,
  232.     [191] = brightly(GREEN),
  233.     [192] = BEZHEV,
  234.     [193] = SEREBRIST,
  235.     [194] = 'лимонн',
  236.     [195] = 'лаймов',
  237.     [196] = 'бледно-жёлт',
  238.     [197] = GOLDEN,
  239.     [198] = 'синеват',
  240.     [199] = 'темно-медн',
  241.     [200] = SANDLY,
  242.     [201] = greily(BLUE),
  243.     [202] = GREEN,
  244.     [203] = greily(BLUE),
  245.     [204] = SEREBRIST,
  246.     [205] = darkly(BLUE),
  247.     [206] = darkly(GREY),
  248.     [207] = GREY,
  249.     [208] = LIGHTBLUE,
  250.     [209] = LIGHTBLUE,
  251.     [210] = greily(BLUE),
  252.     [211] = PURPURN,
  253.     [212] = ORANGE,
  254.     [213] = BEZHEV,
  255.     [214] = 'медн',
  256.     [215] = GREEN,
  257.     [216] = brightly(BEZHEV),
  258.     [217] = lightly(AQUA),
  259.     [218] = lightly(PINK),
  260.     [219] = ORANGE,
  261.     [220] = PURPLE,
  262.     [221] = YELLOW,
  263.     [222] = ORANGE,
  264.     [223] = darkly(BLUE),
  265.     [224] = BROWN,
  266.     [225] = 'медн',
  267.     [226] = 'лаймов',
  268.     [227] = GREEN,
  269.     [228] = YELLOW,
  270.     [229] = GREEN,
  271.     [230] = DARKRED,
  272.     [231] = SANDLY,
  273.     [232] = PURPLE,
  274.     [233] = PURPLE,
  275.     [234] = GREEN,
  276.     [235] = GREEN,
  277.     [236] = bluely(GREEN),
  278.     [237] = PURPLE,
  279.     [238] = SANDLY,
  280.     [239] = ORANGE,
  281.     [240] = AQUA,
  282.     [241] = 'лаймов',
  283.     [242] = PURPURN,
  284.     [243] = brightly(GREEN),
  285.     [244] = BROWN,
  286.     [245] = GREEN,
  287.     [246] = LIGHTBLUE,
  288.     [247] = GREY,
  289.     [248] = RED,
  290.     [249] = DARKRED,
  291.     [250] = DARKRED,
  292.     [251] = GREY,
  293.     [252] = GREY,
  294.     [253] = BEZHEV,
  295.     [254] = GREY,
  296.     [255] = GREY
  297. }
  298. local tCarsName = {
  299.     'Лэндсталкер',
  300.     'Бравура',
  301.     'Буффало',
  302.     'Лайнраннер',
  303.     'Перрениал',
  304.     'Сентинел',
  305.     'Дампер',
  306.     'Пожарная машина',
  307.     'Trashmaster',
  308.     'Лимузин',
  309.     'Манана',
  310.     'Инфернус',
  311.     'Вуду',
  312.     'Пони',
  313.     'Мул',
  314.     'Читах',
  315.     'Скорая',
  316.     'Левиафан',
  317.     'Мунбим',
  318.     'Эсперанто',
  319.     'Такси',
  320.     'Вашингтон',
  321.     'Бобкэт',
  322.     'Вуп',
  323.     'БФИнжекшн',
  324.     'Хантер',
  325.     'Премьер',
  326.     'Энфорсер',
  327.     'Секьюркар',
  328.     'Баньши',
  329.     'Предатор',
  330.     'Автобус',
  331.     'Танк',
  332.     'Барракс',
  333.     'Хоткнайф',
  334.     'Трейлер',
  335.     'Превион',
  336.     'Автобус',
  337.     'Такси',
  338.     'Сталлион',
  339.     'Румпо',
  340.     'RCBandit',
  341.     'Ромеро',
  342.     'Пэкер',
  343.     'Монстер',
  344.     'Адмирал',
  345.     'Скуало',
  346.     'Сиспэрроу',
  347.     'Пиццабой',
  348.     'Трамвай',
  349.     'Трэйлер',
  350.     'Туризмо',
  351.     'Спидир',
  352.     'Риивир',
  353.     'Тропик',
  354.     'Флэтбед',
  355.     'Янки',
  356.     'Кэдди',
  357.     'Солар',
  358.     "Berkley'sRCVan",
  359.     'Скиммер',
  360.     'PCJ-600',
  361.     'мопед',
  362.     'Фривей',
  363.     'RCBaron',
  364.     'RCRaider',
  365.     'Глендэйл',
  366.     'Ошеаник',
  367.     'Санчез',
  368.     'Спэрроу',
  369.     'Патриот',
  370.     'Квадроцикл',
  371.     'Coastguard',
  372.     'Динги',
  373.     'Хермес',
  374.     'Сабре',
  375.     'Растлер',
  376.     'ZR-350',
  377.     'Валтон',
  378.     'Регина',
  379.     'Комет',
  380.     'BMX',
  381.     'Буррито',
  382.     'Кэмпер',
  383.     'Макрис',
  384.     'Baggage',
  385.     'Dozer',
  386.     'Маверик',
  387.     'NewsChopper',
  388.     'Ранчер',
  389.     'FBIRancher',
  390.     'Вирго',
  391.     'Гринвуд',
  392.     'Jetmax',
  393.     'Хотринг',
  394.     'Сэндкинг',
  395.     'Блиста',
  396.     'PoliceMaverick',
  397.     'Боксвилль',
  398.     'Бенсон',
  399.     'Меса',
  400.     'RCGoblin',
  401.     'Хотринг',
  402.     'Хотринг',
  403.     'BloodringBanger',
  404.     'Рэнчер',
  405.     'SuperGT',
  406.     'Элегант',
  407.     'Journey',
  408.     'Bike',
  409.     'MountainBike',
  410.     'Beagle',
  411.     'Cropduster',
  412.     'Stunt',
  413.     'Tanker',
  414.     'Roadtrain',
  415.     'Небула',
  416.     'Маджестик',
  417.     'Буканнер',
  418.     'Шамал',
  419.     'hydra',
  420.     'FCR-900',
  421.     'NRG-500',
  422.     'HPV1000',
  423.     'CementTruck',
  424.     'Эвакуатор',
  425.     'Фортуна',
  426.     'Кадрона',
  427.     'FBITruck',
  428.     'Willard',
  429.     'Forklift',
  430.     'Tractor',
  431.     'Combine',
  432.     'Feltzer',
  433.     'Ремингтон',
  434.     'Сламвэн',
  435.     'Блейд',
  436.     'Freight',
  437.     'Streak',
  438.     'Vortex',
  439.     'Vincent',
  440.     'Bullet',
  441.     'Clover',
  442.     'Sadler',
  443.     'Firetruck',
  444.     'Hustler',
  445.     'Intruder',
  446.     'Primo',
  447.     'Cargobob',
  448.     'Tampa',
  449.     'Sunrise',
  450.     'Merit',
  451.     'Utility',
  452.     'Nevada',
  453.     'Йосемэйт',
  454.     'Виндсор',
  455.     'Monster',
  456.     'Monster',
  457.     'Уранус',
  458.     'Джестер',
  459.     'Султан',
  460.     'Стратум',
  461.     'Элегия',
  462.     'Рэйнденс',
  463.     'RCTiger',
  464.     'Флеш',
  465.     'Тахома',
  466.     'Savanna',
  467.     'Bandito',
  468.     'FreightFlat',
  469.     'StreakCarriage',
  470.     'Kart',
  471.     'Mower',
  472.     'Dune',
  473.     'Sweeper',
  474.     'Broadway',
  475.     'Tornado',
  476.     'AT-400',
  477.     'DFT-30',
  478.     'Хантли',
  479.     'Stafford',
  480.     'BF-400',
  481.     'NewsVan',
  482.     'Tug',
  483.     'Трейлер',
  484.     'Emperor',
  485.     'Wayfarer',
  486.     'Euros',
  487.     'Hotdog',
  488.     'Club',
  489.     'FreightBox',
  490.     'Trailer',
  491.     'Andromada',
  492.     'Dodo',
  493.     'RCCam',
  494.     'Launch',
  495.     'Машина ЛСПД',
  496.     'Машина СФПД',
  497.     'Машина ЛВПД',
  498.     'Полицейский рейнджер',
  499.     'Пикадор',
  500.     'S.W.A.T',
  501.     'Альфа',
  502.     'Феникс',
  503.     'GlendaleShit',
  504.     'SadlerShit',
  505.     'Luggage A',
  506.     'Luggage B',
  507.     'Stairs',
  508.     'Боксвиль',
  509.     'Tiller',
  510.     'UtilityTrailer'
  511. }
  512. function getVehName(veh)
  513.     if veh == nil or not doesVehicleExist(veh) then
  514.         return 'Nil'
  515.     end
  516.     return tCarsName[getCarModel(veh) - 399]
  517. end
  518. function getVehColorName(veh)
  519.     local colorId, _ = getCarColours(veh)
  520.     if colorNames[colorId] == nil then
  521.         sampAddChatMessage(string.format('неопозанный цвет %s', colorId), 5)
  522.         return 'неопознанного'
  523.     end
  524.     local colorName = colorNames[colorId]
  525.     if string.find(colorName, BLUE) then
  526.         return colorName .. 'его'
  527.     else
  528.         return colorName .. 'ого'
  529.     end
  530. end
  531. local excludedCars = {[591] = true, [435] = true, [584] = true}
  532. function getNearVeh(X, Y, Z)
  533.     local closestVeh, lastMinDist
  534.     local allVehicles = getAllVehicles()
  535.     for _, veh in ipairs(allVehicles) do
  536.         local distance = getDistanceBetweenCoords3d(X, Y, Z, getCarCoordinates(veh))
  537.         local vehModel = getCarModel(veh)
  538.         if
  539.             not isCharInCar(PLAYER_PED, veh) and (lastMinDist == nil or distance < lastMinDist) and
  540.                 excludedCars[vehModel] == nil
  541.          then
  542.             lastMinDist, closestVeh = distance, veh
  543.         end
  544.     end
  545.     return closestVeh
  546. end
  547. registerVariable(
  548.     'nearveh',
  549.     'возвращает ближайший транспорт (не ваш)',
  550.     function()
  551.         local closestVeh = getNearVeh(getCharCoordinates(PLAYER_PED))
  552.         if closestVeh ~= nil then
  553.             getVehName(closestVeh)
  554.         else
  555.             return 'Транспорт'
  556.         end
  557.     end
  558. )
  559.  
  560. registerVariable(
  561.     'nearvehcolor',
  562.     'возвращает цвет ближайшего транспорта (не ваш)',
  563.     function()
  564.         local veh = getNearVeh(getCharCoordinates(PLAYER_PED))
  565.         if veh == nil then
  566.             return ''
  567.         end
  568.         return getVehColorName(veh)
  569.     end
  570. )
  571.  
  572. local IsChoosingVehicle = false
  573. local TargetVehicle = nil
  574. local TargetVehicleIndex = 1
  575. local NearVehicles = {}
  576. local BlipForTargetVehicle = nil
  577.  
  578. local _VehSelectionTime = 0
  579. function getVehDriverSampId(veh)
  580.     if not doesVehicleExist(veh) then
  581.         return -1
  582.     end
  583.     local driverPed = getDriverOfCar(veh)
  584.     if doesCharExist(driverPed) then
  585.         local _, driverId = sampGetPlayerIdByCharHandle(driverPed)
  586.         return driverId
  587.     end
  588.     return -1
  589. end
  590. function go()
  591.     repeat
  592.         wait(100)
  593.     until isPlayerPlaying(PLAYER_PED)
  594.  
  595.     function endSelectTarget()
  596.         if doesVehicleExist(TargetVehicle) then
  597.             local driverId = getVehDriverSampId(TargetVehicle)
  598.             if driverId ~= -1 then
  599.                 sampAddChatMessage(
  600.                     'Выбран альтернативный транспорт: ' .. getVehName(TargetVehicle) .. ' SA-' .. driverId,
  601.                     0xd3d3d3
  602.                 )
  603.             else
  604.                 sampAddChatMessage(
  605.                     'Выбран альтернативный транспорт без водителя: ' .. getVehName(TargetVehicle),
  606.                     0x6495ed
  607.                 )
  608.             end
  609.             removeBlip(BlipForTargetVehicle)
  610.         else
  611.             sampAddChatMessage('Выбран неверный транспорт', 0x6495ed)
  612.         end
  613.         IsChoosingVehicle = false
  614.     end
  615.     while true do
  616.         if IsChoosingVehicle and localClock() - _VehSelectionTime > 3 then
  617.             endSelectTarget()
  618.             _VehSelectionTime = localClock()
  619.         end
  620.         local mouseWheel = getMousewheelDelta()
  621.         local isChanged = false
  622.         if isKeyJustPressed(0x04) then
  623.             if IsChoosingVehicle then
  624.                 endSelectTarget()
  625.             else
  626.                 if doesVehicleExist(TargetVehicle) then
  627.                     BlipForTargetVehicle = addBlipForCar(TargetVehicle)
  628.                 end
  629.                 for k in pairs(NearVehicles) do
  630.                     NearVehicles[k] = nil
  631.                 end
  632.  
  633.                 local i = 1
  634.                 for _, veh in ipairs(getAllVehicles()) do
  635.                     if doesVehicleExist(veh) and veh ~= nil then
  636.                         NearVehicles[i] = veh
  637.                         i = i + 1
  638.                     end
  639.                 end
  640.                 TargetVehicleIndex = 1
  641.                 local px, py = getCharCoordinates(PLAYER_PED)
  642.                 table.sort(
  643.                     NearVehicles,
  644.                     function(v1, v2)
  645.                         local x1, y1 = getCarCoordinates(v1)
  646.                         local x2, y2 = getCarCoordinates(v2)
  647.                         return getDistanceBetweenCoords2d(x1, y1, px, py) > getDistanceBetweenCoords2d(x2, y2, px, py)
  648.                     end
  649.                 )
  650.  
  651.                 if table.getn(NearVehicles) ~= 0 then
  652.                     sampAddChatMessage(
  653.                         'Выбираем транспорт (Колесико мыши вверх - дальше, вниз - ближе). Всего транспорта: ' ..
  654.                             table.getn(NearVehicles),
  655.                         -1
  656.                     )
  657.                     _VehSelectionTime = localClock()
  658.                     IsChoosingVehicle = true
  659.                 else
  660.                     sampAddChatMessage('Нет транспорта по близости', 0xd3d3d3)
  661.                 end
  662.             end
  663.         end
  664.         if mouseWheel > 0 then
  665.             _VehSelectionTime = localClock()
  666.             if IsChoosingVehicle then
  667.                 isChanged = true
  668.                 if TargetVehicleIndex == 1 then
  669.                     TargetVehicleIndex = table.getn(NearVehicles)
  670.                 else
  671.                     TargetVehicleIndex = TargetVehicleIndex - 1
  672.                 end
  673.             end
  674.         end
  675.         if mouseWheel < 0 then
  676.             _VehSelectionTime = localClock()
  677.             if IsChoosingVehicle then
  678.                 isChanged = true
  679.                 if TargetVehicleIndex == table.getn(NearVehicles) then
  680.                     TargetVehicleIndex = 1
  681.                 else
  682.                     TargetVehicleIndex = TargetVehicleIndex + 1
  683.                 end
  684.             end
  685.         end
  686.  
  687.         if isChanged then
  688.             if doesBlipExist(BlipForTargetVehicle) then
  689.                 removeBlip(BlipForTargetVehicle)
  690.             end
  691.  
  692.             TargetVehicle = NearVehicles[TargetVehicleIndex]
  693.             if TargetVehicle == nil or not doesVehicleExist(TargetVehicle) then
  694.                 sampAddChatMessage('Выбранный транспорт более недоступен', 0xd3d3d3)
  695.                 TargetVehicleIndex = 1
  696.             else
  697.                 BlipForTargetVehicle = addBlipForCar(TargetVehicle)
  698.                 local driverId = getVehDriverSampId(TargetVehicle)
  699.                 local distance =
  700.                     math.ceil(
  701.                     getDistanceBetweenCoords3d(getCarCoordinates(TargetVehicle), getCharCoordinates(PLAYER_PED))
  702.                 ) .. 'м.'
  703.                 if driverId ~= -1 then
  704.                     sampAddChatMessage(getVehName(TargetVehicle) .. ' SA-' .. driverId .. ' ' .. distance, -1)
  705.                 else
  706.                     sampAddChatMessage(getVehName(TargetVehicle) .. ' ' .. distance, -1)
  707.                 end
  708.             end
  709.         end
  710.         wait(0)
  711.     end
  712. end
  713. registerVariable(
  714.     'alttargetvehname',
  715.     'возвращает название транспорта альтернативного таргета',
  716.     function()
  717.         if doesVehicleExist(TargetVehicle) then
  718.             return getVehName(TargetVehicle)
  719.         else
  720.             return ''
  721.         end
  722.     end
  723. )
  724. registerVariable(
  725.     'alttargetvehcolor',
  726.     'возвращает название транспорта альтернативного таргета',
  727.     function()
  728.         if doesVehicleExist(TargetVehicle) then
  729.             return getVehColorName(TargetVehicle)
  730.         else
  731.             return ''
  732.         end
  733.     end
  734. )
  735. registerVariable(
  736.     'alttargetvehdriverid',
  737.     'возвращает название транспорта альтернативного таргета',
  738.     function()
  739.         if doesVehicleExist(TargetVehicle) then
  740.             return getVehDriverSampId(TargetVehicle)
  741.         else
  742.             return ''
  743.         end
  744.     end
  745. )
  746. lua_thread.create(go)
  747.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement