помогите

qqware

Участник
Автор темы
44
2
Версия MoonLoader
Другое
Screenshot_20240208-214706_Arizona.png

почему иконка не отображается
названия и тд все верно
script:
local imgui = require 'mimgui'
local encoding = require 'encoding'
encoding.default = 'CP1251'
local u8 = encoding.UTF8

local WinState = imgui.new.bool()
local faicons = require('fAwesome6')
local tab = 1

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(670, 470), imgui.Cond.Always)
    imgui.Begin(faicons('ROUTER')..u8' cmd software', WinState, imgui.WindowFlags.NoResize)
    imgui.Image(imhandle, imgui.ImVec2(150, 97))
    
        if imgui.Button(faicons('USER_TIE')..u8' Player', imgui.ImVec2(150,77)) then
            tab = 1
    
        end
       if imgui.Button(faicons('car')..u8' Car', imgui.ImVec2(150,77)) then
            tab = 2
    
        end
      if  imgui.Button(faicons('gun')..u8' Gun', imgui.ImVec2(150,77)) then
            tab = 3
    
        end
       if imgui.Button(faicons('wrench')..u8' Setting', imgui.ImVec2(150,77)) then
            tab = 4
    
        end
    
    imgui.SetCursorPos(imgui.ImVec2(159, 43))
    if imgui.BeginChild('Name##'..tab, imgui.ImVec2(500, 395), true) then
    
        if tab == 1 then
        imgui.Button(faicons('user'),imgui.ImVec2(100,100))
        
        elseif tab == 2 then
        
        elseif tab == 3 then
        
        
           end       
        imgui.EndChild()
    end
    imgui.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'), 20, config, iconRanges)
    if doesFileExist(getWorkingDirectory()..'\\cmd\\example.png') then
        imhandle = imgui.CreateTextureFromFile(getWorkingDirectory() .. '\\cmd\\example.png')
    end
end)


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