Помогите разобраться с imgui

Remuru_Outrage

Новичок
Автор темы
19
1
Версия MoonLoader
.026-beta
Помогите пожалуйста сделать вторую вкладку, постоянно скрипт крашит когда пытаюсь сам сделать.

Первая вкладка "Обычные места", вторая ниже должна быть "интеръеры".







изображение_2021-07-29_022024.png

Код:
        if menuSelect == 10 then
            if elements.checkbox.fullDSuccesfuly.v then
                imgui.Text(u8"Выбирай место! Я мигом тебя перенесу.")
                if imgui.CollapsingHeader(u8"Обычные места") then
                    if tableOfNew.fdOnlinePlayer.v == 0 then
                        if imgui.Button(u8"Мэрия", imgui.ImVec2(150, 0)) then setCharCoordinates(PLAYER_PED, 1480.03, -1725.07, 13.55) end
                        if imgui.Button(u8"Больница", imgui.ImVec2(150, 0)) then setCharCoordinates(PLAYER_PED, 1185.23, -1322.75,  13.57) end
                        if imgui.Button(u8"АММО ЛС", imgui.ImVec2(150, 0)) then setCharCoordinates(PLAYER_PED, 1363, -1280, 14) end
                        if imgui.Button(u8"ЖДЛС", imgui.ImVec2(150, 0)) then setCharCoordinates(PLAYER_PED, 1772.14, -1894.73, 13.55) end
                        if imgui.Button(u8"ЖДСФ", imgui.ImVec2(150, 0)) then setCharCoordinates(PLAYER_PED, -1975.14, 153.28, 27.69) end
                        if imgui.Button(u8"ЖДЛВ", imgui.ImVec2(150, 0)) then setCharCoordinates(PLAYER_PED, 2847.50, 1291.26, 11.39) end
                        if imgui.Button(u8"Притон", imgui.ImVec2(150, 0)) then setCharCoordinates(PLAYER_PED, 2171.19, -1683.56, 14.96) end
                        if imgui.Button(u8"Ферма", imgui.ImVec2(150, 0)) then setCharCoordinates(PLAYER_PED, -80, 103, 3) end
                        if imgui.Button(u8"Каръер ЛВ", imgui.ImVec2(150, 0)) then setCharCoordinates(PLAYER_PED, 820, 845, 10) end
                        if imgui.Button(u8"VineWood", imgui.ImVec2(150, 0)) then setCharCoordinates(PLAYER_PED, 927, -675, 118) end
                        if imgui.Button(u8"Мост LS-SF", imgui.ImVec2(150, 0)) then setCharCoordinates(PLAYER_PED, 77, -1535, 5) end
                        if imgui.Button(u8"Мост LS-LV", imgui.ImVec2(150, 0)) then setCharCoordinates(PLAYER_PED, 1739.66, 524.80, 27.77) end
                        if imgui.Button(u8"Деревня Монгомери", imgui.ImVec2(150, 0)) then setCharCoordinates(PLAYER_PED, 1318, 313, 20) end
                        if imgui.Button(u8"Дервеня Блуббери", imgui.ImVec2(150, 0)) then setCharCoordinates(PLAYER_PED, 230, -180, 2) end
                        if imgui.Button(u8"Дервеня Ангел-Пэйн", imgui.ImVec2(150, 0)) then setCharCoordinates(PLAYER_PED, -2120, -2500, 30) end
                        if imgui.Button(u8"Four Dragons", imgui.ImVec2(150, 0)) then setCharCoordinates(PLAYER_PED, 2030, 1008, 10) end
                        if imgui.Button(u8"Four Dragons", imgui.ImVec2(150, 0)) then setCharCoordinates(PLAYER_PED, 2030, 1008, 10) end
                        if imgui.Button(u8"Four Dragons", imgui.ImVec2(150, 0)) then setCharCoordinates(PLAYER_PED, 2030, 1008, 10) end
                        if imgui.Button(u8"Four Dragons", imgui.ImVec2(150, 0)) then setCharCoordinates(PLAYER_PED, 2030, 1008, 10) end
                        if imgui.Button(u8"Four Dragons", imgui.ImVec2(150, 0)) then setCharCoordinates(PLAYER_PED, 2030, 1008, 10) end
                        if imgui.Button(u8"Four Dragons", imgui.ImVec2(150, 0)) then setCharCoordinates(PLAYER_PED, 2030, 1008, 10) end
                        if imgui.Button(u8"Four Dragons", imgui.ImVec2(150, 0)) then setCharCoordinates(PLAYER_PED, 2030, 1008, 10) end
                        if imgui.Button(u8"КОНЕЦ", imgui.ImVec2(150, 0)) then
                        setCharCoordinates(PLAYER_PED, 1546.57, -1675.75, 13.56)
                        end
                    end
                end
            end
        end
        imgui.EndChild()
        imgui.End()
    end
 

Dmitriy Makarov

25.05.2021
Проверенный
2,479
1,113
Ну как сделал первую такую вкладку, делаешь и вторую.))
Lua:
if imgui.CollapsingHeader(u8"Первая вкладка") then -- 1
    if imgui.Button("Button") then
        -- code
    end
    if imgui.Button("Button") then
        -- code
    end
end
if imgui.CollapsingHeader(u8"Вторая вкладка") then -- 2
    if imgui.Button("Click") then
        -- code
    end
    if imgui.Button("Click") then
        -- code
    end
end
 
  • Нравится
Реакции: Remuru_Outrage

Remuru_Outrage

Новичок
Автор темы
19
1
Ну как сделал первую такую вкладку, делаешь и вторую.))
Lua:
if imgui.CollapsingHeader(u8"Первая вкладка") then -- 1
    if imgui.Button("Button") then
        -- code
    end
    if imgui.Button("Button") then
        -- code
    end
end
if imgui.CollapsingHeader(u8"Вторая вкладка") then -- 2
    if imgui.Button("Click") then
        -- code
    end
    if imgui.Button("Click") then
        -- code
    end
end
не получается, крашится