Piemenu

RICJS29_JSJA

Участник
Автор темы
111
4
Версия MoonLoader
.026-beta
Lua:
if imgui.IsWindowHovered() and imgui.IsMouseClicked(1) then
  imgui.OpenPopup('PieMenu')
end
if pie.BeginPiePopup('PieMenu', 1) then
  if pie.PieMenuItem('Test1') then end
if pie.PieMenuItem('Test2') then end
  --if pie.PieMenuItem('Test5') then end
  if pie.PieMenuItem('Test3', false) then end
  if pie.BeginPieMenu('Sub') then
    if pie.BeginPieMenu('Sub sub\nmenu') then
      if pie.PieMenuItem('SubSub') then end
      if pie.PieMenuItem('SubSub2') then end
      pie.EndPieMenu()
    end
    if pie.PieMenuItem('TestSub') then end
    if pie.PieMenuItem('TestSub2') then end
   pie.EndPieMenu()
  end
  pie.EndPiePopup()
end
Вложения
Не могу понять куда этот код вставить, и как активировать?
 

Вложения

  • imgui_piemenu (3).lua
    13.3 KB · Просмотры: 1
Решение
Lua:
local renderWindow = new.bool(true)
local showPieMenu = new.bool(false)

function main()
    while not isSampAvailable() do wait(0) end

    sampAddChatMessage(TagScript .. ' Загружен! Активация: /ghelper | Версия скрипта: ' .. thisScript().version .. ' | Автор: ' .. unpack(thisScript().authors), -1)
    sampRegisterChatCommand('ghelper', function() thisScriptMenu[0] = not thisScriptMenu[0] end)
    sampRegisterChatCommand('mimgui', function()
        renderWindow[0] = not renderWindow[0]
    end)
    while true do
        wait(0)
    end
end
крашит все равно
работает все, покажи ошибку
1716414660397.png

Fasz fiatal

Активный
294
61
Могу ошибаться, но такого в imgui именно под SAMP нету. Советую глянуть документацию по imgui: https://www.blast.hk/threads/19292/
 

SURVERS

Активный
130
28
Лол, впервые вижу, я даже перед ответом по гуглил чтобы убедиться, и в гугле не было этого, беру выше свои слова назад.
 

Fasz fiatal

Активный
294
61
Lua:
if imgui.IsWindowHovered() and imgui.IsMouseClicked(1) then
  imgui.OpenPopup('PieMenu')
end
if pie.BeginPiePopup('PieMenu', 1) then
  if pie.PieMenuItem('Test1') then end
if pie.PieMenuItem('Test2') then end
  --if pie.PieMenuItem('Test5') then end
  if pie.PieMenuItem('Test3', false) then end
  if pie.BeginPieMenu('Sub') then
    if pie.BeginPieMenu('Sub sub\nmenu') then
      if pie.PieMenuItem('SubSub') then end
      if pie.PieMenuItem('SubSub2') then end
      pie.EndPieMenu()
    end
    if pie.PieMenuItem('TestSub') then end
    if pie.PieMenuItem('TestSub2') then end
   pie.EndPieMenu()
  end
  pie.EndPiePopup()
end
Вложения
Не могу понять куда этот код вставить, и как активировать?
Код:
function imgui.OnDrawFrame()
    if piemenu then
        --ur code
    end
end
это пример, а дальше уже под себя сделаешь
Лол, впервые вижу, я даже перед ответом по гуглил чтобы убедиться, и в гугле не было этого, беру выше свои слова назад.
файл библиотеки, который он прикрепил в тему сюда: я для тебя шутка что ли?)
 

RICJS29_JSJA

Участник
Автор темы
111
4
Код:
function imgui.OnDrawFrame()
    if piemenu then
        --ur code
    end
end
это пример, а дальше уже под себя сделаешь

файл библиотеки, который он прикрепил в тему сюда: я для тебя шутка что ли?)
а как на mimgui? тип:
Lua:
local piemenu = new.bool(false)
local piemenU = imgui.OnFrame(function() return piemenu[0] end,
function(self)
    if imgui.IsWindowHovered() and imgui.IsMouseClicked(1) then
        imgui.OpenPopup('PieMenu')
      end
      if pie.BeginPiePopup('PieMenu', 1) then
        if pie.PieMenuItem('Test1') then end
      if pie.PieMenuItem('Test2') then end
        --if pie.PieMenuItem('Test5') then end
        if pie.PieMenuItem('Test3', false) then end
        if pie.BeginPieMenu('Sub') then
          if pie.BeginPieMenu('Sub sub\nmenu') then
            if pie.PieMenuItem('SubSub') then end
            if pie.PieMenuItem('SubSub2') then end
            pie.EndPieMenu()
          end
          if pie.PieMenuItem('TestSub') then end
          if pie.PieMenuItem('TestSub2') then end
         pie.EndPieMenu()
        end
        pie.EndPiePopup()
      end
end)
 

chromiusj

C Y N T H O N I
Модератор
5,048
3,314
а как на mimgui? тип:
Lua:
local piemenu = new.bool(false)
local piemenU = imgui.OnFrame(function() return piemenu[0] end,
function(self)
    if imgui.IsWindowHovered() and imgui.IsMouseClicked(1) then
        imgui.OpenPopup('PieMenu')
      end
      if pie.BeginPiePopup('PieMenu', 1) then
        if pie.PieMenuItem('Test1') then end
      if pie.PieMenuItem('Test2') then end
        --if pie.PieMenuItem('Test5') then end
        if pie.PieMenuItem('Test3', false) then end
        if pie.BeginPieMenu('Sub') then
          if pie.BeginPieMenu('Sub sub\nmenu') then
            if pie.PieMenuItem('SubSub') then end
            if pie.PieMenuItem('SubSub2') then end
            pie.EndPieMenu()
          end
          if pie.PieMenuItem('TestSub') then end
          if pie.PieMenuItem('TestSub2') then end
         pie.EndPieMenu()
        end
        pie.EndPiePopup()
      end
end)
Да, примерно так.
Еще есть такой пример, для более удобной работы, хз откуда взял, был изначльно на имгуи

Lua:
local imgui = require 'mimgui'
local pie = require('imgui_piemenu')
local encoding = require 'encoding'
encoding.default = 'CP1251'
u8 = encoding.UTF8

local renderWindow = imgui.new.bool(true)
local showPieMenu = imgui.new.bool(false)

imgui.OnInitialize(function()
    imgui.GetIO().IniFilename = nil
end)

local menuItems = {
    { label = '/dealing', action = function() sampSendChat("/b /dealing") end },
    {
        label = 'cost', items = {
            { label = '100$', action = function() showPieMenu[0] = not showPieMenu[0] end },
            { label = '200$', action = function() showPieMenu[0] = not showPieMenu[0] end },
            { label = u8'Себе', action = function() sampSendChat("/inscar") end }
        }
    },
    {
        label = 'user', items = {
            { label = u8'Реклама', action = function() sampSendChat("Работает автодилер") end },
            { label = u8'Скилл', action = function() sampSendChat("/carskill") end }
        }
    }
}

imgui.OnFrame(
    function() return renderWindow[0] end,
    function(player)
        if imgui.IsMouseDown(1) then
            imgui.OpenPopup('PieMenu')
        end
        if pie.BeginPiePopup('PieMenu', 1) then
            for _, item in ipairs(menuItems) do
                if item.items then
                    if pie.BeginPieMenu(item.label) then
                        for _, subItem in ipairs(item.items) do
                            if pie.PieMenuItem(subItem.label) then
                                subItem.action()
                            end
                        end
                        pie.EndPieMenu()
                    end
                else
                    if pie.PieMenuItem(item.label) then
                        item.action()
                        showPieMenu[0] = not showPieMenu[0]
                    end
                end
            end
            pie.EndPiePopup()
        end
        imgui.End()
    end
)

function main()
    while not isSampAvailable() do wait(0) end
    sampRegisterChatCommand('mimgui', function()
        renderWindow[0] = not renderWindow[0]
    end)
    wait(-1)
end
 

RICJS29_JSJA

Участник
Автор темы
111
4
Да, примерно так.
Еще есть такой пример, для более удобной работы, хз откуда взял, был изначльно на имгуи

Lua:
local imgui = require 'mimgui'
local pie = require('imgui_piemenu')
local encoding = require 'encoding'
encoding.default = 'CP1251'
u8 = encoding.UTF8

local renderWindow = imgui.new.bool(true)
local showPieMenu = imgui.new.bool(false)

imgui.OnInitialize(function()
    imgui.GetIO().IniFilename = nil
end)

local menuItems = {
    { label = '/dealing', action = function() sampSendChat("/b /dealing") end },
    {
        label = 'cost', items = {
            { label = '100$', action = function() showPieMenu[0] = not showPieMenu[0] end },
            { label = '200$', action = function() showPieMenu[0] = not showPieMenu[0] end },
            { label = u8'Себе', action = function() sampSendChat("/inscar") end }
        }
    },
    {
        label = 'user', items = {
            { label = u8'Реклама', action = function() sampSendChat("Работает автодилер") end },
            { label = u8'Скилл', action = function() sampSendChat("/carskill") end }
        }
    }
}

imgui.OnFrame(
    function() return renderWindow[0] end,
    function(player)
        if imgui.IsMouseDown(1) then
            imgui.OpenPopup('PieMenu')
        end
        if pie.BeginPiePopup('PieMenu', 1) then
            for _, item in ipairs(menuItems) do
                if item.items then
                    if pie.BeginPieMenu(item.label) then
                        for _, subItem in ipairs(item.items) do
                            if pie.PieMenuItem(subItem.label) then
                                subItem.action()
                            end
                        end
                        pie.EndPieMenu()
                    end
                else
                    if pie.PieMenuItem(item.label) then
                        item.action()
                        showPieMenu[0] = not showPieMenu[0]
                    end
                end
            end
            pie.EndPiePopup()
        end
        imgui.End()
    end
)

function main()
    while not isSampAvailable() do wait(0) end
    sampRegisterChatCommand('mimgui', function()
        renderWindow[0] = not renderWindow[0]
    end)
    wait(-1)
end
крашит игру почему то после ввода команды /mimgui, вот код
Lua:
script_name('GovHelper')
script_author('Marcus Kransov')
script_version('1.0')
script_version_number(1.0)

require('lib.moonloader')
local imgui         = require('mimgui')
local pie           = require('imgui_piemenu')
local keys          = require('vkeys')
local encoding      = require('encoding')

encoding.default = 'CP1251'
local u8 = encoding.UTF8
local ffi           = require('ffi')
local new           = imgui.new
local inicfg        = require('inicfg')
local CfgFileName   = 'GovHelper.ini'
local cfg           = inicfg.load({
    settings = {

    },
    config = {

    }
}, CfgFileName)

imgui.OnInitialize(function()
    blue_theme()
end)

local resX, resY        = getScreenResolution()
local TagScript     = '{191970}[GovHelper | LSPD]{FFFFFF}'
local thisScriptMenu    = new.bool(false)

function main()
    while not isSampAvailable() do wait(0) end

    sampAddChatMessage(TagScript .. ' Загружен! Активация: /ghelper | Версия скрипта: ' .. thisScript().version .. ' | Автор: ' .. unpack(thisScript().authors), -1)
    sampRegisterChatCommand('ghelper', function() thisScriptMenu[0] = not thisScriptMenu[0] end)
    sampRegisterChatCommand('mimgui', function()
        renderWindow[0] = not renderWindow[0]
    end)
    while true do
        wait(0)
    end
end
-------
local renderWindow = imgui.new.bool(true)
local showPieMenu = imgui.new.bool(false)
local menuItems = {
    { label = '/dealing', action = function() sampSendChat("/b /dealing") end },
    {
        label = 'cost', items = {
            { label = '100$', action = function() showPieMenu[0] = not showPieMenu[0] end },
            { label = '200$', action = function() showPieMenu[0] = not showPieMenu[0] end },
            { label = u8'Себе', action = function() sampSendChat("/inscar") end }
        }
    },
    {
        label = 'user', items = {
            { label = u8'Реклама', action = function() sampSendChat("Работает автодилер") end },
            { label = u8'Скилл', action = function() sampSendChat("/carskill") end }
        }
    }
}

local piemenu = new.bool(false)
local piemenU = imgui.OnFrame(function() return renderWindow[0] end,
function(player)
    if imgui.IsMouseDown(1) then
        imgui.OpenPopup('PieMenu')
    end
    if pie.BeginPiePopup('PieMenu', 1) then
        for _, item in ipairs(menuItems) do
            if item.items then
                if pie.BeginPieMenu(item.label) then
                    for _, subItem in ipairs(item.items) do
                        if pie.PieMenuItem(subItem.label) then
                            subItem.action()
                        end
                    end
                    pie.EndPieMenu()
                end
            else
                if pie.PieMenuItem(item.label) then
                    item.action()
                    showPieMenu[0] = not showPieMenu[0]
                end
            end
        end
        pie.EndPiePopup()
    end
    imgui.End()
end)

local newFrameMenu = imgui.OnFrame(function() return thisScriptMenu[0] end,
    function(self)
        local sizeX, sizeY = 530, 238
        imgui.SetNextWindowPos(imgui.ImVec2(resX / 2, resY / 2), imgui.Cond.FirstUseEver, imgui.ImVec2(0.5, 0.5))
        imgui.SetNextWindowSize(imgui.ImVec2(sizeX, sizeY))

        imgui.Begin(u8'GovHelper LSPD | Samp-Rp Underground', thisScriptMenu)
        imgui.End()
    end
)
function blue_theme()
    imgui.SwitchContext()
    local style = imgui.GetStyle()
    local colors = style.Colors
    local clr = imgui.Col
    local ImVec4 = imgui.ImVec4

    style.WindowPadding = imgui.ImVec2(5, 5)
    style.FramePadding = imgui.ImVec2(5, 5)
    style.ItemSpacing = imgui.ImVec2(5, 5)
    style.ItemInnerSpacing = imgui.ImVec2(2, 2)
    style.TouchExtraPadding = imgui.ImVec2(0, 0)
    style.IndentSpacing = 0
    style.ScrollbarSize = 10
    style.GrabMinSize = 10
    style.WindowTitleAlign = imgui.ImVec2(0.5, 0.5)
    --==[ BORDER ]==--
    style.WindowBorderSize = 1
    style.ChildBorderSize = 1
    style.PopupBorderSize = 1
    style.FrameBorderSize = 1
    style.TabBorderSize = 1

    --==[ ROUNDING ]==--
    style.WindowRounding = 8
    style.ChildRounding = 8
    style.FrameRounding = 0
    style.PopupRounding = 8
    style.ScrollbarRounding = 8
    style.GrabRounding = 8
    style.TabRounding = 8

    colors[clr.FrameBg]                = ImVec4(0.16, 0.29, 0.48, 0.54)
    colors[clr.FrameBgHovered]         = ImVec4(0.26, 0.59, 0.98, 0.40)
    colors[clr.FrameBgActive]          = ImVec4(0.26, 0.59, 0.98, 0.67)
    colors[clr.TitleBg]                = ImVec4(0.04, 0.04, 0.04, 1.00)
    colors[clr.TitleBgActive]          = ImVec4(0.16, 0.29, 0.48, 1.00)
    colors[clr.TitleBgCollapsed]       = ImVec4(0.00, 0.00, 0.00, 0.51)
    colors[clr.CheckMark]              = ImVec4(0.26, 0.59, 0.98, 1.00)
    colors[clr.SliderGrab]             = ImVec4(0.24, 0.52, 0.88, 1.00)
    colors[clr.SliderGrabActive]       = ImVec4(0.26, 0.59, 0.98, 1.00)
    colors[clr.Button]                 = ImVec4(0.26, 0.59, 0.98, 0.40)
    colors[clr.ButtonHovered]          = ImVec4(0.26, 0.59, 0.98, 1.00)
    colors[clr.ButtonActive]           = ImVec4(0.06, 0.53, 0.98, 1.00)
    colors[clr.Header]                 = ImVec4(0.26, 0.59, 0.98, 0.31)
    colors[clr.HeaderHovered]          = ImVec4(0.26, 0.59, 0.98, 0.80)
    colors[clr.HeaderActive]           = ImVec4(0.26, 0.59, 0.98, 1.00)
    colors[clr.Separator]              = colors[clr.Border]
    colors[clr.SeparatorHovered]       = ImVec4(0.26, 0.59, 0.98, 0.78)
    colors[clr.SeparatorActive]        = ImVec4(0.26, 0.59, 0.98, 1.00)
    colors[clr.ResizeGrip]             = ImVec4(0.26, 0.59, 0.98, 0.25)
    colors[clr.ResizeGripHovered]      = ImVec4(0.26, 0.59, 0.98, 0.67)
    colors[clr.ResizeGripActive]       = ImVec4(0.26, 0.59, 0.98, 0.95)
    colors[clr.TextSelectedBg]         = ImVec4(0.26, 0.59, 0.98, 0.35)
    colors[clr.Text]                   = ImVec4(1.00, 1.00, 1.00, 1.00)
    colors[clr.TextDisabled]           = ImVec4(0.50, 0.50, 0.50, 1.00)
    colors[clr.WindowBg]               = ImVec4(0.06, 0.06, 0.06, 0.94)
    colors[clr.ChildBg]                = ImVec4(1.00, 1.00, 1.00, 0.00)
    colors[clr.PopupBg]                = ImVec4(0.08, 0.08, 0.08, 0.94)
    colors[clr.Border]                 = ImVec4(0.43, 0.43, 0.50, 0.50)
    colors[clr.BorderShadow]           = ImVec4(0.00, 0.00, 0.00, 0.00)
    colors[clr.MenuBarBg]              = ImVec4(0.14, 0.14, 0.14, 1.00)
    colors[clr.ScrollbarBg]            = ImVec4(0.02, 0.02, 0.02, 0.53)
    colors[clr.ScrollbarGrab]          = ImVec4(0.31, 0.31, 0.31, 1.00)
    colors[clr.ScrollbarGrabHovered]   = ImVec4(0.41, 0.41, 0.41, 1.00)
    colors[clr.ScrollbarGrabActive]    = ImVec4(0.51, 0.51, 0.51, 1.00)
    colors[clr.PlotLines]              = ImVec4(0.61, 0.61, 0.61, 1.00)
    colors[clr.PlotLinesHovered]       = ImVec4(1.00, 0.43, 0.35, 1.00)
    colors[clr.PlotHistogram]          = ImVec4(0.90, 0.70, 0.00, 1.00)
    colors[clr.PlotHistogramHovered]   = ImVec4(1.00, 0.60, 0.00, 1.00)
end
 

chromiusj

C Y N T H O N I
Модератор
5,048
3,314
крашит игру почему то после ввода команды /mimgui, вот код
Lua:
script_name('GovHelper')
script_author('Marcus Kransov')
script_version('1.0')
script_version_number(1.0)

require('lib.moonloader')
local imgui         = require('mimgui')
local pie           = require('imgui_piemenu')
local keys          = require('vkeys')
local encoding      = require('encoding')

encoding.default = 'CP1251'
local u8 = encoding.UTF8
local ffi           = require('ffi')
local new           = imgui.new
local inicfg        = require('inicfg')
local CfgFileName   = 'GovHelper.ini'
local cfg           = inicfg.load({
    settings = {

    },
    config = {

    }
}, CfgFileName)

imgui.OnInitialize(function()
    blue_theme()
end)

local resX, resY        = getScreenResolution()
local TagScript     = '{191970}[GovHelper | LSPD]{FFFFFF}'
local thisScriptMenu    = new.bool(false)

function main()
    while not isSampAvailable() do wait(0) end

    sampAddChatMessage(TagScript .. ' Загружен! Активация: /ghelper | Версия скрипта: ' .. thisScript().version .. ' | Автор: ' .. unpack(thisScript().authors), -1)
    sampRegisterChatCommand('ghelper', function() thisScriptMenu[0] = not thisScriptMenu[0] end)
    sampRegisterChatCommand('mimgui', function()
        renderWindow[0] = not renderWindow[0]
    end)
    while true do
        wait(0)
    end
end
-------
local renderWindow = imgui.new.bool(true)
local showPieMenu = imgui.new.bool(false)
local menuItems = {
    { label = '/dealing', action = function() sampSendChat("/b /dealing") end },
    {
        label = 'cost', items = {
            { label = '100$', action = function() showPieMenu[0] = not showPieMenu[0] end },
            { label = '200$', action = function() showPieMenu[0] = not showPieMenu[0] end },
            { label = u8'Себе', action = function() sampSendChat("/inscar") end }
        }
    },
    {
        label = 'user', items = {
            { label = u8'Реклама', action = function() sampSendChat("Работает автодилер") end },
            { label = u8'Скилл', action = function() sampSendChat("/carskill") end }
        }
    }
}

local piemenu = new.bool(false)
local piemenU = imgui.OnFrame(function() return renderWindow[0] end,
function(player)
    if imgui.IsMouseDown(1) then
        imgui.OpenPopup('PieMenu')
    end
    if pie.BeginPiePopup('PieMenu', 1) then
        for _, item in ipairs(menuItems) do
            if item.items then
                if pie.BeginPieMenu(item.label) then
                    for _, subItem in ipairs(item.items) do
                        if pie.PieMenuItem(subItem.label) then
                            subItem.action()
                        end
                    end
                    pie.EndPieMenu()
                end
            else
                if pie.PieMenuItem(item.label) then
                    item.action()
                    showPieMenu[0] = not showPieMenu[0]
                end
            end
        end
        pie.EndPiePopup()
    end
    imgui.End()
end)

local newFrameMenu = imgui.OnFrame(function() return thisScriptMenu[0] end,
    function(self)
        local sizeX, sizeY = 530, 238
        imgui.SetNextWindowPos(imgui.ImVec2(resX / 2, resY / 2), imgui.Cond.FirstUseEver, imgui.ImVec2(0.5, 0.5))
        imgui.SetNextWindowSize(imgui.ImVec2(sizeX, sizeY))

        imgui.Begin(u8'GovHelper LSPD | Samp-Rp Underground', thisScriptMenu)
        imgui.End()
    end
)
function blue_theme()
    imgui.SwitchContext()
    local style = imgui.GetStyle()
    local colors = style.Colors
    local clr = imgui.Col
    local ImVec4 = imgui.ImVec4

    style.WindowPadding = imgui.ImVec2(5, 5)
    style.FramePadding = imgui.ImVec2(5, 5)
    style.ItemSpacing = imgui.ImVec2(5, 5)
    style.ItemInnerSpacing = imgui.ImVec2(2, 2)
    style.TouchExtraPadding = imgui.ImVec2(0, 0)
    style.IndentSpacing = 0
    style.ScrollbarSize = 10
    style.GrabMinSize = 10
    style.WindowTitleAlign = imgui.ImVec2(0.5, 0.5)
    --==[ BORDER ]==--
    style.WindowBorderSize = 1
    style.ChildBorderSize = 1
    style.PopupBorderSize = 1
    style.FrameBorderSize = 1
    style.TabBorderSize = 1

    --==[ ROUNDING ]==--
    style.WindowRounding = 8
    style.ChildRounding = 8
    style.FrameRounding = 0
    style.PopupRounding = 8
    style.ScrollbarRounding = 8
    style.GrabRounding = 8
    style.TabRounding = 8

    colors[clr.FrameBg]                = ImVec4(0.16, 0.29, 0.48, 0.54)
    colors[clr.FrameBgHovered]         = ImVec4(0.26, 0.59, 0.98, 0.40)
    colors[clr.FrameBgActive]          = ImVec4(0.26, 0.59, 0.98, 0.67)
    colors[clr.TitleBg]                = ImVec4(0.04, 0.04, 0.04, 1.00)
    colors[clr.TitleBgActive]          = ImVec4(0.16, 0.29, 0.48, 1.00)
    colors[clr.TitleBgCollapsed]       = ImVec4(0.00, 0.00, 0.00, 0.51)
    colors[clr.CheckMark]              = ImVec4(0.26, 0.59, 0.98, 1.00)
    colors[clr.SliderGrab]             = ImVec4(0.24, 0.52, 0.88, 1.00)
    colors[clr.SliderGrabActive]       = ImVec4(0.26, 0.59, 0.98, 1.00)
    colors[clr.Button]                 = ImVec4(0.26, 0.59, 0.98, 0.40)
    colors[clr.ButtonHovered]          = ImVec4(0.26, 0.59, 0.98, 1.00)
    colors[clr.ButtonActive]           = ImVec4(0.06, 0.53, 0.98, 1.00)
    colors[clr.Header]                 = ImVec4(0.26, 0.59, 0.98, 0.31)
    colors[clr.HeaderHovered]          = ImVec4(0.26, 0.59, 0.98, 0.80)
    colors[clr.HeaderActive]           = ImVec4(0.26, 0.59, 0.98, 1.00)
    colors[clr.Separator]              = colors[clr.Border]
    colors[clr.SeparatorHovered]       = ImVec4(0.26, 0.59, 0.98, 0.78)
    colors[clr.SeparatorActive]        = ImVec4(0.26, 0.59, 0.98, 1.00)
    colors[clr.ResizeGrip]             = ImVec4(0.26, 0.59, 0.98, 0.25)
    colors[clr.ResizeGripHovered]      = ImVec4(0.26, 0.59, 0.98, 0.67)
    colors[clr.ResizeGripActive]       = ImVec4(0.26, 0.59, 0.98, 0.95)
    colors[clr.TextSelectedBg]         = ImVec4(0.26, 0.59, 0.98, 0.35)
    colors[clr.Text]                   = ImVec4(1.00, 1.00, 1.00, 1.00)
    colors[clr.TextDisabled]           = ImVec4(0.50, 0.50, 0.50, 1.00)
    colors[clr.WindowBg]               = ImVec4(0.06, 0.06, 0.06, 0.94)
    colors[clr.ChildBg]                = ImVec4(1.00, 1.00, 1.00, 0.00)
    colors[clr.PopupBg]                = ImVec4(0.08, 0.08, 0.08, 0.94)
    colors[clr.Border]                 = ImVec4(0.43, 0.43, 0.50, 0.50)
    colors[clr.BorderShadow]           = ImVec4(0.00, 0.00, 0.00, 0.00)
    colors[clr.MenuBarBg]              = ImVec4(0.14, 0.14, 0.14, 1.00)
    colors[clr.ScrollbarBg]            = ImVec4(0.02, 0.02, 0.02, 0.53)
    colors[clr.ScrollbarGrab]          = ImVec4(0.31, 0.31, 0.31, 1.00)
    colors[clr.ScrollbarGrabHovered]   = ImVec4(0.41, 0.41, 0.41, 1.00)
    colors[clr.ScrollbarGrabActive]    = ImVec4(0.51, 0.51, 0.51, 1.00)
    colors[clr.PlotLines]              = ImVec4(0.61, 0.61, 0.61, 1.00)
    colors[clr.PlotLinesHovered]       = ImVec4(1.00, 0.43, 0.35, 1.00)
    colors[clr.PlotHistogram]          = ImVec4(0.90, 0.70, 0.00, 1.00)
    colors[clr.PlotHistogramHovered]   = ImVec4(1.00, 0.60, 0.00, 1.00)
end
у тебя переменная не находится перед мейном
1716414018299.png
 

RICJS29_JSJA

Участник
Автор темы
111
4
у тебя переменная не находится перед мейном
Посмотреть вложение 241227
Lua:
local renderWindow = new.bool(true)
local showPieMenu = new.bool(false)

function main()
    while not isSampAvailable() do wait(0) end

    sampAddChatMessage(TagScript .. ' Загружен! Активация: /ghelper | Версия скрипта: ' .. thisScript().version .. ' | Автор: ' .. unpack(thisScript().authors), -1)
    sampRegisterChatCommand('ghelper', function() thisScriptMenu[0] = not thisScriptMenu[0] end)
    sampRegisterChatCommand('mimgui', function()
        renderWindow[0] = not renderWindow[0]
    end)
    while true do
        wait(0)
    end
end
крашит все равно
 

chromiusj

C Y N T H O N I
Модератор
5,048
3,314
Lua:
local renderWindow = new.bool(true)
local showPieMenu = new.bool(false)

function main()
    while not isSampAvailable() do wait(0) end

    sampAddChatMessage(TagScript .. ' Загружен! Активация: /ghelper | Версия скрипта: ' .. thisScript().version .. ' | Автор: ' .. unpack(thisScript().authors), -1)
    sampRegisterChatCommand('ghelper', function() thisScriptMenu[0] = not thisScriptMenu[0] end)
    sampRegisterChatCommand('mimgui', function()
        renderWindow[0] = not renderWindow[0]
    end)
    while true do
        wait(0)
    end
end
крашит все равно
работает все, покажи ошибку
1716414660397.png
 

RICJS29_JSJA

Участник
Автор темы
111
4
Последнее редактирование: