Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- script_version("12.12.2019")
- require("lib.sampfuncs")
- require("lib.moonloader")
- slot0 = require("memory")
- slot1 = require("vkeys")
- slot2 = require("lib.samp.events")
- slot3 = 0
- slot4 = 0
- slot5 = 0
- slot6 = 0
- slot7 = 0
- resCap = 0
- slot8 = " 11.12.2019"
- slot9 = require("imgui")
- slot10 = require("samp.events")
- slot11, slot12 = pcall(import, "imgui_notf.lua")
- slot13 = require("lib.samp.events")
- slot14 = require("lib.samp.events")
- slot15 = require("vector3d")
- slot17 = false
- slot18 = false
- slot19 = 1.9
- slot20 = require("samp.events")
- gmped = false
- gmcar = false
- slot21 = require("lib.samp.events")
- slot22 = slot9.ImBool(false)
- slot23 = slot9.ImBool(false)
- slot24 = 34
- slot25 = false
- slot26 = false
- slot28 = 0
- slot29 = 0
- slot30 = {
- _DESCRIPTION = "Http s1xreq made simpler",
- http_socket = http_socket,
- https_socket = https_socket,
- HTTPDigestAuth = function (slot0, slot1)
- return {
- _type = "digest",
- user = slot0,
- password = slot1
- }
- end,
- HTTPBasicAuth = function (slot0, slot1)
- return {
- _type = "basic",
- user = slot0,
- password = slot1
- }
- end,
- post = function (slot0, slot1)
- return uv0.request("POST", slot0, slot1)
- end,
- get = function (slot0, slot1)
- return uv0.request("GET", slot0, slot1)
- end,
- delete = function (slot0, slot1)
- return uv0.request("DELETE", slot0, slot1)
- end,
- patch = function (slot0, slot1)
- return uv0.request("PATCH", slot0, slot1)
- end,
- put = function (slot0, slot1)
- return uv0.request("PUT", slot0, slot1)
- end,
- options = function (slot0, slot1)
- return uv0.request("OPTIONS", slot0, slot1)
- end,
- head = function (slot0, slot1)
- return uv0.request("HEAD", slot0, slot1)
- end,
- trace = function (slot0, slot1)
- return uv0.request("TRACE", slot0, slot1)
- end,
- request = function (slot0, slot1, slot2)
- slot3 = nil
- if type(slot1) == "table" then
- slot3 = slot1
- else
- slot2 or {}.url = slot1
- end
- slot3.method = slot0
- uv0.parse_args(slot3)
- if slot3.auth and slot3.auth._type == "digest" then
- return uv0.use_digest(uv0.make_request(slot3), slot3)
- else
- return uv0.make_request(slot3)
- end
- end
- }
- slot31 = {
- make_request = function (slot0)
- slot4 = nil
- slot4, ({
- text = table.concat(slot1),
- json = function ()
- return uv0.decode(uv1.text)
- end,
- xml = function ()
- return uv0.load(uv1.text)
- end
- })["status_code"], ()["headers"], ()["status"] = string.find(({
- method = slot0.method,
- url = slot0.url,
- headers = slot0.headers,
- source = uv0.source.string(slot0.data),
- sink = uv0.sink.table(slot1),
- redirect = slot0.allow_redirects,
- proxy = slot0.proxy
- })["url"], "^https:") and not slot0.proxy and uv1 or uv2.request(slot2)
- assert(slot4, "error in " .. slot0.method .. " request: " .. ()["status_code"])
- return
- end,
- parse_args = function (slot0)
- uv0.check_url(slot0)
- uv0.check_data(slot0)
- uv0.create_header(slot0)
- uv0.check_timeout(slot0.timeout)
- uv0.check_redirect(slot0.allow_redirects)
- end,
- format_params = function (slot0, slot1)
- if not slot1 or next(slot1) == nil then
- return slot0
- end
- slot0 = slot0 .. "?"
- for slot5, slot6 in pairs(slot1) do
- if tostring(slot6) then
- slot0 = slot0 .. tostring(slot5) .. "="
- if type(slot6) == "table" then
- slot7 = ""
- for slot11, slot12 in ipairs(slot6) do
- slot7 = slot7 .. tostring(slot12) .. ","
- end
- slot0 = slot0 .. slot7:sub(0, -2)
- else
- slot0 = slot0 .. tostring(slot6)
- end
- slot0 = slot0 .. "&"
- end
- end
- return slot0:sub(0, -2)
- end,
- check_url = function (slot0)
- assert(slot0.url, "No url specified for request")
- slot0.url = uv0.format_params(slot0.url, slot0.params)
- end,
- create_header = function (slot0)
- slot0.headers = slot0.headers or {}
- slot0.headers["Content-Length"] = slot0.data:len()
- if slot0.cookies then
- if slot0.headers.cookie then
- slot0.headers.cookie = slot0.headers.cookie .. "; " .. slot0.cookies
- else
- slot0.headers.cookie = slot0.cookies
- end
- end
- if slot0.auth then
- uv0.add_auth_headers(slot0)
- end
- end,
- check_data = function (slot0)
- slot0.data = slot0.data or ""
- if type(slot0.data) == "table" then
- slot0.data = uv0.encode(slot0.data)
- end
- end,
- check_timeout = function (slot0)
- uv0.TIMEOUT = slot0 or 5
- uv1.TIMEOUT = slot0 or 5
- end,
- check_redirect = function (slot0)
- if slot0 and type(slot0) ~= "boolean" then
- error("allow_redirects expects a boolean value. received type = " .. type(slot0))
- end
- end,
- basic_auth_header = function (slot0)
- slot0.headers.Authorization = "Basic " .. uv0.encode(slot0.auth.user .. ":" .. slot0.auth.password)
- end,
- digest_create_header_string = function (slot0)
- slot1 = ""
- 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 .. "\""
- if slot0.opaque then
- slot1 = slot1 .. ", opaque=\"" .. slot0.opaque .. "\""
- end
- return slot1
- end,
- digest_hash_response = function (slot0)
- return uv0(uv0(slot0.user, slot0.realm, slot0.password), slot0.nonce, slot0.nc, slot0.cnonce, slot0.qop, uv0(slot0.method, slot0.uri))
- end,
- digest_auth_header = function (slot0)
- if not slot0.auth.nonce then
- return
- end
- slot0.auth.cnonce = slot0.auth.cnonce or string.format("%08x", os.time())
- slot0.auth.nc_count = slot0.auth.nc_count or 0
- slot0.auth.nc_count = slot0.auth.nc_count + 1
- slot0.auth.nc = string.format("%08x", slot0.auth.nc_count)
- slot0.auth.uri = uv0.build({
- path = uv0.parse(slot0.url).path,
- query = uv0.parse(slot0.url).query
- })
- slot0.auth.method = slot0.method
- slot0.auth.qop = "auth"
- slot0.auth.response = uv1.digest_hash_response(slot0.auth)
- slot0.headers.Authorization = uv1.digest_create_header_string(slot0.auth)
- end,
- use_digest = function (slot0, slot1)
- if slot0.status_code == 401 then
- uv0.parse_digest_response_header(slot0, slot1)
- uv0.create_header(slot1)
- uv0.make_request(slot1).auth = slot1.auth
- uv0.make_request(slot1).cookies = slot1.headers.cookie
- return uv0.make_request(slot1)
- else
- slot0.auth = slot1.auth
- slot0.cookies = slot1.headers.cookie
- return slot0
- end
- end,
- parse_digest_response_header = function (slot0, slot1)
- for slot5, slot6 in slot0.headers["www-authenticate"]:gmatch("(%w+)=\"(%S+)\"") do
- slot1.auth[slot5] = slot6
- end
- if slot1.headers.cookie then
- slot1.headers.cookie = slot1.headers.cookie .. "; " .. slot0.headers["set-cookie"]
- else
- slot1.headers.cookie = slot0.headers["set-cookie"]
- end
- slot1.auth.nc_count = 0
- end,
- add_auth_headers = function (slot0)
- ({
- basic = uv0.basic_auth_header,
- digest = uv0.digest_auth_header
- })[slot0.auth._type](slot0)
- end
- }
- slot32 = require("ffi")
- slot33 = require("lib.encoding")
- slot34 = false
- waitaenter = slot9.ImInt(0)
- slot35 = slot9.ImInt(1)
- inputID = slot9.ImBuffer(4096)
- slot36 = slot9.ImBool(false)
- slot37 = slot9.ImBool(false)
- slot38 = slot9.ImBool(false)
- slot39 = slot9.ImBool(false)
- slot40 = slot9.ImBool(false)
- slot41 = require("samp.events")
- slot42 = slot9.ImBool(false)
- slot43 = slot9.ImBool(false)
- slot44 = slot9.ImBool(false)
- slot45 = slot9.ImBool(false)
- slot46 = slot9.ImBool(false)
- slot47 = slot9.ImBool(false)
- slot48 = 0
- slot49, slot50 = nil
- slot9.SwitchContext()
- slot51 = slot9.GetStyle()
- slot33.default = "CP1251"
- cp1251 = slot33.CP1251
- u8 = slot33.UTF8
- slot56 = slot9.ImBuffer(u8("0"), 1000)
- slot57 = slot9.ImBuffer(u8("0"), 1002)
- slot58 = slot9.ImBuffer(u8("0"), 1001)
- slot59 = slot9.ImBuffer(u8("0"), 1003)
- slot60 = slot9.ImBuffer(u8("0"), 1004)
- slot61 = slot9.ImBool(false)
- waitavtonazatietwo = slot9.ImInt(250)
- slot51.WindowPadding = slot55(15, 15)
- slot51.WindowRounding = 6
- slot51.FramePadding = slot55(5, 5)
- slot51.FrameRounding = 4
- slot51.ItemSpacing = slot55(12, 8)
- slot51.ItemInnerSpacing = slot55(8, 6)
- slot51.IndentSpacing = 25
- slot51.ScrollbarSize = 15
- slot51.ScrollbarRounding = 9
- slot51.GrabMinSize = 5
- slot51.GrabRounding = 3
- slot51.Colors[slot9.Col.Text] = slot54(0.8, 0.8, 0.83, 1)
- slot51.Colors[slot9.Col.TextDisabled] = slot54(0.24, 0.23, 0.29, 1)
- slot51.Colors[slot9.Col.WindowBg] = slot54(0.06, 0.05, 0.07, 1)
- slot51.Colors[slot9.Col.ChildWindowBg] = slot54(0.07, 0.07, 0.09, 1)
- slot51.Colors[slot9.Col.PopupBg] = slot54(0.07, 0.07, 0.09, 1)
- slot51.Colors[slot9.Col.Border] = slot54(0.8, 0.8, 0.83, 0.88)
- slot51.Colors[slot9.Col.BorderShadow] = slot54(0.92, 0.91, 0.88, 0)
- slot51.Colors[slot9.Col.FrameBg] = slot54(0.1, 0.09, 0.12, 1)
- slot51.Colors[slot9.Col.FrameBgHovered] = slot54(0.24, 0.23, 0.29, 1)
- slot51.Colors[slot9.Col.FrameBgActive] = slot54(0.56, 0.56, 0.58, 1)
- slot51.Colors[slot9.Col.TitleBg] = slot54(0.76, 0.31, 0, 1)
- slot51.Colors[slot9.Col.TitleBgCollapsed] = slot54(1, 0.98, 0.95, 0.75)
- slot51.Colors[slot9.Col.TitleBgActive] = slot54(0.8, 0.33, 0, 1)
- slot51.Colors[slot9.Col.MenuBarBg] = slot54(0.3, 0.2, 0.39, 0.57)
- slot51.Colors[slot9.Col.ScrollbarBg] = slot54(0.3, 0.2, 0.39, 1)
- slot51.Colors[slot9.Col.ScrollbarGrab] = slot54(0.41, 0.19, 0.63, 0.31)
- slot51.Colors[slot9.Col.ScrollbarGrabHovered] = slot54(0.41, 0.19, 0.63, 0.78)
- slot51.Colors[slot9.Col.ScrollbarGrabActive] = slot54(0.41, 0.19, 0.63, 1)
- slot51.Colors[slot9.Col.ComboBg] = slot54(0.3, 0.2, 0.39, 1)
- slot51.Colors[slot9.Col.CheckMark] = slot54(0.56, 0.61, 1, 1)
- slot51.Colors[slot9.Col.SliderGrab] = slot54(0.41, 0.19, 0.63, 0.24)
- slot51.Colors[slot9.Col.SliderGrabActive] = slot54(0.41, 0.19, 0.63, 1)
- slot51.Colors[slot9.Col.Button] = slot54(0.41, 0.19, 0.63, 0.44)
- slot51.Colors[slot9.Col.ButtonHovered] = slot54(0.41, 0.19, 0.63, 0.86)
- slot51.Colors[slot9.Col.ButtonActive] = slot54(0.64, 0.33, 0.94, 1)
- slot51.Colors[slot9.Col.Header] = slot54(0.41, 0.19, 0.63, 0.76)
- slot51.Colors[slot9.Col.HeaderHovered] = slot54(0.41, 0.19, 0.63, 0.86)
- slot51.Colors[slot9.Col.HeaderActive] = slot54(0.41, 0.19, 0.63, 1)
- slot51.Colors[slot9.Col.ResizeGrip] = slot54(0.41, 0.19, 0.63, 0.2)
- slot51.Colors[slot9.Col.ResizeGripHovered] = slot54(0.41, 0.19, 0.63, 0.78)
- slot51.Colors[slot9.Col.ResizeGripActive] = slot54(0.41, 0.19, 0.63, 1)
- slot51.Colors[slot9.Col.CloseButton] = slot54(1, 1, 1, 0.75)
- slot51.Colors[slot9.Col.CloseButtonHovered] = slot54(0.88, 0.74, 1, 0.59)
- slot51.Colors[slot9.Col.CloseButtonActive] = slot54(0.88, 0.85, 0.92, 1)
- slot51.Colors[slot9.Col.PlotLines] = slot54(0.89, 0.85, 0.92, 0.63)
- slot51.Colors[slot9.Col.PlotLinesHovered] = slot54(0.41, 0.19, 0.63, 1)
- slot51.Colors[slot9.Col.PlotHistogram] = slot54(0.89, 0.85, 0.92, 0.63)
- slot51.Colors[slot9.Col.PlotHistogramHovered] = slot54(0.41, 0.19, 0.63, 1)
- slot51.Colors[slot9.Col.TextSelectedBg] = slot54(0.41, 0.19, 0.63, 0.43)
- slot51.Colors[slot9.Col.ModalWindowDarkening] = slot54(0.2, 0.2, 0.2, 0.35)
- function ShowHelpMarker(slot0)
- uv0.TextDisabled("(?)")
- if uv0.IsItemHovered() then
- uv0.BeginTooltip()
- uv0.PushTextWrapPos(450)
- uv0.TextUnformatted(slot0)
- uv0.PopTextWrapPos()
- uv0.EndTooltip()
- end
- end
- function ShowMessageMarker(slot0)
- uv0.TextDisabled("(!)")
- if uv0.IsItemHovered() then
- uv0.BeginTooltip()
- uv0.PushTextWrapPos(1000)
- uv0.TextUnformatted(slot0)
- uv0.PopTextWrapPos()
- uv0.EndTooltip()
- end
- end
- function slot9.OnDrawFrame()
- if uv0.v then
- uv1.SetNextWindowSize(uv1.ImVec2(500, 500), uv1.Cond.FirstUseEver)
- slot0, slot1 = getScreenResolution()
- uv1.SetNextWindowPos(uv1.ImVec2(slot0 / 2, slot1 / 2), uv1.Cond.FirstUseEver, uv1.ImVec2(0.5, 0.5))
- uv1.Begin(u8("Лучший Cracked. от SK-Tim") .. uv2, uv0, uv1.WindowFlags.NoResize or uv1.WindowFlags.NoCollapse or uv1.WindowFlags.NoSavedSettings)
- uv1.Columns(2, NULL, false)
- uv1.SetColumnOffset(1, 500)
- uv1.RadioButton(u8(" Последнее обновление: 08.12.2019"), uv3, 1)
- if uv1.CollapsingHeader(u8("Помощь в ловле")) then
- uv1.Checkbox(u8("Коллизия"), uv4)
- ShowHelpMarker(u8("Функция позволяет проходить без проблем через людей (не работает на машины, объекты и прочее)."), uv1.SameLine())
- uv1.Checkbox(u8("Только цифры"), uv5)
- ShowHelpMarker(u8("В диалог капчи с включённой функией возможно будет ввести только цифры."), uv1.SameLine())
- uv1.Checkbox(u8("Только 5 цифр"), uv6)
- ShowHelpMarker(u8("Ограничение символов в диалоге капчи."), uv1.SameLine())
- uv1.Checkbox(u8("АвтоНажатие \"N\""), uv7)
- ShowHelpMarker(u8("Автоматически нажимает клавишу: \"N\", когда дом/бизнес слетает (поиск осуществляется по экрану)."), uv1.SameLine())
- uv1.Text(u8("Введите задержку Auto N"))
- uv1.SliderInt(u8("##2"), waitavtonazatietwo, 0, 1000)
- uv1.Checkbox(u8("АвтоНажатие \"ENTER\""), uv8)
- ShowHelpMarker(u8("Автоматически нажимает клавишу: \"ENTER\", когда в окне капчи есть 5 символов."), uv1.SameLine())
- uv1.Text(u8("Введите задержку Auto Enter"))
- uv1.SliderInt(u8("##3"), waitaenter, 0, 1000)
- end
- if uv1.CollapsingHeader(u8("Дополнительные функции")) then
- uv1.Checkbox(u8("Удаление людей"), uv9)
- ShowHelpMarker(u8("Если активен чекбокс, то при нажатии клавиши \"E\" все люди в зоне стрима удалятся."), uv1.SameLine())
- uv1.Checkbox(u8("Удаление машин"), uv10)
- ShowHelpMarker(u8("Если активен чекбокс, то при нажатии клавиши \"R\" все машины в зоне стрима удалятся."), uv1.SameLine())
- ShowMessageMarker(u8("Убирает все автомобили в зоне прорисовки визуально, но хочу предупредить, что после этого пока Вы не покинете данную зону прорисовки - не сможете использовать телепорт по методу \"Surf\"."), uv1.SameLine())
- end
- if uv1.CollapsingHeader(u8("ГМ для персонажа и машины")) then
- uv1.RadioButton(u8(" ГМ для персонажа"), uv3, 1)
- uv1.Text(u8("Активация на клавишу `Insert`."))
- uv1.Text(u8("Защищает Вас от падений, пуль, и прочего."))
- uv1.RadioButton(u8(" ГМ для транспорта"), uv3, 1)
- uv1.Text(u8("Активация на клавишу `Home`."))
- uv1.Text(u8("Защищает Ваш транспорт от любых повреждений."))
- uv1.RadioButton(u8(" Подробнее о ГМ"), uv3, 1)
- uv1.Text(u8("Введите в чат: /gm , чтобы узнать больше."))
- end
- if uv1.CollapsingHeader(u8("AHK для ловли на Arizona RP Supreme")) then
- uv1.RadioButton(u8(" Активация:"), uv3, 1)
- uv1.Text(u8("Для активации введите: /ahk [задержка 1] [2] [3] [4] [5]"))
- ShowHelpMarker(u8("Пример: /ahk 0 0 0 0 0"), uv1.SameLine())
- uv1.RadioButton(u8(" Моментальная ловля:"), uv3, 1)
- uv1.Text(u8("Для моментальной ловли приедьте заранее к бизнесу."))
- uv1.Text(u8("Направьте камеру на TextDraw слетающего бизнеса бизнеса, ..."))
- uv1.Text(u8("... после чего включите функцию `Auto N` с задержкой 0 и..."))
- uv1.Text(u8("... запустите нулевую задержку для АХК [/ahk 0 0 0 0 0]."))
- uv1.Text(u8("Как только дом или бизнес слетит - скрипт автоматически..."))
- uv1.Text(u8("... нажмёт клавишу `N` и введёт моментально капчу."))
- end
- if uv1.CollapsingHeader(u8("Действия после покупки")) then
- ShowHelpMarker(u8("Определение последующих действий после ловли дома."), uv1.SameLine())
- uv1.RadioButton(u8(" Ничего не делать"), uv3, 1)
- uv1.RadioButton(u8(" Отключиться от сервера"), uv3, 2)
- end
- if uv1.CollapsingHeader(u8("Телепорты")) then
- uv1.RadioButton(u8(" Surf"), uv3, 1)
- ShowHelpMarker(u8("Моментальный телепорт используя определённый транспорт в зоне стрима."), uv1.SameLine())
- if uv1.Button(u8("Телепорт по маркеру (Surf)")) then
- sampProcessChatInput("/stp")
- end
- if uv1.Button(u8("Телепорт по чекпоинту (Surf)")) then
- sampProcessChatInput("/stpc")
- end
- uv1.RadioButton(u8(" Coord"), uv3, 1)
- ShowHelpMarker(u8("Быстрый телепорт используя метод курда (занимает какое-то время)"), uv1.SameLine())
- if uv1.Button(u8("Телепорт по маркеру (Coord OnFoot)")) then
- sampProcessChatInput("/poehali")
- end
- if uv1.Button(u8("Телепорт по маркеру (Coord InCar)")) then
- sampProcessChatInput("/fmincar")
- end
- if uv1.Button(u8("Телепорт по чекпоинту (Coord InCar)")) then
- sampProcessChatInput("/fcincar")
- end
- uv1.RadioButton(u8(" Passenger"), uv3, 1)
- ShowHelpMarker(u8("Телепорт через пассажирское место (занимает какое-то время)"), uv1.SameLine())
- ShowMessageMarker(u8("Функция не полностью доработана, поэтому могут быть кики от анти-чита."), uv1.SameLine())
- if uv1.Button(u8("Телепорт по маркеру (Passenger)")) then
- sampProcessChatInput("/fgop")
- end
- if uv1.Button(u8("Телепорт по чекпоинту (Passenger)")) then
- sampProcessChatInput("/fgcp")
- end
- uv1.RadioButton(u8(" Команды:"), uv3, 1)
- ShowHelpMarker(u8("Есть дополнительные команды. Пример: тп на дом или бизнес."), uv1.SameLine())
- uv1.Text(u8("Команды и дополнительные методы телепортации"))
- uv1.Text(u8("можно узнать в разделе: `Доп. информация`"))
- end
- if uv1.CollapsingHeader(u8("Машины для телепортации (Surf)")) then
- uv1.RadioButton(u8(" ИД машин:"), uv3, 1)
- uv1.Text(u8("478, 430, 446, 452, 453, 473, 472, 454, 407, 406, "))
- uv1.Text(u8("484, 493, 595, 543, 605, 538, 433, 408, 570, 414, "))
- uv1.Text(u8("601, 582, 578, 554, 413, 422, 407, 456, 886, 430, "))
- uv1.Text(u8("469, 449, 482, 483, 535, 600, 544, 270, 269, 490. "))
- uv1.RadioButton(u8(" Названия машин:"), uv3, 1)
- uv1.Text(u8("Fire Truck, Predator, Squallo, Speeder, Reefer,"))
- uv1.Text(u8("Dinghy, DFT-30, Tropic, Marquis, Jetmax, Launch,"))
- uv1.Text(u8("Sadler, Sadler Shit, Train, Barracks, S.W.A.T,"))
- uv1.Text(u8("TrashMaster, Newsvan, CoastGuard, Pony, Mule,"))
- uv1.Text(u8("Yosemite, Bobcat, Yankee, Streak Trailer, Tram,"))
- uv1.Text(u8("Flatbed, Burrito, Camper, Slamvan, Packer,"))
- uv1.Text(u8("Picador, Firetruck LA, Dumper, FBI Rancher."))
- uv1.RadioButton(u8(" Количество машин:"), uv3, 1)
- uv1.Text(u8("В данный момент в методе `Surf`: 40 транспортных средств."))
- end
- if uv1.CollapsingHeader(u8("Информация")) then
- uv1.Text(u8("Автор скрипта: Sainix "))
- ShowMessageMarker(u8("vk.com/roma_chepiga"), uv1.SameLine())
- uv1.Text(u8("АХК для ловли домов на ARZ RP Supreme: dsay "))
- ShowMessageMarker(u8("blast.hk/members/370665/"), uv1.SameLine())
- uv1.Text(u8("Метод телепортации (Surf): Sainix, f0Re3t "))
- ShowMessageMarker(u8("vk.com/roma_chepiga"), uv1.SameLine())
- uv1.Text(u8("Метод телепортации (Coord OnFoot): vova2999 "))
- ShowMessageMarker(u8("blast.hk/members/171651/"), uv1.SameLine())
- uv1.Text(u8("Метод телепортации (Coord InCar): damag "))
- ShowMessageMarker(u8("vk.com/dedsec02"), uv1.SameLine())
- uv1.Text(u8("Метод телепортации (Passenger): pipsqueak "))
- ShowMessageMarker(u8("blast.hk/members/324904/"), uv1.SameLine())
- end
- if uv1.CollapsingHeader(u8("Доп. информация")) then
- uv1.RadioButton(u8(" Описание команд:"), uv3, 1)
- uv1.Text(u8("/stph - меню скрипта "))
- uv1.Text(u8("/stp - телепорт на метку (surf) "))
- uv1.Text(u8("/fgop - телепорт на метку (passenger) "))
- uv1.Text(u8("/poehali - телепорт на метку (coord onfoot) "))
- uv1.Text(u8("/fmincar - телепорт на метку (coord incar) "))
- uv1.Text(u8("/fcincar - телепорт на чекпоинт (coord incar) "))
- uv1.Text(u8("/stpc - телепорт на чекпоинт (surf) "))
- uv1.Text(u8("/fgсp - телепорт на чекпоинт (passenger) "))
- uv1.Text(u8("/fh [id] - телепорт на дом (surf) "))
- uv1.Text(u8("/fb [id] - телепорт на бизнес (surf) "))
- uv1.Text(u8("/fhp [id] - телепорт на дом (passenger) "))
- uv1.Text(u8("/fbp [id] - телепорт на бизнес (passenger) "))
- uv1.Text(u8("/ahk - задержка ловли домов на ARZ RP Supreme "))
- uv1.Text(u8("/gm - подробнее о ГМ для персонажа и транспорта "))
- end
- uv1.End()
- end
- end
- function ShowMessage(slot0, slot1, slot2)
- uv0.cdef([[
- int MessageBoxA(
- void* hWnd,
- const char* lpText,
- const char* lpCaption,
- unsigned int uType
- );
- ]])
- uv0.C.MessageBoxA(uv0.cast("void*", readMemory(13160328, 4, false)), slot0, slot1, slot2 and slot2 + 327680 or 327680)
- end
- function nopHook(slot0, slot1)
- require("samp.events")[slot0] = function ()
- if uv0 then
- return false
- end
- end
- end
- function slot41.onSendPlayerSync(slot0)
- if Surfing then
- slot0.surfingVehicleId = vehicleId
- slot0.surfingOffsets.x = 0.1
- slot0.surfingOffsets.y = 0.1
- slot0.surfingOffsets.z = 0.1
- end
- end
- function sendPassengerSync(slot0, slot1, slot2)
- slot3 = allocateMemory(24)
- slot4, slot7 = sampGetPlayerIdByCharHandle(PLAYER_PED)
- sampStorePlayerPassengerData(slot5, slot3)
- setStructElement(slot3, 2, 1, 1, false)
- setStructFloatElement(slot3, 12, slot0, false)
- setStructFloatElement(slot3, 16, slot1, false)
- setStructFloatElement(slot3, 20, slot2, false)
- sampSendPassengerData(slot3)
- freeMemory(slot3)
- end
- function sendUnoccupiedSyncBySeatId(slot0, slot1, slot2, slot3)
- slot4 = allocateMemory(67)
- slot6, slot15 = sampGetVehicleIdByCarHandle(slot5)
- slot14, slot14, slot14 = getCarRoll(slot5)
- setStructElement(slot4, 0, 2, slot7, false)
- setStructElement(slot4, 2, 1, slot3, false)
- setStructFloatElement(slot4, 3, slot8, false)
- setStructFloatElement(slot4, 7, slot9, false)
- setStructFloatElement(slot4, 11, slot10, false)
- setStructFloatElement(slot4, 15, 0.09, false)
- setStructFloatElement(slot4, 19, -0.8, false)
- setStructFloatElement(slot4, 23, 0.02, false)
- setStructFloatElement(slot4, 27, slot0, false)
- setStructFloatElement(slot4, 31, slot1, false)
- setStructFloatElement(slot4, 35, slot2, false)
- setStructFloatElement(slot4, 39, 0.05, false)
- setStructFloatElement(slot4, 43, 0.05, false)
- setStructFloatElement(slot4, 47, 0.05, false)
- setStructFloatElement(slot4, 51, 0.005, false)
- setStructFloatElement(slot4, 55, -0.002, false)
- setStructFloatElement(slot4, 59, 0.3, false)
- setStructElement(slot4, 63, 4, 0, false)
- sampSendUnoccupiedData(slot4)
- freeMemory(slot4)
- end
- function sendInCarFakePosition(slot0, slot1, slot2)
- for slot6 = 0, 2, 1 do
- slot7 = allocateMemory(24)
- slot8, slot11 = sampGetPlayerIdByCharHandle(PLAYER_PED)
- sampStorePlayerPassengerData(slot9, slot7)
- freeMemory(slot7)
- sendUnoccupiedSyncBySeatId(slot0, slot1, slot2, getStructElement(slot7, 2, 1, false))
- sendPassengerSync(slot0, slot1, slot2)
- end
- end
- function carTeleport(slot0, slot1, slot2)
- nopHook("onSendPacket", true)
- lockPlayerControl(false)
- coordmaster(slot0, slot1, slot2)
- end
- function coordmaster(slot0, slot1, slot2)
- slot3 = 6
- slot9, slot10, slot7 = getCarCoordinates(slot4)
- slot8 = getAngle(slot5, slot6, slot0, slot1)
- while true do
- wait(0)
- printStringNow("~Y~Loading...~s~", 1000)
- if slot3 < getDistanceBetweenCoords2d(slot5, slot6, slot0, slot1) then
- sendInCarFakePosition(slot5 + math.sin(slot8) * slot3, slot6 + math.cos(slot8) * slot3, slot7)
- else
- sendInCarFakePosition(slot0, slot1, slot2)
- setCarCoordinates(slot4, slot0, slot1, slot2)
- nopHook("onSendPacket", false)
- lockPlayerControl(false)
- sampAddChatMessage("{f5c011}[SainixTeleport] {ffffff} {FFFFFF}| {00FF00}[Успешно] {FFFFFF}Телепортация выполнена!", -1)
- addOneOffSound(0, 0, 0, 1139)
- break
- end
- end
- end
- function getAngle(slot0, slot1, slot2, slot3)
- return math.atan2(slot2 - slot0, slot3 - slot1)
- end
- function getTargetBlipCoordinatesFixed()
- slot0, slot1, slot2, slot3 = getTargetBlipCoordinates()
- if not slot0 then
- return false
- end
- requestCollision(slot1, slot2)
- loadScene(slot1, slot2, slot3)
- slot8, slot9, slot10, slot11 = getTargetBlipCoordinates()
- return slot4, slot5, slot6, slot7
- end
- function SearchMarker(slot0, slot1, slot2)
- slot3 = 0
- slot4 = 0
- slot5 = 0
- slot6 = false
- for slot10 = 0, 31, 1 do
- slot11 = 0
- slot13 = representIntAsFloat(readMemory(13103464 + slot10 * 56 + 4, 4, false))
- slot14 = representIntAsFloat(readMemory(13103464 + slot10 * 56 + 8, 4, false))
- if representIntAsFloat(readMemory(13103464 + slot10 * 56 + 0, 4, false)) ~= 0 or slot13 ~= 0 or slot14 ~= 0 then
- slot3 = slot12
- slot4 = slot13
- slot5 = slot14
- slot6 = true
- end
- end
- return slot6, slot3, slot4, slot5
- end
- function slot41.onCreate3DText(slot0, slot1, slot2, slot3, slot4, slot5, slot6, slot7)
- if uv0.v and (slot7:find("*** Дом продается ***") or slot7:find("Бизнес продается")) then
- lua_thread.create(function ()
- wait(waitavtonazatietwo.v)
- slot0, slot4 = sampGetPlayerIdByCharHandle(PLAYER_PED)
- slot2 = allocateMemory(68)
- sampStorePlayerOnfootData(slot1, slot2)
- setStructElement(slot2, 36, 1, 128, false)
- sampSendOnfootData(slot2)
- freeMemory(slot2)
- end)
- end
- end
- function slot41.onServerMessage(slot0, slot1)
- if slot1:find("{FF6347} Местом спавна автоматически назначен ваш дом. Изменить место спавна {FFFFFF}") and uv0.v == 2 then
- raknetEmulPacketReceiveBitStream(PACKET_DISCONNECTION_NOTIFICATION, raknetNewBitStream())
- raknetDeleteBitStream(raknetNewBitStream())
- sampDisconnectWithReason(1)
- sampAddChatMessage("{FFFFFF} Дисконнект проведён успешно!", -1)
- uv0.v = 1
- end
- end
- function slot41.onShowDialog(slot0, slot1, slot2, slot3, slot4, slot5)
- if uv0.v and slot2:find("Проверка на робота") then
- lua_thread.create(function ()
- wait(0)
- while true do
- wait(0)
- inputtext = sampGetCurrentDialogEditboxText()
- if inputtext ~= "" then
- sampSetCurrentDialogEditboxText(string.gsub(inputtext, "[^1234567890]", ""))
- end
- end
- end)
- end
- if uv1.v and slot2:find("Проверка на робота") then
- lua_thread.create(function ()
- wait(0)
- while true do
- wait(0)
- textsumfive = sampGetCurrentDialogEditboxText()
- if uv0.v then
- kol()
- end
- if #textsumfive == 5 then
- wait(waitaenter.v)
- sampCloseCurrentDialogWithButton(1)
- uv1.v = false
- break
- end
- end
- end)
- end
- if uv3.v then
- lua_thread.create(function ()
- while true do
- wait(0)
- if sampIsDialogActive() and sampGetDialogCaption():find("Проверка на робота") then
- if uv0.v then
- sampSetCurrentDialogEditboxText(string.gsub(sampGetCurrentDialogEditboxText(), "[^1234567890]", ""))
- end
- if uv1.v and #sampGetCurrentDialogEditboxText() > 5 then
- sampSetCurrentDialogEditboxText(slot0:sub(1, 5))
- end
- end
- end
- end)
- end
- end
- function kol()
- for slot3, slot4 in ipairs(getAllChars()) do
- if doesCharExist(slot4) and slot4 ~= playerPed then
- setCharCollision(slot4, false)
- end
- end
- end
- function autoupdate(slot0, slot1, slot2)
- slot3 = require("moonloader").download_status
- if doesFileExist(getWorkingDirectory() .. "\\" .. thisScript().name .. "-version.json") then
- os.remove(slot4)
- end
- downloadUrlToFile(slot0, slot4, function (slot0, slot1, slot2, slot3)
- if slot1 == uv0.STATUSEX_ENDDOWNLOAD then
- if doesFileExist(uv1) then
- if io.open(uv1, "r") then
- updatelink = decodeJson(slot4:read("*a")).updateurl
- updateversion = decodeJson(slot4.read("*a")).latest
- slot4:close()
- os.remove(uv1)
- if updateversion ~= thisScript().version then
- lua_thread.create(function (slot0)
- slot1 = require("moonloader").download_status
- sampAddChatMessage(slot0 .. "Обнаружено обновление. Пытаюсь обновиться c " .. thisScript().version .. " на " .. updateversion, slot2)
- wait(250)
- downloadUrlToFile(updatelink, thisScript().path, function (slot0, slot1, slot2, slot3)
- if slot1 == uv0.STATUS_DOWNLOADINGDATA then
- print(string.format("Загружено %d из %d.", slot2, slot3))
- elseif slot1 == uv0.STATUS_ENDDOWNLOADDATA then
- print("Загрузка обновления завершена.")
- sampAddChatMessage(uv1 .. "Обновление завершено!", uv2)
- goupdatestatus = true
- lua_thread.create(function ()
- wait(500)
- thisScript():reload()
- end)
- end
- if slot1 == uv0.STATUSEX_ENDDOWNLOAD and goupdatestatus == nil then
- sampAddChatMessage(uv1 .. "Обновление прошло неудачно. Запускаю устаревшую версию..", uv2)
- update = false
- end
- end)
- end, uv2)
- else
- update = false
- print("v" .. thisScript().version .. ": Обновление не требуется.")
- end
- end
- else
- print("v" .. thisScript().version .. ": Не могу проверить обновление. Смиритесь или проверьте самостоятельно на " .. uv3)
- update = false
- end
- end
- end)
- while update ~= false do
- wait(100)
- end
- end
- function getserial()
- slot0 = require("ffi")
- slot0.cdef([[
- int __stdcall GetVolumeInformationA(
- const char* lpRootPathName,
- char* lpVolumeNameBuffer,
- uint32_t nVolumeNameSize,
- uint32_t* lpVolumeSerialNumber,
- uint32_t* lpMaximumComponentLength,
- uint32_t* lpFileSystemFlags,
- char* lpFileSystemNameBuffer,
- uint32_t nFileSystemNameSize
- );
- ]])
- slot0.C.GetVolumeInformationA(nil, nil, 0, slot0.new("unsigned long[1]", 0), nil, nil, nil, 0)
- return slot0.new("unsigned long[1]", 0)[0]
- end
- slot62 = require("ffi")
- slot62.cdef([[
- int __stdcall GetVolumeInformationA(
- const char* lpRootPathName,
- char* lpVolumeNameBuffer,
- uint32_t nVolumeNameSize,
- uint32_t* lpVolumeSerialNumber,
- uint32_t* lpMaximumComponentLength,
- uint32_t* lpFileSystemFlags,
- char* lpFileSystemNameBuffer,
- uint32_t nFileSystemNameSize
- );
- ]])
- slot62.C.GetVolumeInformationA(nil, nil, 0, slot62.new("unsigned long[1]", 0), nil, nil, nil, 0)
- slot63 = slot62.new("unsigned long[1]", 0)[0]
- slot64 = require("lib.samp.events")
- requests = require("requests")
- function getserial()
- slot0 = require("ffi")
- slot0.cdef([[
- int __stdcall GetVolumeInformationA(
- const char* lpRootPathName,
- char* lpVolumeNameBuffer,
- uint32_t nVolumeNameSize,
- uint32_t* lpVolumeSerialNumber,
- uint32_t* lpMaximumComponentLength,
- uint32_t* lpFileSystemFlags,
- char* lpFileSystemNameBuffer,
- uint32_t nFileSystemNameSize
- );
- ]])
- slot0.C.GetVolumeInformationA(nil, nil, 0, slot0.new("unsigned long[1]", 0), nil, nil, nil, 0)
- return slot0.new("unsigned long[1]", 0)[0]
- end
- function checkKey()
- response = requests.get("http://vipmasmd.beget.tech/auth.php?code=" .. getserial())
- if not response.text:match("<body>(.*)</body>"):find("-1") then
- if not response.text:match("<body>(.*)</body>"):find("The duration of the key has expired.") then
- -- Nothing
- end
- else
- sampAddChatMessage("{f5c011}[Sainixteleport.lua] {FFFFFF} не привязан обратитесь к https://vk.com/roma_chepiga либо попробуйте перезапустить игру", -1)
- sampAddChatMessage("{f5c011}[Sainixteleport.lua] {FFFFFF} Ваш ключ: " .. uv0, -1)
- thisScript():unload()
- end
- end
- function main()
- if not isSampfuncsLoaded() or not isSampLoaded() then
- return
- end
- while not isSampAvailable() do
- wait(100)
- end
- if false then
- slot0("http://vipmasmd.beget.tech/menu/update.php", "[" .. string.upper(thisScript().name) .. "]: ", "http://vipmasmd.beget.tech/menu/Sainixteleport.luac")
- checkKey()
- wait(0)
- end
- sampAddChatMessage("{f5c011}[SainixTeleport] {ffffff} Скрипт загружен! Автор скрипта: Sainix Меню скрипта: /stph", -1)
- uv0.addNotification("Скрипт \"SainixTeleport\" успешно загружен! Версия: 11.12.2019.", 5, 4)
- uv1.default = "CP1251"
- cp1251 = uv1.CP1251
- u8 = uv1.UTF8
- uv2.Process = true
- sampRegisterChatCommand("fhp", cmd_fhp)
- sampRegisterChatCommand("gm", gm)
- sampRegisterChatCommand("gmm", function (slot0)
- end)
- lua_thread.create(function ()
- while true do
- wait(0)
- doKeyCheck()
- end
- end)
- sampRegisterChatCommand("fbp", cmd_fbp)
- sampRegisterChatCommand("fgop", function ()
- result, x, y, z = getTargetBlipCoordinatesFixed()
- if result then
- if isCharInAnyCar(PLAYER_PED) then
- lua_thread.create(carTeleport, x, y, z)
- end
- else
- sampAddChatMessage("{f5c011}[SainixTeleport] {ffffff} {FFFFFF}| {FF0000}[Ошибка] {FFFFFF}Маркер не найден!", -1)
- end
- end)
- sampRegisterChatCommand("fgcp", function ()
- result, x, y, z = SearchMarker(getCharCoordinates(PLAYER_PED))
- if result then
- if isCharInAnyCar(PLAYER_PED) then
- lua_thread.create(carTeleport, x, y, z)
- end
- else
- sampAddChatMessage("{f5c011}[SainixTeleport] {ffffff} {FFFFFF}| {FF0000}[Ошибка] {FFFFFF}Чекпоинт не найден!", -1)
- end
- end)
- sampRegisterChatCommand("stph", function ()
- uv0.v = not uv0.v
- end)
- lua_thread.create(function ()
- while true do
- wait(0)
- if uv0.v and isKeyDown(69) then
- dekchars()
- end
- if uv1.v and isKeyDown(82) then
- dekcars()
- end
- if uv2.v then
- kol()
- end
- uv3.Process = uv4.v
- end
- end)
- sampRegisterChatCommand("fmincar", function ()
- lua_thread.create(function ()
- if uv0 then
- return sampAddChatMessage("{f5c011}[SainixTeleport] {ffffff} {FFFFFF}| {FF0000}[Ошибка] {FFFFFF}Error 404!", -1)
- end
- blip, blipX, blipY, blipZ = getTargetBlipCoordinatesFixed()
- if blip then
- uv1 = true
- charPosX, charPosY, charPosZ = getCharCoordinates(playerPed)
- if getDistanceBetweenCoords3d(blipX, blipY, charPosZ, charPosX, charPosY, charPosZ) < 9 then
- return setCharCoordinates(playerPed, blipX, blipY, blipZ)
- end
- setCharCoordinates(playerPed, blipX, blipY, blipZ)
- uv0 = true
- end
- end)
- end)
- sampRegisterChatCommand("fcincar", function ()
- lua_thread.create(function ()
- if uv0 then
- return sampAddChatMessage("{f5c011}[SainixTeleport] {ffffff} {FFFFFF}| {FF0000}[Ошибка] {FFFFFF}Error 404!", -1)
- end
- blip, blipX, blipY, blipZ = SearchMarker(getCharCoordinates(PLAYER_PED))
- if blip then
- uv1 = true
- charPosX, charPosY, charPosZ = getCharCoordinates(playerPed)
- if getDistanceBetweenCoords3d(blipX, blipY, charPosZ, charPosX, charPosY, charPosZ) < 9 then
- return setCharCoordinates(playerPed, blipX, blipY, blipZ)
- end
- setCharCoordinates(playerPed, blipX, blipY, blipZ)
- uv0 = true
- end
- end)
- end)
- while true do
- wait(0)
- if os.clock() - uv9 > 2000 and uv8 then
- uv9 = 0
- uv8 = false
- end
- if uv7 then
- if getDistanceBetweenCoords3d(blipX, blipY, blipZ, charPosX, charPosY, charPosZ) > 9 then
- slot0, slot1 = sampGetVehicleIdByCarHandle(vehicleId)
- vectorX = blipX - charPosX
- vectorY = blipY - charPosY
- vectorZ = blipZ - charPosZ
- slot2 = uv10(vectorX, vectorY, vectorZ)
- slot2:normalize()
- wait(1)
- sampForceVehicleSync()
- charPosX = charPosX + slot2.x * 14.5
- charPosY = charPosY + slot2.y * 14.5
- charPosZ = charPosZ + slot2.z * 14.5
- sendOnfootSync(charPosX, charPosY, charPosZ + 4)
- sendOnfootSyncc(charPosX, charPosY, charPosZ)
- uv11 = uv11 + 1
- if uv11 == 5 then
- wait(1)
- sendOnfootSync(charPosX + 100, charPosY + 100, charPosZ + 2)
- sampForceVehicleSync()
- uv11 = 0
- end
- else
- sendOnfootSync(charPosX, charPosY, charPosZ)
- printStringNow("~y~teleported", 666)
- sendOnfootSync(charPosX + 1, charPosY + 1, charPosZ + 2)
- setCharCoordinates(playerPed, blipX, blipY, blipZ)
- sampForceVehicleSync()
- sendOnfootSync(charPosX, charPosY, charPosZ + 2)
- uv7 = false
- setCharCoordinates(playerPed, blipX, blipY, blipZ)
- uv8 = false
- end
- end
- sampRegisterChatCommand("ahk", atax)
- while true do
- wait(0)
- for slot3 = 0, 4, 1 do
- offset = -10
- 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
- resCap = 0
- end
- 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
- resCap = 9
- end
- 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
- resCap = 4
- end
- 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
- resCap = 8
- end
- 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
- resCap = 7
- end
- 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
- resCap = 6
- end
- 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
- resCap = 5
- end
- 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
- resCap = 3
- end
- 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
- resCap = 2
- end
- 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
- resCap = 1
- end
- if slot3 == 0 then
- uv12 = resCap
- elseif slot3 == 1 then
- uv13 = resCap
- elseif slot3 == 2 then
- uv14 = resCap
- elseif slot3 == 3 then
- uv15 = resCap
- elseif slot3 == 4 then
- uv16 = resCap
- end
- end
- end
- end
- end
- function dekchars()
- for slot3, slot4 in ipairs(getAllChars()) do
- if doesCharExist(slot4) then
- slot5, slot6 = sampGetPlayerIdByCharHandle(slot4)
- if slot6 ~= myid then
- emul_rpc("onPlayerStreamOut", {
- slot6
- })
- end
- end
- end
- end
- function emul_rpc(slot0, slot1)
- slot2 = require("samp.events.bitstream_io")
- slot3 = require("samp.events.handlers")
- slot4 = require("samp.events.extra_types")
- slot6 = {
- onShowTextDraw = true,
- onSetObjectMaterialText = true,
- onVehicleStreamIn = true,
- onSetObjectMaterial = true,
- onInitMenu = true,
- onInitGame = true,
- onCreateObject = true
- }
- slot7 = {
- Int32Array3 = true,
- PlayerScorePingMap = true
- }
- if ({
- onInitGame = {
- 139
- },
- onPlayerJoin = {
- "int16",
- "int32",
- "bool8",
- "string8",
- 137
- },
- onPlayerQuit = {
- "int16",
- "int8",
- 138
- },
- onRequestClassResponse = {
- "bool8",
- "int8",
- "int32",
- "int8",
- "vector3d",
- "float",
- "Int32Array3",
- "Int32Array3",
- 128
- },
- onRequestSpawnResponse = {
- "bool8",
- 129
- },
- onSetPlayerName = {
- "int16",
- "string8",
- "bool8",
- 11
- },
- onSetPlayerPos = {
- "vector3d",
- 12
- },
- onSetPlayerPosFindZ = {
- "vector3d",
- 13
- },
- onSetPlayerHealth = {
- "float",
- 14
- },
- onTogglePlayerControllable = {
- "bool8",
- 15
- },
- onPlaySound = {
- "int32",
- "vector3d",
- 16
- },
- onSetWorldBounds = {
- "float",
- "float",
- "float",
- "float",
- 17
- },
- onGivePlayerMoney = {
- "int32",
- 18
- },
- onSetPlayerFacingAngle = {
- "float",
- 19
- },
- onGivePlayerWeapon = {
- "int32",
- "int32",
- 22
- },
- onSetPlayerTime = {
- "int8",
- "int8",
- 29
- },
- onSetToggleClock = {
- "bool8",
- 30
- },
- onPlayerStreamIn = {
- "int16",
- "int8",
- "int32",
- "vector3d",
- "float",
- "int32",
- "int8",
- 32
- },
- onSetShopName = {
- "string256",
- 33
- },
- onSetPlayerSkillLevel = {
- "int16",
- "int32",
- "int16",
- 34
- },
- onSetPlayerDrunk = {
- "int32",
- 35
- },
- onCreate3DText = {
- "int16",
- "int32",
- "vector3d",
- "float",
- "bool8",
- "int16",
- "int16",
- "encodedString4096",
- 36
- },
- onSetRaceCheckpoint = {
- "int8",
- "vector3d",
- "vector3d",
- "float",
- 38
- },
- onPlayAudioStream = {
- "string8",
- "vector3d",
- "float",
- "bool8",
- 41
- },
- onRemoveBuilding = {
- "int32",
- "vector3d",
- "float",
- 43
- },
- onCreateObject = {
- 44
- },
- onSetObjectPosition = {
- "int16",
- "vector3d",
- 45
- },
- onSetObjectRotation = {
- "int16",
- "vector3d",
- 46
- },
- onDestroyObject = {
- "int16",
- 47
- },
- onPlayerDeathNotification = {
- "int16",
- "int16",
- "int8",
- 55
- },
- onSetMapIcon = {
- "int8",
- "vector3d",
- "int8",
- "int32",
- "int8",
- 56
- },
- onRemoveVehicleComponent = {
- "int16",
- "int16",
- 57
- },
- onRemove3DTextLabel = {
- "int16",
- 58
- },
- onPlayerChatBubble = {
- "int16",
- "int32",
- "float",
- "int32",
- "string8",
- 59
- },
- onUpdateGlobalTimer = {
- "int32",
- 60
- },
- onShowDialog = {
- "int16",
- "int8",
- "string8",
- "string8",
- "string8",
- "encodedString4096",
- 61
- },
- onDestroyPickup = {
- "int32",
- 63
- },
- onLinkVehicleToInterior = {
- "int16",
- "int8",
- 65
- },
- onSetPlayerArmour = {
- "float",
- 66
- },
- onSetPlayerArmedWeapon = {
- "int32",
- 67
- },
- onSetSpawnInfo = {
- "int8",
- "int32",
- "int8",
- "vector3d",
- "float",
- "Int32Array3",
- "Int32Array3",
- 68
- },
- onSetPlayerTeam = {
- "int16",
- "int8",
- 69
- },
- onPutPlayerInVehicle = {
- "int16",
- "int8",
- 70
- },
- onSetPlayerColor = {
- "int16",
- "int32",
- 72
- },
- onDisplayGameText = {
- "int32",
- "int32",
- "string32",
- 73
- },
- onAttachObjectToPlayer = {
- "int16",
- "int16",
- "vector3d",
- "vector3d",
- 75
- },
- onInitMenu = {
- 76
- },
- onShowMenu = {
- "int8",
- 77
- },
- onHideMenu = {
- "int8",
- 78
- },
- onCreateExplosion = {
- "vector3d",
- "int32",
- "float",
- 79
- },
- onShowPlayerNameTag = {
- "int16",
- "bool8",
- 80
- },
- onAttachCameraToObject = {
- "int16",
- 81
- },
- onInterpolateCamera = {
- "bool",
- "vector3d",
- "vector3d",
- "int32",
- "int8",
- 82
- },
- onGangZoneStopFlash = {
- "int16",
- 85
- },
- onApplyPlayerAnimation = {
- "int16",
- "string8",
- "string8",
- "bool",
- "bool",
- "bool",
- "bool",
- "int32",
- 86
- },
- onClearPlayerAnimation = {
- "int16",
- 87
- },
- onSetPlayerSpecialAction = {
- "int8",
- 88
- },
- onSetPlayerFightingStyle = {
- "int16",
- "int8",
- 89
- },
- onSetPlayerVelocity = {
- "vector3d",
- 90
- },
- onSetVehicleVelocity = {
- "bool8",
- "vector3d",
- 91
- },
- onServerMessage = {
- "int32",
- "string32",
- 93
- },
- onSetWorldTime = {
- "int8",
- 94
- },
- onCreatePickup = {
- "int32",
- "int32",
- "int32",
- "vector3d",
- 95
- },
- onMoveObject = {
- "int16",
- "vector3d",
- "vector3d",
- "float",
- "vector3d",
- 99
- },
- onEnableStuntBonus = {
- "bool",
- 104
- },
- onTextDrawSetString = {
- "int16",
- "string16",
- 105
- },
- onSetCheckpoint = {
- "vector3d",
- "float",
- 107
- },
- onCreateGangZone = {
- "int16",
- "vector2d",
- "vector2d",
- "int32",
- 108
- },
- onPlayCrimeReport = {
- "int16",
- "int32",
- "int32",
- "int32",
- "int32",
- "vector3d",
- 112
- },
- onGangZoneDestroy = {
- "int16",
- 120
- },
- onGangZoneFlash = {
- "int16",
- "int32",
- 121
- },
- onStopObject = {
- "int16",
- 122
- },
- onSetVehicleNumberPlate = {
- "int16",
- "string8",
- 123
- },
- onTogglePlayerSpectating = {
- "bool32",
- 124
- },
- onSpectatePlayer = {
- "int16",
- "int8",
- 126
- },
- onSpectateVehicle = {
- "int16",
- "int8",
- 127
- },
- onShowTextDraw = {
- 134
- },
- onSetPlayerWantedLevel = {
- "int8",
- 133
- },
- onTextDrawHide = {
- "int16",
- 135
- },
- onRemoveMapIcon = {
- "int8",
- 144
- },
- onSetWeaponAmmo = {
- "int8",
- "int16",
- 145
- },
- onSetGravity = {
- "float",
- 146
- },
- onSetVehicleHealth = {
- "int16",
- "float",
- 147
- },
- onAttachTrailerToVehicle = {
- "int16",
- "int16",
- 148
- },
- onDetachTrailerFromVehicle = {
- "int16",
- 149
- },
- onSetWeather = {
- "int8",
- 152
- },
- onSetPlayerSkin = {
- "int32",
- "int32",
- 153
- },
- onSetInterior = {
- "int8",
- 156
- },
- onSetCameraPosition = {
- "vector3d",
- 157
- },
- onSetCameraLookAt = {
- "vector3d",
- "int8",
- 158
- },
- onSetVehiclePosition = {
- "int16",
- "vector3d",
- 159
- },
- onSetVehicleAngle = {
- "int16",
- "float",
- 160
- },
- onSetVehicleParams = {
- "int16",
- "int16",
- "bool8",
- 161
- },
- onChatMessage = {
- "int16",
- "string8",
- 101
- },
- onConnectionRejected = {
- "int8",
- 130
- },
- onPlayerStreamOut = {
- "int16",
- 163
- },
- onVehicleStreamIn = {
- 164
- },
- onVehicleStreamOut = {
- "int16",
- 165
- },
- onPlayerDeath = {
- "int16",
- 166
- },
- onPlayerEnterVehicle = {
- "int16",
- "int16",
- "bool8",
- 26
- },
- onUpdateScoresAndPings = {
- "PlayerScorePingMap",
- 155
- },
- onSetObjectMaterial = {
- 84
- },
- onSetObjectMaterialText = {
- 84
- },
- onSetVehicleParamsEx = {
- "int16",
- "int8",
- "int8",
- "int8",
- "int8",
- "int8",
- "int8",
- "int8",
- "int8",
- "int8",
- "int8",
- "int8",
- "int8",
- "int8",
- "int8",
- "int8",
- "int8",
- 24
- },
- onSetPlayerAttachedObject = {
- "int16",
- "int32",
- "bool",
- "int32",
- "int32",
- "vector3d",
- "vector3d",
- "vector3d",
- "int32",
- "int32",
- 113
- }
- })[slot0] then
- slot9 = raknetNewBitStream()
- if not slot6[slot0] then
- if #slot8 - 1 > 0 then
- for slot14 = 1, slot10, 1 do
- if slot7[slot8[slot14]] then
- slot4[slot15].write(slot9, slot1[slot14])
- else
- slot2[slot15].write(slot9, slot1[slot14])
- end
- end
- end
- elseif slot0 == "onInitGame" then
- slot3.on_init_game_writer(slot9, slot1)
- elseif slot0 == "onCreateObject" then
- slot3.on_create_object_writer(slot9, slot1)
- elseif slot0 == "onInitMenu" then
- slot3.on_init_menu_writer(slot9, slot1)
- elseif slot0 == "onShowTextDraw" then
- slot3.on_show_textdraw_writer(slot9, slot1)
- elseif slot0 == "onVehicleStreamIn" then
- slot3.on_vehicle_stream_in_writer(slot9, slot1)
- elseif slot0 == "onSetObjectMaterial" then
- slot3.on_set_object_material_writer(slot9, slot1, 1)
- elseif slot0 == "onSetObjectMaterialText" then
- slot3.on_set_object_material_writer(slot9, slot1, 2)
- end
- raknetEmulRpcReceiveBitStream(slot8[#slot8], slot9)
- raknetDeleteBitStream(slot9)
- end
- end
- function dekcars()
- for slot3, slot4 in pairs(getAllVehicles()) do
- if doesVehicleExist(slot4) then
- deleteCar(slot4)
- end
- end
- end
- function cmd_fhp(slot0)
- lua_thread.create(function ()
- sampSendChat("/findihouse " .. uv0)
- wait(250)
- sampProcessChatInput("/fgop")
- end)
- end
- function gm(slot0)
- lua_thread.create(function ()
- wait(250)
- sampAddChatMessage("{f5c011}[SainixTeleport] {ffffff} {FFFFFF}| {20B2AA}[ИНФО] {FFFFFF}ГМ всегда готов к работе, для его активации нажмите ...", -1)
- sampAddChatMessage("... на: Insert (активация ГМ на персонажа), нажмите на: Home (активация ГМ на транспорт).", -1)
- end)
- end
- function cmd_fbp(slot0)
- lua_thread.create(function ()
- sampSendChat("/findibiz " .. uv0)
- wait(250)
- sampProcessChatInput("/fgcp")
- end)
- end
- function acrd()
- if not uv0 and not uv1 then
- slot0, slot1, slot2, slot3 = getTargetBlipCoordinatesFixed()
- if not slot0 then
- sampAddChatMessage("{f5c011}[SainixTeleport] {ffffff} {FFFFFF}| {FF0000}[Ошибка] {FFFFFF}Метка не найдена!", -1)
- else
- sampAddChatMessage("{f5c011}[SainixTeleport] {ffffff} {FFFFFF}| {00FF00}[Успешно] {FFFFFF}Телепортация запущена...", -1)
- lua_thread.create(function ()
- uv0 = true
- slot0, slot1, slot2 = getCharCoordinates(PLAYER_PED)
- for slot6 = 1, 25, 1 do
- setCharCoordinates(PLAYER_PED, slot0, slot1, slot2 - uv1)
- for slot10 = 1, 3, 1 do
- slot11 = samp_create_sync_data("player")
- slot11.health = getCharHealth(PLAYER_PED)
- slot11.armor = getCharArmour(PLAYER_PED)
- slot11.position.z = slot2 - 1
- slot11.position.y = slot1 + 5
- slot11.position.x = slot0 + 5
- slot11.moveSpeed.z = 0.5
- slot11.moveSpeed.y = 0.4
- slot11.moveSpeed.x = 0.5
- slot11.send()
- end
- wait(uv2)
- end
- slot3 = getDistanceBetweenCoords3d(uv3, uv4, uv5, slot0, slot1, slot2)
- while slot3 > uv1 + 1 do
- if not uv0 then
- sampAddChatMessage("{f5c011}[SainixTeleport] {ffffff} {FFFFFF}| {FF0000}[Ошибка] {FFFFFF}Телепортация остановлена. Поднимаемся наверх.", -1)
- uv6 = true
- slot4 = getGroundZFor3dCoord(slot0, slot1, slot2 + 1000)
- while slot2 < slot4 do
- setCharCoordinates(PLAYER_PED, slot0, slot1, slot2 + uv1)
- for slot8 = 1, 3, 1 do
- slot9 = samp_create_sync_data("player")
- slot9.health = getCharHealth(PLAYER_PED)
- slot9.armor = getCharArmour(PLAYER_PED)
- slot9.position.z = slot2
- slot9.position.y = slot1 + 5
- slot9.position.x = slot0 + 5
- slot9.moveSpeed.z = 0.5
- slot9.moveSpeed.y = 0.4
- slot9.moveSpeed.x = 0.5
- slot9.send()
- end
- wait(uv2)
- end
- uv6 = false
- break
- end
- slot0 = uv3 < slot0 and slot0 - uv1 or slot0 + uv1
- slot1 = uv4 < slot1 and slot1 - uv1 or slot1 + uv1
- if isCharInArea3d(PLAYER_PED, uv3 + 10, uv4 + 10, uv5 + 10000, uv3 - 10, uv4 - 10, uv5 - 10000, false) then
- slot2 = uv5 < slot2 and slot2 - uv1 or slot2 + uv1
- end
- slot3 = getDistanceBetweenCoords3d(uv3, uv4, uv5, slot0, slot1, slot2)
- sampForceOnfootSync()
- setCharCoordinates(PLAYER_PED, slot0, slot1, slot2 + 2)
- sampForceOnfootSync()
- for slot7 = 1, 3, 1 do
- wait(4)
- slot8 = samp_create_sync_data("player")
- slot8.health = getCharHealth(PLAYER_PED)
- slot8.armor = getCharArmour(PLAYER_PED)
- slot8.position.z = slot2 + 2
- slot8.position.y = slot1 + 5
- slot8.position.x = slot0 + 9
- slot8.moveSpeed.z = 0.9
- slot8.moveSpeed.y = 0.9
- slot8.moveSpeed.x = 0.9
- slot8.send()
- end
- wait(4)
- end
- wait(100)
- uv0 = false
- sampAddChatMessage("{f5c011}[SainixTeleport] {ffffff} {FFFFFF}| {00FF00}[Успешно] {FFFFFF}Телепортация выполнена!", -1)
- end)
- end
- return
- end
- if not uv1 then
- uv0 = false
- end
- end
- function nopHook(slot0, slot1)
- require("samp.events")[slot0] = function ()
- if uv0 then
- return false
- end
- end
- end
- function sendPassengerSync(slot0, slot1, slot2)
- slot3 = allocateMemory(24)
- slot4, slot7 = sampGetPlayerIdByCharHandle(PLAYER_PED)
- sampStorePlayerPassengerData(slot5, slot3)
- setStructElement(slot3, 2, 1, 1, false)
- setStructFloatElement(slot3, 12, slot0, false)
- setStructFloatElement(slot3, 16, slot1, false)
- setStructFloatElement(slot3, 20, slot2, false)
- sampSendPassengerData(slot3)
- freeMemory(slot3)
- end
- function sendUnoccupiedSyncBySeatId(slot0, slot1, slot2, slot3)
- slot4 = allocateMemory(67)
- slot6, slot15 = sampGetVehicleIdByCarHandle(slot5)
- slot14, slot14, slot14 = getCarRoll(slot5)
- setStructElement(slot4, 0, 2, slot7, false)
- setStructElement(slot4, 2, 1, slot3, false)
- setStructFloatElement(slot4, 3, slot8, false)
- setStructFloatElement(slot4, 7, slot9, false)
- setStructFloatElement(slot4, 11, slot10, false)
- setStructFloatElement(slot4, 15, 0.09, false)
- setStructFloatElement(slot4, 19, -0.8, false)
- setStructFloatElement(slot4, 23, 0.02, false)
- setStructFloatElement(slot4, 27, slot0, false)
- setStructFloatElement(slot4, 31, slot1, false)
- setStructFloatElement(slot4, 35, slot2, false)
- setStructFloatElement(slot4, 39, 0.0012, false)
- setStructFloatElement(slot4, 43, 0.02, false)
- setStructFloatElement(slot4, 47, 0.0017, false)
- setStructFloatElement(slot4, 51, 0.005, false)
- setStructFloatElement(slot4, 55, -0.002, false)
- setStructFloatElement(slot4, 59, 0.3, false)
- setStructElement(slot4, 63, 4, 0, false)
- sampSendUnoccupiedData(slot4)
- freeMemory(slot4)
- end
- function sendInCarFakePosition(slot0, slot1, slot2)
- for slot6 = 0, 2, 1 do
- slot7 = allocateMemory(24)
- slot8, slot11 = sampGetPlayerIdByCharHandle(PLAYER_PED)
- sampStorePlayerPassengerData(slot9, slot7)
- freeMemory(slot7)
- sendUnoccupiedSyncBySeatId(slot0, slot1, slot2, getStructElement(slot7, 2, 1, false))
- sendPassengerSync(slot0, slot1, slot2)
- end
- end
- function carTeleport(slot0, slot1, slot2)
- CarTp = true
- nopHook("onSendUnoccupiedSync", true)
- nopHook("onSendPassengerSync", true)
- nopHook("onSendVehicleSync", true)
- lockPlayerControl(true)
- coordmaster(slot0, slot1, slot2)
- end
- function coordmaster(slot0, slot1, slot2)
- slot3 = 5
- slot9, slot10, slot7 = getCarCoordinates(slot4)
- slot8 = getAngle(slot5, slot6, slot0, slot1)
- while true do
- wait(15)
- printStringNow("~y~Please wait!~s~", 1000)
- if slot3 < getDistanceBetweenCoords2d(slot5, slot6, slot0, slot1) then
- sendInCarFakePosition(slot5 + math.sin(slot8) * slot3, slot6 + math.cos(slot8) * slot3, slot7 + 5)
- else
- sendInCarFakePosition(slot0, slot1, slot2 + 5)
- setCarCoordinates(slot4, slot0, slot1, slot2 + 5)
- nopHook("onSendUnoccupiedSync", false)
- nopHook("onSendPassengerSync", false)
- lockPlayerControl(false)
- nopHook("onSendVehicleSync", false)
- setCharCoordinates(PLAYER_PED, slot0, slot1, slot2 + 3)
- printStringNow("~y~Teleported!", 2500)
- addOneOffSound(0, 0, 0, 1139)
- break
- end
- end
- end
- function getAngle(slot0, slot1, slot2, slot3)
- return math.atan2(slot2 - slot0, slot3 - slot1)
- end
- function slot21.onSetVehiclePos(slot0)
- if uv0 then
- uv1 = os.clock()
- return false
- end
- end
- function slot21.onSendVehicleSync(slot0)
- if uv0 then
- return false
- end
- end
- function slot21.onSetPlayerPos(slot0)
- if uv0 then
- uv1 = os.clock()
- return false
- end
- end
- function samp_create_sync_data(slot0, slot1)
- slot2 = require("ffi")
- slot3 = require("sampfuncs")
- slot4 = require("samp.raknet")
- slot9 = tonumber(slot2.cast("uintptr_t", slot2.new(slot7 .. "*", slot2.new(slot7, {}))))
- if (slot1 or true) and slot6[3] then
- slot11, slot12 = nil
- if slot1 == true then
- slot11, slot12 = sampGetPlayerIdByCharHandle(PLAYER_PED)
- else
- slot12 = tonumber(slot1)
- end
- slot10(slot12, slot9)
- end
- return setmetatable({
- send = function ()
- slot0 = raknetNewBitStream()
- raknetBitStreamWriteInt8(slot0, uv0[2])
- raknetBitStreamWriteBuffer(slot0, uv1, uv2.sizeof(uv3))
- raknetSendBitStreamEx(slot0, uv4.HIGH_PRIORITY, uv4.UNRELIABLE_SEQUENCED, 1)
- raknetDeleteBitStream(slot0)
- end
- }, {
- __index = function (slot0, slot1)
- return uv0[slot1]
- end,
- __newindex = function (slot0, slot1, slot2)
- uv0[slot1] = slot2
- end
- })
- end
- require("lib.samp.events").onSendPlayerSync = function (slot0)
- if uv0 or uv1 then
- return false
- end
- end
- require("lib.samp.events").onSendClientJoin = function (slot0, slot1, slot2, slot3, slot4, slot5, slot6)
- slot5 = "0.3.7-R3"
- end
- function sendOnfootSync(slot0, slot1, slot2)
- slot3 = samp_create_sync_data("vehicle")
- slot3.position = {
- slot0,
- slot1,
- slot2
- }
- slot3.moveSpeed = {
- -0.5,
- -0.5,
- -0.5
- }
- slot3.send()
- end
- function sendOnfootSyncc(slot0, slot1, slot2)
- slot3 = samp_create_sync_data("unoccupied")
- slot3.position = {
- slot0,
- slot1,
- slot2
- }
- slot3.moveSpeed = {
- 3.5,
- 0.5,
- 0.5
- }
- slot3.send()
- end
- function sendInCarSync(slot0, slot1, slot2)
- slot3 = samp_create_sync_data("player")
- slot3.position = {
- slot0,
- slot1,
- slot2
- }
- slot3.moveSpeed = {
- -0.5,
- -0.5,
- -0.5
- }
- slot3.send()
- end
- function getTargetBlipCoordinatesFixed()
- slot0, slot1, slot2, slot3 = getTargetBlipCoordinates()
- if not slot0 then
- return false
- end
- requestCollision(slot1, slot2)
- loadScene(slot1, slot2, slot3)
- slot8, slot9, slot10, slot11 = getTargetBlipCoordinates()
- return slot4, slot5, slot6, slot7
- end
- slot65 = require("socket.http")
- slot66 = require("ssl.https")
- slot67 = require("socket.url")
- slot68 = require("ltn12")
- slot69 = require("cjson.safe")
- slot70 = require("xml")
- slot71 = require("md5")
- slot72 = require("base64")
- function slot73(...)
- return uv0.sumhexa(table.concat({
- ...
- }, ":"))
- end
- function slot74(slot0)
- slot1 = 0
- for slot5 = 1, #slot0, 1 do
- slot1 = slot1 * 256 + string.byte(slot0, slot5)
- end
- return slot1
- end
- function md5_tohex(slot0)
- 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)))
- end
- require("lib.samp.events").onSendPlayerSync = function (slot0)
- if Surfing then
- slot0.surfingVehicleId = vehicleId
- slot0.surfingOffsets.x = 0.1
- slot0.surfingOffsets.y = 0.1
- slot0.surfingOffsets.z = 0.1
- end
- end
- function doKeyCheck()
- if not isKeyCheckAvailable() then
- return
- end
- slot1 = nil
- if isCharInAnyCar(playerPed) then
- slot1 = storeCarCharIsInNoSave(playerPed)
- end
- if isKeyJustPressed(VK_INSERT) then
- if gmped == false then
- setCharProofs(playerPed, true, true, true, true, true)
- writeMemory(9867630, 1, 1, false)
- gmped = true
- printStringNow("~g~GM enabled for player!", 1000)
- elseif gmped ~= false then
- setCharProofs(playerPed, false, false, false, false, false)
- writeMemory(9867630, 1, 0, false)
- gmped = false
- printStringNow("~r~GM disabled for player!", 1000)
- end
- end
- if isKeyJustPressed(VK_HOME) and slot0 then
- if gmcar == false then
- setCarProofs(slot1, true, true, true, true, true)
- gmcar = true
- printStringNow("~g~GM enabled for cars!", 1000)
- elseif gmcar ~= false then
- setCarProofs(slot1, false, false, false, false, false)
- gmcar = false
- printStringNow("~r~GM disabled for cars!", 1000)
- end
- end
- doCheatWork()
- end
- function doCheatWork()
- slot1 = nil
- if isCharInAnyCar(playerPed) then
- slot1 = storeCarCharIsInNoSave(playerPed)
- end
- if gmped == true and isCharDead(playerPed) then
- setCharProofs(playerPed, false, false, false, false, false)
- writeMemory(9867630, 1, 0, false)
- gmped = false
- printStringNow("~r~GM disabled for player!", 1000)
- end
- if gmcar == true and slot0 then
- setCarProofs(slot1, true, true, true, true, true)
- end
- end
- function isKeyCheckAvailable()
- if not isSampfuncsLoaded() then
- return true
- end
- return not isSampfuncsConsoleActive() and not sampIsChatInputActive() and not sampIsDialogActive()
- end
- function atax(slot0)
- id, id1, id2, id3, id4 = slot0:match("(.+) (%d+) (%d+) (%d+) (%d+)")
- if id ~= nil or id1 ~= nil or id2 ~= nil or id3 ~= nil or id4 ~= nil then
- function uv0.onShowDialog(slot0, slot1, slot2, slot3, slot4, slot5)
- lua_thread.create(function ()
- if uv0:find("робота") then
- wait(id)
- sampSetCurrentDialogEditboxText(uv1)
- wait(id1)
- sampSetCurrentDialogEditboxText(uv2 .. uv3)
- wait(id2)
- sampSetCurrentDialogEditboxText(uv1 .. uv2 .. uv3 .. uv4)
- wait(id3)
- sampSetCurrentDialogEditboxText(uv1 .. uv2 .. uv3 .. uv4 .. uv5)
- wait(id4)
- sampSendDialogResponse(23045, 1, "", "" .. uv1 .. uv2 .. uv3 .. uv4 .. uv5 .. "")
- wait(1)
- sampCloseCurrentDialogWithButton(1)
- end
- end)
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment