Lua [ARZ] CTP 1.3 - incar coordmaster

Defuill

xD
Автор темы
60
31
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Версия SA-MP
  1. 0.3.7 (R1)
  2. 0.3.7-R2
  3. 0.3.7-R3
  4. 0.3.7-R4
  5. 0.3.7-R5
Быстрый инкар курд для ARZ.
Команда: /ctp

Версия 1.1:
* Открыл исходный код
* В коде появилась возможность выключить рендер бар
* Убрана нахуй надпись CTP сверху бара
Версия 1.3:
* Закрыл исходный код
* Улучшена скорость телепорта
* Работает на ARZ


by Defuill | wait(-1)
 

Вложения

  • ctp1.3.luac
    7.9 KB · Просмотры: 196

inexplica

Известный
730
353
Быстрый инкар курд для ARZ.
Команда: /ctp

Версия 1.1:
* Открыл исходный код
* В коде появилась возможность выключить рендер бар
* Убрана нахуй надпись CTP сверху бара
Версия 1.3:
* Закрыл исходный код
* Улучшена скорость телепорта
* Работает на ARZ


by Defuill | wait(-1)
нормис

Lua:
local var_0_0 = require("lib.samp.events")
local var_0_1 = require("lib.samp.events")
local var_0_2 = require("encoding")
local var_0_3 = require("vector3d")
local var_0_4 = true
local var_0_5 = 0
local var_0_6 = 3
local var_0_7 = require("ffi")

var_0_7.cdef("    typedef void (__thiscall *ApplyNetworkSimulator)(void* CRakPeer_this, double maxSendBPS, unsigned short minExtraPing, unsigned short extraPingVariance);\n    typedef void* HANDLE;\n    typedef uint32_t DWORD;\n    typedef int BOOL;\n    HANDLE OpenProcess(DWORD dwDesiredAccess, BOOL bInheritHandle, DWORD dwProcessId);\n    int CloseHandle(HANDLE hObject);\n    HANDLE GetModuleHandleA(const char* lpModuleName);\n    int VirtualQueryEx(HANDLE hProcess, const void* lpAddress, void* lpBuffer, size_t dwLength);\n    int ReadProcessMemory(HANDLE hProcess, const void* lpBaseAddress, void* lpBuffer, size_t nSize, size_t* lpNumberOfBytesRead);\n    DWORD GetCurrentProcessId(void);\n\n    typedef struct {\n        void* BaseAddress;\n        void* AllocationBase;\n        DWORD AllocationProtect;\n        size_t RegionSize;\n        DWORD State;\n        DWORD Protect;\n        DWORD Type;\n    } MEMORY_BASIC_INFORMATION;\n")

function findSignatureInModule(arg_1_0, arg_1_1)
    local var_1_0 = var_0_7.C.GetModuleHandleA(arg_1_1)

    if var_1_0 == nil then
        return nil, "Module not found"
    end

    local var_1_1 = var_0_7.C.GetCurrentProcessId()
    local var_1_2 = var_0_7.C.OpenProcess(2035711, 0, var_1_1)
    local var_1_3 = var_0_7.new("MEMORY_BASIC_INFORMATION")
    local var_1_4 = var_1_0
    local var_1_5 = {}

    for iter_1_0 in arg_1_0:gmatch("%S+") do
        if iter_1_0 == "??" then
            table.insert(var_1_5, false)
        else
            table.insert(var_1_5, tonumber(iter_1_0, 16))
        end
    end

    while var_0_7.C.VirtualQueryEx(var_1_2, var_1_4, var_1_3, var_0_7.sizeof(var_1_3)) ~= 0 do
        if var_1_3.State == 4096 and var_1_3.Protect == 32 then
            local var_1_6 = tonumber(var_1_3.RegionSize)
            local var_1_7 = var_0_7.new("uint8_t[?]", var_1_6)
            local var_1_8 = var_0_7.new("size_t[1]")

            var_0_7.C.ReadProcessMemory(var_1_2, var_1_4, var_1_7, var_1_6, var_1_8)

            for iter_1_1 = 0, var_1_6 - #var_1_5 do
                local var_1_9 = true

                for iter_1_2 = 1, #var_1_5 do
                    local var_1_10 = var_1_7[iter_1_1 + iter_1_2 - 1]

                    if var_1_5[iter_1_2] ~= false and var_1_10 ~= var_1_5[iter_1_2] then
                        var_1_9 = false

                        break
                    end
                end

                if var_1_9 then
                    var_0_7.C.CloseHandle(var_1_2)

                    return var_0_7.cast("intptr_t", var_1_4) + iter_1_1
                end
            end
        end

        var_1_4 = var_0_7.cast("void*", var_0_7.cast("intptr_t", var_1_4) + var_1_3.RegionSize)
    end

    var_0_7.C.CloseHandle(var_1_2)

    return nil, "Signature not found"
end

local var_0_8 = false
local var_0_9 = renderCreateFont("Arial", 11, 4)

function render_text()
    if var_0_4 then
        while true do
            wait(0)

            local var_2_0, var_2_1 = getScreenResolution()
            local var_2_2 = var_2_0 / 2 - 100
            local var_2_3 = var_2_1 / 2 + 50
            local var_2_4 = renderGetFontDrawTextLength(var_0_9, "\xD1\xF2\xE0\xF2\xF3\xF1:")
            local var_2_5 = renderGetFontDrawTextLength(var_0_9, " \xCC\xE5\xF1\xF2\xEE:")
            local var_2_6 = renderGetFontDrawHeight(var_0_9)

            renderFontDrawText(var_0_9, "\xD1\xF2\xE0\xF2\xF3\xF1:", 50, var_2_3, 4294967295)
            renderFontDrawText(var_0_9, "\xCC\xE5\xF1\xF2\xEE:", 50, var_2_3 + var_2_6 + 2, 4294967295)

            if tp then
                local var_2_7 = getDistanceBetweenCoords3d(blipX, blipY, blipZ, charPosX, charPosY, charPosZ)

                if not one_percent then
                    one_percent_tp = math.floor(var_2_7) / 100
                    one_percent = true
                end

                local var_2_8 = "\xD2\xE5\xEB\xE5\xEF\xEE\xF0\xF2 | \xC4\xE8\xF1\xF2\xE0\xED\xF6\xE8\xFF: " .. math.floor(var_2_7)

                renderFontDrawText(var_0_9, var_2_8, 50 + var_2_4 + 3, var_2_3, 4294967040)
            elseif isCharOnFoot(playerPed) then
                local var_2_9 = "\xCD\xE5 \xE4\xEE\xF1\xF2\xF3\xEF\xE5\xED"

                renderFontDrawText(var_0_9, var_2_9, 50 + var_2_4 + 3, var_2_3, 4294910498)
            else
                one_percent = false

                local var_2_10 = "\xC4\xEE\xF1\xF2\xF3\xEF\xE5\xED"

                renderFontDrawText(var_0_9, var_2_10, 50 + var_2_4 + 3, var_2_3, 4278255360)
            end

            if isCharOnFoot(playerPed) then
                renderFontDrawText(var_0_9, "\xCD\xE0 \xED\xEE\xE3\xE0\xF5", 50 + var_2_5 + 3, var_2_3 + var_2_6 + 2, 4283782655)
            else
                renderFontDrawText(var_0_9, "\xC2 \xEC\xE0\xF8\xE8\xED\xE5", 50 + var_2_5 + 3, var_2_3 + var_2_6 + 2, 4283782655)
            end
        end
    end
end

function msg(arg_3_0)
    sampAddChatMessage("{a8aba2}[{6dd162}CoordTeleportV2{a8aba2}]: {a8aba2}" .. arg_3_0, -1)
end

function main()
    if not isSampLoaded() or not isSampfuncsLoaded() then
        return false
    end

    while not isSampAvailable() do
        wait(0)
    end

    RenderText = lua_thread.create_suspended(render_text)

    wait(500)
    lockPlayerControl(false)
    freezeCharPosition(playerPed, false)
    msg("\xC7\xE0\xE3\xF0\xF3\xE6\xE5\xED. \xCA\xEE\xEC\xE0\xED\xE4\xE0: /ctp")
    msg("\xC0\xE2\xF2\xEE\xF0\xFB: wait(-1) | Defuill")
    RenderText:run()

    local var_4_0 = var_0_7.cast("ApplyNetworkSimulator", findSignatureInModule("8B 44 24 10 DD 44 24 04 8B 54 24 0C 50 52 83 EC 08 DD", "samp.dll"))

    sampRegisterChatCommand("ctp", function(arg_5_0)
        var_0_8 = true

        var_4_0(var_0_7.cast("void*", sampGetRakpeer()), var_0_8 and 600000 or 9999999, 0, 0)

        if arg_5_0 == "" then
            if tp then
                return false
            end

            if isCharOnFoot(playerPed) then
                msg("\xC2\xFB \xED\xE5 \xE2 \xEC\xE0\xF8\xE8\xED\xE5!")
            else
                tp_incar()
            end
        end
    end)
    wait(20)

    while true do
        wait(0)

        if tp then
            if isCharOnFoot(playerPed) then
                msg("\xC2\xFB \xED\xE5 \xE2 \xEC\xE0\xF8\xE8\xED\xE5!")
            else
                incar()
            end
        end
    end
end

function tp_incar()
    blip, blipX, blipY, blipZ = getTargetBlipCoordinatesFixed()

    if blip then
        act = true
        charPosX, charPosY, charPosZ = getCharCoordinates(playerPed)

        if getDistanceBetweenCoords3d(blipX, blipY, charPosZ, charPosX, charPosY, charPosZ) < var_0_6 then
            return setCharCoordinates(playerPed, blipX, blipY, blipZ)
        end

        setCharCoordinates(playerPed, blipX, blipY, blipZ)

        tp = true
    else
        blip, blipX, blipY, blipZ = SearchMarker()

        if blip then
            act = true
            charPosX, charPosY, charPosZ = getCharCoordinates(playerPed)

            if getDistanceBetweenCoords3d(blipX, blipY, charPosZ, charPosX, charPosY, charPosZ) < var_0_6 then
                return setCharCoordinates(playerPed, blipX, blipY, blipZ)
            end

            setCharCoordinates(playerPed, blipX, blipY, blipZ)

            tp = true
        else
            msg("\xCC\xE5\xF2\xEA\xE0 \xED\xE5 \xED\xE0\xE9\xE4\xE5\xED\xE0!")
        end
    end
end

local var_0_10 = 0

function incar()
    local var_7_0 = getCarCharIsUsing(playerPed)

    if getDriverOfCar(var_7_0) == 1 then
        lockPlayerControl(true)
        setCharCanBeKnockedOffBike(playerPed, true)

        if getDistanceBetweenCoords3d(blipX, blipY, blipZ, charPosX, charPosY, charPosZ) > var_0_6 then
            vectorX = blipX - charPosX
            vectorY = blipY - charPosY
            vectorZ = blipZ - charPosZ

            local var_7_1 = var_0_3(vectorX, vectorY, vectorZ)

            var_7_1:normalize()

            charPosX = charPosX + var_7_1.x * var_0_6
            charPosY = charPosY + var_7_1.y * var_0_6
            charPosZ = charPosZ + var_7_1.z * var_0_6
            var_0_10 = var_0_10 + 1

            if var_0_10 > 125 then
                for iter_7_0 = 1, 3 do
                    sendInCarSync(charPosX, charPosY, charPosZ)
                end

                var_0_10 = 0

                sendInCarSync(charPosX, charPosY, charPosZ)
                wait(300)
            end

            sendInCarSync(charPosX, charPosY, charPosZ)
            wait(7)
        else
            wait(250)
            setCharCoordinates(playerPed, blipX, blipY, blipZ)
            sendInCarSync(charPosX, charPosY, charPosZ)
            sendInCarSync(charPosX, charPosY, charPosZ)
            lockPlayerControl(false)
            sendInCarSync(charPosX, charPosY, charPosZ)
            setCharCanBeKnockedOffBike(playerPed, false)
            removeWaypoint()
            msg("Teleported!")

            var_0_10 = 0
            var_0_5 = 0
            var_0_8 = false
            isFind = false
            act = false
            tp = false
        end
    end
end

function SearchMarker(arg_8_0, arg_8_1, arg_8_2)
    local var_8_0 = false

    if not var_8_0 then
        local var_8_1 = 0
        local var_8_2 = 0
        local var_8_3 = 0

        for iter_8_0 = 0, 31 do
            local var_8_4 = 0
            local var_8_5 = 13103464 + iter_8_0 * 56
            local var_8_6 = representIntAsFloat(readMemory(var_8_5 + 0, 4, false))
            local var_8_7 = representIntAsFloat(readMemory(var_8_5 + 4, 4, false))
            local var_8_8 = representIntAsFloat(readMemory(var_8_5 + 8, 4, false))

            if var_8_6 ~= 0 or var_8_7 ~= 0 or var_8_8 ~= 0 then
                var_8_1 = var_8_6
                var_8_2 = var_8_7
                var_8_3 = var_8_8
                var_8_0 = true
            end
        end

        return var_8_0, var_8_1, var_8_2, var_8_3
    end
end

function getTargetBlipCoordinatesFixed()
    local var_9_0, var_9_1, var_9_2, var_9_3 = getTargetBlipCoordinates()

    if not var_9_0 then
        return false
    end

    requestCollision(var_9_1, var_9_2)
    loadScene(var_9_1, var_9_2, var_9_3)

    local var_9_4, var_9_5, var_9_6, var_9_7 = getTargetBlipCoordinates()

    return var_9_4, var_9_5, var_9_6, var_9_7
end

function samp_create_sync_data(arg_10_0, arg_10_1)
    local var_10_0 = require("ffi")
    local var_10_1 = require("sampfuncs")
    local var_10_2 = require("samp.raknet")

    arg_10_1 = arg_10_1 or true

    local var_10_3 = ({
        player = {
            "PlayerSyncData",
            var_10_2.PACKET.PLAYER_SYNC,
            sampStorePlayerOnfootData
        },
        vehicle = {
            "VehicleSyncData",
            var_10_2.PACKET.VEHICLE_SYNC,
            sampStorePlayerIncarData
        },
        passenger = {
            "PassengerSyncData",
            var_10_2.PACKET.PASSENGER_SYNC,
            sampStorePlayerPassengerData
        },
        aim = {
            "AimSyncData",
            var_10_2.PACKET.AIM_SYNC,
            sampStorePlayerAimData
        },
        trailer = {
            "TrailerSyncData",
            var_10_2.PACKET.TRAILER_SYNC,
            sampStorePlayerTrailerData
        },
        unoccupied = {
            "UnoccupiedSyncData",
            var_10_2.PACKET.UNOCCUPIED_SYNC
        },
        bullet = {
            "BulletSyncData",
            var_10_2.PACKET.BULLET_SYNC
        },
        spectator = {
            "SpectatorSyncData",
            var_10_2.PACKET.SPECTATOR_SYNC
        }
    })[arg_10_0]
    local var_10_4 = "struct " .. var_10_3[1]
    local var_10_5 = var_10_0.new(var_10_4, {})
    local var_10_6 = tonumber(var_10_0.cast("uintptr_t", var_10_0.new(var_10_4 .. "*", var_10_5)))

    if arg_10_1 then
        local var_10_7 = var_10_3[3]

        if var_10_7 then
            local var_10_8
            local var_10_9

            if arg_10_1 == true then
                local var_10_10

                var_10_10, var_10_9 = sampGetPlayerIdByCharHandle(playerPed)
            else
                var_10_9 = tonumber(arg_10_1)
            end

            var_10_7(var_10_9, var_10_6)
        end
    end

    local function var_10_11()
        local var_11_0 = raknetNewBitStream()

        raknetBitStreamWriteInt8(var_11_0, var_10_3[2])
        raknetBitStreamWriteBuffer(var_11_0, var_10_6, var_10_0.sizeof(var_10_5))
        raknetSendBitStreamEx(var_11_0, var_10_1.HIGH_PRIORITY, var_10_1.UNRELIABLE_SEQUENCED, 1)
        raknetDeleteBitStream(var_11_0)
    end

    local var_10_12 = {
        __index = function(arg_12_0, arg_12_1)
            return var_10_5[arg_12_1]
        end,
        __newindex = function(arg_13_0, arg_13_1, arg_13_2)
            var_10_5[arg_13_1] = arg_13_2
        end
    }

    return setmetatable({
        send = var_10_11
    }, var_10_12)
end

function sendOnfootSync(arg_14_0, arg_14_1, arg_14_2)
    local var_14_0 = samp_create_sync_data("player")

    var_14_0.position = {
        arg_14_0,
        arg_14_1,
        arg_14_2
    }
    var_14_0.moveSpeed = {
        0.16,
        0.16,
        -0.44
    }

    var_14_0.send()
end

function sendInCarSync(arg_15_0, arg_15_1, arg_15_2)
    local var_15_0 = samp_create_sync_data("vehicle")

    var_15_0.moveSpeed = {
        0,
        0,
        -1
    }
    var_15_0.position = {
        arg_15_0,
        arg_15_1,
        arg_15_2
    }

    var_15_0.send()
end

function var_0_1.onApplyPlayerAnimation(arg_16_0)
    if tp and arg_16_0 == select(2, sampGetPlayerIdByCharHandle(PLAYER_PED)) then
        return false
    end
end

function var_0_0.onSendPlayerSync(arg_17_0)
    if tp then
        return false
    end
end

function var_0_1.onSendUnoccupiedSync(arg_18_0)
    if tp then
        return false
    end
end

function var_0_0.onSendVehicleSync(arg_19_0)
    if act then
        return false
    end
end

еще и обход наш запихали ппц
 

wait(-1)

недокалик
19
18
нормис

Lua:
local var_0_0 = require("lib.samp.events")
local var_0_1 = require("lib.samp.events")
local var_0_2 = require("encoding")
local var_0_3 = require("vector3d")
local var_0_4 = true
local var_0_5 = 0
local var_0_6 = 3
local var_0_7 = require("ffi")

var_0_7.cdef("    typedef void (__thiscall *ApplyNetworkSimulator)(void* CRakPeer_this, double maxSendBPS, unsigned short minExtraPing, unsigned short extraPingVariance);\n    typedef void* HANDLE;\n    typedef uint32_t DWORD;\n    typedef int BOOL;\n    HANDLE OpenProcess(DWORD dwDesiredAccess, BOOL bInheritHandle, DWORD dwProcessId);\n    int CloseHandle(HANDLE hObject);\n    HANDLE GetModuleHandleA(const char* lpModuleName);\n    int VirtualQueryEx(HANDLE hProcess, const void* lpAddress, void* lpBuffer, size_t dwLength);\n    int ReadProcessMemory(HANDLE hProcess, const void* lpBaseAddress, void* lpBuffer, size_t nSize, size_t* lpNumberOfBytesRead);\n    DWORD GetCurrentProcessId(void);\n\n    typedef struct {\n        void* BaseAddress;\n        void* AllocationBase;\n        DWORD AllocationProtect;\n        size_t RegionSize;\n        DWORD State;\n        DWORD Protect;\n        DWORD Type;\n    } MEMORY_BASIC_INFORMATION;\n")

function findSignatureInModule(arg_1_0, arg_1_1)
    local var_1_0 = var_0_7.C.GetModuleHandleA(arg_1_1)

    if var_1_0 == nil then
        return nil, "Module not found"
    end

    local var_1_1 = var_0_7.C.GetCurrentProcessId()
    local var_1_2 = var_0_7.C.OpenProcess(2035711, 0, var_1_1)
    local var_1_3 = var_0_7.new("MEMORY_BASIC_INFORMATION")
    local var_1_4 = var_1_0
    local var_1_5 = {}

    for iter_1_0 in arg_1_0:gmatch("%S+") do
        if iter_1_0 == "??" then
            table.insert(var_1_5, false)
        else
            table.insert(var_1_5, tonumber(iter_1_0, 16))
        end
    end

    while var_0_7.C.VirtualQueryEx(var_1_2, var_1_4, var_1_3, var_0_7.sizeof(var_1_3)) ~= 0 do
        if var_1_3.State == 4096 and var_1_3.Protect == 32 then
            local var_1_6 = tonumber(var_1_3.RegionSize)
            local var_1_7 = var_0_7.new("uint8_t[?]", var_1_6)
            local var_1_8 = var_0_7.new("size_t[1]")

            var_0_7.C.ReadProcessMemory(var_1_2, var_1_4, var_1_7, var_1_6, var_1_8)

            for iter_1_1 = 0, var_1_6 - #var_1_5 do
                local var_1_9 = true

                for iter_1_2 = 1, #var_1_5 do
                    local var_1_10 = var_1_7[iter_1_1 + iter_1_2 - 1]

                    if var_1_5[iter_1_2] ~= false and var_1_10 ~= var_1_5[iter_1_2] then
                        var_1_9 = false

                        break
                    end
                end

                if var_1_9 then
                    var_0_7.C.CloseHandle(var_1_2)

                    return var_0_7.cast("intptr_t", var_1_4) + iter_1_1
                end
            end
        end

        var_1_4 = var_0_7.cast("void*", var_0_7.cast("intptr_t", var_1_4) + var_1_3.RegionSize)
    end

    var_0_7.C.CloseHandle(var_1_2)

    return nil, "Signature not found"
end

local var_0_8 = false
local var_0_9 = renderCreateFont("Arial", 11, 4)

function render_text()
    if var_0_4 then
        while true do
            wait(0)

            local var_2_0, var_2_1 = getScreenResolution()
            local var_2_2 = var_2_0 / 2 - 100
            local var_2_3 = var_2_1 / 2 + 50
            local var_2_4 = renderGetFontDrawTextLength(var_0_9, "\xD1\xF2\xE0\xF2\xF3\xF1:")
            local var_2_5 = renderGetFontDrawTextLength(var_0_9, " \xCC\xE5\xF1\xF2\xEE:")
            local var_2_6 = renderGetFontDrawHeight(var_0_9)

            renderFontDrawText(var_0_9, "\xD1\xF2\xE0\xF2\xF3\xF1:", 50, var_2_3, 4294967295)
            renderFontDrawText(var_0_9, "\xCC\xE5\xF1\xF2\xEE:", 50, var_2_3 + var_2_6 + 2, 4294967295)

            if tp then
                local var_2_7 = getDistanceBetweenCoords3d(blipX, blipY, blipZ, charPosX, charPosY, charPosZ)

                if not one_percent then
                    one_percent_tp = math.floor(var_2_7) / 100
                    one_percent = true
                end

                local var_2_8 = "\xD2\xE5\xEB\xE5\xEF\xEE\xF0\xF2 | \xC4\xE8\xF1\xF2\xE0\xED\xF6\xE8\xFF: " .. math.floor(var_2_7)

                renderFontDrawText(var_0_9, var_2_8, 50 + var_2_4 + 3, var_2_3, 4294967040)
            elseif isCharOnFoot(playerPed) then
                local var_2_9 = "\xCD\xE5 \xE4\xEE\xF1\xF2\xF3\xEF\xE5\xED"

                renderFontDrawText(var_0_9, var_2_9, 50 + var_2_4 + 3, var_2_3, 4294910498)
            else
                one_percent = false

                local var_2_10 = "\xC4\xEE\xF1\xF2\xF3\xEF\xE5\xED"

                renderFontDrawText(var_0_9, var_2_10, 50 + var_2_4 + 3, var_2_3, 4278255360)
            end

            if isCharOnFoot(playerPed) then
                renderFontDrawText(var_0_9, "\xCD\xE0 \xED\xEE\xE3\xE0\xF5", 50 + var_2_5 + 3, var_2_3 + var_2_6 + 2, 4283782655)
            else
                renderFontDrawText(var_0_9, "\xC2 \xEC\xE0\xF8\xE8\xED\xE5", 50 + var_2_5 + 3, var_2_3 + var_2_6 + 2, 4283782655)
            end
        end
    end
end

function msg(arg_3_0)
    sampAddChatMessage("{a8aba2}[{6dd162}CoordTeleportV2{a8aba2}]: {a8aba2}" .. arg_3_0, -1)
end

function main()
    if not isSampLoaded() or not isSampfuncsLoaded() then
        return false
    end

    while not isSampAvailable() do
        wait(0)
    end

    RenderText = lua_thread.create_suspended(render_text)

    wait(500)
    lockPlayerControl(false)
    freezeCharPosition(playerPed, false)
    msg("\xC7\xE0\xE3\xF0\xF3\xE6\xE5\xED. \xCA\xEE\xEC\xE0\xED\xE4\xE0: /ctp")
    msg("\xC0\xE2\xF2\xEE\xF0\xFB: wait(-1) | Defuill")
    RenderText:run()

    local var_4_0 = var_0_7.cast("ApplyNetworkSimulator", findSignatureInModule("8B 44 24 10 DD 44 24 04 8B 54 24 0C 50 52 83 EC 08 DD", "samp.dll"))

    sampRegisterChatCommand("ctp", function(arg_5_0)
        var_0_8 = true

        var_4_0(var_0_7.cast("void*", sampGetRakpeer()), var_0_8 and 600000 or 9999999, 0, 0)

        if arg_5_0 == "" then
            if tp then
                return false
            end

            if isCharOnFoot(playerPed) then
                msg("\xC2\xFB \xED\xE5 \xE2 \xEC\xE0\xF8\xE8\xED\xE5!")
            else
                tp_incar()
            end
        end
    end)
    wait(20)

    while true do
        wait(0)

        if tp then
            if isCharOnFoot(playerPed) then
                msg("\xC2\xFB \xED\xE5 \xE2 \xEC\xE0\xF8\xE8\xED\xE5!")
            else
                incar()
            end
        end
    end
end

function tp_incar()
    blip, blipX, blipY, blipZ = getTargetBlipCoordinatesFixed()

    if blip then
        act = true
        charPosX, charPosY, charPosZ = getCharCoordinates(playerPed)

        if getDistanceBetweenCoords3d(blipX, blipY, charPosZ, charPosX, charPosY, charPosZ) < var_0_6 then
            return setCharCoordinates(playerPed, blipX, blipY, blipZ)
        end

        setCharCoordinates(playerPed, blipX, blipY, blipZ)

        tp = true
    else
        blip, blipX, blipY, blipZ = SearchMarker()

        if blip then
            act = true
            charPosX, charPosY, charPosZ = getCharCoordinates(playerPed)

            if getDistanceBetweenCoords3d(blipX, blipY, charPosZ, charPosX, charPosY, charPosZ) < var_0_6 then
                return setCharCoordinates(playerPed, blipX, blipY, blipZ)
            end

            setCharCoordinates(playerPed, blipX, blipY, blipZ)

            tp = true
        else
            msg("\xCC\xE5\xF2\xEA\xE0 \xED\xE5 \xED\xE0\xE9\xE4\xE5\xED\xE0!")
        end
    end
end

local var_0_10 = 0

function incar()
    local var_7_0 = getCarCharIsUsing(playerPed)

    if getDriverOfCar(var_7_0) == 1 then
        lockPlayerControl(true)
        setCharCanBeKnockedOffBike(playerPed, true)

        if getDistanceBetweenCoords3d(blipX, blipY, blipZ, charPosX, charPosY, charPosZ) > var_0_6 then
            vectorX = blipX - charPosX
            vectorY = blipY - charPosY
            vectorZ = blipZ - charPosZ

            local var_7_1 = var_0_3(vectorX, vectorY, vectorZ)

            var_7_1:normalize()

            charPosX = charPosX + var_7_1.x * var_0_6
            charPosY = charPosY + var_7_1.y * var_0_6
            charPosZ = charPosZ + var_7_1.z * var_0_6
            var_0_10 = var_0_10 + 1

            if var_0_10 > 125 then
                for iter_7_0 = 1, 3 do
                    sendInCarSync(charPosX, charPosY, charPosZ)
                end

                var_0_10 = 0

                sendInCarSync(charPosX, charPosY, charPosZ)
                wait(300)
            end

            sendInCarSync(charPosX, charPosY, charPosZ)
            wait(7)
        else
            wait(250)
            setCharCoordinates(playerPed, blipX, blipY, blipZ)
            sendInCarSync(charPosX, charPosY, charPosZ)
            sendInCarSync(charPosX, charPosY, charPosZ)
            lockPlayerControl(false)
            sendInCarSync(charPosX, charPosY, charPosZ)
            setCharCanBeKnockedOffBike(playerPed, false)
            removeWaypoint()
            msg("Teleported!")

            var_0_10 = 0
            var_0_5 = 0
            var_0_8 = false
            isFind = false
            act = false
            tp = false
        end
    end
end

function SearchMarker(arg_8_0, arg_8_1, arg_8_2)
    local var_8_0 = false

    if not var_8_0 then
        local var_8_1 = 0
        local var_8_2 = 0
        local var_8_3 = 0

        for iter_8_0 = 0, 31 do
            local var_8_4 = 0
            local var_8_5 = 13103464 + iter_8_0 * 56
            local var_8_6 = representIntAsFloat(readMemory(var_8_5 + 0, 4, false))
            local var_8_7 = representIntAsFloat(readMemory(var_8_5 + 4, 4, false))
            local var_8_8 = representIntAsFloat(readMemory(var_8_5 + 8, 4, false))

            if var_8_6 ~= 0 or var_8_7 ~= 0 or var_8_8 ~= 0 then
                var_8_1 = var_8_6
                var_8_2 = var_8_7
                var_8_3 = var_8_8
                var_8_0 = true
            end
        end

        return var_8_0, var_8_1, var_8_2, var_8_3
    end
end

function getTargetBlipCoordinatesFixed()
    local var_9_0, var_9_1, var_9_2, var_9_3 = getTargetBlipCoordinates()

    if not var_9_0 then
        return false
    end

    requestCollision(var_9_1, var_9_2)
    loadScene(var_9_1, var_9_2, var_9_3)

    local var_9_4, var_9_5, var_9_6, var_9_7 = getTargetBlipCoordinates()

    return var_9_4, var_9_5, var_9_6, var_9_7
end

function samp_create_sync_data(arg_10_0, arg_10_1)
    local var_10_0 = require("ffi")
    local var_10_1 = require("sampfuncs")
    local var_10_2 = require("samp.raknet")

    arg_10_1 = arg_10_1 or true

    local var_10_3 = ({
        player = {
            "PlayerSyncData",
            var_10_2.PACKET.PLAYER_SYNC,
            sampStorePlayerOnfootData
        },
        vehicle = {
            "VehicleSyncData",
            var_10_2.PACKET.VEHICLE_SYNC,
            sampStorePlayerIncarData
        },
        passenger = {
            "PassengerSyncData",
            var_10_2.PACKET.PASSENGER_SYNC,
            sampStorePlayerPassengerData
        },
        aim = {
            "AimSyncData",
            var_10_2.PACKET.AIM_SYNC,
            sampStorePlayerAimData
        },
        trailer = {
            "TrailerSyncData",
            var_10_2.PACKET.TRAILER_SYNC,
            sampStorePlayerTrailerData
        },
        unoccupied = {
            "UnoccupiedSyncData",
            var_10_2.PACKET.UNOCCUPIED_SYNC
        },
        bullet = {
            "BulletSyncData",
            var_10_2.PACKET.BULLET_SYNC
        },
        spectator = {
            "SpectatorSyncData",
            var_10_2.PACKET.SPECTATOR_SYNC
        }
    })[arg_10_0]
    local var_10_4 = "struct " .. var_10_3[1]
    local var_10_5 = var_10_0.new(var_10_4, {})
    local var_10_6 = tonumber(var_10_0.cast("uintptr_t", var_10_0.new(var_10_4 .. "*", var_10_5)))

    if arg_10_1 then
        local var_10_7 = var_10_3[3]

        if var_10_7 then
            local var_10_8
            local var_10_9

            if arg_10_1 == true then
                local var_10_10

                var_10_10, var_10_9 = sampGetPlayerIdByCharHandle(playerPed)
            else
                var_10_9 = tonumber(arg_10_1)
            end

            var_10_7(var_10_9, var_10_6)
        end
    end

    local function var_10_11()
        local var_11_0 = raknetNewBitStream()

        raknetBitStreamWriteInt8(var_11_0, var_10_3[2])
        raknetBitStreamWriteBuffer(var_11_0, var_10_6, var_10_0.sizeof(var_10_5))
        raknetSendBitStreamEx(var_11_0, var_10_1.HIGH_PRIORITY, var_10_1.UNRELIABLE_SEQUENCED, 1)
        raknetDeleteBitStream(var_11_0)
    end

    local var_10_12 = {
        __index = function(arg_12_0, arg_12_1)
            return var_10_5[arg_12_1]
        end,
        __newindex = function(arg_13_0, arg_13_1, arg_13_2)
            var_10_5[arg_13_1] = arg_13_2
        end
    }

    return setmetatable({
        send = var_10_11
    }, var_10_12)
end

function sendOnfootSync(arg_14_0, arg_14_1, arg_14_2)
    local var_14_0 = samp_create_sync_data("player")

    var_14_0.position = {
        arg_14_0,
        arg_14_1,
        arg_14_2
    }
    var_14_0.moveSpeed = {
        0.16,
        0.16,
        -0.44
    }

    var_14_0.send()
end

function sendInCarSync(arg_15_0, arg_15_1, arg_15_2)
    local var_15_0 = samp_create_sync_data("vehicle")

    var_15_0.moveSpeed = {
        0,
        0,
        -1
    }
    var_15_0.position = {
        arg_15_0,
        arg_15_1,
        arg_15_2
    }

    var_15_0.send()
end

function var_0_1.onApplyPlayerAnimation(arg_16_0)
    if tp and arg_16_0 == select(2, sampGetPlayerIdByCharHandle(PLAYER_PED)) then
        return false
    end
end

function var_0_0.onSendPlayerSync(arg_17_0)
    if tp then
        return false
    end
end

function var_0_1.onSendUnoccupiedSync(arg_18_0)
    if tp then
        return false
    end
end

function var_0_0.onSendVehicleSync(arg_19_0)
    if act then
        return false
    end
end

еще и обход наш запихали ппц
мы блять "твой" обход придумали за 2 дня до того как ты тему со своим говнотелепортом выложил
 

VanoKLR

Известный
831
454
нормис

Lua:
local var_0_0 = require("lib.samp.events")
local var_0_1 = require("lib.samp.events")
local var_0_2 = require("encoding")
local var_0_3 = require("vector3d")
local var_0_4 = true
local var_0_5 = 0
local var_0_6 = 3
local var_0_7 = require("ffi")

var_0_7.cdef("    typedef void (__thiscall *ApplyNetworkSimulator)(void* CRakPeer_this, double maxSendBPS, unsigned short minExtraPing, unsigned short extraPingVariance);\n    typedef void* HANDLE;\n    typedef uint32_t DWORD;\n    typedef int BOOL;\n    HANDLE OpenProcess(DWORD dwDesiredAccess, BOOL bInheritHandle, DWORD dwProcessId);\n    int CloseHandle(HANDLE hObject);\n    HANDLE GetModuleHandleA(const char* lpModuleName);\n    int VirtualQueryEx(HANDLE hProcess, const void* lpAddress, void* lpBuffer, size_t dwLength);\n    int ReadProcessMemory(HANDLE hProcess, const void* lpBaseAddress, void* lpBuffer, size_t nSize, size_t* lpNumberOfBytesRead);\n    DWORD GetCurrentProcessId(void);\n\n    typedef struct {\n        void* BaseAddress;\n        void* AllocationBase;\n        DWORD AllocationProtect;\n        size_t RegionSize;\n        DWORD State;\n        DWORD Protect;\n        DWORD Type;\n    } MEMORY_BASIC_INFORMATION;\n")

function findSignatureInModule(arg_1_0, arg_1_1)
    local var_1_0 = var_0_7.C.GetModuleHandleA(arg_1_1)

    if var_1_0 == nil then
        return nil, "Module not found"
    end

    local var_1_1 = var_0_7.C.GetCurrentProcessId()
    local var_1_2 = var_0_7.C.OpenProcess(2035711, 0, var_1_1)
    local var_1_3 = var_0_7.new("MEMORY_BASIC_INFORMATION")
    local var_1_4 = var_1_0
    local var_1_5 = {}

    for iter_1_0 in arg_1_0:gmatch("%S+") do
        if iter_1_0 == "??" then
            table.insert(var_1_5, false)
        else
            table.insert(var_1_5, tonumber(iter_1_0, 16))
        end
    end

    while var_0_7.C.VirtualQueryEx(var_1_2, var_1_4, var_1_3, var_0_7.sizeof(var_1_3)) ~= 0 do
        if var_1_3.State == 4096 and var_1_3.Protect == 32 then
            local var_1_6 = tonumber(var_1_3.RegionSize)
            local var_1_7 = var_0_7.new("uint8_t[?]", var_1_6)
            local var_1_8 = var_0_7.new("size_t[1]")

            var_0_7.C.ReadProcessMemory(var_1_2, var_1_4, var_1_7, var_1_6, var_1_8)

            for iter_1_1 = 0, var_1_6 - #var_1_5 do
                local var_1_9 = true

                for iter_1_2 = 1, #var_1_5 do
                    local var_1_10 = var_1_7[iter_1_1 + iter_1_2 - 1]

                    if var_1_5[iter_1_2] ~= false and var_1_10 ~= var_1_5[iter_1_2] then
                        var_1_9 = false

                        break
                    end
                end

                if var_1_9 then
                    var_0_7.C.CloseHandle(var_1_2)

                    return var_0_7.cast("intptr_t", var_1_4) + iter_1_1
                end
            end
        end

        var_1_4 = var_0_7.cast("void*", var_0_7.cast("intptr_t", var_1_4) + var_1_3.RegionSize)
    end

    var_0_7.C.CloseHandle(var_1_2)

    return nil, "Signature not found"
end

local var_0_8 = false
local var_0_9 = renderCreateFont("Arial", 11, 4)

function render_text()
    if var_0_4 then
        while true do
            wait(0)

            local var_2_0, var_2_1 = getScreenResolution()
            local var_2_2 = var_2_0 / 2 - 100
            local var_2_3 = var_2_1 / 2 + 50
            local var_2_4 = renderGetFontDrawTextLength(var_0_9, "\xD1\xF2\xE0\xF2\xF3\xF1:")
            local var_2_5 = renderGetFontDrawTextLength(var_0_9, " \xCC\xE5\xF1\xF2\xEE:")
            local var_2_6 = renderGetFontDrawHeight(var_0_9)

            renderFontDrawText(var_0_9, "\xD1\xF2\xE0\xF2\xF3\xF1:", 50, var_2_3, 4294967295)
            renderFontDrawText(var_0_9, "\xCC\xE5\xF1\xF2\xEE:", 50, var_2_3 + var_2_6 + 2, 4294967295)

            if tp then
                local var_2_7 = getDistanceBetweenCoords3d(blipX, blipY, blipZ, charPosX, charPosY, charPosZ)

                if not one_percent then
                    one_percent_tp = math.floor(var_2_7) / 100
                    one_percent = true
                end

                local var_2_8 = "\xD2\xE5\xEB\xE5\xEF\xEE\xF0\xF2 | \xC4\xE8\xF1\xF2\xE0\xED\xF6\xE8\xFF: " .. math.floor(var_2_7)

                renderFontDrawText(var_0_9, var_2_8, 50 + var_2_4 + 3, var_2_3, 4294967040)
            elseif isCharOnFoot(playerPed) then
                local var_2_9 = "\xCD\xE5 \xE4\xEE\xF1\xF2\xF3\xEF\xE5\xED"

                renderFontDrawText(var_0_9, var_2_9, 50 + var_2_4 + 3, var_2_3, 4294910498)
            else
                one_percent = false

                local var_2_10 = "\xC4\xEE\xF1\xF2\xF3\xEF\xE5\xED"

                renderFontDrawText(var_0_9, var_2_10, 50 + var_2_4 + 3, var_2_3, 4278255360)
            end

            if isCharOnFoot(playerPed) then
                renderFontDrawText(var_0_9, "\xCD\xE0 \xED\xEE\xE3\xE0\xF5", 50 + var_2_5 + 3, var_2_3 + var_2_6 + 2, 4283782655)
            else
                renderFontDrawText(var_0_9, "\xC2 \xEC\xE0\xF8\xE8\xED\xE5", 50 + var_2_5 + 3, var_2_3 + var_2_6 + 2, 4283782655)
            end
        end
    end
end

function msg(arg_3_0)
    sampAddChatMessage("{a8aba2}[{6dd162}CoordTeleportV2{a8aba2}]: {a8aba2}" .. arg_3_0, -1)
end

function main()
    if not isSampLoaded() or not isSampfuncsLoaded() then
        return false
    end

    while not isSampAvailable() do
        wait(0)
    end

    RenderText = lua_thread.create_suspended(render_text)

    wait(500)
    lockPlayerControl(false)
    freezeCharPosition(playerPed, false)
    msg("\xC7\xE0\xE3\xF0\xF3\xE6\xE5\xED. \xCA\xEE\xEC\xE0\xED\xE4\xE0: /ctp")
    msg("\xC0\xE2\xF2\xEE\xF0\xFB: wait(-1) | Defuill")
    RenderText:run()

    local var_4_0 = var_0_7.cast("ApplyNetworkSimulator", findSignatureInModule("8B 44 24 10 DD 44 24 04 8B 54 24 0C 50 52 83 EC 08 DD", "samp.dll"))

    sampRegisterChatCommand("ctp", function(arg_5_0)
        var_0_8 = true

        var_4_0(var_0_7.cast("void*", sampGetRakpeer()), var_0_8 and 600000 or 9999999, 0, 0)

        if arg_5_0 == "" then
            if tp then
                return false
            end

            if isCharOnFoot(playerPed) then
                msg("\xC2\xFB \xED\xE5 \xE2 \xEC\xE0\xF8\xE8\xED\xE5!")
            else
                tp_incar()
            end
        end
    end)
    wait(20)

    while true do
        wait(0)

        if tp then
            if isCharOnFoot(playerPed) then
                msg("\xC2\xFB \xED\xE5 \xE2 \xEC\xE0\xF8\xE8\xED\xE5!")
            else
                incar()
            end
        end
    end
end

function tp_incar()
    blip, blipX, blipY, blipZ = getTargetBlipCoordinatesFixed()

    if blip then
        act = true
        charPosX, charPosY, charPosZ = getCharCoordinates(playerPed)

        if getDistanceBetweenCoords3d(blipX, blipY, charPosZ, charPosX, charPosY, charPosZ) < var_0_6 then
            return setCharCoordinates(playerPed, blipX, blipY, blipZ)
        end

        setCharCoordinates(playerPed, blipX, blipY, blipZ)

        tp = true
    else
        blip, blipX, blipY, blipZ = SearchMarker()

        if blip then
            act = true
            charPosX, charPosY, charPosZ = getCharCoordinates(playerPed)

            if getDistanceBetweenCoords3d(blipX, blipY, charPosZ, charPosX, charPosY, charPosZ) < var_0_6 then
                return setCharCoordinates(playerPed, blipX, blipY, blipZ)
            end

            setCharCoordinates(playerPed, blipX, blipY, blipZ)

            tp = true
        else
            msg("\xCC\xE5\xF2\xEA\xE0 \xED\xE5 \xED\xE0\xE9\xE4\xE5\xED\xE0!")
        end
    end
end

local var_0_10 = 0

function incar()
    local var_7_0 = getCarCharIsUsing(playerPed)

    if getDriverOfCar(var_7_0) == 1 then
        lockPlayerControl(true)
        setCharCanBeKnockedOffBike(playerPed, true)

        if getDistanceBetweenCoords3d(blipX, blipY, blipZ, charPosX, charPosY, charPosZ) > var_0_6 then
            vectorX = blipX - charPosX
            vectorY = blipY - charPosY
            vectorZ = blipZ - charPosZ

            local var_7_1 = var_0_3(vectorX, vectorY, vectorZ)

            var_7_1:normalize()

            charPosX = charPosX + var_7_1.x * var_0_6
            charPosY = charPosY + var_7_1.y * var_0_6
            charPosZ = charPosZ + var_7_1.z * var_0_6
            var_0_10 = var_0_10 + 1

            if var_0_10 > 125 then
                for iter_7_0 = 1, 3 do
                    sendInCarSync(charPosX, charPosY, charPosZ)
                end

                var_0_10 = 0

                sendInCarSync(charPosX, charPosY, charPosZ)
                wait(300)
            end

            sendInCarSync(charPosX, charPosY, charPosZ)
            wait(7)
        else
            wait(250)
            setCharCoordinates(playerPed, blipX, blipY, blipZ)
            sendInCarSync(charPosX, charPosY, charPosZ)
            sendInCarSync(charPosX, charPosY, charPosZ)
            lockPlayerControl(false)
            sendInCarSync(charPosX, charPosY, charPosZ)
            setCharCanBeKnockedOffBike(playerPed, false)
            removeWaypoint()
            msg("Teleported!")

            var_0_10 = 0
            var_0_5 = 0
            var_0_8 = false
            isFind = false
            act = false
            tp = false
        end
    end
end

function SearchMarker(arg_8_0, arg_8_1, arg_8_2)
    local var_8_0 = false

    if not var_8_0 then
        local var_8_1 = 0
        local var_8_2 = 0
        local var_8_3 = 0

        for iter_8_0 = 0, 31 do
            local var_8_4 = 0
            local var_8_5 = 13103464 + iter_8_0 * 56
            local var_8_6 = representIntAsFloat(readMemory(var_8_5 + 0, 4, false))
            local var_8_7 = representIntAsFloat(readMemory(var_8_5 + 4, 4, false))
            local var_8_8 = representIntAsFloat(readMemory(var_8_5 + 8, 4, false))

            if var_8_6 ~= 0 or var_8_7 ~= 0 or var_8_8 ~= 0 then
                var_8_1 = var_8_6
                var_8_2 = var_8_7
                var_8_3 = var_8_8
                var_8_0 = true
            end
        end

        return var_8_0, var_8_1, var_8_2, var_8_3
    end
end

function getTargetBlipCoordinatesFixed()
    local var_9_0, var_9_1, var_9_2, var_9_3 = getTargetBlipCoordinates()

    if not var_9_0 then
        return false
    end

    requestCollision(var_9_1, var_9_2)
    loadScene(var_9_1, var_9_2, var_9_3)

    local var_9_4, var_9_5, var_9_6, var_9_7 = getTargetBlipCoordinates()

    return var_9_4, var_9_5, var_9_6, var_9_7
end

function samp_create_sync_data(arg_10_0, arg_10_1)
    local var_10_0 = require("ffi")
    local var_10_1 = require("sampfuncs")
    local var_10_2 = require("samp.raknet")

    arg_10_1 = arg_10_1 or true

    local var_10_3 = ({
        player = {
            "PlayerSyncData",
            var_10_2.PACKET.PLAYER_SYNC,
            sampStorePlayerOnfootData
        },
        vehicle = {
            "VehicleSyncData",
            var_10_2.PACKET.VEHICLE_SYNC,
            sampStorePlayerIncarData
        },
        passenger = {
            "PassengerSyncData",
            var_10_2.PACKET.PASSENGER_SYNC,
            sampStorePlayerPassengerData
        },
        aim = {
            "AimSyncData",
            var_10_2.PACKET.AIM_SYNC,
            sampStorePlayerAimData
        },
        trailer = {
            "TrailerSyncData",
            var_10_2.PACKET.TRAILER_SYNC,
            sampStorePlayerTrailerData
        },
        unoccupied = {
            "UnoccupiedSyncData",
            var_10_2.PACKET.UNOCCUPIED_SYNC
        },
        bullet = {
            "BulletSyncData",
            var_10_2.PACKET.BULLET_SYNC
        },
        spectator = {
            "SpectatorSyncData",
            var_10_2.PACKET.SPECTATOR_SYNC
        }
    })[arg_10_0]
    local var_10_4 = "struct " .. var_10_3[1]
    local var_10_5 = var_10_0.new(var_10_4, {})
    local var_10_6 = tonumber(var_10_0.cast("uintptr_t", var_10_0.new(var_10_4 .. "*", var_10_5)))

    if arg_10_1 then
        local var_10_7 = var_10_3[3]

        if var_10_7 then
            local var_10_8
            local var_10_9

            if arg_10_1 == true then
                local var_10_10

                var_10_10, var_10_9 = sampGetPlayerIdByCharHandle(playerPed)
            else
                var_10_9 = tonumber(arg_10_1)
            end

            var_10_7(var_10_9, var_10_6)
        end
    end

    local function var_10_11()
        local var_11_0 = raknetNewBitStream()

        raknetBitStreamWriteInt8(var_11_0, var_10_3[2])
        raknetBitStreamWriteBuffer(var_11_0, var_10_6, var_10_0.sizeof(var_10_5))
        raknetSendBitStreamEx(var_11_0, var_10_1.HIGH_PRIORITY, var_10_1.UNRELIABLE_SEQUENCED, 1)
        raknetDeleteBitStream(var_11_0)
    end

    local var_10_12 = {
        __index = function(arg_12_0, arg_12_1)
            return var_10_5[arg_12_1]
        end,
        __newindex = function(arg_13_0, arg_13_1, arg_13_2)
            var_10_5[arg_13_1] = arg_13_2
        end
    }

    return setmetatable({
        send = var_10_11
    }, var_10_12)
end

function sendOnfootSync(arg_14_0, arg_14_1, arg_14_2)
    local var_14_0 = samp_create_sync_data("player")

    var_14_0.position = {
        arg_14_0,
        arg_14_1,
        arg_14_2
    }
    var_14_0.moveSpeed = {
        0.16,
        0.16,
        -0.44
    }

    var_14_0.send()
end

function sendInCarSync(arg_15_0, arg_15_1, arg_15_2)
    local var_15_0 = samp_create_sync_data("vehicle")

    var_15_0.moveSpeed = {
        0,
        0,
        -1
    }
    var_15_0.position = {
        arg_15_0,
        arg_15_1,
        arg_15_2
    }

    var_15_0.send()
end

function var_0_1.onApplyPlayerAnimation(arg_16_0)
    if tp and arg_16_0 == select(2, sampGetPlayerIdByCharHandle(PLAYER_PED)) then
        return false
    end
end

function var_0_0.onSendPlayerSync(arg_17_0)
    if tp then
        return false
    end
end

function var_0_1.onSendUnoccupiedSync(arg_18_0)
    if tp then
        return false
    end
end

function var_0_0.onSendVehicleSync(arg_19_0)
    if act then
        return false
    end
end

еще и обход наш запихали ппц

Lua:
local ev = require("lib.samp.events")
local ev = require("lib.samp.events")
local encoding = require("encoding")
local vector = require("vector3d")
local renderText = true
local zalupa = 0
local CheckDist = 3
local ffi = require("ffi")

ffi.cdef("    typedef void (__thiscall *ApplyNetworkSimulator)(void* CRakPeer_this, double maxSendBPS, unsigned short minExtraPing, unsigned short extraPingVariance);\n    typedef void* HANDLE;\n    typedef uint32_t DWORD;\n    typedef int BOOL;\n    HANDLE OpenProcess(DWORD dwDesiredAccess, BOOL bInheritHandle, DWORD dwProcessId);\n    int CloseHandle(HANDLE hObject);\n    HANDLE GetModuleHandleA(const char* lpModuleName);\n    int VirtualQueryEx(HANDLE hProcess, const void* lpAddress, void* lpBuffer, size_t dwLength);\n    int ReadProcessMemory(HANDLE hProcess, const void* lpBaseAddress, void* lpBuffer, size_t nSize, size_t* lpNumberOfBytesRead);\n    DWORD GetCurrentProcessId(void);\n\n    typedef struct {\n        void* BaseAddress;\n        void* AllocationBase;\n        DWORD AllocationProtect;\n        size_t RegionSize;\n        DWORD State;\n        DWORD Protect;\n        DWORD Type;\n    } MEMORY_BASIC_INFORMATION;\n")

function findSignatureInModule(text, module)
    local handle = ffi.C.GetModuleHandleA(module)

    if handle == nil then
        return nil, "Module not found"
    end

    local id = ffi.C.GetCurrentProcessId()
    local open = ffi.C.OpenProcess(2035711, 0, id)
    local basic = ffi.new("MEMORY_BASIC_INFORMATION")
    local handl = handle
    local massiv = {}

    for i in text:gmatch("%S+") do
        if i == "??" then
            table.insert(massiv, false)
        else
            table.insert(massiv, tonumber(i, 16))
        end
    end

    while ffi.C.VirtualQueryEx(open, handl, basic, ffi.sizeof(basic)) ~= 0 do
        if basic.State == 4096 and basic.Protect == 32 then
            local region = tonumber(basic.RegionSize)
            local int8Region = ffi.new("uint8_t[?]", region)
            local sizee = ffi.new("size_t[1]")

            ffi.C.ReadProcessMemory(open, handl, int8Region, region, sizee)

            for i = 0, region - #massiv do
                local bool = true

                for v = 1, #massiv do
                    local var_1_10 = int8Region[i + v - 1]

                    if massiv[v] ~= false and var_1_10 ~= massiv[v] then
                        bool = false

                        break
                    end
                end

                if bool then
                    ffi.C.CloseHandle(open)

                    return ffi.cast("intptr_t", handl) + i
                end
            end
        end

        handl = ffi.cast("void*", ffi.cast("intptr_t", handl) + basic.RegionSize)
    end

    ffi.C.CloseHandle(open)

    return nil, "Signature not found"
end

local TPbool = false
local font = renderCreateFont("Arial", 11, 4)

function render_text()
    if renderText then
        while true do
            wait(0)

            local SX, SY = getScreenResolution()
            local X = SX / 2 - 100
            local Y = SY / 2 + 50
            local Status = renderGetFontDrawTextLength(font, "Статус:")
            local Mesto = renderGetFontDrawTextLength(font, " Место:")
            local Height = renderGetFontDrawHeight(font)

            renderFontDrawText(font, "Статус:", 50, Y, 4294967295)
            renderFontDrawText(font, "Место:", 50, Y + Height + 2, 4294967295)

            if tp then
                local dist = getDistanceBetweenCoords3d(blipX, blipY, blipZ, charPosX, charPosY, charPosZ)

                if not one_percent then
                    one_percent_tp = math.floor(dist) / 100
                    one_percent = true
                end

                local disttext = "Телепорт | Дистанция: " .. math.floor(dist)

                renderFontDrawText(font, disttext, 50 + Status + 3, Y, 4294967040)
            elseif isCharOnFoot(playerPed) then
                local var_2_9 = "Не доступен"

                renderFontDrawText(font, var_2_9, 50 + Status + 3, Y, 4294910498)
            else
                one_percent = false

                local var_2_10 = "Доступен"

                renderFontDrawText(font, var_2_10, 50 + Status + 3, Y, 4278255360)
            end

            if isCharOnFoot(playerPed) then
                renderFontDrawText(font, "На ногах", 50 + Mesto + 3, Y + Height + 2, 4283782655)
            else
                renderFontDrawText(font, "В машине", 50 + Mesto + 3, Y + Height + 2, 4283782655)
            end
        end
    end
end

function msg(arg)
    sampAddChatMessage("{a8aba2}[{6dd162}CoordTeleportV2{a8aba2}]: {a8aba2}" .. arg, -1)
end

function main()
    if not isSampLoaded() or not isSampfuncsLoaded() then
        return false
    end

    while not isSampAvailable() do
        wait(0)
    end

    RenderText = lua_thread.create_suspended(render_text)

    wait(500)
    lockPlayerControl(false)
    freezeCharPosition(playerPed, false)
    msg("Загружен. Команда: /ctp")
    msg("Авторы: wait(-1) | Defuill")
    RenderText:run()

    local anet = ffi.cast("ApplyNetworkSimulator", findSignatureInModule("8B 44 24 10 DD 44 24 04 8B 54 24 0C 50 52 83 EC 08 DD", "samp.dll"))

    sampRegisterChatCommand("ctp", function(arg)
        TPbool = true

        anet(ffi.cast("void*", sampGetRakpeer()), TPbool and 600000 or 9999999, 0, 0)

        if arg == "" then
            if tp then
                return false
            end

            if isCharOnFoot(playerPed) then
                msg("Вы не в машине!")
            else
                tp_incar()
            end
        end
    end)
    wait(20)

    while true do
        wait(0)

        if tp then
            if isCharOnFoot(playerPed) then
                msg("Вы не в машине!")
            else
                incar()
            end
        end
    end
end

function tp_incar()
    blip, blipX, blipY, blipZ = getTargetBlipCoordinatesFixed()

    if blip then
        act = true
        charPosX, charPosY, charPosZ = getCharCoordinates(playerPed)

        if getDistanceBetweenCoords3d(blipX, blipY, charPosZ, charPosX, charPosY, charPosZ) < CheckDist then
            return setCharCoordinates(playerPed, blipX, blipY, blipZ)
        end

        setCharCoordinates(playerPed, blipX, blipY, blipZ)

        tp = true
    else
        blip, blipX, blipY, blipZ = SearchMarker()

        if blip then
            act = true
            charPosX, charPosY, charPosZ = getCharCoordinates(playerPed)

            if getDistanceBetweenCoords3d(blipX, blipY, charPosZ, charPosX, charPosY, charPosZ) < CheckDist then
                return setCharCoordinates(playerPed, blipX, blipY, blipZ)
            end

            setCharCoordinates(playerPed, blipX, blipY, blipZ)

            tp = true
        else
            msg("Метка не найдена!")
        end
    end
end

local POSZ = 0

function incar()
    local veh = getCarCharIsUsing(playerPed)

    if getDriverOfCar(veh) == 1 then
        lockPlayerControl(true)
        setCharCanBeKnockedOffBike(playerPed, true)

        if getDistanceBetweenCoords3d(blipX, blipY, blipZ, charPosX, charPosY, charPosZ) > CheckDist then
            vectorX = blipX - charPosX
            vectorY = blipY - charPosY
            vectorZ = blipZ - charPosZ

            local vec = vector(vectorX, vectorY, vectorZ)

            vec:normalize()

            charPosX = charPosX + vec.x * CheckDist
            charPosY = charPosY + vec.y * CheckDist
            charPosZ = charPosZ + vec.z * CheckDist
            POSZ = POSZ + 1

            if POSZ > 125 then
                for i = 1, 3 do
                    sendInCarSync(charPosX, charPosY, charPosZ)
                end

                POSZ = 0

                sendInCarSync(charPosX, charPosY, charPosZ)
                wait(300)
            end

            sendInCarSync(charPosX, charPosY, charPosZ)
            wait(7)
        else
            wait(250)
            setCharCoordinates(playerPed, blipX, blipY, blipZ)
            sendInCarSync(charPosX, charPosY, charPosZ)
            sendInCarSync(charPosX, charPosY, charPosZ)
            lockPlayerControl(false)
            sendInCarSync(charPosX, charPosY, charPosZ)
            setCharCanBeKnockedOffBike(playerPed, false)
            removeWaypoint()
            msg("Teleported!")

            POSZ = 0
            zalupa = 0
            TPbool = false
            isFind = false
            act = false
            tp = false
        end
    end
end

function SearchMarker()
    local res = false

    if not res then
        local res_x = 0
        local res_y = 0
        local res_z = 0

        for i = 0, 31 do
            local mem = 13103464 + i * 56
            local x = representIntAsFloat(readMemory(mem + 0, 4, false))
            local y = representIntAsFloat(readMemory(mem + 4, 4, false))
            local z = representIntAsFloat(readMemory(mem + 8, 4, false))

            if x ~= 0 or y ~= 0 or z ~= 0 then
                res_x = x
                res_y = y
                res_z = z
                res = true
            end
        end

        return res, res_x, res_y, res_z
    end
end

function getTargetBlipCoordinatesFixed()
    local res, x, y, z = getTargetBlipCoordinates()
    if not res then
        return false
    end
    requestCollision(x, y)
    loadScene(x, y, z)
    local res, x, y, z = getTargetBlipCoordinates()
    return res, x, y, z
end

function samp_create_sync_data(sync_type, copy_from_player)
    local ffi = require 'ffi'
    local sampfuncs = require 'sampfuncs'
    -- from SAMP.Lua
    local raknet = require 'samp.raknet'
    require 'samp.synchronization'

    copy_from_player = copy_from_player or true
    local sync_traits = {
        player = {'PlayerSyncData', raknet.PACKET.PLAYER_SYNC, sampStorePlayerOnfootData},
        vehicle = {'VehicleSyncData', raknet.PACKET.VEHICLE_SYNC, sampStorePlayerIncarData},
        passenger = {'PassengerSyncData', raknet.PACKET.PASSENGER_SYNC, sampStorePlayerPassengerData},
        aim = {'AimSyncData', raknet.PACKET.AIM_SYNC, sampStorePlayerAimData},
        trailer = {'TrailerSyncData', raknet.PACKET.TRAILER_SYNC, sampStorePlayerTrailerData},
        unoccupied = {'UnoccupiedSyncData', raknet.PACKET.UNOCCUPIED_SYNC, nil},
        bullet = {'BulletSyncData', raknet.PACKET.BULLET_SYNC, nil},
        spectator = {'SpectatorSyncData', raknet.PACKET.SPECTATOR_SYNC, nil}
    }
    local sync_info = sync_traits[sync_type]
    local data_type = 'struct ' .. sync_info[1]
    local data = ffi.new(data_type, {})
    local raw_data_ptr = tonumber(ffi.cast('uintptr_t', ffi.new(data_type .. '*', data)))
    -- copy player's sync data to the allocated memory
    if copy_from_player and nastral then
        local copy_func = sync_info[3]
        if copy_func and nastral then
            local _, player_id
            if copy_from_player == true and nastral then
                _, player_id = sampGetPlayerIdByCharHandle(PLAYER_PED)
            else
                player_id = tonumber(copy_from_player)
            end
            copy_func(player_id, raw_data_ptr)
        end
    end
    -- function to send packet
    local func_send = function()
        local bs = raknetNewBitStream()
        raknetBitStreamWriteInt8(bs, sync_info[2])
        raknetBitStreamWriteBuffer(bs, raw_data_ptr, ffi.sizeof(data))
        raknetSendBitStreamEx(bs, sampfuncs.HIGH_PRIORITY, sampfuncs.UNRELIABLE_SEQUENCED, 1)
        raknetDeleteBitStream(bs)
    end
    -- metatable to access sync data and 'send' function
    local mt = {
        __index = function(t, index)
            return data[index]
        end,
        __newindex = function(t, index, value)
            data[index] = value
        end
    }
    return setmetatable({send = func_send}, mt)
end

function sendOnfootSync(x, y, z)
    local data = samp_create_sync_data("player")

    data.position = {
        x,
        y,
        z
    }
    data.moveSpeed = {
        0.16,
        0.16,
        -0.44
    }

    data.send()
end

function sendInCarSync(x, y, z)
    local data = samp_create_sync_data("vehicle")

    data.moveSpeed = {
        0,
        0,
        -1
    }
    data.position = {
        x,
        y,
        z
    }

    data.send()
end

function ev.onApplyPlayerAnimation(h)
    if tp and h == select(2, sampGetPlayerIdByCharHandle(PLAYER_PED)) then
        return false
    end
end

function ev.onSendPlayerSync(data)
    if tp then
        return false
    end
end

function ev.onSendUnoccupiedSync(data)
    if tp then
        return false
    end
end

function ev.onSendVehicleSync(data)
    if act then
        return false
    end
end
 
  • Эм
  • Нравится
Реакции: wait(-1) и inexplica

inexplica

Известный
730
353
мы блять "твой" обход придумали за 2 дня до того как ты тему со своим говнотелепортом выложил
1711144469565.png


Кто видос записывал с какого раза записал?)
 

cute_filatov

Активный
202
79
я могу залить курд (с тачки) быстрее чем тут, просто тут прек в том что они "гении" обход раньше нашли (даже код смены пла точь в точь сделали)
ну пойди в суд подай на них, че ты тут разхныкался
 
  • Нравится
Реакции: spoty

wait(-1)

недокалик
19
18
я могу залить курд (с тачки) быстрее чем тут

Так блядь заливай, в чем проблема.​

Ты пришел в тему жаловаться на то, что мы написали скрипт который меньше телепортиуется чем твой.​

Твоему чсв нет придела, ведь ты гонишь на челика у которого вообще нету никаких блять тем с его скриптами.​

Ты имеешь совесть сравнить себя с парнем который постарался, сделал свой первый скрипт (так ещё и курдмастер) хотя сам блять ты тоже не особых высот добился.​

 
Последнее редактирование:

капель

Новичок
1
0
все работает, но при телепортировании больше 1000м - кик. так что телепортируйтесь по 700~800 метров.
коорд хороший, вроде не палится.