vermillion_settings

SainixTeleport Decompiled

Dec 14th, 2019
2,246
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 64.16 KB | None | 0 0
  1. script_version("12.12.2019")
  2. require("lib.sampfuncs")
  3. require("lib.moonloader")
  4.  
  5. slot0 = require("memory")
  6. slot1 = require("vkeys")
  7. slot2 = require("lib.samp.events")
  8. slot3 = 0
  9. slot4 = 0
  10. slot5 = 0
  11. slot6 = 0
  12. slot7 = 0
  13. resCap = 0
  14. slot8 = " 11.12.2019"
  15. slot9 = require("imgui")
  16. slot10 = require("samp.events")
  17. slot11, slot12 = pcall(import, "imgui_notf.lua")
  18. slot13 = require("lib.samp.events")
  19. slot14 = require("lib.samp.events")
  20. slot15 = require("vector3d")
  21. slot17 = false
  22. slot18 = false
  23. slot19 = 1.9
  24. slot20 = require("samp.events")
  25. gmped = false
  26. gmcar = false
  27. slot21 = require("lib.samp.events")
  28. slot22 = slot9.ImBool(false)
  29. slot23 = slot9.ImBool(false)
  30. slot24 = 34
  31. slot25 = false
  32. slot26 = false
  33. slot28 = 0
  34. slot29 = 0
  35. slot30 = {
  36.     _DESCRIPTION = "Http s1xreq made simpler",
  37.     http_socket = http_socket,
  38.     https_socket = https_socket,
  39.     HTTPDigestAuth = function (slot0, slot1)
  40.         return {
  41.             _type = "digest",
  42.             user = slot0,
  43.             password = slot1
  44.         }
  45.     end,
  46.     HTTPBasicAuth = function (slot0, slot1)
  47.         return {
  48.             _type = "basic",
  49.             user = slot0,
  50.             password = slot1
  51.         }
  52.     end,
  53.     post = function (slot0, slot1)
  54.         return uv0.request("POST", slot0, slot1)
  55.     end,
  56.     get = function (slot0, slot1)
  57.         return uv0.request("GET", slot0, slot1)
  58.     end,
  59.     delete = function (slot0, slot1)
  60.         return uv0.request("DELETE", slot0, slot1)
  61.     end,
  62.     patch = function (slot0, slot1)
  63.         return uv0.request("PATCH", slot0, slot1)
  64.     end,
  65.     put = function (slot0, slot1)
  66.         return uv0.request("PUT", slot0, slot1)
  67.     end,
  68.     options = function (slot0, slot1)
  69.         return uv0.request("OPTIONS", slot0, slot1)
  70.     end,
  71.     head = function (slot0, slot1)
  72.         return uv0.request("HEAD", slot0, slot1)
  73.     end,
  74.     trace = function (slot0, slot1)
  75.         return uv0.request("TRACE", slot0, slot1)
  76.     end,
  77.     request = function (slot0, slot1, slot2)
  78.         slot3 = nil
  79.  
  80.         if type(slot1) == "table" then
  81.             slot3 = slot1
  82.         else
  83.             slot2 or {}.url = slot1
  84.         end
  85.  
  86.         slot3.method = slot0
  87.  
  88.         uv0.parse_args(slot3)
  89.  
  90.         if slot3.auth and slot3.auth._type == "digest" then
  91.             return uv0.use_digest(uv0.make_request(slot3), slot3)
  92.         else
  93.             return uv0.make_request(slot3)
  94.         end
  95.     end
  96. }
  97. slot31 = {
  98.     make_request = function (slot0)
  99.         slot4 = nil
  100.         slot4, ({
  101.             text = table.concat(slot1),
  102.             json = function ()
  103.                 return uv0.decode(uv1.text)
  104.             end,
  105.             xml = function ()
  106.                 return uv0.load(uv1.text)
  107.             end
  108.         })["status_code"], ()["headers"], ()["status"] = string.find(({
  109.             method = slot0.method,
  110.             url = slot0.url,
  111.             headers = slot0.headers,
  112.             source = uv0.source.string(slot0.data),
  113.             sink = uv0.sink.table(slot1),
  114.             redirect = slot0.allow_redirects,
  115.             proxy = slot0.proxy
  116.         })["url"], "^https:") and not slot0.proxy and uv1 or uv2.request(slot2)
  117.  
  118.         assert(slot4, "error in " .. slot0.method .. " request: " .. ()["status_code"])
  119.  
  120.         return
  121.     end,
  122.     parse_args = function (slot0)
  123.         uv0.check_url(slot0)
  124.         uv0.check_data(slot0)
  125.         uv0.create_header(slot0)
  126.         uv0.check_timeout(slot0.timeout)
  127.         uv0.check_redirect(slot0.allow_redirects)
  128.     end,
  129.     format_params = function (slot0, slot1)
  130.         if not slot1 or next(slot1) == nil then
  131.             return slot0
  132.         end
  133.  
  134.         slot0 = slot0 .. "?"
  135.  
  136.         for slot5, slot6 in pairs(slot1) do
  137.             if tostring(slot6) then
  138.                 slot0 = slot0 .. tostring(slot5) .. "="
  139.  
  140.                 if type(slot6) == "table" then
  141.                     slot7 = ""
  142.  
  143.                     for slot11, slot12 in ipairs(slot6) do
  144.                         slot7 = slot7 .. tostring(slot12) .. ","
  145.                     end
  146.  
  147.                     slot0 = slot0 .. slot7:sub(0, -2)
  148.                 else
  149.                     slot0 = slot0 .. tostring(slot6)
  150.                 end
  151.  
  152.                 slot0 = slot0 .. "&"
  153.             end
  154.         end
  155.  
  156.         return slot0:sub(0, -2)
  157.     end,
  158.     check_url = function (slot0)
  159.         assert(slot0.url, "No url specified for request")
  160.  
  161.         slot0.url = uv0.format_params(slot0.url, slot0.params)
  162.     end,
  163.     create_header = function (slot0)
  164.         slot0.headers = slot0.headers or {}
  165.         slot0.headers["Content-Length"] = slot0.data:len()
  166.  
  167.         if slot0.cookies then
  168.             if slot0.headers.cookie then
  169.                 slot0.headers.cookie = slot0.headers.cookie .. "; " .. slot0.cookies
  170.             else
  171.                 slot0.headers.cookie = slot0.cookies
  172.             end
  173.         end
  174.  
  175.         if slot0.auth then
  176.             uv0.add_auth_headers(slot0)
  177.         end
  178.     end,
  179.     check_data = function (slot0)
  180.         slot0.data = slot0.data or ""
  181.  
  182.         if type(slot0.data) == "table" then
  183.             slot0.data = uv0.encode(slot0.data)
  184.         end
  185.     end,
  186.     check_timeout = function (slot0)
  187.         uv0.TIMEOUT = slot0 or 5
  188.         uv1.TIMEOUT = slot0 or 5
  189.     end,
  190.     check_redirect = function (slot0)
  191.         if slot0 and type(slot0) ~= "boolean" then
  192.             error("allow_redirects expects a boolean value. received type = " .. type(slot0))
  193.         end
  194.     end,
  195.     basic_auth_header = function (slot0)
  196.         slot0.headers.Authorization = "Basic " .. uv0.encode(slot0.auth.user .. ":" .. slot0.auth.password)
  197.     end,
  198.     digest_create_header_string = function (slot0)
  199.         slot1 = ""
  200.         slot1 = "Digest username=\"" .. slot0.user .. "\", realm=\"" .. slot0.realm .. "\", nonce=\"" .. slot0.nonce .. "\", uri=\"" .. slot0.uri .. "\", qop=" .. slot0.qop .. ", nc=" .. slot0.nc .. ", cnonce=\"" .. slot0.cnonce .. "\", response=\"" .. slot0.response .. "\""
  201.  
  202.         if slot0.opaque then
  203.             slot1 = slot1 .. ", opaque=\"" .. slot0.opaque .. "\""
  204.         end
  205.  
  206.         return slot1
  207.     end,
  208.     digest_hash_response = function (slot0)
  209.         return uv0(uv0(slot0.user, slot0.realm, slot0.password), slot0.nonce, slot0.nc, slot0.cnonce, slot0.qop, uv0(slot0.method, slot0.uri))
  210.     end,
  211.     digest_auth_header = function (slot0)
  212.         if not slot0.auth.nonce then
  213.             return
  214.         end
  215.  
  216.         slot0.auth.cnonce = slot0.auth.cnonce or string.format("%08x", os.time())
  217.         slot0.auth.nc_count = slot0.auth.nc_count or 0
  218.         slot0.auth.nc_count = slot0.auth.nc_count + 1
  219.         slot0.auth.nc = string.format("%08x", slot0.auth.nc_count)
  220.         slot0.auth.uri = uv0.build({
  221.             path = uv0.parse(slot0.url).path,
  222.             query = uv0.parse(slot0.url).query
  223.         })
  224.         slot0.auth.method = slot0.method
  225.         slot0.auth.qop = "auth"
  226.         slot0.auth.response = uv1.digest_hash_response(slot0.auth)
  227.         slot0.headers.Authorization = uv1.digest_create_header_string(slot0.auth)
  228.     end,
  229.     use_digest = function (slot0, slot1)
  230.         if slot0.status_code == 401 then
  231.             uv0.parse_digest_response_header(slot0, slot1)
  232.             uv0.create_header(slot1)
  233.  
  234.             uv0.make_request(slot1).auth = slot1.auth
  235.             uv0.make_request(slot1).cookies = slot1.headers.cookie
  236.  
  237.             return uv0.make_request(slot1)
  238.         else
  239.             slot0.auth = slot1.auth
  240.             slot0.cookies = slot1.headers.cookie
  241.  
  242.             return slot0
  243.         end
  244.     end,
  245.     parse_digest_response_header = function (slot0, slot1)
  246.         for slot5, slot6 in slot0.headers["www-authenticate"]:gmatch("(%w+)=\"(%S+)\"") do
  247.             slot1.auth[slot5] = slot6
  248.         end
  249.  
  250.         if slot1.headers.cookie then
  251.             slot1.headers.cookie = slot1.headers.cookie .. "; " .. slot0.headers["set-cookie"]
  252.         else
  253.             slot1.headers.cookie = slot0.headers["set-cookie"]
  254.         end
  255.  
  256.         slot1.auth.nc_count = 0
  257.     end,
  258.     add_auth_headers = function (slot0)
  259.         ({
  260.             basic = uv0.basic_auth_header,
  261.             digest = uv0.digest_auth_header
  262.         })[slot0.auth._type](slot0)
  263.     end
  264. }
  265. slot32 = require("ffi")
  266. slot33 = require("lib.encoding")
  267. slot34 = false
  268. waitaenter = slot9.ImInt(0)
  269. slot35 = slot9.ImInt(1)
  270. inputID = slot9.ImBuffer(4096)
  271. slot36 = slot9.ImBool(false)
  272. slot37 = slot9.ImBool(false)
  273. slot38 = slot9.ImBool(false)
  274. slot39 = slot9.ImBool(false)
  275. slot40 = slot9.ImBool(false)
  276. slot41 = require("samp.events")
  277. slot42 = slot9.ImBool(false)
  278. slot43 = slot9.ImBool(false)
  279. slot44 = slot9.ImBool(false)
  280. slot45 = slot9.ImBool(false)
  281. slot46 = slot9.ImBool(false)
  282. slot47 = slot9.ImBool(false)
  283. slot48 = 0
  284. slot49, slot50 = nil
  285.  
  286. slot9.SwitchContext()
  287.  
  288. slot51 = slot9.GetStyle()
  289. slot33.default = "CP1251"
  290. cp1251 = slot33.CP1251
  291. u8 = slot33.UTF8
  292. slot56 = slot9.ImBuffer(u8("0"), 1000)
  293. slot57 = slot9.ImBuffer(u8("0"), 1002)
  294. slot58 = slot9.ImBuffer(u8("0"), 1001)
  295. slot59 = slot9.ImBuffer(u8("0"), 1003)
  296. slot60 = slot9.ImBuffer(u8("0"), 1004)
  297. slot61 = slot9.ImBool(false)
  298. waitavtonazatietwo = slot9.ImInt(250)
  299. slot51.WindowPadding = slot55(15, 15)
  300. slot51.WindowRounding = 6
  301. slot51.FramePadding = slot55(5, 5)
  302. slot51.FrameRounding = 4
  303. slot51.ItemSpacing = slot55(12, 8)
  304. slot51.ItemInnerSpacing = slot55(8, 6)
  305. slot51.IndentSpacing = 25
  306. slot51.ScrollbarSize = 15
  307. slot51.ScrollbarRounding = 9
  308. slot51.GrabMinSize = 5
  309. slot51.GrabRounding = 3
  310. slot51.Colors[slot9.Col.Text] = slot54(0.8, 0.8, 0.83, 1)
  311. slot51.Colors[slot9.Col.TextDisabled] = slot54(0.24, 0.23, 0.29, 1)
  312. slot51.Colors[slot9.Col.WindowBg] = slot54(0.06, 0.05, 0.07, 1)
  313. slot51.Colors[slot9.Col.ChildWindowBg] = slot54(0.07, 0.07, 0.09, 1)
  314. slot51.Colors[slot9.Col.PopupBg] = slot54(0.07, 0.07, 0.09, 1)
  315. slot51.Colors[slot9.Col.Border] = slot54(0.8, 0.8, 0.83, 0.88)
  316. slot51.Colors[slot9.Col.BorderShadow] = slot54(0.92, 0.91, 0.88, 0)
  317. slot51.Colors[slot9.Col.FrameBg] = slot54(0.1, 0.09, 0.12, 1)
  318. slot51.Colors[slot9.Col.FrameBgHovered] = slot54(0.24, 0.23, 0.29, 1)
  319. slot51.Colors[slot9.Col.FrameBgActive] = slot54(0.56, 0.56, 0.58, 1)
  320. slot51.Colors[slot9.Col.TitleBg] = slot54(0.76, 0.31, 0, 1)
  321. slot51.Colors[slot9.Col.TitleBgCollapsed] = slot54(1, 0.98, 0.95, 0.75)
  322. slot51.Colors[slot9.Col.TitleBgActive] = slot54(0.8, 0.33, 0, 1)
  323. slot51.Colors[slot9.Col.MenuBarBg] = slot54(0.3, 0.2, 0.39, 0.57)
  324. slot51.Colors[slot9.Col.ScrollbarBg] = slot54(0.3, 0.2, 0.39, 1)
  325. slot51.Colors[slot9.Col.ScrollbarGrab] = slot54(0.41, 0.19, 0.63, 0.31)
  326. slot51.Colors[slot9.Col.ScrollbarGrabHovered] = slot54(0.41, 0.19, 0.63, 0.78)
  327. slot51.Colors[slot9.Col.ScrollbarGrabActive] = slot54(0.41, 0.19, 0.63, 1)
  328. slot51.Colors[slot9.Col.ComboBg] = slot54(0.3, 0.2, 0.39, 1)
  329. slot51.Colors[slot9.Col.CheckMark] = slot54(0.56, 0.61, 1, 1)
  330. slot51.Colors[slot9.Col.SliderGrab] = slot54(0.41, 0.19, 0.63, 0.24)
  331. slot51.Colors[slot9.Col.SliderGrabActive] = slot54(0.41, 0.19, 0.63, 1)
  332. slot51.Colors[slot9.Col.Button] = slot54(0.41, 0.19, 0.63, 0.44)
  333. slot51.Colors[slot9.Col.ButtonHovered] = slot54(0.41, 0.19, 0.63, 0.86)
  334. slot51.Colors[slot9.Col.ButtonActive] = slot54(0.64, 0.33, 0.94, 1)
  335. slot51.Colors[slot9.Col.Header] = slot54(0.41, 0.19, 0.63, 0.76)
  336. slot51.Colors[slot9.Col.HeaderHovered] = slot54(0.41, 0.19, 0.63, 0.86)
  337. slot51.Colors[slot9.Col.HeaderActive] = slot54(0.41, 0.19, 0.63, 1)
  338. slot51.Colors[slot9.Col.ResizeGrip] = slot54(0.41, 0.19, 0.63, 0.2)
  339. slot51.Colors[slot9.Col.ResizeGripHovered] = slot54(0.41, 0.19, 0.63, 0.78)
  340. slot51.Colors[slot9.Col.ResizeGripActive] = slot54(0.41, 0.19, 0.63, 1)
  341. slot51.Colors[slot9.Col.CloseButton] = slot54(1, 1, 1, 0.75)
  342. slot51.Colors[slot9.Col.CloseButtonHovered] = slot54(0.88, 0.74, 1, 0.59)
  343. slot51.Colors[slot9.Col.CloseButtonActive] = slot54(0.88, 0.85, 0.92, 1)
  344. slot51.Colors[slot9.Col.PlotLines] = slot54(0.89, 0.85, 0.92, 0.63)
  345. slot51.Colors[slot9.Col.PlotLinesHovered] = slot54(0.41, 0.19, 0.63, 1)
  346. slot51.Colors[slot9.Col.PlotHistogram] = slot54(0.89, 0.85, 0.92, 0.63)
  347. slot51.Colors[slot9.Col.PlotHistogramHovered] = slot54(0.41, 0.19, 0.63, 1)
  348. slot51.Colors[slot9.Col.TextSelectedBg] = slot54(0.41, 0.19, 0.63, 0.43)
  349. slot51.Colors[slot9.Col.ModalWindowDarkening] = slot54(0.2, 0.2, 0.2, 0.35)
  350.  
  351. function ShowHelpMarker(slot0)
  352.     uv0.TextDisabled("(?)")
  353.  
  354.     if uv0.IsItemHovered() then
  355.         uv0.BeginTooltip()
  356.         uv0.PushTextWrapPos(450)
  357.         uv0.TextUnformatted(slot0)
  358.         uv0.PopTextWrapPos()
  359.         uv0.EndTooltip()
  360.     end
  361. end
  362.  
  363. function ShowMessageMarker(slot0)
  364.     uv0.TextDisabled("(!)")
  365.  
  366.     if uv0.IsItemHovered() then
  367.         uv0.BeginTooltip()
  368.         uv0.PushTextWrapPos(1000)
  369.         uv0.TextUnformatted(slot0)
  370.         uv0.PopTextWrapPos()
  371.         uv0.EndTooltip()
  372.     end
  373. end
  374.  
  375. function slot9.OnDrawFrame()
  376.     if uv0.v then
  377.         uv1.SetNextWindowSize(uv1.ImVec2(500, 500), uv1.Cond.FirstUseEver)
  378.  
  379.         slot0, slot1 = getScreenResolution()
  380.  
  381.         uv1.SetNextWindowPos(uv1.ImVec2(slot0 / 2, slot1 / 2), uv1.Cond.FirstUseEver, uv1.ImVec2(0.5, 0.5))
  382.         uv1.Begin(u8("Лучший Cracked. от SK-Tim") .. uv2, uv0, uv1.WindowFlags.NoResize or uv1.WindowFlags.NoCollapse or uv1.WindowFlags.NoSavedSettings)
  383.         uv1.Columns(2, NULL, false)
  384.         uv1.SetColumnOffset(1, 500)
  385.         uv1.RadioButton(u8(" Последнее обновление: 08.12.2019"), uv3, 1)
  386.  
  387.         if uv1.CollapsingHeader(u8("Помощь в ловле")) then
  388.             uv1.Checkbox(u8("Коллизия"), uv4)
  389.             ShowHelpMarker(u8("Функция позволяет проходить без проблем через людей (не работает на машины, объекты и прочее)."), uv1.SameLine())
  390.             uv1.Checkbox(u8("Только цифры"), uv5)
  391.             ShowHelpMarker(u8("В диалог капчи с включённой функией возможно будет ввести только цифры."), uv1.SameLine())
  392.             uv1.Checkbox(u8("Только 5 цифр"), uv6)
  393.             ShowHelpMarker(u8("Ограничение символов в диалоге капчи."), uv1.SameLine())
  394.             uv1.Checkbox(u8("АвтоНажатие \"N\""), uv7)
  395.             ShowHelpMarker(u8("Автоматически нажимает клавишу: \"N\", когда дом/бизнес слетает (поиск осуществляется по экрану)."), uv1.SameLine())
  396.             uv1.Text(u8("Введите задержку Auto N"))
  397.             uv1.SliderInt(u8("##2"), waitavtonazatietwo, 0, 1000)
  398.             uv1.Checkbox(u8("АвтоНажатие \"ENTER\""), uv8)
  399.             ShowHelpMarker(u8("Автоматически нажимает клавишу: \"ENTER\", когда в окне капчи есть 5 символов."), uv1.SameLine())
  400.             uv1.Text(u8("Введите задержку Auto Enter"))
  401.             uv1.SliderInt(u8("##3"), waitaenter, 0, 1000)
  402.         end
  403.  
  404.         if uv1.CollapsingHeader(u8("Дополнительные функции")) then
  405.             uv1.Checkbox(u8("Удаление людей"), uv9)
  406.             ShowHelpMarker(u8("Если активен чекбокс, то при нажатии клавиши \"E\" все люди в зоне стрима удалятся."), uv1.SameLine())
  407.             uv1.Checkbox(u8("Удаление машин"), uv10)
  408.             ShowHelpMarker(u8("Если активен чекбокс, то при нажатии клавиши \"R\" все машины в зоне стрима удалятся."), uv1.SameLine())
  409.             ShowMessageMarker(u8("Убирает все автомобили в зоне прорисовки визуально, но хочу предупредить, что после этого пока Вы не покинете данную зону прорисовки - не сможете использовать телепорт по методу \"Surf\"."), uv1.SameLine())
  410.         end
  411.  
  412.         if uv1.CollapsingHeader(u8("ГМ для персонажа и машины")) then
  413.             uv1.RadioButton(u8(" ГМ для персонажа"), uv3, 1)
  414.             uv1.Text(u8("Активация на клавишу `Insert`."))
  415.             uv1.Text(u8("Защищает Вас от падений, пуль, и прочего."))
  416.             uv1.RadioButton(u8(" ГМ для транспорта"), uv3, 1)
  417.             uv1.Text(u8("Активация на клавишу `Home`."))
  418.             uv1.Text(u8("Защищает Ваш транспорт от любых повреждений."))
  419.             uv1.RadioButton(u8(" Подробнее о ГМ"), uv3, 1)
  420.             uv1.Text(u8("Введите в чат: /gm , чтобы узнать больше."))
  421.         end
  422.  
  423.         if uv1.CollapsingHeader(u8("AHK для ловли на Arizona RP Supreme")) then
  424.             uv1.RadioButton(u8(" Активация:"), uv3, 1)
  425.             uv1.Text(u8("Для активации введите: /ahk [задержка 1] [2] [3] [4] [5]"))
  426.             ShowHelpMarker(u8("Пример: /ahk 0 0 0 0 0"), uv1.SameLine())
  427.             uv1.RadioButton(u8(" Моментальная ловля:"), uv3, 1)
  428.             uv1.Text(u8("Для моментальной ловли приедьте заранее к бизнесу."))
  429.             uv1.Text(u8("Направьте камеру на TextDraw слетающего бизнеса бизнеса, ..."))
  430.             uv1.Text(u8("... после чего включите функцию `Auto N` с задержкой 0 и..."))
  431.             uv1.Text(u8("... запустите нулевую задержку для АХК [/ahk 0 0 0 0 0]."))
  432.             uv1.Text(u8("Как только дом или бизнес слетит - скрипт автоматически..."))
  433.             uv1.Text(u8("... нажмёт клавишу `N` и введёт моментально капчу."))
  434.         end
  435.  
  436.         if uv1.CollapsingHeader(u8("Действия после покупки")) then
  437.             ShowHelpMarker(u8("Определение последующих действий после ловли дома."), uv1.SameLine())
  438.             uv1.RadioButton(u8(" Ничего не делать"), uv3, 1)
  439.             uv1.RadioButton(u8(" Отключиться от сервера"), uv3, 2)
  440.         end
  441.  
  442.         if uv1.CollapsingHeader(u8("Телепорты")) then
  443.             uv1.RadioButton(u8(" Surf"), uv3, 1)
  444.             ShowHelpMarker(u8("Моментальный телепорт используя определённый транспорт в зоне стрима."), uv1.SameLine())
  445.  
  446.             if uv1.Button(u8("Телепорт по маркеру (Surf)")) then
  447.                 sampProcessChatInput("/stp")
  448.             end
  449.  
  450.             if uv1.Button(u8("Телепорт по чекпоинту (Surf)")) then
  451.                 sampProcessChatInput("/stpc")
  452.             end
  453.  
  454.             uv1.RadioButton(u8(" Coord"), uv3, 1)
  455.             ShowHelpMarker(u8("Быстрый телепорт используя метод курда (занимает какое-то время)"), uv1.SameLine())
  456.  
  457.             if uv1.Button(u8("Телепорт по маркеру (Coord OnFoot)")) then
  458.                 sampProcessChatInput("/poehali")
  459.             end
  460.  
  461.             if uv1.Button(u8("Телепорт по маркеру (Coord InCar)")) then
  462.                 sampProcessChatInput("/fmincar")
  463.             end
  464.  
  465.             if uv1.Button(u8("Телепорт по чекпоинту (Coord InCar)")) then
  466.                 sampProcessChatInput("/fcincar")
  467.             end
  468.  
  469.             uv1.RadioButton(u8(" Passenger"), uv3, 1)
  470.             ShowHelpMarker(u8("Телепорт через пассажирское место (занимает какое-то время)"), uv1.SameLine())
  471.             ShowMessageMarker(u8("Функция не полностью доработана, поэтому могут быть кики от анти-чита."), uv1.SameLine())
  472.  
  473.             if uv1.Button(u8("Телепорт по маркеру (Passenger)")) then
  474.                 sampProcessChatInput("/fgop")
  475.             end
  476.  
  477.             if uv1.Button(u8("Телепорт по чекпоинту (Passenger)")) then
  478.                 sampProcessChatInput("/fgcp")
  479.             end
  480.  
  481.             uv1.RadioButton(u8(" Команды:"), uv3, 1)
  482.             ShowHelpMarker(u8("Есть дополнительные команды. Пример: тп на дом или бизнес."), uv1.SameLine())
  483.             uv1.Text(u8("Команды и дополнительные методы телепортации"))
  484.             uv1.Text(u8("можно узнать в разделе: `Доп. информация`"))
  485.         end
  486.  
  487.         if uv1.CollapsingHeader(u8("Машины для телепортации (Surf)")) then
  488.             uv1.RadioButton(u8(" ИД машин:"), uv3, 1)
  489.             uv1.Text(u8("478, 430, 446, 452, 453, 473, 472, 454, 407, 406, "))
  490.             uv1.Text(u8("484, 493, 595, 543, 605, 538, 433, 408, 570, 414, "))
  491.             uv1.Text(u8("601, 582, 578, 554, 413, 422, 407, 456, 886, 430, "))
  492.             uv1.Text(u8("469, 449, 482, 483, 535, 600, 544, 270, 269, 490. "))
  493.             uv1.RadioButton(u8(" Названия машин:"), uv3, 1)
  494.             uv1.Text(u8("Fire Truck, Predator, Squallo, Speeder, Reefer,"))
  495.             uv1.Text(u8("Dinghy, DFT-30, Tropic, Marquis, Jetmax, Launch,"))
  496.             uv1.Text(u8("Sadler, Sadler Shit, Train, Barracks, S.W.A.T,"))
  497.             uv1.Text(u8("TrashMaster, Newsvan, CoastGuard, Pony, Mule,"))
  498.             uv1.Text(u8("Yosemite, Bobcat, Yankee, Streak Trailer, Tram,"))
  499.             uv1.Text(u8("Flatbed, Burrito, Camper, Slamvan, Packer,"))
  500.             uv1.Text(u8("Picador, Firetruck LA, Dumper, FBI Rancher."))
  501.             uv1.RadioButton(u8(" Количество машин:"), uv3, 1)
  502.             uv1.Text(u8("В данный момент в методе `Surf`: 40 транспортных средств."))
  503.         end
  504.  
  505.         if uv1.CollapsingHeader(u8("Информация")) then
  506.             uv1.Text(u8("Автор скрипта: Sainix  "))
  507.             ShowMessageMarker(u8("vk.com/roma_chepiga"), uv1.SameLine())
  508.             uv1.Text(u8("АХК для ловли домов на ARZ RP Supreme: dsay "))
  509.             ShowMessageMarker(u8("blast.hk/members/370665/"), uv1.SameLine())
  510.             uv1.Text(u8("Метод телепортации (Surf): Sainix, f0Re3t "))
  511.             ShowMessageMarker(u8("vk.com/roma_chepiga"), uv1.SameLine())
  512.             uv1.Text(u8("Метод телепортации (Coord OnFoot): vova2999 "))
  513.             ShowMessageMarker(u8("blast.hk/members/171651/"), uv1.SameLine())
  514.             uv1.Text(u8("Метод телепортации (Coord InCar): damag "))
  515.             ShowMessageMarker(u8("vk.com/dedsec02"), uv1.SameLine())
  516.             uv1.Text(u8("Метод телепортации (Passenger): pipsqueak "))
  517.             ShowMessageMarker(u8("blast.hk/members/324904/"), uv1.SameLine())
  518.         end
  519.  
  520.         if uv1.CollapsingHeader(u8("Доп. информация")) then
  521.             uv1.RadioButton(u8(" Описание команд:"), uv3, 1)
  522.             uv1.Text(u8("/stph - меню скрипта "))
  523.             uv1.Text(u8("/stp - телепорт на метку (surf) "))
  524.             uv1.Text(u8("/fgop - телепорт на метку (passenger) "))
  525.             uv1.Text(u8("/poehali - телепорт на метку (coord onfoot) "))
  526.             uv1.Text(u8("/fmincar - телепорт на метку (coord incar) "))
  527.             uv1.Text(u8("/fcincar - телепорт на чекпоинт (coord incar) "))
  528.             uv1.Text(u8("/stpc - телепорт на чекпоинт (surf) "))
  529.             uv1.Text(u8("/fgсp - телепорт на чекпоинт (passenger) "))
  530.             uv1.Text(u8("/fh [id] - телепорт на дом (surf) "))
  531.             uv1.Text(u8("/fb [id] - телепорт на бизнес (surf) "))
  532.             uv1.Text(u8("/fhp [id] - телепорт на дом (passenger) "))
  533.             uv1.Text(u8("/fbp [id] - телепорт на бизнес (passenger) "))
  534.             uv1.Text(u8("/ahk - задержка ловли домов на ARZ RP Supreme "))
  535.             uv1.Text(u8("/gm - подробнее о ГМ для персонажа и транспорта "))
  536.         end
  537.  
  538.         uv1.End()
  539.     end
  540. end
  541.  
  542. function ShowMessage(slot0, slot1, slot2)
  543.     uv0.cdef([[
  544.         int MessageBoxA(
  545.             void* hWnd,
  546.             const char* lpText,
  547.             const char* lpCaption,
  548.             unsigned int uType
  549.         );
  550.     ]])
  551.     uv0.C.MessageBoxA(uv0.cast("void*", readMemory(13160328, 4, false)), slot0, slot1, slot2 and slot2 + 327680 or 327680)
  552. end
  553.  
  554. function nopHook(slot0, slot1)
  555.     require("samp.events")[slot0] = function ()
  556.         if uv0 then
  557.             return false
  558.         end
  559.     end
  560. end
  561.  
  562. function slot41.onSendPlayerSync(slot0)
  563.     if Surfing then
  564.         slot0.surfingVehicleId = vehicleId
  565.         slot0.surfingOffsets.x = 0.1
  566.         slot0.surfingOffsets.y = 0.1
  567.         slot0.surfingOffsets.z = 0.1
  568.     end
  569. end
  570.  
  571. function sendPassengerSync(slot0, slot1, slot2)
  572.     slot3 = allocateMemory(24)
  573.     slot4, slot7 = sampGetPlayerIdByCharHandle(PLAYER_PED)
  574.  
  575.     sampStorePlayerPassengerData(slot5, slot3)
  576.     setStructElement(slot3, 2, 1, 1, false)
  577.     setStructFloatElement(slot3, 12, slot0, false)
  578.     setStructFloatElement(slot3, 16, slot1, false)
  579.     setStructFloatElement(slot3, 20, slot2, false)
  580.     sampSendPassengerData(slot3)
  581.     freeMemory(slot3)
  582. end
  583.  
  584. function sendUnoccupiedSyncBySeatId(slot0, slot1, slot2, slot3)
  585.     slot4 = allocateMemory(67)
  586.     slot6, slot15 = sampGetVehicleIdByCarHandle(slot5)
  587.     slot14, slot14, slot14 = getCarRoll(slot5)
  588.  
  589.     setStructElement(slot4, 0, 2, slot7, false)
  590.     setStructElement(slot4, 2, 1, slot3, false)
  591.     setStructFloatElement(slot4, 3, slot8, false)
  592.     setStructFloatElement(slot4, 7, slot9, false)
  593.     setStructFloatElement(slot4, 11, slot10, false)
  594.     setStructFloatElement(slot4, 15, 0.09, false)
  595.     setStructFloatElement(slot4, 19, -0.8, false)
  596.     setStructFloatElement(slot4, 23, 0.02, false)
  597.     setStructFloatElement(slot4, 27, slot0, false)
  598.     setStructFloatElement(slot4, 31, slot1, false)
  599.     setStructFloatElement(slot4, 35, slot2, false)
  600.     setStructFloatElement(slot4, 39, 0.05, false)
  601.     setStructFloatElement(slot4, 43, 0.05, false)
  602.     setStructFloatElement(slot4, 47, 0.05, false)
  603.     setStructFloatElement(slot4, 51, 0.005, false)
  604.     setStructFloatElement(slot4, 55, -0.002, false)
  605.     setStructFloatElement(slot4, 59, 0.3, false)
  606.     setStructElement(slot4, 63, 4, 0, false)
  607.     sampSendUnoccupiedData(slot4)
  608.     freeMemory(slot4)
  609. end
  610.  
  611. function sendInCarFakePosition(slot0, slot1, slot2)
  612.     for slot6 = 0, 2, 1 do
  613.         slot7 = allocateMemory(24)
  614.         slot8, slot11 = sampGetPlayerIdByCharHandle(PLAYER_PED)
  615.  
  616.         sampStorePlayerPassengerData(slot9, slot7)
  617.         freeMemory(slot7)
  618.         sendUnoccupiedSyncBySeatId(slot0, slot1, slot2, getStructElement(slot7, 2, 1, false))
  619.         sendPassengerSync(slot0, slot1, slot2)
  620.     end
  621. end
  622.  
  623. function carTeleport(slot0, slot1, slot2)
  624.     nopHook("onSendPacket", true)
  625.     lockPlayerControl(false)
  626.     coordmaster(slot0, slot1, slot2)
  627. end
  628.  
  629. function coordmaster(slot0, slot1, slot2)
  630.     slot3 = 6
  631.     slot9, slot10, slot7 = getCarCoordinates(slot4)
  632.     slot8 = getAngle(slot5, slot6, slot0, slot1)
  633.  
  634.     while true do
  635.         wait(0)
  636.         printStringNow("~Y~Loading...~s~", 1000)
  637.  
  638.         if slot3 < getDistanceBetweenCoords2d(slot5, slot6, slot0, slot1) then
  639.             sendInCarFakePosition(slot5 + math.sin(slot8) * slot3, slot6 + math.cos(slot8) * slot3, slot7)
  640.         else
  641.             sendInCarFakePosition(slot0, slot1, slot2)
  642.             setCarCoordinates(slot4, slot0, slot1, slot2)
  643.             nopHook("onSendPacket", false)
  644.             lockPlayerControl(false)
  645.             sampAddChatMessage("{f5c011}[SainixTeleport] {ffffff} {FFFFFF}| {00FF00}[Успешно] {FFFFFF}Телепортация выполнена!", -1)
  646.             addOneOffSound(0, 0, 0, 1139)
  647.  
  648.             break
  649.         end
  650.     end
  651. end
  652.  
  653. function getAngle(slot0, slot1, slot2, slot3)
  654.     return math.atan2(slot2 - slot0, slot3 - slot1)
  655. end
  656.  
  657. function getTargetBlipCoordinatesFixed()
  658.     slot0, slot1, slot2, slot3 = getTargetBlipCoordinates()
  659.  
  660.     if not slot0 then
  661.         return false
  662.     end
  663.  
  664.     requestCollision(slot1, slot2)
  665.     loadScene(slot1, slot2, slot3)
  666.  
  667.     slot8, slot9, slot10, slot11 = getTargetBlipCoordinates()
  668.  
  669.     return slot4, slot5, slot6, slot7
  670. end
  671.  
  672. function SearchMarker(slot0, slot1, slot2)
  673.     slot3 = 0
  674.     slot4 = 0
  675.     slot5 = 0
  676.     slot6 = false
  677.  
  678.     for slot10 = 0, 31, 1 do
  679.         slot11 = 0
  680.         slot13 = representIntAsFloat(readMemory(13103464 + slot10 * 56 + 4, 4, false))
  681.         slot14 = representIntAsFloat(readMemory(13103464 + slot10 * 56 + 8, 4, false))
  682.  
  683.         if representIntAsFloat(readMemory(13103464 + slot10 * 56 + 0, 4, false)) ~= 0 or slot13 ~= 0 or slot14 ~= 0 then
  684.             slot3 = slot12
  685.             slot4 = slot13
  686.             slot5 = slot14
  687.             slot6 = true
  688.         end
  689.     end
  690.  
  691.     return slot6, slot3, slot4, slot5
  692. end
  693.  
  694. function slot41.onCreate3DText(slot0, slot1, slot2, slot3, slot4, slot5, slot6, slot7)
  695.     if uv0.v and (slot7:find("*** Дом продается ***") or slot7:find("Бизнес продается")) then
  696.         lua_thread.create(function ()
  697.             wait(waitavtonazatietwo.v)
  698.  
  699.             slot0, slot4 = sampGetPlayerIdByCharHandle(PLAYER_PED)
  700.             slot2 = allocateMemory(68)
  701.  
  702.             sampStorePlayerOnfootData(slot1, slot2)
  703.             setStructElement(slot2, 36, 1, 128, false)
  704.             sampSendOnfootData(slot2)
  705.             freeMemory(slot2)
  706.         end)
  707.     end
  708. end
  709.  
  710. function slot41.onServerMessage(slot0, slot1)
  711.     if slot1:find("{FF6347} Местом спавна автоматически назначен ваш дом. Изменить место спавна {FFFFFF}") and uv0.v == 2 then
  712.         raknetEmulPacketReceiveBitStream(PACKET_DISCONNECTION_NOTIFICATION, raknetNewBitStream())
  713.         raknetDeleteBitStream(raknetNewBitStream())
  714.         sampDisconnectWithReason(1)
  715.         sampAddChatMessage("{FFFFFF} Дисконнект проведён успешно!", -1)
  716.  
  717.         uv0.v = 1
  718.     end
  719. end
  720.  
  721. function slot41.onShowDialog(slot0, slot1, slot2, slot3, slot4, slot5)
  722.     if uv0.v and slot2:find("Проверка на робота") then
  723.         lua_thread.create(function ()
  724.             wait(0)
  725.  
  726.             while true do
  727.                 wait(0)
  728.  
  729.                 inputtext = sampGetCurrentDialogEditboxText()
  730.  
  731.                 if inputtext ~= "" then
  732.                     sampSetCurrentDialogEditboxText(string.gsub(inputtext, "[^1234567890]", ""))
  733.                 end
  734.             end
  735.         end)
  736.     end
  737.  
  738.     if uv1.v and slot2:find("Проверка на робота") then
  739.         lua_thread.create(function ()
  740.             wait(0)
  741.  
  742.             while true do
  743.                 wait(0)
  744.  
  745.                 textsumfive = sampGetCurrentDialogEditboxText()
  746.  
  747.                 if uv0.v then
  748.                     kol()
  749.                 end
  750.  
  751.                 if #textsumfive == 5 then
  752.                     wait(waitaenter.v)
  753.                     sampCloseCurrentDialogWithButton(1)
  754.  
  755.                     uv1.v = false
  756.  
  757.                     break
  758.                 end
  759.             end
  760.         end)
  761.     end
  762.  
  763.     if uv3.v then
  764.         lua_thread.create(function ()
  765.             while true do
  766.                 wait(0)
  767.  
  768.                 if sampIsDialogActive() and sampGetDialogCaption():find("Проверка на робота") then
  769.                     if uv0.v then
  770.                         sampSetCurrentDialogEditboxText(string.gsub(sampGetCurrentDialogEditboxText(), "[^1234567890]", ""))
  771.                     end
  772.  
  773.                     if uv1.v and #sampGetCurrentDialogEditboxText() > 5 then
  774.                         sampSetCurrentDialogEditboxText(slot0:sub(1, 5))
  775.                     end
  776.                 end
  777.             end
  778.         end)
  779.     end
  780. end
  781.  
  782. function kol()
  783.     for slot3, slot4 in ipairs(getAllChars()) do
  784.         if doesCharExist(slot4) and slot4 ~= playerPed then
  785.             setCharCollision(slot4, false)
  786.         end
  787.     end
  788. end
  789.  
  790. function autoupdate(slot0, slot1, slot2)
  791.     slot3 = require("moonloader").download_status
  792.  
  793.     if doesFileExist(getWorkingDirectory() .. "\\" .. thisScript().name .. "-version.json") then
  794.         os.remove(slot4)
  795.     end
  796.  
  797.     downloadUrlToFile(slot0, slot4, function (slot0, slot1, slot2, slot3)
  798.         if slot1 == uv0.STATUSEX_ENDDOWNLOAD then
  799.             if doesFileExist(uv1) then
  800.                 if io.open(uv1, "r") then
  801.                     updatelink = decodeJson(slot4:read("*a")).updateurl
  802.                     updateversion = decodeJson(slot4.read("*a")).latest
  803.  
  804.                     slot4:close()
  805.                     os.remove(uv1)
  806.  
  807.                     if updateversion ~= thisScript().version then
  808.                         lua_thread.create(function (slot0)
  809.                             slot1 = require("moonloader").download_status
  810.  
  811.                             sampAddChatMessage(slot0 .. "Обнаружено обновление. Пытаюсь обновиться c " .. thisScript().version .. " на " .. updateversion, slot2)
  812.                             wait(250)
  813.                             downloadUrlToFile(updatelink, thisScript().path, function (slot0, slot1, slot2, slot3)
  814.                                 if slot1 == uv0.STATUS_DOWNLOADINGDATA then
  815.                                     print(string.format("Загружено %d из %d.", slot2, slot3))
  816.                                 elseif slot1 == uv0.STATUS_ENDDOWNLOADDATA then
  817.                                     print("Загрузка обновления завершена.")
  818.                                     sampAddChatMessage(uv1 .. "Обновление завершено!", uv2)
  819.  
  820.                                     goupdatestatus = true
  821.  
  822.                                     lua_thread.create(function ()
  823.                                         wait(500)
  824.                                         thisScript():reload()
  825.                                     end)
  826.                                 end
  827.  
  828.                                 if slot1 == uv0.STATUSEX_ENDDOWNLOAD and goupdatestatus == nil then
  829.                                     sampAddChatMessage(uv1 .. "Обновление прошло неудачно. Запускаю устаревшую версию..", uv2)
  830.  
  831.                                     update = false
  832.                                 end
  833.                             end)
  834.                         end, uv2)
  835.                     else
  836.                         update = false
  837.  
  838.                         print("v" .. thisScript().version .. ": Обновление не требуется.")
  839.                     end
  840.                 end
  841.             else
  842.                 print("v" .. thisScript().version .. ": Не могу проверить обновление. Смиритесь или проверьте самостоятельно на " .. uv3)
  843.  
  844.                 update = false
  845.             end
  846.         end
  847.     end)
  848.  
  849.     while update ~= false do
  850.         wait(100)
  851.     end
  852. end
  853.  
  854. function getserial()
  855.     slot0 = require("ffi")
  856.  
  857.     slot0.cdef([[
  858.     int __stdcall GetVolumeInformationA(
  859.     const char* lpRootPathName,
  860.     char* lpVolumeNameBuffer,
  861.     uint32_t nVolumeNameSize,
  862.     uint32_t* lpVolumeSerialNumber,
  863.     uint32_t* lpMaximumComponentLength,
  864.     uint32_t* lpFileSystemFlags,
  865.     char* lpFileSystemNameBuffer,
  866.     uint32_t nFileSystemNameSize
  867.     );
  868.     ]])
  869.     slot0.C.GetVolumeInformationA(nil, nil, 0, slot0.new("unsigned long[1]", 0), nil, nil, nil, 0)
  870.  
  871.     return slot0.new("unsigned long[1]", 0)[0]
  872. end
  873.  
  874. slot62 = require("ffi")
  875.  
  876. slot62.cdef([[
  877. int __stdcall GetVolumeInformationA(
  878.     const char* lpRootPathName,
  879.     char* lpVolumeNameBuffer,
  880.     uint32_t nVolumeNameSize,
  881.     uint32_t* lpVolumeSerialNumber,
  882.     uint32_t* lpMaximumComponentLength,
  883.     uint32_t* lpFileSystemFlags,
  884.     char* lpFileSystemNameBuffer,
  885.     uint32_t nFileSystemNameSize
  886. );
  887. ]])
  888. slot62.C.GetVolumeInformationA(nil, nil, 0, slot62.new("unsigned long[1]", 0), nil, nil, nil, 0)
  889.  
  890. slot63 = slot62.new("unsigned long[1]", 0)[0]
  891. slot64 = require("lib.samp.events")
  892. requests = require("requests")
  893.  
  894. function getserial()
  895.     slot0 = require("ffi")
  896.  
  897.     slot0.cdef([[
  898.     int __stdcall GetVolumeInformationA(
  899.     const char* lpRootPathName,
  900.     char* lpVolumeNameBuffer,
  901.     uint32_t nVolumeNameSize,
  902.     uint32_t* lpVolumeSerialNumber,
  903.     uint32_t* lpMaximumComponentLength,
  904.     uint32_t* lpFileSystemFlags,
  905.     char* lpFileSystemNameBuffer,
  906.     uint32_t nFileSystemNameSize
  907.     );
  908.     ]])
  909.     slot0.C.GetVolumeInformationA(nil, nil, 0, slot0.new("unsigned long[1]", 0), nil, nil, nil, 0)
  910.  
  911.     return slot0.new("unsigned long[1]", 0)[0]
  912. end
  913.  
  914. function checkKey()
  915.     response = requests.get("http://vipmasmd.beget.tech/auth.php?code=" .. getserial())
  916.  
  917.     if not response.text:match("<body>(.*)</body>"):find("-1") then
  918.         if not response.text:match("<body>(.*)</body>"):find("The duration of the key has expired.") then
  919.             -- Nothing
  920.         end
  921.     else
  922.         sampAddChatMessage("{f5c011}[Sainixteleport.lua] {FFFFFF} не привязан обратитесь к https://vk.com/roma_chepiga либо попробуйте перезапустить игру", -1)
  923.         sampAddChatMessage("{f5c011}[Sainixteleport.lua] {FFFFFF} Ваш ключ: " .. uv0, -1)
  924.         thisScript():unload()
  925.     end
  926. end
  927.  
  928. function main()
  929.     if not isSampfuncsLoaded() or not isSampLoaded() then
  930.         return
  931.     end
  932.  
  933.     while not isSampAvailable() do
  934.         wait(100)
  935.     end
  936.  
  937.     if false then
  938.         slot0("http://vipmasmd.beget.tech/menu/update.php", "[" .. string.upper(thisScript().name) .. "]: ", "http://vipmasmd.beget.tech/menu/Sainixteleport.luac")
  939.         checkKey()
  940.         wait(0)
  941.     end
  942.  
  943.     sampAddChatMessage("{f5c011}[SainixTeleport] {ffffff} Скрипт загружен! Автор скрипта: Sainix Меню скрипта: /stph", -1)
  944.     uv0.addNotification("Скрипт \"SainixTeleport\" успешно загружен!  Версия: 11.12.2019.", 5, 4)
  945.  
  946.     uv1.default = "CP1251"
  947.     cp1251 = uv1.CP1251
  948.     u8 = uv1.UTF8
  949.     uv2.Process = true
  950.  
  951.     sampRegisterChatCommand("fhp", cmd_fhp)
  952.     sampRegisterChatCommand("gm", gm)
  953.     sampRegisterChatCommand("gmm", function (slot0)
  954.     end)
  955.     lua_thread.create(function ()
  956.         while true do
  957.             wait(0)
  958.             doKeyCheck()
  959.         end
  960.     end)
  961.     sampRegisterChatCommand("fbp", cmd_fbp)
  962.     sampRegisterChatCommand("fgop", function ()
  963.         result, x, y, z = getTargetBlipCoordinatesFixed()
  964.  
  965.         if result then
  966.             if isCharInAnyCar(PLAYER_PED) then
  967.                 lua_thread.create(carTeleport, x, y, z)
  968.             end
  969.         else
  970.             sampAddChatMessage("{f5c011}[SainixTeleport] {ffffff} {FFFFFF}| {FF0000}[Ошибка] {FFFFFF}Маркер не найден!", -1)
  971.         end
  972.     end)
  973.     sampRegisterChatCommand("fgcp", function ()
  974.         result, x, y, z = SearchMarker(getCharCoordinates(PLAYER_PED))
  975.  
  976.         if result then
  977.             if isCharInAnyCar(PLAYER_PED) then
  978.                 lua_thread.create(carTeleport, x, y, z)
  979.             end
  980.         else
  981.             sampAddChatMessage("{f5c011}[SainixTeleport] {ffffff} {FFFFFF}| {FF0000}[Ошибка] {FFFFFF}Чекпоинт не найден!", -1)
  982.         end
  983.     end)
  984.     sampRegisterChatCommand("stph", function ()
  985.         uv0.v = not uv0.v
  986.     end)
  987.     lua_thread.create(function ()
  988.         while true do
  989.             wait(0)
  990.  
  991.             if uv0.v and isKeyDown(69) then
  992.                 dekchars()
  993.             end
  994.  
  995.             if uv1.v and isKeyDown(82) then
  996.                 dekcars()
  997.             end
  998.  
  999.             if uv2.v then
  1000.                 kol()
  1001.             end
  1002.  
  1003.             uv3.Process = uv4.v
  1004.         end
  1005.     end)
  1006.     sampRegisterChatCommand("fmincar", function ()
  1007.         lua_thread.create(function ()
  1008.             if uv0 then
  1009.                 return sampAddChatMessage("{f5c011}[SainixTeleport] {ffffff} {FFFFFF}| {FF0000}[Ошибка] {FFFFFF}Error 404!", -1)
  1010.             end
  1011.  
  1012.             blip, blipX, blipY, blipZ = getTargetBlipCoordinatesFixed()
  1013.  
  1014.             if blip then
  1015.                 uv1 = true
  1016.                 charPosX, charPosY, charPosZ = getCharCoordinates(playerPed)
  1017.  
  1018.                 if getDistanceBetweenCoords3d(blipX, blipY, charPosZ, charPosX, charPosY, charPosZ) < 9 then
  1019.                     return setCharCoordinates(playerPed, blipX, blipY, blipZ)
  1020.                 end
  1021.  
  1022.                 setCharCoordinates(playerPed, blipX, blipY, blipZ)
  1023.  
  1024.                 uv0 = true
  1025.             end
  1026.         end)
  1027.     end)
  1028.     sampRegisterChatCommand("fcincar", function ()
  1029.         lua_thread.create(function ()
  1030.             if uv0 then
  1031.                 return sampAddChatMessage("{f5c011}[SainixTeleport] {ffffff} {FFFFFF}| {FF0000}[Ошибка] {FFFFFF}Error 404!", -1)
  1032.             end
  1033.  
  1034.             blip, blipX, blipY, blipZ = SearchMarker(getCharCoordinates(PLAYER_PED))
  1035.  
  1036.             if blip then
  1037.                 uv1 = true
  1038.                 charPosX, charPosY, charPosZ = getCharCoordinates(playerPed)
  1039.  
  1040.                 if getDistanceBetweenCoords3d(blipX, blipY, charPosZ, charPosX, charPosY, charPosZ) < 9 then
  1041.                     return setCharCoordinates(playerPed, blipX, blipY, blipZ)
  1042.                 end
  1043.  
  1044.                 setCharCoordinates(playerPed, blipX, blipY, blipZ)
  1045.  
  1046.                 uv0 = true
  1047.             end
  1048.         end)
  1049.     end)
  1050.  
  1051.     while true do
  1052.         wait(0)
  1053.  
  1054.         if os.clock() - uv9 > 2000 and uv8 then
  1055.             uv9 = 0
  1056.             uv8 = false
  1057.         end
  1058.  
  1059.         if uv7 then
  1060.             if getDistanceBetweenCoords3d(blipX, blipY, blipZ, charPosX, charPosY, charPosZ) > 9 then
  1061.                 slot0, slot1 = sampGetVehicleIdByCarHandle(vehicleId)
  1062.                 vectorX = blipX - charPosX
  1063.                 vectorY = blipY - charPosY
  1064.                 vectorZ = blipZ - charPosZ
  1065.                 slot2 = uv10(vectorX, vectorY, vectorZ)
  1066.  
  1067.                 slot2:normalize()
  1068.                 wait(1)
  1069.                 sampForceVehicleSync()
  1070.  
  1071.                 charPosX = charPosX + slot2.x * 14.5
  1072.                 charPosY = charPosY + slot2.y * 14.5
  1073.                 charPosZ = charPosZ + slot2.z * 14.5
  1074.  
  1075.                 sendOnfootSync(charPosX, charPosY, charPosZ + 4)
  1076.                 sendOnfootSyncc(charPosX, charPosY, charPosZ)
  1077.  
  1078.                 uv11 = uv11 + 1
  1079.  
  1080.                 if uv11 == 5 then
  1081.                     wait(1)
  1082.                     sendOnfootSync(charPosX + 100, charPosY + 100, charPosZ + 2)
  1083.                     sampForceVehicleSync()
  1084.  
  1085.                     uv11 = 0
  1086.                 end
  1087.             else
  1088.                 sendOnfootSync(charPosX, charPosY, charPosZ)
  1089.                 printStringNow("~y~teleported", 666)
  1090.                 sendOnfootSync(charPosX + 1, charPosY + 1, charPosZ + 2)
  1091.                 setCharCoordinates(playerPed, blipX, blipY, blipZ)
  1092.                 sampForceVehicleSync()
  1093.                 sendOnfootSync(charPosX, charPosY, charPosZ + 2)
  1094.  
  1095.                 uv7 = false
  1096.  
  1097.                 setCharCoordinates(playerPed, blipX, blipY, blipZ)
  1098.  
  1099.                 uv8 = false
  1100.             end
  1101.         end
  1102.  
  1103.         sampRegisterChatCommand("ahk", atax)
  1104.  
  1105.         while true do
  1106.             wait(0)
  1107.  
  1108.             for slot3 = 0, 4, 1 do
  1109.                 offset = -10
  1110.  
  1111.                 if sampTextdrawIsExists(2081 + 7 * slot3 + offset) and sampTextdrawIsExists(2082 + 7 * slot3 + offset) and sampTextdrawIsExists(2083 + 7 * slot3 + offset) and sampTextdrawIsExists(2084 + 7 * slot3 + offset) and not sampTextdrawIsExists(2085 + 7 * slot3 + offset) and sampTextdrawIsExists(2086 + 7 * slot3 + offset) and sampTextdrawIsExists(2087 + 7 * slot3 + offset) then
  1112.                     resCap = 0
  1113.                 end
  1114.  
  1115.                 if sampTextdrawIsExists(2081 + 7 * slot3 + offset) and sampTextdrawIsExists(2082 + 7 * slot3 + offset) and sampTextdrawIsExists(2083 + 7 * slot3 + offset) and sampTextdrawIsExists(2084 + 7 * slot3 + offset) and sampTextdrawIsExists(2085 + 7 * slot3 + offset) and not sampTextdrawIsExists(2086 + 7 * slot3 + offset) and sampTextdrawIsExists(2087 + 7 * slot3 + offset) then
  1116.                     resCap = 9
  1117.                 end
  1118.  
  1119.                 if sampTextdrawIsExists(2081 + 7 * slot3 + offset) and sampTextdrawIsExists(2082 + 7 * slot3 + offset) and not sampTextdrawIsExists(2083 + 7 * slot3 + offset) and not sampTextdrawIsExists(2084 + 7 * slot3 + offset) and sampTextdrawIsExists(2085 + 7 * slot3 + offset) and not sampTextdrawIsExists(2086 + 7 * slot3 + offset) and sampTextdrawIsExists(2087 + 7 * slot3 + offset) then
  1120.                     resCap = 4
  1121.                 end
  1122.  
  1123.                 if sampTextdrawIsExists(2081 + 7 * slot3 + offset) and sampTextdrawIsExists(2082 + 7 * slot3 + offset) and sampTextdrawIsExists(2083 + 7 * slot3 + offset) and sampTextdrawIsExists(2084 + 7 * slot3 + offset) and sampTextdrawIsExists(2085 + 7 * slot3 + offset) and sampTextdrawIsExists(2086 + 7 * slot3 + offset) and sampTextdrawIsExists(2087 + 7 * slot3 + offset) then
  1124.                     resCap = 8
  1125.                 end
  1126.  
  1127.                 if not sampTextdrawIsExists(2081 + 7 * slot3 + offset) and sampTextdrawIsExists(2082 + 7 * slot3 + offset) and sampTextdrawIsExists(2083 + 7 * slot3 + offset) and not sampTextdrawIsExists(2084 + 7 * slot3 + offset) and not sampTextdrawIsExists(2085 + 7 * slot3 + offset) and not sampTextdrawIsExists(2086 + 7 * slot3 + offset) and sampTextdrawIsExists(2087 + 7 * slot3 + offset) then
  1128.                     resCap = 7
  1129.                 end
  1130.  
  1131.                 if sampTextdrawIsExists(2081 + 7 * slot3 + offset) and not sampTextdrawIsExists(2082 + 7 * slot3 + offset) and sampTextdrawIsExists(2083 + 7 * slot3 + offset) and sampTextdrawIsExists(2084 + 7 * slot3 + offset) and sampTextdrawIsExists(2085 + 7 * slot3 + offset) and sampTextdrawIsExists(2086 + 7 * slot3 + offset) and sampTextdrawIsExists(2087 + 7 * slot3 + offset) then
  1132.                     resCap = 6
  1133.                 end
  1134.  
  1135.                 if sampTextdrawIsExists(2081 + 7 * slot3 + offset) and not sampTextdrawIsExists(2082 + 7 * slot3 + offset) and sampTextdrawIsExists(2083 + 7 * slot3 + offset) and sampTextdrawIsExists(2084 + 7 * slot3 + offset) and sampTextdrawIsExists(2085 + 7 * slot3 + offset) and not sampTextdrawIsExists(2086 + 7 * slot3 + offset) and sampTextdrawIsExists(2087 + 7 * slot3 + offset) then
  1136.                     resCap = 5
  1137.                 end
  1138.  
  1139.                 if not sampTextdrawIsExists(2081 + 7 * slot3 + offset) and sampTextdrawIsExists(2082 + 7 * slot3 + offset) and sampTextdrawIsExists(2083 + 7 * slot3 + offset) and sampTextdrawIsExists(2084 + 7 * slot3 + offset) and sampTextdrawIsExists(2085 + 7 * slot3 + offset) and not sampTextdrawIsExists(2086 + 7 * slot3 + offset) and sampTextdrawIsExists(2087 + 7 * slot3 + offset) then
  1140.                     resCap = 3
  1141.                 end
  1142.  
  1143.                 if not sampTextdrawIsExists(2081 + 7 * slot3 + offset) and sampTextdrawIsExists(2082 + 7 * slot3 + offset) and sampTextdrawIsExists(2083 + 7 * slot3 + offset) and sampTextdrawIsExists(2084 + 7 * slot3 + offset) and sampTextdrawIsExists(2085 + 7 * slot3 + offset) and sampTextdrawIsExists(2086 + 7 * slot3 + offset) and not sampTextdrawIsExists(2087 + 7 * slot3 + offset) then
  1144.                     resCap = 2
  1145.                 end
  1146.  
  1147.                 if not sampTextdrawIsExists(2081 + 7 * slot3 + offset) and sampTextdrawIsExists(2082 + 7 * slot3 + offset) and not sampTextdrawIsExists(2083 + 7 * slot3 + offset) and not sampTextdrawIsExists(2084 + 7 * slot3 + offset) and not sampTextdrawIsExists(2085 + 7 * slot3 + offset) and not sampTextdrawIsExists(2086 + 7 * slot3 + offset) and sampTextdrawIsExists(2087 + 7 * slot3 + offset) then
  1148.                     resCap = 1
  1149.                 end
  1150.  
  1151.                 if slot3 == 0 then
  1152.                     uv12 = resCap
  1153.                 elseif slot3 == 1 then
  1154.                     uv13 = resCap
  1155.                 elseif slot3 == 2 then
  1156.                     uv14 = resCap
  1157.                 elseif slot3 == 3 then
  1158.                     uv15 = resCap
  1159.                 elseif slot3 == 4 then
  1160.                     uv16 = resCap
  1161.                 end
  1162.             end
  1163.         end
  1164.     end
  1165. end
  1166.  
  1167. function dekchars()
  1168.     for slot3, slot4 in ipairs(getAllChars()) do
  1169.         if doesCharExist(slot4) then
  1170.             slot5, slot6 = sampGetPlayerIdByCharHandle(slot4)
  1171.  
  1172.             if slot6 ~= myid then
  1173.                 emul_rpc("onPlayerStreamOut", {
  1174.                     slot6
  1175.                 })
  1176.             end
  1177.         end
  1178.     end
  1179. end
  1180.  
  1181. function emul_rpc(slot0, slot1)
  1182.     slot2 = require("samp.events.bitstream_io")
  1183.     slot3 = require("samp.events.handlers")
  1184.     slot4 = require("samp.events.extra_types")
  1185.     slot6 = {
  1186.         onShowTextDraw = true,
  1187.         onSetObjectMaterialText = true,
  1188.         onVehicleStreamIn = true,
  1189.         onSetObjectMaterial = true,
  1190.         onInitMenu = true,
  1191.         onInitGame = true,
  1192.         onCreateObject = true
  1193.     }
  1194.     slot7 = {
  1195.         Int32Array3 = true,
  1196.         PlayerScorePingMap = true
  1197.     }
  1198.  
  1199.     if ({
  1200.         onInitGame = {
  1201.             139
  1202.         },
  1203.         onPlayerJoin = {
  1204.             "int16",
  1205.             "int32",
  1206.             "bool8",
  1207.             "string8",
  1208.             137
  1209.         },
  1210.         onPlayerQuit = {
  1211.             "int16",
  1212.             "int8",
  1213.             138
  1214.         },
  1215.         onRequestClassResponse = {
  1216.             "bool8",
  1217.             "int8",
  1218.             "int32",
  1219.             "int8",
  1220.             "vector3d",
  1221.             "float",
  1222.             "Int32Array3",
  1223.             "Int32Array3",
  1224.             128
  1225.         },
  1226.         onRequestSpawnResponse = {
  1227.             "bool8",
  1228.             129
  1229.         },
  1230.         onSetPlayerName = {
  1231.             "int16",
  1232.             "string8",
  1233.             "bool8",
  1234.             11
  1235.         },
  1236.         onSetPlayerPos = {
  1237.             "vector3d",
  1238.             12
  1239.         },
  1240.         onSetPlayerPosFindZ = {
  1241.             "vector3d",
  1242.             13
  1243.         },
  1244.         onSetPlayerHealth = {
  1245.             "float",
  1246.             14
  1247.         },
  1248.         onTogglePlayerControllable = {
  1249.             "bool8",
  1250.             15
  1251.         },
  1252.         onPlaySound = {
  1253.             "int32",
  1254.             "vector3d",
  1255.             16
  1256.         },
  1257.         onSetWorldBounds = {
  1258.             "float",
  1259.             "float",
  1260.             "float",
  1261.             "float",
  1262.             17
  1263.         },
  1264.         onGivePlayerMoney = {
  1265.             "int32",
  1266.             18
  1267.         },
  1268.         onSetPlayerFacingAngle = {
  1269.             "float",
  1270.             19
  1271.         },
  1272.         onGivePlayerWeapon = {
  1273.             "int32",
  1274.             "int32",
  1275.             22
  1276.         },
  1277.         onSetPlayerTime = {
  1278.             "int8",
  1279.             "int8",
  1280.             29
  1281.         },
  1282.         onSetToggleClock = {
  1283.             "bool8",
  1284.             30
  1285.         },
  1286.         onPlayerStreamIn = {
  1287.             "int16",
  1288.             "int8",
  1289.             "int32",
  1290.             "vector3d",
  1291.             "float",
  1292.             "int32",
  1293.             "int8",
  1294.             32
  1295.         },
  1296.         onSetShopName = {
  1297.             "string256",
  1298.             33
  1299.         },
  1300.         onSetPlayerSkillLevel = {
  1301.             "int16",
  1302.             "int32",
  1303.             "int16",
  1304.             34
  1305.         },
  1306.         onSetPlayerDrunk = {
  1307.             "int32",
  1308.             35
  1309.         },
  1310.         onCreate3DText = {
  1311.             "int16",
  1312.             "int32",
  1313.             "vector3d",
  1314.             "float",
  1315.             "bool8",
  1316.             "int16",
  1317.             "int16",
  1318.             "encodedString4096",
  1319.             36
  1320.         },
  1321.         onSetRaceCheckpoint = {
  1322.             "int8",
  1323.             "vector3d",
  1324.             "vector3d",
  1325.             "float",
  1326.             38
  1327.         },
  1328.         onPlayAudioStream = {
  1329.             "string8",
  1330.             "vector3d",
  1331.             "float",
  1332.             "bool8",
  1333.             41
  1334.         },
  1335.         onRemoveBuilding = {
  1336.             "int32",
  1337.             "vector3d",
  1338.             "float",
  1339.             43
  1340.         },
  1341.         onCreateObject = {
  1342.             44
  1343.         },
  1344.         onSetObjectPosition = {
  1345.             "int16",
  1346.             "vector3d",
  1347.             45
  1348.         },
  1349.         onSetObjectRotation = {
  1350.             "int16",
  1351.             "vector3d",
  1352.             46
  1353.         },
  1354.         onDestroyObject = {
  1355.             "int16",
  1356.             47
  1357.         },
  1358.         onPlayerDeathNotification = {
  1359.             "int16",
  1360.             "int16",
  1361.             "int8",
  1362.             55
  1363.         },
  1364.         onSetMapIcon = {
  1365.             "int8",
  1366.             "vector3d",
  1367.             "int8",
  1368.             "int32",
  1369.             "int8",
  1370.             56
  1371.         },
  1372.         onRemoveVehicleComponent = {
  1373.             "int16",
  1374.             "int16",
  1375.             57
  1376.         },
  1377.         onRemove3DTextLabel = {
  1378.             "int16",
  1379.             58
  1380.         },
  1381.         onPlayerChatBubble = {
  1382.             "int16",
  1383.             "int32",
  1384.             "float",
  1385.             "int32",
  1386.             "string8",
  1387.             59
  1388.         },
  1389.         onUpdateGlobalTimer = {
  1390.             "int32",
  1391.             60
  1392.         },
  1393.         onShowDialog = {
  1394.             "int16",
  1395.             "int8",
  1396.             "string8",
  1397.             "string8",
  1398.             "string8",
  1399.             "encodedString4096",
  1400.             61
  1401.         },
  1402.         onDestroyPickup = {
  1403.             "int32",
  1404.             63
  1405.         },
  1406.         onLinkVehicleToInterior = {
  1407.             "int16",
  1408.             "int8",
  1409.             65
  1410.         },
  1411.         onSetPlayerArmour = {
  1412.             "float",
  1413.             66
  1414.         },
  1415.         onSetPlayerArmedWeapon = {
  1416.             "int32",
  1417.             67
  1418.         },
  1419.         onSetSpawnInfo = {
  1420.             "int8",
  1421.             "int32",
  1422.             "int8",
  1423.             "vector3d",
  1424.             "float",
  1425.             "Int32Array3",
  1426.             "Int32Array3",
  1427.             68
  1428.         },
  1429.         onSetPlayerTeam = {
  1430.             "int16",
  1431.             "int8",
  1432.             69
  1433.         },
  1434.         onPutPlayerInVehicle = {
  1435.             "int16",
  1436.             "int8",
  1437.             70
  1438.         },
  1439.         onSetPlayerColor = {
  1440.             "int16",
  1441.             "int32",
  1442.             72
  1443.         },
  1444.         onDisplayGameText = {
  1445.             "int32",
  1446.             "int32",
  1447.             "string32",
  1448.             73
  1449.         },
  1450.         onAttachObjectToPlayer = {
  1451.             "int16",
  1452.             "int16",
  1453.             "vector3d",
  1454.             "vector3d",
  1455.             75
  1456.         },
  1457.         onInitMenu = {
  1458.             76
  1459.         },
  1460.         onShowMenu = {
  1461.             "int8",
  1462.             77
  1463.         },
  1464.         onHideMenu = {
  1465.             "int8",
  1466.             78
  1467.         },
  1468.         onCreateExplosion = {
  1469.             "vector3d",
  1470.             "int32",
  1471.             "float",
  1472.             79
  1473.         },
  1474.         onShowPlayerNameTag = {
  1475.             "int16",
  1476.             "bool8",
  1477.             80
  1478.         },
  1479.         onAttachCameraToObject = {
  1480.             "int16",
  1481.             81
  1482.         },
  1483.         onInterpolateCamera = {
  1484.             "bool",
  1485.             "vector3d",
  1486.             "vector3d",
  1487.             "int32",
  1488.             "int8",
  1489.             82
  1490.         },
  1491.         onGangZoneStopFlash = {
  1492.             "int16",
  1493.             85
  1494.         },
  1495.         onApplyPlayerAnimation = {
  1496.             "int16",
  1497.             "string8",
  1498.             "string8",
  1499.             "bool",
  1500.             "bool",
  1501.             "bool",
  1502.             "bool",
  1503.             "int32",
  1504.             86
  1505.         },
  1506.         onClearPlayerAnimation = {
  1507.             "int16",
  1508.             87
  1509.         },
  1510.         onSetPlayerSpecialAction = {
  1511.             "int8",
  1512.             88
  1513.         },
  1514.         onSetPlayerFightingStyle = {
  1515.             "int16",
  1516.             "int8",
  1517.             89
  1518.         },
  1519.         onSetPlayerVelocity = {
  1520.             "vector3d",
  1521.             90
  1522.         },
  1523.         onSetVehicleVelocity = {
  1524.             "bool8",
  1525.             "vector3d",
  1526.             91
  1527.         },
  1528.         onServerMessage = {
  1529.             "int32",
  1530.             "string32",
  1531.             93
  1532.         },
  1533.         onSetWorldTime = {
  1534.             "int8",
  1535.             94
  1536.         },
  1537.         onCreatePickup = {
  1538.             "int32",
  1539.             "int32",
  1540.             "int32",
  1541.             "vector3d",
  1542.             95
  1543.         },
  1544.         onMoveObject = {
  1545.             "int16",
  1546.             "vector3d",
  1547.             "vector3d",
  1548.             "float",
  1549.             "vector3d",
  1550.             99
  1551.         },
  1552.         onEnableStuntBonus = {
  1553.             "bool",
  1554.             104
  1555.         },
  1556.         onTextDrawSetString = {
  1557.             "int16",
  1558.             "string16",
  1559.             105
  1560.         },
  1561.         onSetCheckpoint = {
  1562.             "vector3d",
  1563.             "float",
  1564.             107
  1565.         },
  1566.         onCreateGangZone = {
  1567.             "int16",
  1568.             "vector2d",
  1569.             "vector2d",
  1570.             "int32",
  1571.             108
  1572.         },
  1573.         onPlayCrimeReport = {
  1574.             "int16",
  1575.             "int32",
  1576.             "int32",
  1577.             "int32",
  1578.             "int32",
  1579.             "vector3d",
  1580.             112
  1581.         },
  1582.         onGangZoneDestroy = {
  1583.             "int16",
  1584.             120
  1585.         },
  1586.         onGangZoneFlash = {
  1587.             "int16",
  1588.             "int32",
  1589.             121
  1590.         },
  1591.         onStopObject = {
  1592.             "int16",
  1593.             122
  1594.         },
  1595.         onSetVehicleNumberPlate = {
  1596.             "int16",
  1597.             "string8",
  1598.             123
  1599.         },
  1600.         onTogglePlayerSpectating = {
  1601.             "bool32",
  1602.             124
  1603.         },
  1604.         onSpectatePlayer = {
  1605.             "int16",
  1606.             "int8",
  1607.             126
  1608.         },
  1609.         onSpectateVehicle = {
  1610.             "int16",
  1611.             "int8",
  1612.             127
  1613.         },
  1614.         onShowTextDraw = {
  1615.             134
  1616.         },
  1617.         onSetPlayerWantedLevel = {
  1618.             "int8",
  1619.             133
  1620.         },
  1621.         onTextDrawHide = {
  1622.             "int16",
  1623.             135
  1624.         },
  1625.         onRemoveMapIcon = {
  1626.             "int8",
  1627.             144
  1628.         },
  1629.         onSetWeaponAmmo = {
  1630.             "int8",
  1631.             "int16",
  1632.             145
  1633.         },
  1634.         onSetGravity = {
  1635.             "float",
  1636.             146
  1637.         },
  1638.         onSetVehicleHealth = {
  1639.             "int16",
  1640.             "float",
  1641.             147
  1642.         },
  1643.         onAttachTrailerToVehicle = {
  1644.             "int16",
  1645.             "int16",
  1646.             148
  1647.         },
  1648.         onDetachTrailerFromVehicle = {
  1649.             "int16",
  1650.             149
  1651.         },
  1652.         onSetWeather = {
  1653.             "int8",
  1654.             152
  1655.         },
  1656.         onSetPlayerSkin = {
  1657.             "int32",
  1658.             "int32",
  1659.             153
  1660.         },
  1661.         onSetInterior = {
  1662.             "int8",
  1663.             156
  1664.         },
  1665.         onSetCameraPosition = {
  1666.             "vector3d",
  1667.             157
  1668.         },
  1669.         onSetCameraLookAt = {
  1670.             "vector3d",
  1671.             "int8",
  1672.             158
  1673.         },
  1674.         onSetVehiclePosition = {
  1675.             "int16",
  1676.             "vector3d",
  1677.             159
  1678.         },
  1679.         onSetVehicleAngle = {
  1680.             "int16",
  1681.             "float",
  1682.             160
  1683.         },
  1684.         onSetVehicleParams = {
  1685.             "int16",
  1686.             "int16",
  1687.             "bool8",
  1688.             161
  1689.         },
  1690.         onChatMessage = {
  1691.             "int16",
  1692.             "string8",
  1693.             101
  1694.         },
  1695.         onConnectionRejected = {
  1696.             "int8",
  1697.             130
  1698.         },
  1699.         onPlayerStreamOut = {
  1700.             "int16",
  1701.             163
  1702.         },
  1703.         onVehicleStreamIn = {
  1704.             164
  1705.         },
  1706.         onVehicleStreamOut = {
  1707.             "int16",
  1708.             165
  1709.         },
  1710.         onPlayerDeath = {
  1711.             "int16",
  1712.             166
  1713.         },
  1714.         onPlayerEnterVehicle = {
  1715.             "int16",
  1716.             "int16",
  1717.             "bool8",
  1718.             26
  1719.         },
  1720.         onUpdateScoresAndPings = {
  1721.             "PlayerScorePingMap",
  1722.             155
  1723.         },
  1724.         onSetObjectMaterial = {
  1725.             84
  1726.         },
  1727.         onSetObjectMaterialText = {
  1728.             84
  1729.         },
  1730.         onSetVehicleParamsEx = {
  1731.             "int16",
  1732.             "int8",
  1733.             "int8",
  1734.             "int8",
  1735.             "int8",
  1736.             "int8",
  1737.             "int8",
  1738.             "int8",
  1739.             "int8",
  1740.             "int8",
  1741.             "int8",
  1742.             "int8",
  1743.             "int8",
  1744.             "int8",
  1745.             "int8",
  1746.             "int8",
  1747.             "int8",
  1748.             24
  1749.         },
  1750.         onSetPlayerAttachedObject = {
  1751.             "int16",
  1752.             "int32",
  1753.             "bool",
  1754.             "int32",
  1755.             "int32",
  1756.             "vector3d",
  1757.             "vector3d",
  1758.             "vector3d",
  1759.             "int32",
  1760.             "int32",
  1761.             113
  1762.         }
  1763.     })[slot0] then
  1764.         slot9 = raknetNewBitStream()
  1765.  
  1766.         if not slot6[slot0] then
  1767.             if #slot8 - 1 > 0 then
  1768.                 for slot14 = 1, slot10, 1 do
  1769.                     if slot7[slot8[slot14]] then
  1770.                         slot4[slot15].write(slot9, slot1[slot14])
  1771.                     else
  1772.                         slot2[slot15].write(slot9, slot1[slot14])
  1773.                     end
  1774.                 end
  1775.             end
  1776.         elseif slot0 == "onInitGame" then
  1777.             slot3.on_init_game_writer(slot9, slot1)
  1778.         elseif slot0 == "onCreateObject" then
  1779.             slot3.on_create_object_writer(slot9, slot1)
  1780.         elseif slot0 == "onInitMenu" then
  1781.             slot3.on_init_menu_writer(slot9, slot1)
  1782.         elseif slot0 == "onShowTextDraw" then
  1783.             slot3.on_show_textdraw_writer(slot9, slot1)
  1784.         elseif slot0 == "onVehicleStreamIn" then
  1785.             slot3.on_vehicle_stream_in_writer(slot9, slot1)
  1786.         elseif slot0 == "onSetObjectMaterial" then
  1787.             slot3.on_set_object_material_writer(slot9, slot1, 1)
  1788.         elseif slot0 == "onSetObjectMaterialText" then
  1789.             slot3.on_set_object_material_writer(slot9, slot1, 2)
  1790.         end
  1791.  
  1792.         raknetEmulRpcReceiveBitStream(slot8[#slot8], slot9)
  1793.         raknetDeleteBitStream(slot9)
  1794.     end
  1795. end
  1796.  
  1797. function dekcars()
  1798.     for slot3, slot4 in pairs(getAllVehicles()) do
  1799.         if doesVehicleExist(slot4) then
  1800.             deleteCar(slot4)
  1801.         end
  1802.     end
  1803. end
  1804.  
  1805. function cmd_fhp(slot0)
  1806.     lua_thread.create(function ()
  1807.         sampSendChat("/findihouse " .. uv0)
  1808.         wait(250)
  1809.         sampProcessChatInput("/fgop")
  1810.     end)
  1811. end
  1812.  
  1813. function gm(slot0)
  1814.     lua_thread.create(function ()
  1815.         wait(250)
  1816.         sampAddChatMessage("{f5c011}[SainixTeleport] {ffffff} {FFFFFF}| {20B2AA}[ИНФО] {FFFFFF}ГМ всегда готов к работе, для его активации нажмите ...", -1)
  1817.         sampAddChatMessage("... на: Insert (активация ГМ на персонажа), нажмите на: Home (активация ГМ на транспорт).", -1)
  1818.     end)
  1819. end
  1820.  
  1821. function cmd_fbp(slot0)
  1822.     lua_thread.create(function ()
  1823.         sampSendChat("/findibiz " .. uv0)
  1824.         wait(250)
  1825.         sampProcessChatInput("/fgcp")
  1826.     end)
  1827. end
  1828.  
  1829. function acrd()
  1830.     if not uv0 and not uv1 then
  1831.         slot0, slot1, slot2, slot3 = getTargetBlipCoordinatesFixed()
  1832.  
  1833.         if not slot0 then
  1834.             sampAddChatMessage("{f5c011}[SainixTeleport] {ffffff} {FFFFFF}| {FF0000}[Ошибка] {FFFFFF}Метка не найдена!", -1)
  1835.         else
  1836.             sampAddChatMessage("{f5c011}[SainixTeleport] {ffffff} {FFFFFF}| {00FF00}[Успешно] {FFFFFF}Телепортация запущена...", -1)
  1837.             lua_thread.create(function ()
  1838.                 uv0 = true
  1839.                 slot0, slot1, slot2 = getCharCoordinates(PLAYER_PED)
  1840.  
  1841.                 for slot6 = 1, 25, 1 do
  1842.                     setCharCoordinates(PLAYER_PED, slot0, slot1, slot2 - uv1)
  1843.  
  1844.                     for slot10 = 1, 3, 1 do
  1845.                         slot11 = samp_create_sync_data("player")
  1846.                         slot11.health = getCharHealth(PLAYER_PED)
  1847.                         slot11.armor = getCharArmour(PLAYER_PED)
  1848.                         slot11.position.z = slot2 - 1
  1849.                         slot11.position.y = slot1 + 5
  1850.                         slot11.position.x = slot0 + 5
  1851.                         slot11.moveSpeed.z = 0.5
  1852.                         slot11.moveSpeed.y = 0.4
  1853.                         slot11.moveSpeed.x = 0.5
  1854.  
  1855.                         slot11.send()
  1856.                     end
  1857.  
  1858.                     wait(uv2)
  1859.                 end
  1860.  
  1861.                 slot3 = getDistanceBetweenCoords3d(uv3, uv4, uv5, slot0, slot1, slot2)
  1862.  
  1863.                 while slot3 > uv1 + 1 do
  1864.                     if not uv0 then
  1865.                         sampAddChatMessage("{f5c011}[SainixTeleport] {ffffff} {FFFFFF}| {FF0000}[Ошибка] {FFFFFF}Телепортация остановлена. Поднимаемся наверх.", -1)
  1866.  
  1867.                         uv6 = true
  1868.                         slot4 = getGroundZFor3dCoord(slot0, slot1, slot2 + 1000)
  1869.  
  1870.                         while slot2 < slot4 do
  1871.                             setCharCoordinates(PLAYER_PED, slot0, slot1, slot2 + uv1)
  1872.  
  1873.                             for slot8 = 1, 3, 1 do
  1874.                                 slot9 = samp_create_sync_data("player")
  1875.                                 slot9.health = getCharHealth(PLAYER_PED)
  1876.                                 slot9.armor = getCharArmour(PLAYER_PED)
  1877.                                 slot9.position.z = slot2
  1878.                                 slot9.position.y = slot1 + 5
  1879.                                 slot9.position.x = slot0 + 5
  1880.                                 slot9.moveSpeed.z = 0.5
  1881.                                 slot9.moveSpeed.y = 0.4
  1882.                                 slot9.moveSpeed.x = 0.5
  1883.  
  1884.                                 slot9.send()
  1885.                             end
  1886.  
  1887.                             wait(uv2)
  1888.                         end
  1889.  
  1890.                         uv6 = false
  1891.  
  1892.                         break
  1893.                     end
  1894.  
  1895.                     slot0 = uv3 < slot0 and slot0 - uv1 or slot0 + uv1
  1896.                     slot1 = uv4 < slot1 and slot1 - uv1 or slot1 + uv1
  1897.  
  1898.                     if isCharInArea3d(PLAYER_PED, uv3 + 10, uv4 + 10, uv5 + 10000, uv3 - 10, uv4 - 10, uv5 - 10000, false) then
  1899.                         slot2 = uv5 < slot2 and slot2 - uv1 or slot2 + uv1
  1900.                     end
  1901.  
  1902.                     slot3 = getDistanceBetweenCoords3d(uv3, uv4, uv5, slot0, slot1, slot2)
  1903.  
  1904.                     sampForceOnfootSync()
  1905.                     setCharCoordinates(PLAYER_PED, slot0, slot1, slot2 + 2)
  1906.                     sampForceOnfootSync()
  1907.  
  1908.                     for slot7 = 1, 3, 1 do
  1909.                         wait(4)
  1910.  
  1911.                         slot8 = samp_create_sync_data("player")
  1912.                         slot8.health = getCharHealth(PLAYER_PED)
  1913.                         slot8.armor = getCharArmour(PLAYER_PED)
  1914.                         slot8.position.z = slot2 + 2
  1915.                         slot8.position.y = slot1 + 5
  1916.                         slot8.position.x = slot0 + 9
  1917.                         slot8.moveSpeed.z = 0.9
  1918.                         slot8.moveSpeed.y = 0.9
  1919.                         slot8.moveSpeed.x = 0.9
  1920.  
  1921.                         slot8.send()
  1922.                     end
  1923.  
  1924.                     wait(4)
  1925.                 end
  1926.  
  1927.                 wait(100)
  1928.  
  1929.                 uv0 = false
  1930.  
  1931.                 sampAddChatMessage("{f5c011}[SainixTeleport] {ffffff} {FFFFFF}| {00FF00}[Успешно] {FFFFFF}Телепортация выполнена!", -1)
  1932.             end)
  1933.         end
  1934.  
  1935.         return
  1936.     end
  1937.  
  1938.     if not uv1 then
  1939.         uv0 = false
  1940.     end
  1941. end
  1942.  
  1943. function nopHook(slot0, slot1)
  1944.     require("samp.events")[slot0] = function ()
  1945.         if uv0 then
  1946.             return false
  1947.         end
  1948.     end
  1949. end
  1950.  
  1951. function sendPassengerSync(slot0, slot1, slot2)
  1952.     slot3 = allocateMemory(24)
  1953.     slot4, slot7 = sampGetPlayerIdByCharHandle(PLAYER_PED)
  1954.  
  1955.     sampStorePlayerPassengerData(slot5, slot3)
  1956.     setStructElement(slot3, 2, 1, 1, false)
  1957.     setStructFloatElement(slot3, 12, slot0, false)
  1958.     setStructFloatElement(slot3, 16, slot1, false)
  1959.     setStructFloatElement(slot3, 20, slot2, false)
  1960.     sampSendPassengerData(slot3)
  1961.     freeMemory(slot3)
  1962. end
  1963.  
  1964. function sendUnoccupiedSyncBySeatId(slot0, slot1, slot2, slot3)
  1965.     slot4 = allocateMemory(67)
  1966.     slot6, slot15 = sampGetVehicleIdByCarHandle(slot5)
  1967.     slot14, slot14, slot14 = getCarRoll(slot5)
  1968.  
  1969.     setStructElement(slot4, 0, 2, slot7, false)
  1970.     setStructElement(slot4, 2, 1, slot3, false)
  1971.     setStructFloatElement(slot4, 3, slot8, false)
  1972.     setStructFloatElement(slot4, 7, slot9, false)
  1973.     setStructFloatElement(slot4, 11, slot10, false)
  1974.     setStructFloatElement(slot4, 15, 0.09, false)
  1975.     setStructFloatElement(slot4, 19, -0.8, false)
  1976.     setStructFloatElement(slot4, 23, 0.02, false)
  1977.     setStructFloatElement(slot4, 27, slot0, false)
  1978.     setStructFloatElement(slot4, 31, slot1, false)
  1979.     setStructFloatElement(slot4, 35, slot2, false)
  1980.     setStructFloatElement(slot4, 39, 0.0012, false)
  1981.     setStructFloatElement(slot4, 43, 0.02, false)
  1982.     setStructFloatElement(slot4, 47, 0.0017, false)
  1983.     setStructFloatElement(slot4, 51, 0.005, false)
  1984.     setStructFloatElement(slot4, 55, -0.002, false)
  1985.     setStructFloatElement(slot4, 59, 0.3, false)
  1986.     setStructElement(slot4, 63, 4, 0, false)
  1987.     sampSendUnoccupiedData(slot4)
  1988.     freeMemory(slot4)
  1989. end
  1990.  
  1991. function sendInCarFakePosition(slot0, slot1, slot2)
  1992.     for slot6 = 0, 2, 1 do
  1993.         slot7 = allocateMemory(24)
  1994.         slot8, slot11 = sampGetPlayerIdByCharHandle(PLAYER_PED)
  1995.  
  1996.         sampStorePlayerPassengerData(slot9, slot7)
  1997.         freeMemory(slot7)
  1998.         sendUnoccupiedSyncBySeatId(slot0, slot1, slot2, getStructElement(slot7, 2, 1, false))
  1999.         sendPassengerSync(slot0, slot1, slot2)
  2000.     end
  2001. end
  2002.  
  2003. function carTeleport(slot0, slot1, slot2)
  2004.     CarTp = true
  2005.  
  2006.     nopHook("onSendUnoccupiedSync", true)
  2007.     nopHook("onSendPassengerSync", true)
  2008.     nopHook("onSendVehicleSync", true)
  2009.     lockPlayerControl(true)
  2010.     coordmaster(slot0, slot1, slot2)
  2011. end
  2012.  
  2013. function coordmaster(slot0, slot1, slot2)
  2014.     slot3 = 5
  2015.     slot9, slot10, slot7 = getCarCoordinates(slot4)
  2016.     slot8 = getAngle(slot5, slot6, slot0, slot1)
  2017.  
  2018.     while true do
  2019.         wait(15)
  2020.         printStringNow("~y~Please wait!~s~", 1000)
  2021.  
  2022.         if slot3 < getDistanceBetweenCoords2d(slot5, slot6, slot0, slot1) then
  2023.             sendInCarFakePosition(slot5 + math.sin(slot8) * slot3, slot6 + math.cos(slot8) * slot3, slot7 + 5)
  2024.         else
  2025.             sendInCarFakePosition(slot0, slot1, slot2 + 5)
  2026.             setCarCoordinates(slot4, slot0, slot1, slot2 + 5)
  2027.             nopHook("onSendUnoccupiedSync", false)
  2028.             nopHook("onSendPassengerSync", false)
  2029.             lockPlayerControl(false)
  2030.             nopHook("onSendVehicleSync", false)
  2031.             setCharCoordinates(PLAYER_PED, slot0, slot1, slot2 + 3)
  2032.             printStringNow("~y~Teleported!", 2500)
  2033.             addOneOffSound(0, 0, 0, 1139)
  2034.  
  2035.             break
  2036.         end
  2037.     end
  2038. end
  2039.  
  2040. function getAngle(slot0, slot1, slot2, slot3)
  2041.     return math.atan2(slot2 - slot0, slot3 - slot1)
  2042. end
  2043.  
  2044. function slot21.onSetVehiclePos(slot0)
  2045.     if uv0 then
  2046.         uv1 = os.clock()
  2047.  
  2048.         return false
  2049.     end
  2050. end
  2051.  
  2052. function slot21.onSendVehicleSync(slot0)
  2053.     if uv0 then
  2054.         return false
  2055.     end
  2056. end
  2057.  
  2058. function slot21.onSetPlayerPos(slot0)
  2059.     if uv0 then
  2060.         uv1 = os.clock()
  2061.  
  2062.         return false
  2063.     end
  2064. end
  2065.  
  2066. function samp_create_sync_data(slot0, slot1)
  2067.     slot2 = require("ffi")
  2068.     slot3 = require("sampfuncs")
  2069.     slot4 = require("samp.raknet")
  2070.     slot9 = tonumber(slot2.cast("uintptr_t", slot2.new(slot7 .. "*", slot2.new(slot7, {}))))
  2071.  
  2072.     if (slot1 or true) and slot6[3] then
  2073.         slot11, slot12 = nil
  2074.  
  2075.         if slot1 == true then
  2076.             slot11, slot12 = sampGetPlayerIdByCharHandle(PLAYER_PED)
  2077.         else
  2078.             slot12 = tonumber(slot1)
  2079.         end
  2080.  
  2081.         slot10(slot12, slot9)
  2082.     end
  2083.  
  2084.     return setmetatable({
  2085.         send = function ()
  2086.             slot0 = raknetNewBitStream()
  2087.  
  2088.             raknetBitStreamWriteInt8(slot0, uv0[2])
  2089.             raknetBitStreamWriteBuffer(slot0, uv1, uv2.sizeof(uv3))
  2090.             raknetSendBitStreamEx(slot0, uv4.HIGH_PRIORITY, uv4.UNRELIABLE_SEQUENCED, 1)
  2091.             raknetDeleteBitStream(slot0)
  2092.         end
  2093.     }, {
  2094.         __index = function (slot0, slot1)
  2095.             return uv0[slot1]
  2096.         end,
  2097.         __newindex = function (slot0, slot1, slot2)
  2098.             uv0[slot1] = slot2
  2099.         end
  2100.     })
  2101. end
  2102.  
  2103. require("lib.samp.events").onSendPlayerSync = function (slot0)
  2104.     if uv0 or uv1 then
  2105.         return false
  2106.     end
  2107. end
  2108.  
  2109. require("lib.samp.events").onSendClientJoin = function (slot0, slot1, slot2, slot3, slot4, slot5, slot6)
  2110.     slot5 = "0.3.7-R3"
  2111. end
  2112.  
  2113. function sendOnfootSync(slot0, slot1, slot2)
  2114.     slot3 = samp_create_sync_data("vehicle")
  2115.     slot3.position = {
  2116.         slot0,
  2117.         slot1,
  2118.         slot2
  2119.     }
  2120.     slot3.moveSpeed = {
  2121.         -0.5,
  2122.         -0.5,
  2123.         -0.5
  2124.     }
  2125.  
  2126.     slot3.send()
  2127. end
  2128.  
  2129. function sendOnfootSyncc(slot0, slot1, slot2)
  2130.     slot3 = samp_create_sync_data("unoccupied")
  2131.     slot3.position = {
  2132.         slot0,
  2133.         slot1,
  2134.         slot2
  2135.     }
  2136.     slot3.moveSpeed = {
  2137.         3.5,
  2138.         0.5,
  2139.         0.5
  2140.     }
  2141.  
  2142.     slot3.send()
  2143. end
  2144.  
  2145. function sendInCarSync(slot0, slot1, slot2)
  2146.     slot3 = samp_create_sync_data("player")
  2147.     slot3.position = {
  2148.         slot0,
  2149.         slot1,
  2150.         slot2
  2151.     }
  2152.     slot3.moveSpeed = {
  2153.         -0.5,
  2154.         -0.5,
  2155.         -0.5
  2156.     }
  2157.  
  2158.     slot3.send()
  2159. end
  2160.  
  2161. function getTargetBlipCoordinatesFixed()
  2162.     slot0, slot1, slot2, slot3 = getTargetBlipCoordinates()
  2163.  
  2164.     if not slot0 then
  2165.         return false
  2166.     end
  2167.  
  2168.     requestCollision(slot1, slot2)
  2169.     loadScene(slot1, slot2, slot3)
  2170.  
  2171.     slot8, slot9, slot10, slot11 = getTargetBlipCoordinates()
  2172.  
  2173.     return slot4, slot5, slot6, slot7
  2174. end
  2175.  
  2176. slot65 = require("socket.http")
  2177. slot66 = require("ssl.https")
  2178. slot67 = require("socket.url")
  2179. slot68 = require("ltn12")
  2180. slot69 = require("cjson.safe")
  2181. slot70 = require("xml")
  2182. slot71 = require("md5")
  2183. slot72 = require("base64")
  2184.  
  2185. function slot73(...)
  2186.     return uv0.sumhexa(table.concat({
  2187.         ...
  2188.     }, ":"))
  2189. end
  2190.  
  2191. function slot74(slot0)
  2192.     slot1 = 0
  2193.  
  2194.     for slot5 = 1, #slot0, 1 do
  2195.         slot1 = slot1 * 256 + string.byte(slot0, slot5)
  2196.     end
  2197.  
  2198.     return slot1
  2199. end
  2200.  
  2201. function md5_tohex(slot0)
  2202.     return string.format("%08x%08x%08x%08x", uv0(string.sub(slot0, 1, 4)), uv0(string.sub(slot0, 5, 8)), uv0(string.sub(slot0, 9, 12)), uv0(string.sub(slot0, 13, 16)))
  2203. end
  2204.  
  2205. require("lib.samp.events").onSendPlayerSync = function (slot0)
  2206.     if Surfing then
  2207.         slot0.surfingVehicleId = vehicleId
  2208.         slot0.surfingOffsets.x = 0.1
  2209.         slot0.surfingOffsets.y = 0.1
  2210.         slot0.surfingOffsets.z = 0.1
  2211.     end
  2212. end
  2213.  
  2214. function doKeyCheck()
  2215.     if not isKeyCheckAvailable() then
  2216.         return
  2217.     end
  2218.  
  2219.     slot1 = nil
  2220.  
  2221.     if isCharInAnyCar(playerPed) then
  2222.         slot1 = storeCarCharIsInNoSave(playerPed)
  2223.     end
  2224.  
  2225.     if isKeyJustPressed(VK_INSERT) then
  2226.         if gmped == false then
  2227.             setCharProofs(playerPed, true, true, true, true, true)
  2228.             writeMemory(9867630, 1, 1, false)
  2229.  
  2230.             gmped = true
  2231.  
  2232.             printStringNow("~g~GM enabled for player!", 1000)
  2233.         elseif gmped ~= false then
  2234.             setCharProofs(playerPed, false, false, false, false, false)
  2235.             writeMemory(9867630, 1, 0, false)
  2236.  
  2237.             gmped = false
  2238.  
  2239.             printStringNow("~r~GM disabled for player!", 1000)
  2240.         end
  2241.     end
  2242.  
  2243.     if isKeyJustPressed(VK_HOME) and slot0 then
  2244.         if gmcar == false then
  2245.             setCarProofs(slot1, true, true, true, true, true)
  2246.  
  2247.             gmcar = true
  2248.  
  2249.             printStringNow("~g~GM enabled for cars!", 1000)
  2250.         elseif gmcar ~= false then
  2251.             setCarProofs(slot1, false, false, false, false, false)
  2252.  
  2253.             gmcar = false
  2254.  
  2255.             printStringNow("~r~GM disabled for cars!", 1000)
  2256.         end
  2257.     end
  2258.  
  2259.     doCheatWork()
  2260. end
  2261.  
  2262. function doCheatWork()
  2263.     slot1 = nil
  2264.  
  2265.     if isCharInAnyCar(playerPed) then
  2266.         slot1 = storeCarCharIsInNoSave(playerPed)
  2267.     end
  2268.  
  2269.     if gmped == true and isCharDead(playerPed) then
  2270.         setCharProofs(playerPed, false, false, false, false, false)
  2271.         writeMemory(9867630, 1, 0, false)
  2272.  
  2273.         gmped = false
  2274.  
  2275.         printStringNow("~r~GM disabled for player!", 1000)
  2276.     end
  2277.  
  2278.     if gmcar == true and slot0 then
  2279.         setCarProofs(slot1, true, true, true, true, true)
  2280.     end
  2281. end
  2282.  
  2283. function isKeyCheckAvailable()
  2284.     if not isSampfuncsLoaded() then
  2285.         return true
  2286.     end
  2287.  
  2288.     return not isSampfuncsConsoleActive() and not sampIsChatInputActive() and not sampIsDialogActive()
  2289. end
  2290.  
  2291. function atax(slot0)
  2292.     id, id1, id2, id3, id4 = slot0:match("(.+) (%d+) (%d+) (%d+) (%d+)")
  2293.  
  2294.     if id ~= nil or id1 ~= nil or id2 ~= nil or id3 ~= nil or id4 ~= nil then
  2295.         function uv0.onShowDialog(slot0, slot1, slot2, slot3, slot4, slot5)
  2296.             lua_thread.create(function ()
  2297.                 if uv0:find("робота") then
  2298.                     wait(id)
  2299.                     sampSetCurrentDialogEditboxText(uv1)
  2300.                     wait(id1)
  2301.                     sampSetCurrentDialogEditboxText(uv2 .. uv3)
  2302.                     wait(id2)
  2303.                     sampSetCurrentDialogEditboxText(uv1 .. uv2 .. uv3 .. uv4)
  2304.                     wait(id3)
  2305.                     sampSetCurrentDialogEditboxText(uv1 .. uv2 .. uv3 .. uv4 .. uv5)
  2306.                     wait(id4)
  2307.                     sampSendDialogResponse(23045, 1, "", "" .. uv1 .. uv2 .. uv3 .. uv4 .. uv5 .. "")
  2308.                     wait(1)
  2309.                     sampCloseCurrentDialogWithButton(1)
  2310.                 end
  2311.             end)
  2312.         end
  2313.     end
  2314. end
Advertisement
Add Comment
Please, Sign In to add comment