Mimgui помогите Как привязать чайд к окну

Arizona Mobile 3

Потрачен
Автор темы
117
12
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Версия MoonLoader
Другое
Здрастуйте, помогите пж. Как привязать чайд к окну чтобы как меняешь размер чайд за ним бегал
 

Arizona Mobile 3

Потрачен
Автор темы
117
12
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Lua:
local ffi = require "ffi"
local imgui = require "mimgui"
local encoding = require "encoding"
encoding.default = "CP1251"
local u8 = encoding.UTF8
local new = imgui.new
local faicons = require("fAwesome6")
local new, str = imgui.new, ffi.string

-- вписываем всё необходимое


local playerid = select(2, sampGetPlayerIdByCharHandle(PLAYER_PED))
local name = sampGetPlayerNickname(select(2, sampGetPlayerIdByCharHandle(playerPed)))


local tab = 1
local WinState = new.bool()

imgui.OnFrame(function()
    return WinState[0]
end, function(player)
    imgui.SetNextWindowPos(imgui.ImVec2(500, 700), imgui.Cond.FirstUseEver, imgui.ImVec2(0.5, 0.5))
    imgui.Begin(u8"Zam-Leader Helper", WinState)
    
    imgui.Text(u8'Zam-Leader Helper')
    imgui.Text(u8'Для Arizona Mobile')

    if imgui.Button(faicons("user") .. u8" Главная", imgui.ImVec2(160, 60)) then
        tab = 1
    end

    if imgui.Button(faicons("gear") .. u8" Настройки", imgui.ImVec2(160, 60)) then
        tab = 2
    end

    if imgui.Button(faicons("sliders") .. u8" Биндер", imgui.ImVec2(160, 60)) then
        tab = 3
    end

    if imgui.Button(faicons("desktop") .. u8" Info", imgui.ImVec2(160, 60)) then
        tab = 4
    end

    
        if tab == 1 then
        imgui.Text(u8'Ваш ник ' ..name.. ' [  ' ..playerid.. ' ] ')
            -- Содержимое вкладки 1
        elseif tab == 2 then
            -- Содержимое вкладки 2

        elseif tab == 3 then
        
        elseif tab == 4 then
        
        end
    imgui.End()
end)

function main()
    sampRegisterChatCommand("lh", function()
        WinState[0] = not WinState[0]
    end)
end

imgui.OnInitialize(function()
    imgui.GetIO().IniFilename = nil
    local config = imgui.ImFontConfig()
    config.MergeMode = true
    config.PixelSnapH = true
    iconRanges = imgui.new.ImWchar[3](faicons.min_range, faicons.max_range, 0)
    imgui.GetIO().Fonts:AddFontFromMemoryCompressedBase85TTF(faicons.get_font_data_base85("solid"), 14, config, iconRanges)
end)

Lua:
local ffi = require "ffi"
local imgui = require "mimgui"
local encoding = require "encoding"
encoding.default = "CP1251"
local u8 = encoding.UTF8
local new = imgui.new
local faicons = require("fAwesome6")
local new, str = imgui.new, ffi.string

-- вписываем всё необходимое


local playerid = select(2, sampGetPlayerIdByCharHandle(PLAYER_PED))
local name = sampGetPlayerNickname(select(2, sampGetPlayerIdByCharHandle(playerPed)))


local tab = 1
local WinState = new.bool()

imgui.OnFrame(function()
    return WinState[0]
end, function(player)
    imgui.SetNextWindowPos(imgui.ImVec2(500, 700), imgui.Cond.FirstUseEver, imgui.ImVec2(0.5, 0.5))
    imgui.Begin(u8"Zam-Leader Helper", WinState)
   
    imgui.Text(u8'Zam-Leader Helper')
    imgui.Text(u8'Для Arizona Mobile')

    if imgui.Button(faicons("user") .. u8" Главная", imgui.ImVec2(160, 60)) then
        tab = 1
    end

    if imgui.Button(faicons("gear") .. u8" Настройки", imgui.ImVec2(160, 60)) then
        tab = 2
    end

    if imgui.Button(faicons("sliders") .. u8" Биндер", imgui.ImVec2(160, 60)) then
        tab = 3
    end

    if imgui.Button(faicons("desktop") .. u8" Info", imgui.ImVec2(160, 60)) then
        tab = 4
    end

   
        if tab == 1 then
        imgui.Text(u8'Ваш ник ' ..name.. ' [  ' ..playerid.. ' ] ')
            -- Содержимое вкладки 1
        elseif tab == 2 then
            -- Содержимое вкладки 2

        elseif tab == 3 then
       
        elseif tab == 4 then
       
        end
    imgui.End()
end)

function main()
    sampRegisterChatCommand("lh", function()
        WinState[0] = not WinState[0]
    end)
end

imgui.OnInitialize(function()
    imgui.GetIO().IniFilename = nil
    local config = imgui.ImFontConfig()
    config.MergeMode = true
    config.PixelSnapH = true
    iconRanges = imgui.new.ImWchar[3](faicons.min_range, faicons.max_range, 0)
    imgui.GetIO().Fonts:AddFontFromMemoryCompressedBase85TTF(faicons.get_font_data_base85("solid"), 14, config, iconRanges)
end)
вот код
 

Hinаta

Известный
784
356
Lua:
local ffi = require "ffi"
local imgui = require "mimgui"
local encoding = require "encoding"
encoding.default = "CP1251"
local u8 = encoding.UTF8
local new = imgui.new
local faicons = require("fAwesome6")
local new, str = imgui.new, ffi.string

-- вписываем всё необходимое


local playerid = select(2, sampGetPlayerIdByCharHandle(PLAYER_PED))
local name = sampGetPlayerNickname(select(2, sampGetPlayerIdByCharHandle(playerPed)))


local tab = 1
local WinState = new.bool()

imgui.OnFrame(function()
    return WinState[0]
end, function(player)
    imgui.SetNextWindowPos(imgui.ImVec2(500, 700), imgui.Cond.FirstUseEver, imgui.ImVec2(0.5, 0.5))
    imgui.Begin(u8"Zam-Leader Helper", WinState)
   
    imgui.Text(u8'Zam-Leader Helper')
    imgui.Text(u8'Для Arizona Mobile')

    if imgui.Button(faicons("user") .. u8" Главная", imgui.ImVec2(160, 60)) then
        tab = 1
    end

    if imgui.Button(faicons("gear") .. u8" Настройки", imgui.ImVec2(160, 60)) then
        tab = 2
    end

    if imgui.Button(faicons("sliders") .. u8" Биндер", imgui.ImVec2(160, 60)) then
        tab = 3
    end

    if imgui.Button(faicons("desktop") .. u8" Info", imgui.ImVec2(160, 60)) then
        tab = 4
    end

   
        if tab == 1 then
        imgui.Text(u8'Ваш ник ' ..name.. ' [  ' ..playerid.. ' ] ')
            -- Содержимое вкладки 1
        elseif tab == 2 then
            -- Содержимое вкладки 2

        elseif tab == 3 then
       
        elseif tab == 4 then
       
        end
    imgui.End()
end)

function main()
    sampRegisterChatCommand("lh", function()
        WinState[0] = not WinState[0]
    end)
end

imgui.OnInitialize(function()
    imgui.GetIO().IniFilename = nil
    local config = imgui.ImFontConfig()
    config.MergeMode = true
    config.PixelSnapH = true
    iconRanges = imgui.new.ImWchar[3](faicons.min_range, faicons.max_range, 0)
    imgui.GetIO().Fonts:AddFontFromMemoryCompressedBase85TTF(faicons.get_font_data_base85("solid"), 14, config, iconRanges)
end)


вот код
всё бы хорошо, но у тебя ни одного чилда нет. Что ты привязывать собрался?
 

Arizona Mobile 3

Потрачен
Автор темы
117
12
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
всё бы хорошо, но у тебя ни одного чилда нет. Что ты привязывать собрался?
щас сек

Lua:
local size = imgui.GetWindowSize();
if (imgui.BeginChild('content', size - imgui.ImVec2(10, 30), true)) then
    imgui.Text('text');
end
imgui.EndChild();
ого чапооооо лигенда

Lua:
local size = imgui.GetWindowSize();
if (imgui.BeginChild('content', size - imgui.ImVec2(10, 30), true)) then
    imgui.Text('text');
end
imgui.EndChild();
Lua:
local ffi = require "ffi"
local imgui = require "mimgui"
local encoding = require "encoding"
encoding.default = "CP1251"
local u8 = encoding.UTF8
local new = imgui.new
local faicons = require("fAwesome6")
local new, str = imgui.new, ffi.string



-- вписываем всё необходимое


local playerid = select(2, sampGetPlayerIdByCharHandle(PLAYER_PED))
local name = sampGetPlayerNickname(select(2, sampGetPlayerIdByCharHandle(playerPed)))


local tab = 1
local WinState = new.bool()

imgui.OnFrame(function()
    return WinState[0]
end, function(player)
    imgui.SetNextWindowPos(imgui.ImVec2(500, 700), imgui.Cond.FirstUseEver, imgui.ImVec2(0.5, 0.5))
    imgui.Begin(u8"Zam-Leader Helper", WinState)
    
    imgui.Text(u8'Zam-Leader Helper')
    imgui.Text(u8'Для Arizona Mobile')

    if imgui.Button(faicons("user") .. u8" Главная", imgui.ImVec2(160, 60)) then
        tab = 1
    end

    if imgui.Button(faicons("gear") .. u8" Настройки", imgui.ImVec2(160, 60)) then
        tab = 2
    end

    if imgui.Button(faicons("sliders") .. u8" Биндер", imgui.ImVec2(160, 60)) then
        tab = 3
    end

    if imgui.Button(faicons("desktop") .. u8" Info", imgui.ImVec2(160, 60)) then
        tab = 4
    end

local size = imgui.GetWindowSize();
imgui.SetCursorPos(imgui.ImVec2(175, 33))
if (imgui.BeginChild('content', size - imgui.ImVec2(800, 800), true)) then
 
        if tab == 1 then
        imgui.Text(u8'Ваш ник ' ..name.. ' [  ' ..playerid.. ' ] ')
            -- Содержимое вкладки 1
        elseif tab == 2 then
            -- Содержимое вкладки 2

        elseif tab == 3 then
        
        elseif tab == 4 then
        
        end
        imgui.EndChild();
        end
    imgui.End()
end)

function main()
    sampRegisterChatCommand("lh", function()
        WinState[0] = not WinState[0]
    end)
end

imgui.OnInitialize(function()
    imgui.GetIO().IniFilename = nil
    local config = imgui.ImFontConfig()
    config.MergeMode = true
    config.PixelSnapH = true
    iconRanges = imgui.new.ImWchar[3](faicons.min_range, faicons.max_range, 0)
    imgui.GetIO().Fonts:AddFontFromMemoryCompressedBase85TTF(faicons.get_font_data_base85("solid"), 14, config, iconRanges)
end)

Lua:
local size = imgui.GetWindowSize();
if (imgui.BeginChild('content', size - imgui.ImVec2(10, 30), true)) then
    imgui.Text('text');
end
imgui.EndChild();
Lua:
local ffi = require "ffi"
local imgui = require "mimgui"
local encoding = require "encoding"
encoding.default = "CP1251"
local u8 = encoding.UTF8
local new = imgui.new
local faicons = require("fAwesome6")
local new, str = imgui.new, ffi.string



-- вписываем всё необходимое


local playerid = select(2, sampGetPlayerIdByCharHandle(PLAYER_PED))
local name = sampGetPlayerNickname(select(2, sampGetPlayerIdByCharHandle(playerPed)))


local tab = 1
local WinState = new.bool()

imgui.OnFrame(function()
    return WinState[0]
end, function(player)
    imgui.SetNextWindowPos(imgui.ImVec2(500, 700), imgui.Cond.FirstUseEver, imgui.ImVec2(0.5, 0.5))
    imgui.Begin(u8"Zam-Leader Helper", WinState)
    
    imgui.Text(u8'Zam-Leader Helper')
    imgui.Text(u8'Для Arizona Mobile')

    if imgui.Button(faicons("user") .. u8" Главная", imgui.ImVec2(160, 60)) then
        tab = 1
    end

    if imgui.Button(faicons("gear") .. u8" Настройки", imgui.ImVec2(160, 60)) then
        tab = 2
    end

    if imgui.Button(faicons("sliders") .. u8" Биндер", imgui.ImVec2(160, 60)) then
        tab = 3
    end

    if imgui.Button(faicons("desktop") .. u8" Info", imgui.ImVec2(160, 60)) then
        tab = 4
    end

local size = imgui.GetWindowSize();
imgui.SetCursorPos(imgui.ImVec2(175, 33))
if (imgui.BeginChild('content', size - imgui.ImVec2(800, 800), true)) then
 
        if tab == 1 then
        imgui.Text(u8'Ваш ник ' ..name.. ' [  ' ..playerid.. ' ] ')
            -- Содержимое вкладки 1
        elseif tab == 2 then
            -- Содержимое вкладки 2

        elseif tab == 3 then
        
        elseif tab == 4 then
        
        end
        imgui.EndChild();
        end
    imgui.End()
end)

function main()
    sampRegisterChatCommand("lh", function()
        WinState[0] = not WinState[0]
    end)
end

imgui.OnInitialize(function()
    imgui.GetIO().IniFilename = nil
    local config = imgui.ImFontConfig()
    config.MergeMode = true
    config.PixelSnapH = true
    iconRanges = imgui.new.ImWchar[3](faicons.min_range, faicons.max_range, 0)
    imgui.GetIO().Fonts:AddFontFromMemoryCompressedBase85TTF(faicons.get_font_data_base85("solid"), 14, config, iconRanges)
end)

пж фикс чтоьы было все норм и красиво
 

Вложения

  • Screenshot_2023-11-08-21-35-03-909_com.arizona.game.jpg
    Screenshot_2023-11-08-21-35-03-909_com.arizona.game.jpg
    810 KB · Просмотры: 19
Последнее редактирование: