помогите со скриптом

qqware

Участник
Автор темы
44
2
нету 2 последних страниц хотя кнопки и тд прописаны
lua:
local waitt = 1500

local imgui = require 'mimgui'
local encoding = require 'encoding'
local ev = require "lib.samp.events"
encoding.default = 'CP1251'
local u8 = encoding.UTF8
local new = imgui.new

local status = false
local status1 = false
local status2 = false
local status3 = false
local status4 = false
local status5 = false
local status6 = false
local status7 = false
local status8 = false
local status9 = false
local status10 = false
local status11 = false
local status12 = false
local status13 = false
local status14 = false
local obhod = true

local WinState = imgui.new.bool()
local SliderOne = new.int(2)
local Slider2 = new.int(2)
local Slider3 = new.int(2)
local Slider4 = new.int(2)
local Slider5 = new.int(2)
local Slider6 = new.int(2)
local tab = 1

local ComboTest = new.int()
local item_list = {u8'������', u8'����'}
local ImItems = imgui.new['const char*'][#item_list](item_list)

imgui.OnFrame(function() return WinState[0] end, function(player)
    imgui.SetNextWindowPos(imgui.ImVec2(500, 500), imgui.Cond.FirstUseEver, imgui.ImVec2(0.5, 0.5))
    imgui.SetNextWindowSize(imgui.ImVec2(800, 650), imgui.Cond.Always)
    imgui.Begin(u8 ' qqware & langerv ', WinState, imgui.WindowFlags.NoResize)
    for numberTab, nameTab in pairs({ '     ��������', '       ������', ' �������������' }) do
        if imgui.Button(u8(nameTab), imgui.ImVec2(200, 180)) then
            tab = numberTab
        end
    end
    imgui.SetCursorPos(imgui.ImVec2(206,40))
    if imgui.BeginChild('Name##' .. tab, imgui.ImVec2(700, 547), true) then
        if tab == 1 then
            imgui.Text(u8 '����� � ���.')
            
            if imgui.Button(u8 '���� �����') then
                status = not status
            end
            imgui.Text(u8 ' ������ ����� ����� ���� ������ ����, ������ ��� ����� ������������ ����� ���� ����� ����� ������ ')
            if imgui.Button(u8 '������ �����') then
                status1 = not status1
            end           
            imgui.Text(u8 ' ���� ����� ����� ����� ����� ���� ������ ���� ')
            if imgui.Button(u8 '���� �����') then
                status2 = not status2
            end
            imgui.Text(u8 ' ����� ������ ����� ������ ���� ������, ������ ����� ��� �� ������������, ����� ��� ������������ ������ ��� ���� ����� ������, ��� �� ����� ���� ')
            if imgui.Button(u8 '����� ������') then
                status3 = not status3
            end
            imgui.Text(u8 ' ������ ����� ������ ����� ������ ���� ������, �� ����� ��� ����, ����� ���� ����� �� ������, �.� ����� ���� ����� ������� ������ ')
            if imgui.Button(u8 '������ ����� ������') then
                status4 = not status4
            end
            imgui.Text(u8 ' ���� ����� ������, ��� ����� ��� � ������ �����, �� ������ (�������� ����� ��������� ���� ������) ')
            if imgui.Button(u8 '���� ����� ������') then
                status5 = not status5
            end
            imgui.SetCursorPosX(180)
            imgui.SetCursorPosY(178)
            imgui.Button(u8'�������� �����')
            status6 = not status6
        end
        elseif tab == 2 then
            imgui.Text(u8 '����� � ������')
            
            if imgui.Button(u8 '���� �����') then
                status7 = not status7
            end
            imgui.Text(u8 ' ������ ����� ����� ���� ������ ����, ������ ��� ����� ������������ ����� ���� ����� ����� ������ ')
            
            if imgui.Button(u8 '������ �����') then
                status8 = not status8
            end
           imgui.Text(u8 ' ���� ����� ����� ����� ����� ���� ������ ���� ')
            if imgui.Button(u8 '���� �����') then
                status9 = not status9
            end
            imgui.Text(u8 ' ����� ������, ��� ����� ��� � ���� ����� ������ � ��� ')
            if imgui.Button(u8 '����� ������') then
                status10 = not status10
            end
            imgui.Text(u8 ' ������ ����� ������, ��� ����� ��� � ������ ����� ������ � ��� ')
            if imgui.Button(u8 '������ ����� ������') then
                status11 = not status11
            end
            imgui.Text(u8 ' ���� ����� ������, ��� ����� ��� � ���� ����� ������ � ��� ')
            if imgui.Button(u8 '���� ����� ������') then
                status12 = not status12
            end
            
            imgui.SliderInt(u8 '', Slider6, -130, 130)
            
            imgui.SliderInt(u8 '2', Slider3, -130, 130)
            
            imgui.SliderInt(u8 '3', Slider4, -130, 130)
            imgui.SetCursorPosX(180)
            imgui.SetCursorPosY(178)
           if imgui.Button(u8'�������� �����') then
           status13 = not status13
        end
        elseif tab == 3 then
             if imgui.Button(u8'��������')  then
                obhod = not obhod
                if obhod then
                    sampAddChatMessage("�������� �������, ����������� �� ������!",-1)
        else
            lua_thread.create(function()
            sampAddChatMessage("������ ������� �����",-1)
            wait(waitt)
            sampSendSpawn()
            sampAddChatMessage("�������� ��������",-1)
            end)
               imgui.Text(u8 ' ����� ������ ���� � ����������� ���, �� ������ ������ �� �� �������� �� ���, ����� ����� ������� ')
                      imgui.Text(u8 '   menu -> qqware')
                    imgui.Text(u8 '   script -> langerv')
            
        end
        imgui.EndChild()
    end
end
end)
    imgui.End()

-- ������ ������
imgui.OnInitialize(function()
    theme()
end)

function theme()
    imgui.SwitchContext()
    local style = imgui.GetStyle()
    local colors = style.Colors
    local clr = imgui.Col
    local ImVec4 = imgui.ImVec4

    imgui.GetStyle().FramePadding = imgui.ImVec2(3.5, 3.5)
    imgui.GetStyle().FrameRounding = 3
    imgui.GetStyle().ChildRounding = 2
    imgui.GetStyle().WindowTitleAlign = imgui.ImVec2(0.5, 0.5)
    imgui.GetStyle().WindowRounding = 2
    imgui.GetStyle().ItemSpacing = imgui.ImVec2(5.0, 4.0)
    imgui.GetStyle().ScrollbarSize = 13.0
    imgui.GetStyle().ScrollbarRounding = 1
    imgui.GetStyle().GrabMinSize = 8.0
    imgui.GetStyle().GrabRounding = 1.0
    imgui.GetStyle().WindowPadding = imgui.ImVec2(4.0, 4.0)
    imgui.GetStyle().ButtonTextAlign = imgui.ImVec2(0.0, 0.5)
    imgui.GetStyle().WindowRounding = 14

    imgui.GetStyle().Colors[imgui.Col.WindowBg] = imgui.ImVec4(0.14, 0.12, 0.16, 1.00)
    imgui.GetStyle().Colors[imgui.Col.ChildBg] = imgui.ImVec4(0.30, 0.20, 0.39, 0.00)
    imgui.GetStyle().Colors[imgui.Col.PopupBg] = imgui.ImVec4(0.05, 0.05, 0.10, 0.90)
    imgui.GetStyle().Colors[imgui.Col.Border] = imgui.ImVec4(0.89, 0.85, 0.92, 0.30)
    imgui.GetStyle().Colors[imgui.Col.BorderShadow] = imgui.ImVec4(0.00, 0.00, 0.00, 0.00)
    imgui.GetStyle().Colors[imgui.Col.FrameBg] = imgui.ImVec4(0.30, 0.20, 0.39, 1.00)
    imgui.GetStyle().Colors[imgui.Col.FrameBgHovered] = imgui.ImVec4(0.41, 0.19, 0.63, 0.68)
    imgui.GetStyle().Colors[imgui.Col.FrameBgActive] = imgui.ImVec4(0.41, 0.19, 0.63, 1.00)
    imgui.GetStyle().Colors[imgui.Col.TitleBg] = imgui.ImVec4(0.41, 0.19, 0.63, 0.45)
    imgui.GetStyle().Colors[imgui.Col.TitleBgCollapsed] = imgui.ImVec4(0.41, 0.19, 0.63, 0.35)
    imgui.GetStyle().Colors[imgui.Col.TitleBgActive] = imgui.ImVec4(0.41, 0.19, 0.63, 0.78)
    imgui.GetStyle().Colors[imgui.Col.MenuBarBg] = imgui.ImVec4(0.30, 0.20, 0.39, 0.57)
    imgui.GetStyle().Colors[imgui.Col.ScrollbarBg] = imgui.ImVec4(0.30, 0.20, 0.39, 1.00)
    imgui.GetStyle().Colors[imgui.Col.ScrollbarGrab] = imgui.ImVec4(0.41, 0.19, 0.63, 0.31)
    imgui.GetStyle().Colors[imgui.Col.ScrollbarGrabHovered] = imgui.ImVec4(0.41, 0.19, 0.63, 0.78)
    imgui.GetStyle().Colors[imgui.Col.ScrollbarGrabActive] = imgui.ImVec4(0.41, 0.19, 0.63, 1.00)
    imgui.GetStyle().Colors[imgui.Col.CheckMark] = imgui.ImVec4(0.56, 0.61, 1.00, 1.00)
    imgui.GetStyle().Colors[imgui.Col.SliderGrab] = imgui.ImVec4(0.41, 0.19, 0.63, 0.24)
    imgui.GetStyle().Colors[imgui.Col.SliderGrabActive] = imgui.ImVec4(0.41, 0.19, 0.63, 1.00)
    imgui.GetStyle().Colors[imgui.Col.Button] = imgui.ImVec4(0.41, 0.19, 0.63, 0.44)
    imgui.GetStyle().Colors[imgui.Col.ButtonHovered] = imgui.ImVec4(0.41, 0.19, 0.63, 0.86)
    imgui.GetStyle().Colors[imgui.Col.ButtonActive] = imgui.ImVec4(0.64, 0.33, 0.94, 1.00)
    imgui.GetStyle().Colors[imgui.Col.Header] = imgui.ImVec4(0.41, 0.19, 0.63, 0.76)
    imgui.GetStyle().Colors[imgui.Col.HeaderHovered] = imgui.ImVec4(0.41, 0.19, 0.63, 0.86)
    imgui.GetStyle().Colors[imgui.Col.HeaderActive] = imgui.ImVec4(0.41, 0.19, 0.63, 1.00)
    imgui.GetStyle().Colors[imgui.Col.ResizeGrip] = imgui.ImVec4(0.41, 0.19, 0.63, 0.20)
    imgui.GetStyle().Colors[imgui.Col.ResizeGripHovered] = imgui.ImVec4(0.41, 0.19, 0.63, 0.78)
    imgui.GetStyle().Colors[imgui.Col.ResizeGripActive] = imgui.ImVec4(0.41, 0.19, 0.63, 1.00)
    imgui.GetStyle().Colors[imgui.Col.PlotLines] = imgui.ImVec4(0.89, 0.85, 0.92, 0.63)
    imgui.GetStyle().Colors[imgui.Col.PlotLinesHovered] = imgui.ImVec4(0.41, 0.19, 0.63, 1.00)
    imgui.GetStyle().Colors[imgui.Col.PlotHistogram] = imgui.ImVec4(0.89, 0.85, 0.92, 0.63)
    imgui.GetStyle().Colors[imgui.Col.PlotHistogramHovered] = imgui.ImVec4(0.41, 0.19, 0.63, 1.00)
    imgui.GetStyle().Colors[imgui.Col.TextSelectedBg] = imgui.ImVec4(0.41, 0.19, 0.63, 0.43)
end

function main()
    sampRegisterChatCommand('muinvis', function() WinState[0] = not WinState[0] end)
    wait(-1)
end

function ev.onSendPlayerSync(data)
    if status == true then
        local x,y,z = getCharCoordinates(PLAYER_PED)
        data.position.z=data.position.z-4
    end
    if status1 == true then
        local x,y,z = getCharCoordinates(PLAYER_PED)
        data.position.z=data.position.z-20
    end
    if status2 == true then
        local x,y,z = getCharCoordinates(PLAYER_PED)
        data.position.z=data.position.z-80
    end
    if status3 == true then
        local x,y,z = getCharCoordinates(PLAYER_PED)
        data.position.z=data.position.z+50
    end
    if status4 == true then
        local x,y,z = getCharCoordinates(PLAYER_PED)
        data.position.z=data.position.z+100
    end
    if status5 == true then
        local x,y,z = getCharCoordinates(PLAYER_PED)
        data.position.z=data.position.z+130
    end
    if status6 == true then
        local x,y,z = getCharCoordinates(PLAYER_PED)
        data.position.z=data.position.z+0
    end
end

function ev.onSendVehicleSync(data)
    if status7 == true then
        data.position.z=data.position.z-10
    end
    if status8 == true then
        data.position.z=data.position.z-35
    end
    if status9 == true then
        data.position.z=data.position.z-55
    end
    if status10 == true then
        data.position.z=data.position.z+50
    end
    if status11 == true then
        data.position.z=data.position.z+100
    end
    if status12 == true then
        data.position.z=data.position.z+130
    end
    if status13 == true then
        data.position.z=data.position.z+0
    end
end

function ev.onTogglePlayerSpectating(toggle)
    if obhod then
        if not toggle then
            lua_thread.create(function()
                sampRequestClass(1)
                wait(waitt)
                sampSendSpawn()
                sampSendRequestSpawn()
                sampAddChatMessage('�������� �� GoxaShow ��������!', -1)
                sampAddChatMessage('��������� youtube.com/goxashow', -1)
            end)
        end
        return false
    end
end

function ev.onSendPlayerSync(data)
    if obhod then
        local sync = samp_create_sync_data('spectator')
        sync.position = data.position
        sync.keysData = data.keysData
        sync.send()
        return false
    end
end
        
function ev.onSendRequestSpawn() if obhod then return false end end
function ev.onSendSpawn() if obhod then return false end 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 then
        local copy_func = sync_info[3]
        if copy_func then
            local _, player_id
            if copy_from_player == true 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
 
Решение
пожалуйста скинь готовый код я завтра фулл с 0 буду учить щя просто инвиз доделать
sa-mp-002.png

Lua:
local imgui = require 'mimgui'
local encoding = require 'encoding'
local ev = require "lib.samp.events"
encoding.default = 'CP1251'
local u8 = encoding.UTF8
local new = imgui.new
local waitt = 1500

local status = false
local status1 = false
local status2 = false
local status3 = false
local status4 = false
local status5 = false
local status6 = false
local status7 = false
local status8 = false
local status9 = false
local status10 = false
local status11 = false
local status12 = false
local status13 = false
local status14 = false
local obhod = true

local WinState = imgui.new.bool()
local SliderOne = new.int(2)
local Slider2 =...

Hinаta

Известный
777
363
нету 2 последних страниц хотя кнопки и тд прописаны
lua:
local waitt = 1500

local imgui = require 'mimgui'
local encoding = require 'encoding'
local ev = require "lib.samp.events"
encoding.default = 'CP1251'
local u8 = encoding.UTF8
local new = imgui.new

local status = false
local status1 = false
local status2 = false
local status3 = false
local status4 = false
local status5 = false
local status6 = false
local status7 = false
local status8 = false
local status9 = false
local status10 = false
local status11 = false
local status12 = false
local status13 = false
local status14 = false
local obhod = true

local WinState = imgui.new.bool()
local SliderOne = new.int(2)
local Slider2 = new.int(2)
local Slider3 = new.int(2)
local Slider4 = new.int(2)
local Slider5 = new.int(2)
local Slider6 = new.int(2)
local tab = 1

local ComboTest = new.int()
local item_list = {u8'������', u8'����'}
local ImItems = imgui.new['const char*'][#item_list](item_list)

imgui.OnFrame(function() return WinState[0] end, function(player)
    imgui.SetNextWindowPos(imgui.ImVec2(500, 500), imgui.Cond.FirstUseEver, imgui.ImVec2(0.5, 0.5))
    imgui.SetNextWindowSize(imgui.ImVec2(800, 650), imgui.Cond.Always)
    imgui.Begin(u8 ' qqware & langerv ', WinState, imgui.WindowFlags.NoResize)
    for numberTab, nameTab in pairs({ '     ��������', '       ������', ' �������������' }) do
        if imgui.Button(u8(nameTab), imgui.ImVec2(200, 180)) then
            tab = numberTab
        end
    end
    imgui.SetCursorPos(imgui.ImVec2(206,40))
    if imgui.BeginChild('Name##' .. tab, imgui.ImVec2(700, 547), true) then
        if tab == 1 then
            imgui.Text(u8 '����� � ���.')
           
            if imgui.Button(u8 '���� �����') then
                status = not status
            end
            imgui.Text(u8 ' ������ ����� ����� ���� ������ ����, ������ ��� ����� ������������ ����� ���� ����� ����� ������ ')
            if imgui.Button(u8 '������ �����') then
                status1 = not status1
            end          
            imgui.Text(u8 ' ���� ����� ����� ����� ����� ���� ������ ���� ')
            if imgui.Button(u8 '���� �����') then
                status2 = not status2
            end
            imgui.Text(u8 ' ����� ������ ����� ������ ���� ������, ������ ����� ��� �� ������������, ����� ��� ������������ ������ ��� ���� ����� ������, ��� �� ����� ���� ')
            if imgui.Button(u8 '����� ������') then
                status3 = not status3
            end
            imgui.Text(u8 ' ������ ����� ������ ����� ������ ���� ������, �� ����� ��� ����, ����� ���� ����� �� ������, �.� ����� ���� ����� ������� ������ ')
            if imgui.Button(u8 '������ ����� ������') then
                status4 = not status4
            end
            imgui.Text(u8 ' ���� ����� ������, ��� ����� ��� � ������ �����, �� ������ (�������� ����� ��������� ���� ������) ')
            if imgui.Button(u8 '���� ����� ������') then
                status5 = not status5
            end
            imgui.SetCursorPosX(180)
            imgui.SetCursorPosY(178)
            imgui.Button(u8'�������� �����')
            status6 = not status6
        end
        elseif tab == 2 then
            imgui.Text(u8 '����� � ������')
           
            if imgui.Button(u8 '���� �����') then
                status7 = not status7
            end
            imgui.Text(u8 ' ������ ����� ����� ���� ������ ����, ������ ��� ����� ������������ ����� ���� ����� ����� ������ ')
           
            if imgui.Button(u8 '������ �����') then
                status8 = not status8
            end
           imgui.Text(u8 ' ���� ����� ����� ����� ����� ���� ������ ���� ')
            if imgui.Button(u8 '���� �����') then
                status9 = not status9
            end
            imgui.Text(u8 ' ����� ������, ��� ����� ��� � ���� ����� ������ � ��� ')
            if imgui.Button(u8 '����� ������') then
                status10 = not status10
            end
            imgui.Text(u8 ' ������ ����� ������, ��� ����� ��� � ������ ����� ������ � ��� ')
            if imgui.Button(u8 '������ ����� ������') then
                status11 = not status11
            end
            imgui.Text(u8 ' ���� ����� ������, ��� ����� ��� � ���� ����� ������ � ��� ')
            if imgui.Button(u8 '���� ����� ������') then
                status12 = not status12
            end
           
            imgui.SliderInt(u8 '', Slider6, -130, 130)
           
            imgui.SliderInt(u8 '2', Slider3, -130, 130)
           
            imgui.SliderInt(u8 '3', Slider4, -130, 130)
            imgui.SetCursorPosX(180)
            imgui.SetCursorPosY(178)
           if imgui.Button(u8'�������� �����') then
           status13 = not status13
        end
        elseif tab == 3 then
             if imgui.Button(u8'��������')  then
                obhod = not obhod
                if obhod then
                    sampAddChatMessage("�������� �������, ����������� �� ������!",-1)
        else
            lua_thread.create(function()
            sampAddChatMessage("������ ������� �����",-1)
            wait(waitt)
            sampSendSpawn()
            sampAddChatMessage("�������� ��������",-1)
            end)
               imgui.Text(u8 ' ����� ������ ���� � ����������� ���, �� ������ ������ �� �� �������� �� ���, ����� ����� ������� ')
                      imgui.Text(u8 '   menu -> qqware')
                    imgui.Text(u8 '   script -> langerv')
           
        end
        imgui.EndChild()
    end
end
end)
    imgui.End()

-- ������ ������
imgui.OnInitialize(function()
    theme()
end)

function theme()
    imgui.SwitchContext()
    local style = imgui.GetStyle()
    local colors = style.Colors
    local clr = imgui.Col
    local ImVec4 = imgui.ImVec4

    imgui.GetStyle().FramePadding = imgui.ImVec2(3.5, 3.5)
    imgui.GetStyle().FrameRounding = 3
    imgui.GetStyle().ChildRounding = 2
    imgui.GetStyle().WindowTitleAlign = imgui.ImVec2(0.5, 0.5)
    imgui.GetStyle().WindowRounding = 2
    imgui.GetStyle().ItemSpacing = imgui.ImVec2(5.0, 4.0)
    imgui.GetStyle().ScrollbarSize = 13.0
    imgui.GetStyle().ScrollbarRounding = 1
    imgui.GetStyle().GrabMinSize = 8.0
    imgui.GetStyle().GrabRounding = 1.0
    imgui.GetStyle().WindowPadding = imgui.ImVec2(4.0, 4.0)
    imgui.GetStyle().ButtonTextAlign = imgui.ImVec2(0.0, 0.5)
    imgui.GetStyle().WindowRounding = 14

    imgui.GetStyle().Colors[imgui.Col.WindowBg] = imgui.ImVec4(0.14, 0.12, 0.16, 1.00)
    imgui.GetStyle().Colors[imgui.Col.ChildBg] = imgui.ImVec4(0.30, 0.20, 0.39, 0.00)
    imgui.GetStyle().Colors[imgui.Col.PopupBg] = imgui.ImVec4(0.05, 0.05, 0.10, 0.90)
    imgui.GetStyle().Colors[imgui.Col.Border] = imgui.ImVec4(0.89, 0.85, 0.92, 0.30)
    imgui.GetStyle().Colors[imgui.Col.BorderShadow] = imgui.ImVec4(0.00, 0.00, 0.00, 0.00)
    imgui.GetStyle().Colors[imgui.Col.FrameBg] = imgui.ImVec4(0.30, 0.20, 0.39, 1.00)
    imgui.GetStyle().Colors[imgui.Col.FrameBgHovered] = imgui.ImVec4(0.41, 0.19, 0.63, 0.68)
    imgui.GetStyle().Colors[imgui.Col.FrameBgActive] = imgui.ImVec4(0.41, 0.19, 0.63, 1.00)
    imgui.GetStyle().Colors[imgui.Col.TitleBg] = imgui.ImVec4(0.41, 0.19, 0.63, 0.45)
    imgui.GetStyle().Colors[imgui.Col.TitleBgCollapsed] = imgui.ImVec4(0.41, 0.19, 0.63, 0.35)
    imgui.GetStyle().Colors[imgui.Col.TitleBgActive] = imgui.ImVec4(0.41, 0.19, 0.63, 0.78)
    imgui.GetStyle().Colors[imgui.Col.MenuBarBg] = imgui.ImVec4(0.30, 0.20, 0.39, 0.57)
    imgui.GetStyle().Colors[imgui.Col.ScrollbarBg] = imgui.ImVec4(0.30, 0.20, 0.39, 1.00)
    imgui.GetStyle().Colors[imgui.Col.ScrollbarGrab] = imgui.ImVec4(0.41, 0.19, 0.63, 0.31)
    imgui.GetStyle().Colors[imgui.Col.ScrollbarGrabHovered] = imgui.ImVec4(0.41, 0.19, 0.63, 0.78)
    imgui.GetStyle().Colors[imgui.Col.ScrollbarGrabActive] = imgui.ImVec4(0.41, 0.19, 0.63, 1.00)
    imgui.GetStyle().Colors[imgui.Col.CheckMark] = imgui.ImVec4(0.56, 0.61, 1.00, 1.00)
    imgui.GetStyle().Colors[imgui.Col.SliderGrab] = imgui.ImVec4(0.41, 0.19, 0.63, 0.24)
    imgui.GetStyle().Colors[imgui.Col.SliderGrabActive] = imgui.ImVec4(0.41, 0.19, 0.63, 1.00)
    imgui.GetStyle().Colors[imgui.Col.Button] = imgui.ImVec4(0.41, 0.19, 0.63, 0.44)
    imgui.GetStyle().Colors[imgui.Col.ButtonHovered] = imgui.ImVec4(0.41, 0.19, 0.63, 0.86)
    imgui.GetStyle().Colors[imgui.Col.ButtonActive] = imgui.ImVec4(0.64, 0.33, 0.94, 1.00)
    imgui.GetStyle().Colors[imgui.Col.Header] = imgui.ImVec4(0.41, 0.19, 0.63, 0.76)
    imgui.GetStyle().Colors[imgui.Col.HeaderHovered] = imgui.ImVec4(0.41, 0.19, 0.63, 0.86)
    imgui.GetStyle().Colors[imgui.Col.HeaderActive] = imgui.ImVec4(0.41, 0.19, 0.63, 1.00)
    imgui.GetStyle().Colors[imgui.Col.ResizeGrip] = imgui.ImVec4(0.41, 0.19, 0.63, 0.20)
    imgui.GetStyle().Colors[imgui.Col.ResizeGripHovered] = imgui.ImVec4(0.41, 0.19, 0.63, 0.78)
    imgui.GetStyle().Colors[imgui.Col.ResizeGripActive] = imgui.ImVec4(0.41, 0.19, 0.63, 1.00)
    imgui.GetStyle().Colors[imgui.Col.PlotLines] = imgui.ImVec4(0.89, 0.85, 0.92, 0.63)
    imgui.GetStyle().Colors[imgui.Col.PlotLinesHovered] = imgui.ImVec4(0.41, 0.19, 0.63, 1.00)
    imgui.GetStyle().Colors[imgui.Col.PlotHistogram] = imgui.ImVec4(0.89, 0.85, 0.92, 0.63)
    imgui.GetStyle().Colors[imgui.Col.PlotHistogramHovered] = imgui.ImVec4(0.41, 0.19, 0.63, 1.00)
    imgui.GetStyle().Colors[imgui.Col.TextSelectedBg] = imgui.ImVec4(0.41, 0.19, 0.63, 0.43)
end

function main()
    sampRegisterChatCommand('muinvis', function() WinState[0] = not WinState[0] end)
    wait(-1)
end

function ev.onSendPlayerSync(data)
    if status == true then
        local x,y,z = getCharCoordinates(PLAYER_PED)
        data.position.z=data.position.z-4
    end
    if status1 == true then
        local x,y,z = getCharCoordinates(PLAYER_PED)
        data.position.z=data.position.z-20
    end
    if status2 == true then
        local x,y,z = getCharCoordinates(PLAYER_PED)
        data.position.z=data.position.z-80
    end
    if status3 == true then
        local x,y,z = getCharCoordinates(PLAYER_PED)
        data.position.z=data.position.z+50
    end
    if status4 == true then
        local x,y,z = getCharCoordinates(PLAYER_PED)
        data.position.z=data.position.z+100
    end
    if status5 == true then
        local x,y,z = getCharCoordinates(PLAYER_PED)
        data.position.z=data.position.z+130
    end
    if status6 == true then
        local x,y,z = getCharCoordinates(PLAYER_PED)
        data.position.z=data.position.z+0
    end
end

function ev.onSendVehicleSync(data)
    if status7 == true then
        data.position.z=data.position.z-10
    end
    if status8 == true then
        data.position.z=data.position.z-35
    end
    if status9 == true then
        data.position.z=data.position.z-55
    end
    if status10 == true then
        data.position.z=data.position.z+50
    end
    if status11 == true then
        data.position.z=data.position.z+100
    end
    if status12 == true then
        data.position.z=data.position.z+130
    end
    if status13 == true then
        data.position.z=data.position.z+0
    end
end

function ev.onTogglePlayerSpectating(toggle)
    if obhod then
        if not toggle then
            lua_thread.create(function()
                sampRequestClass(1)
                wait(waitt)
                sampSendSpawn()
                sampSendRequestSpawn()
                sampAddChatMessage('�������� �� GoxaShow ��������!', -1)
                sampAddChatMessage('��������� youtube.com/goxashow', -1)
            end)
        end
        return false
    end
end

function ev.onSendPlayerSync(data)
    if obhod then
        local sync = samp_create_sync_data('spectator')
        sync.position = data.position
        sync.keysData = data.keysData
        sync.send()
        return false
    end
end
       
function ev.onSendRequestSpawn() if obhod then return false end end
function ev.onSendSpawn() if obhod then return false end 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 then
        local copy_func = sync_info[3]
        if copy_func then
            local _, player_id
            if copy_from_player == true 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
У тебя все русские тексты пошли по пизде из-за кодировки
 

MLycoris

На вид оружие массового семяизвержения
Проверенный
1,982
2,187
очередную тему создаешь с одними и теми же проблемами, это пиздец, может ты не будешь браться за написание скриптов, если банально не учишься на своих же ошибках

например, где end у кнопок?
1697393173125.png
 
  • Влюблен
Реакции: Hinаta

qqware

Участник
Автор темы
44
2
очередную тему создаешь с одними и теми же проблемами, это пиздец, может ты не будешь браться за написание скриптов, если банально не учишься на своих же ошибках

например, где end у кнопок?
Посмотреть вложение 218122
я меню только написал
 

Hinаta

Известный
777
363
а на остальное я не смогу посмотреть, пока ты кодировку не спросишь. А вообще советую учить lua, чтобы другие за тебя скрипты не писали. Ты даже не пытаешься разобраться, в чём проблема, и на каждый свой глупый вопрос создаёшь новую тему
 

qqware

Участник
Автор темы
44
2
а на остальное я не смогу посмотреть, пока ты кодировку не спросишь. А вообще советую учить lua, чтобы другие за тебя скрипты не писали. Ты даже не пытаешься разобраться, в чём проблема, и на каждый свой глупый вопрос создаёшь новую тему
lua:
local waitt = 1500

local imgui = require 'mimgui'
local encoding = require 'encoding'
local ev = require "lib.samp.events"
encoding.default = 'CP1251'
local u8 = encoding.UTF8
local new = imgui.new

local status = false
local status1 = false
local status2 = false
local status3 = false
local status4 = false
local status5 = false
local status6 = false
local status7 = false
local status8 = false
local status9 = false
local status10 = false
local status11 = false
local status12 = false
local status13 = false
local status14 = false
local obhod = true

local WinState = imgui.new.bool()
local SliderOne = new.int(2)
local Slider2 = new.int(2)
local Slider3 = new.int(2)
local Slider4 = new.int(2)
local Slider5 = new.int(2)
local Slider6 = new.int(2)
local tab = 1

local ComboTest = new.int()
local item_list = {u8'Авторы', u8'Читы'}
local ImItems = imgui.new['const char*'][#item_list](item_list)

imgui.OnFrame(function() return WinState[0] end, function(player)
    imgui.SetNextWindowPos(imgui.ImVec2(500, 500), imgui.Cond.FirstUseEver, imgui.ImVec2(0.5, 0.5))
    imgui.SetNextWindowSize(imgui.ImVec2(800, 650), imgui.Cond.Always)
    imgui.Begin(u8 ' qqware & langerv ', WinState, imgui.WindowFlags.NoResize)
    for numberTab, nameTab in pairs({ '     Персонаж', '       Машина', ' Дополнительно' }) do
        if imgui.Button(u8(nameTab), imgui.ImVec2(200, 180)) then
            tab = numberTab
        end
    end
    imgui.SetCursorPos(imgui.ImVec2(206,40))
    if imgui.BeginChild('Name##' .. tab, imgui.ImVec2(700, 547), true) then
        if tab == 1 then
            imgui.Text(u8 'Инвиз с ног.')
            
            if imgui.Button(u8 'обыч инвиз') then
                status = not status
            end
            imgui.Text(u8 ' ультра инвиз будет тебя кидает вниз, вообще его лучше использовать когда мега инвиз будет кикать ')
            if imgui.Button(u8 'ультра инвиз') then
                status1 = not status1
            end           
            imgui.Text(u8 ' мега инвиз будет очень низко тебя кидать вниз ')
            if imgui.Button(u8 'мега инвиз') then
                status2 = not status2
            end
            imgui.Text(u8 ' инвиз наверх будет кидать тебя наверх, вообще лучше его не использовать, лучше уже использовать ультра или мега инвиз наверх, или же инвиз вниз ')
            if imgui.Button(u8 'инвиз наверх') then
                status3 = not status3
            end
            imgui.Text(u8 ' ультра инвиз наверх будет кидать тебя наверх, он нужен для того, чтобы тебя админ не увидел, т.к очень мало людей смотрят наверх ')
            if imgui.Button(u8 'ультра инвиз наверх') then
                status4 = not status4
            end
            imgui.Text(u8 ' мега инвиз наверх, все также как и ультра инвиз, но повыше (возможно будет пропадать зона стрима) ')
            if imgui.Button(u8 'мега инвиз наверх') then
                status5 = not status5
            end
            imgui.SetCursorPosX(180)
            imgui.SetCursorPosY(178)
            imgui.Button(u8'обнулить инвиз')
            status6 = not status6
        end
        elseif tab == 2 then
            imgui.Text(u8 'Инвиз в машине')
            
            if imgui.Button(u8 'обыч инвиз') then
                status7 = not status7
            end
            imgui.Text(u8 ' ультра инвиз будет тебя кидает вниз, вообще его лучше использовать когда мега инвиз будет кикать ')
            
            if imgui.Button(u8 'ультра инвиз') then
                status8 = not status8
            end
           imgui.Text(u8 ' мега инвиз будет очень низко тебя кидать вниз ')
            if imgui.Button(u8 'мега инвиз') then
                status9 = not status9
            end
            imgui.Text(u8 ' инвиз наверх, все также как и обыч инвиз наверх с ног ')
            if imgui.Button(u8 'инвиз наверх') then
                status10 = not status10
            end
            imgui.Text(u8 ' ультра инвиз наверх, все также как и ультра инвиз наверх с ног ')
            if imgui.Button(u8 'ультра инвиз наверх') then
                status11 = not status11
            end
            imgui.Text(u8 ' мега инвиз наверх, все также как и мега инвиз наверх с ног ')
            if imgui.Button(u8 'мега инвиз наверх') then
                status12 = not status12
            end
            
            imgui.SliderInt(u8 '', Slider6, -130, 130)
            
            imgui.SliderInt(u8 '2', Slider3, -130, 130)
            
            imgui.SliderInt(u8 '3', Slider4, -130, 130)
            imgui.SetCursorPosX(180)
            imgui.SetCursorPosY(178)
           if imgui.Button(u8'обнулить инвиз') then
           status13 = not status13
        end
        elseif tab == 3 then
             if imgui.Button(u8'эксплойт')  then
                obhod = not obhod
                if obhod then
                    sampAddChatMessage("Эксплоит включен, перезайдите на сервер!",-1)
        else
            lua_thread.create(function()
            sampAddChatMessage("Мистер подожди малех",-1)
            wait(waitt)
            sampSendSpawn()
            sampAddChatMessage("Эксплоит выключен",-1)
            end)
               imgui.Text(u8 ' будет кидать тебя в виртуальный мир, на данный момент он не работает на арз, можна юзать админам ')
                      imgui.Text(u8 '   menu -> qqware')
                    imgui.Text(u8 '   script -> langerv')
            
        end
        imgui.EndChild()
    end
end
end)
    imgui.End()

-- раздал опиума
imgui.OnInitialize(function()
    theme()
end)

function theme()
    imgui.SwitchContext()
    local style = imgui.GetStyle()
    local colors = style.Colors
    local clr = imgui.Col
    local ImVec4 = imgui.ImVec4

    imgui.GetStyle().FramePadding = imgui.ImVec2(3.5, 3.5)
    imgui.GetStyle().FrameRounding = 3
    imgui.GetStyle().ChildRounding = 2
    imgui.GetStyle().WindowTitleAlign = imgui.ImVec2(0.5, 0.5)
    imgui.GetStyle().WindowRounding = 2
    imgui.GetStyle().ItemSpacing = imgui.ImVec2(5.0, 4.0)
    imgui.GetStyle().ScrollbarSize = 13.0
    imgui.GetStyle().ScrollbarRounding = 1
    imgui.GetStyle().GrabMinSize = 8.0
    imgui.GetStyle().GrabRounding = 1.0
    imgui.GetStyle().WindowPadding = imgui.ImVec2(4.0, 4.0)
    imgui.GetStyle().ButtonTextAlign = imgui.ImVec2(0.0, 0.5)
    imgui.GetStyle().WindowRounding = 14

    imgui.GetStyle().Colors[imgui.Col.WindowBg] = imgui.ImVec4(0.14, 0.12, 0.16, 1.00)
    imgui.GetStyle().Colors[imgui.Col.ChildBg] = imgui.ImVec4(0.30, 0.20, 0.39, 0.00)
    imgui.GetStyle().Colors[imgui.Col.PopupBg] = imgui.ImVec4(0.05, 0.05, 0.10, 0.90)
    imgui.GetStyle().Colors[imgui.Col.Border] = imgui.ImVec4(0.89, 0.85, 0.92, 0.30)
    imgui.GetStyle().Colors[imgui.Col.BorderShadow] = imgui.ImVec4(0.00, 0.00, 0.00, 0.00)
    imgui.GetStyle().Colors[imgui.Col.FrameBg] = imgui.ImVec4(0.30, 0.20, 0.39, 1.00)
    imgui.GetStyle().Colors[imgui.Col.FrameBgHovered] = imgui.ImVec4(0.41, 0.19, 0.63, 0.68)
    imgui.GetStyle().Colors[imgui.Col.FrameBgActive] = imgui.ImVec4(0.41, 0.19, 0.63, 1.00)
    imgui.GetStyle().Colors[imgui.Col.TitleBg] = imgui.ImVec4(0.41, 0.19, 0.63, 0.45)
    imgui.GetStyle().Colors[imgui.Col.TitleBgCollapsed] = imgui.ImVec4(0.41, 0.19, 0.63, 0.35)
    imgui.GetStyle().Colors[imgui.Col.TitleBgActive] = imgui.ImVec4(0.41, 0.19, 0.63, 0.78)
    imgui.GetStyle().Colors[imgui.Col.MenuBarBg] = imgui.ImVec4(0.30, 0.20, 0.39, 0.57)
    imgui.GetStyle().Colors[imgui.Col.ScrollbarBg] = imgui.ImVec4(0.30, 0.20, 0.39, 1.00)
    imgui.GetStyle().Colors[imgui.Col.ScrollbarGrab] = imgui.ImVec4(0.41, 0.19, 0.63, 0.31)
    imgui.GetStyle().Colors[imgui.Col.ScrollbarGrabHovered] = imgui.ImVec4(0.41, 0.19, 0.63, 0.78)
    imgui.GetStyle().Colors[imgui.Col.ScrollbarGrabActive] = imgui.ImVec4(0.41, 0.19, 0.63, 1.00)
    imgui.GetStyle().Colors[imgui.Col.CheckMark] = imgui.ImVec4(0.56, 0.61, 1.00, 1.00)
    imgui.GetStyle().Colors[imgui.Col.SliderGrab] = imgui.ImVec4(0.41, 0.19, 0.63, 0.24)
    imgui.GetStyle().Colors[imgui.Col.SliderGrabActive] = imgui.ImVec4(0.41, 0.19, 0.63, 1.00)
    imgui.GetStyle().Colors[imgui.Col.Button] = imgui.ImVec4(0.41, 0.19, 0.63, 0.44)
    imgui.GetStyle().Colors[imgui.Col.ButtonHovered] = imgui.ImVec4(0.41, 0.19, 0.63, 0.86)
    imgui.GetStyle().Colors[imgui.Col.ButtonActive] = imgui.ImVec4(0.64, 0.33, 0.94, 1.00)
    imgui.GetStyle().Colors[imgui.Col.Header] = imgui.ImVec4(0.41, 0.19, 0.63, 0.76)
    imgui.GetStyle().Colors[imgui.Col.HeaderHovered] = imgui.ImVec4(0.41, 0.19, 0.63, 0.86)
    imgui.GetStyle().Colors[imgui.Col.HeaderActive] = imgui.ImVec4(0.41, 0.19, 0.63, 1.00)
    imgui.GetStyle().Colors[imgui.Col.ResizeGrip] = imgui.ImVec4(0.41, 0.19, 0.63, 0.20)
    imgui.GetStyle().Colors[imgui.Col.ResizeGripHovered] = imgui.ImVec4(0.41, 0.19, 0.63, 0.78)
    imgui.GetStyle().Colors[imgui.Col.ResizeGripActive] = imgui.ImVec4(0.41, 0.19, 0.63, 1.00)
    imgui.GetStyle().Colors[imgui.Col.PlotLines] = imgui.ImVec4(0.89, 0.85, 0.92, 0.63)
    imgui.GetStyle().Colors[imgui.Col.PlotLinesHovered] = imgui.ImVec4(0.41, 0.19, 0.63, 1.00)
    imgui.GetStyle().Colors[imgui.Col.PlotHistogram] = imgui.ImVec4(0.89, 0.85, 0.92, 0.63)
    imgui.GetStyle().Colors[imgui.Col.PlotHistogramHovered] = imgui.ImVec4(0.41, 0.19, 0.63, 1.00)
    imgui.GetStyle().Colors[imgui.Col.TextSelectedBg] = imgui.ImVec4(0.41, 0.19, 0.63, 0.43)
end

function main()
    sampRegisterChatCommand('muinvis', function() WinState[0] = not WinState[0] end)
    wait(-1)
end

function ev.onSendPlayerSync(data)
    if status == true then
        local x,y,z = getCharCoordinates(PLAYER_PED)
        data.position.z=data.position.z-4
    end
    if status1 == true then
        local x,y,z = getCharCoordinates(PLAYER_PED)
        data.position.z=data.position.z-20
    end
    if status2 == true then
        local x,y,z = getCharCoordinates(PLAYER_PED)
        data.position.z=data.position.z-80
    end
    if status3 == true then
        local x,y,z = getCharCoordinates(PLAYER_PED)
        data.position.z=data.position.z+50
    end
    if status4 == true then
        local x,y,z = getCharCoordinates(PLAYER_PED)
        data.position.z=data.position.z+100
    end
    if status5 == true then
        local x,y,z = getCharCoordinates(PLAYER_PED)
        data.position.z=data.position.z+130
    end
    if status6 == true then
        local x,y,z = getCharCoordinates(PLAYER_PED)
        data.position.z=data.position.z+0
    end
end

function ev.onSendVehicleSync(data)
    if status7 == true then
        data.position.z=data.position.z-10
    end
    if status8 == true then
        data.position.z=data.position.z-35
    end
    if status9 == true then
        data.position.z=data.position.z-55
    end
    if status10 == true then
        data.position.z=data.position.z+50
    end
    if status11 == true then
        data.position.z=data.position.z+100
    end
    if status12 == true then
        data.position.z=data.position.z+130
    end
    if status13 == true then
        data.position.z=data.position.z+0
    end
end

function ev.onTogglePlayerSpectating(toggle)
    if obhod then
        if not toggle then
            lua_thread.create(function()
                sampRequestClass(1)
                wait(waitt)
                sampSendSpawn()
                sampSendRequestSpawn()
                sampAddChatMessage('Эксплоит от GoxaShow сработал!', -1)
                sampAddChatMessage('Создатель youtube.com/goxashow', -1)
            end)
        end
        return false
    end
end

function ev.onSendPlayerSync(data)
    if obhod then
        local sync = samp_create_sync_data('spectator')
        sync.position = data.position
        sync.keysData = data.keysData
        sync.send()
        return false
    end
end
        
function ev.onSendRequestSpawn() if obhod then return false end end
function ev.onSendSpawn() if obhod then return false end 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 then
        local copy_func = sync_info[3]
        if copy_func then
            local _, player_id
            if copy_from_player == true 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
 

MrDorlik

Известный
953
382
lua:
local waitt = 1500

local imgui = require 'mimgui'
local encoding = require 'encoding'
local ev = require "lib.samp.events"
encoding.default = 'CP1251'
local u8 = encoding.UTF8
local new = imgui.new

local status = false
local status1 = false
local status2 = false
local status3 = false
local status4 = false
local status5 = false
local status6 = false
local status7 = false
local status8 = false
local status9 = false
local status10 = false
local status11 = false
local status12 = false
local status13 = false
local status14 = false
local obhod = true

local WinState = imgui.new.bool()
local SliderOne = new.int(2)
local Slider2 = new.int(2)
local Slider3 = new.int(2)
local Slider4 = new.int(2)
local Slider5 = new.int(2)
local Slider6 = new.int(2)
local tab = 1

local ComboTest = new.int()
local item_list = {u8'Авторы', u8'Читы'}
local ImItems = imgui.new['const char*'][#item_list](item_list)

imgui.OnFrame(function() return WinState[0] end, function(player)
    imgui.SetNextWindowPos(imgui.ImVec2(500, 500), imgui.Cond.FirstUseEver, imgui.ImVec2(0.5, 0.5))
    imgui.SetNextWindowSize(imgui.ImVec2(800, 650), imgui.Cond.Always)
    imgui.Begin(u8 ' qqware & langerv ', WinState, imgui.WindowFlags.NoResize)
    for numberTab, nameTab in pairs({ '     Персонаж', '       Машина', ' Дополнительно' }) do
        if imgui.Button(u8(nameTab), imgui.ImVec2(200, 180)) then
            tab = numberTab
        end
    end
    imgui.SetCursorPos(imgui.ImVec2(206,40))
    if imgui.BeginChild('Name##' .. tab, imgui.ImVec2(700, 547), true) then
        if tab == 1 then
            imgui.Text(u8 'Инвиз с ног.')
          
            if imgui.Button(u8 'обыч инвиз') then
                status = not status
            end
            imgui.Text(u8 ' ультра инвиз будет тебя кидает вниз, вообще его лучше использовать когда мега инвиз будет кикать ')
            if imgui.Button(u8 'ультра инвиз') then
                status1 = not status1
            end         
            imgui.Text(u8 ' мега инвиз будет очень низко тебя кидать вниз ')
            if imgui.Button(u8 'мега инвиз') then
                status2 = not status2
            end
            imgui.Text(u8 ' инвиз наверх будет кидать тебя наверх, вообще лучше его не использовать, лучше уже использовать ультра или мега инвиз наверх, или же инвиз вниз ')
            if imgui.Button(u8 'инвиз наверх') then
                status3 = not status3
            end
            imgui.Text(u8 ' ультра инвиз наверх будет кидать тебя наверх, он нужен для того, чтобы тебя админ не увидел, т.к очень мало людей смотрят наверх ')
            if imgui.Button(u8 'ультра инвиз наверх') then
                status4 = not status4
            end
            imgui.Text(u8 ' мега инвиз наверх, все также как и ультра инвиз, но повыше (возможно будет пропадать зона стрима) ')
            if imgui.Button(u8 'мега инвиз наверх') then
                status5 = not status5
            end
            imgui.SetCursorPosX(180)
            imgui.SetCursorPosY(178)
            imgui.Button(u8'обнулить инвиз')
            status6 = not status6
        end
        elseif tab == 2 then
            imgui.Text(u8 'Инвиз в машине')
          
            if imgui.Button(u8 'обыч инвиз') then
                status7 = not status7
            end
            imgui.Text(u8 ' ультра инвиз будет тебя кидает вниз, вообще его лучше использовать когда мега инвиз будет кикать ')
          
            if imgui.Button(u8 'ультра инвиз') then
                status8 = not status8
            end
           imgui.Text(u8 ' мега инвиз будет очень низко тебя кидать вниз ')
            if imgui.Button(u8 'мега инвиз') then
                status9 = not status9
            end
            imgui.Text(u8 ' инвиз наверх, все также как и обыч инвиз наверх с ног ')
            if imgui.Button(u8 'инвиз наверх') then
                status10 = not status10
            end
            imgui.Text(u8 ' ультра инвиз наверх, все также как и ультра инвиз наверх с ног ')
            if imgui.Button(u8 'ультра инвиз наверх') then
                status11 = not status11
            end
            imgui.Text(u8 ' мега инвиз наверх, все также как и мега инвиз наверх с ног ')
            if imgui.Button(u8 'мега инвиз наверх') then
                status12 = not status12
            end
          
            imgui.SliderInt(u8 '', Slider6, -130, 130)
          
            imgui.SliderInt(u8 '2', Slider3, -130, 130)
          
            imgui.SliderInt(u8 '3', Slider4, -130, 130)
            imgui.SetCursorPosX(180)
            imgui.SetCursorPosY(178)
           if imgui.Button(u8'обнулить инвиз') then
           status13 = not status13
        end
        elseif tab == 3 then
             if imgui.Button(u8'эксплойт')  then
                obhod = not obhod
                if obhod then
                    sampAddChatMessage("Эксплоит включен, перезайдите на сервер!",-1)
        else
            lua_thread.create(function()
            sampAddChatMessage("Мистер подожди малех",-1)
            wait(waitt)
            sampSendSpawn()
            sampAddChatMessage("Эксплоит выключен",-1)
            end)
               imgui.Text(u8 ' будет кидать тебя в виртуальный мир, на данный момент он не работает на арз, можна юзать админам ')
                      imgui.Text(u8 '   menu -> qqware')
                    imgui.Text(u8 '   script -> langerv')
          
        end
        imgui.EndChild()
    end
end
end)
    imgui.End()

-- раздал опиума
imgui.OnInitialize(function()
    theme()
end)

function theme()
    imgui.SwitchContext()
    local style = imgui.GetStyle()
    local colors = style.Colors
    local clr = imgui.Col
    local ImVec4 = imgui.ImVec4

    imgui.GetStyle().FramePadding = imgui.ImVec2(3.5, 3.5)
    imgui.GetStyle().FrameRounding = 3
    imgui.GetStyle().ChildRounding = 2
    imgui.GetStyle().WindowTitleAlign = imgui.ImVec2(0.5, 0.5)
    imgui.GetStyle().WindowRounding = 2
    imgui.GetStyle().ItemSpacing = imgui.ImVec2(5.0, 4.0)
    imgui.GetStyle().ScrollbarSize = 13.0
    imgui.GetStyle().ScrollbarRounding = 1
    imgui.GetStyle().GrabMinSize = 8.0
    imgui.GetStyle().GrabRounding = 1.0
    imgui.GetStyle().WindowPadding = imgui.ImVec2(4.0, 4.0)
    imgui.GetStyle().ButtonTextAlign = imgui.ImVec2(0.0, 0.5)
    imgui.GetStyle().WindowRounding = 14

    imgui.GetStyle().Colors[imgui.Col.WindowBg] = imgui.ImVec4(0.14, 0.12, 0.16, 1.00)
    imgui.GetStyle().Colors[imgui.Col.ChildBg] = imgui.ImVec4(0.30, 0.20, 0.39, 0.00)
    imgui.GetStyle().Colors[imgui.Col.PopupBg] = imgui.ImVec4(0.05, 0.05, 0.10, 0.90)
    imgui.GetStyle().Colors[imgui.Col.Border] = imgui.ImVec4(0.89, 0.85, 0.92, 0.30)
    imgui.GetStyle().Colors[imgui.Col.BorderShadow] = imgui.ImVec4(0.00, 0.00, 0.00, 0.00)
    imgui.GetStyle().Colors[imgui.Col.FrameBg] = imgui.ImVec4(0.30, 0.20, 0.39, 1.00)
    imgui.GetStyle().Colors[imgui.Col.FrameBgHovered] = imgui.ImVec4(0.41, 0.19, 0.63, 0.68)
    imgui.GetStyle().Colors[imgui.Col.FrameBgActive] = imgui.ImVec4(0.41, 0.19, 0.63, 1.00)
    imgui.GetStyle().Colors[imgui.Col.TitleBg] = imgui.ImVec4(0.41, 0.19, 0.63, 0.45)
    imgui.GetStyle().Colors[imgui.Col.TitleBgCollapsed] = imgui.ImVec4(0.41, 0.19, 0.63, 0.35)
    imgui.GetStyle().Colors[imgui.Col.TitleBgActive] = imgui.ImVec4(0.41, 0.19, 0.63, 0.78)
    imgui.GetStyle().Colors[imgui.Col.MenuBarBg] = imgui.ImVec4(0.30, 0.20, 0.39, 0.57)
    imgui.GetStyle().Colors[imgui.Col.ScrollbarBg] = imgui.ImVec4(0.30, 0.20, 0.39, 1.00)
    imgui.GetStyle().Colors[imgui.Col.ScrollbarGrab] = imgui.ImVec4(0.41, 0.19, 0.63, 0.31)
    imgui.GetStyle().Colors[imgui.Col.ScrollbarGrabHovered] = imgui.ImVec4(0.41, 0.19, 0.63, 0.78)
    imgui.GetStyle().Colors[imgui.Col.ScrollbarGrabActive] = imgui.ImVec4(0.41, 0.19, 0.63, 1.00)
    imgui.GetStyle().Colors[imgui.Col.CheckMark] = imgui.ImVec4(0.56, 0.61, 1.00, 1.00)
    imgui.GetStyle().Colors[imgui.Col.SliderGrab] = imgui.ImVec4(0.41, 0.19, 0.63, 0.24)
    imgui.GetStyle().Colors[imgui.Col.SliderGrabActive] = imgui.ImVec4(0.41, 0.19, 0.63, 1.00)
    imgui.GetStyle().Colors[imgui.Col.Button] = imgui.ImVec4(0.41, 0.19, 0.63, 0.44)
    imgui.GetStyle().Colors[imgui.Col.ButtonHovered] = imgui.ImVec4(0.41, 0.19, 0.63, 0.86)
    imgui.GetStyle().Colors[imgui.Col.ButtonActive] = imgui.ImVec4(0.64, 0.33, 0.94, 1.00)
    imgui.GetStyle().Colors[imgui.Col.Header] = imgui.ImVec4(0.41, 0.19, 0.63, 0.76)
    imgui.GetStyle().Colors[imgui.Col.HeaderHovered] = imgui.ImVec4(0.41, 0.19, 0.63, 0.86)
    imgui.GetStyle().Colors[imgui.Col.HeaderActive] = imgui.ImVec4(0.41, 0.19, 0.63, 1.00)
    imgui.GetStyle().Colors[imgui.Col.ResizeGrip] = imgui.ImVec4(0.41, 0.19, 0.63, 0.20)
    imgui.GetStyle().Colors[imgui.Col.ResizeGripHovered] = imgui.ImVec4(0.41, 0.19, 0.63, 0.78)
    imgui.GetStyle().Colors[imgui.Col.ResizeGripActive] = imgui.ImVec4(0.41, 0.19, 0.63, 1.00)
    imgui.GetStyle().Colors[imgui.Col.PlotLines] = imgui.ImVec4(0.89, 0.85, 0.92, 0.63)
    imgui.GetStyle().Colors[imgui.Col.PlotLinesHovered] = imgui.ImVec4(0.41, 0.19, 0.63, 1.00)
    imgui.GetStyle().Colors[imgui.Col.PlotHistogram] = imgui.ImVec4(0.89, 0.85, 0.92, 0.63)
    imgui.GetStyle().Colors[imgui.Col.PlotHistogramHovered] = imgui.ImVec4(0.41, 0.19, 0.63, 1.00)
    imgui.GetStyle().Colors[imgui.Col.TextSelectedBg] = imgui.ImVec4(0.41, 0.19, 0.63, 0.43)
end

function main()
    sampRegisterChatCommand('muinvis', function() WinState[0] = not WinState[0] end)
    wait(-1)
end

function ev.onSendPlayerSync(data)
    if status == true then
        local x,y,z = getCharCoordinates(PLAYER_PED)
        data.position.z=data.position.z-4
    end
    if status1 == true then
        local x,y,z = getCharCoordinates(PLAYER_PED)
        data.position.z=data.position.z-20
    end
    if status2 == true then
        local x,y,z = getCharCoordinates(PLAYER_PED)
        data.position.z=data.position.z-80
    end
    if status3 == true then
        local x,y,z = getCharCoordinates(PLAYER_PED)
        data.position.z=data.position.z+50
    end
    if status4 == true then
        local x,y,z = getCharCoordinates(PLAYER_PED)
        data.position.z=data.position.z+100
    end
    if status5 == true then
        local x,y,z = getCharCoordinates(PLAYER_PED)
        data.position.z=data.position.z+130
    end
    if status6 == true then
        local x,y,z = getCharCoordinates(PLAYER_PED)
        data.position.z=data.position.z+0
    end
end

function ev.onSendVehicleSync(data)
    if status7 == true then
        data.position.z=data.position.z-10
    end
    if status8 == true then
        data.position.z=data.position.z-35
    end
    if status9 == true then
        data.position.z=data.position.z-55
    end
    if status10 == true then
        data.position.z=data.position.z+50
    end
    if status11 == true then
        data.position.z=data.position.z+100
    end
    if status12 == true then
        data.position.z=data.position.z+130
    end
    if status13 == true then
        data.position.z=data.position.z+0
    end
end

function ev.onTogglePlayerSpectating(toggle)
    if obhod then
        if not toggle then
            lua_thread.create(function()
                sampRequestClass(1)
                wait(waitt)
                sampSendSpawn()
                sampSendRequestSpawn()
                sampAddChatMessage('Эксплоит от GoxaShow сработал!', -1)
                sampAddChatMessage('Создатель youtube.com/goxashow', -1)
            end)
        end
        return false
    end
end

function ev.onSendPlayerSync(data)
    if obhod then
        local sync = samp_create_sync_data('spectator')
        sync.position = data.position
        sync.keysData = data.keysData
        sync.send()
        return false
    end
end
      
function ev.onSendRequestSpawn() if obhod then return false end end
function ev.onSendSpawn() if obhod then return false end 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 then
        local copy_func = sync_info[3]
        if copy_func then
            local _, player_id
            if copy_from_player == true 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
пиздец нахуй, по такому коду чапо новую серию "как не надо писать .lua скрипты" должен сделать
 
  • Нравится
Реакции: qqware