local faicons = require("fAwesome6_solid")
local imgui = require("mimgui")
local encoding = require 'encoding'
encoding.default = 'CP1251'
u8 = encoding.UTF8
local new = imgui.new
local renderWindow = new.bool(false)
imgui.OnInitialize(function()
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)
local newFrame = imgui.OnFrame(
function() return renderWindow[0] end,
function(player)
local resX, resY = getScreenResolution()
local sizeX, sizeY = 300, 300
imgui.SetNextWindowPos(imgui.ImVec2(resX / 2, resY / 2), imgui.Cond.FirstUseEver, imgui.ImVec2(0.5, 0.5))
imgui.SetNextWindowSize(imgui.ImVec2(sizeX, sizeY), imgui.Cond.FirstUseEver)
imgui.Begin(u8'FAwesome 6', renderWindow)
for i, v in pairs(faicons) do
imgui.Text(faicons[v])
end
imgui.End()
end
)
function main()
while not isSampAvailable() do wait(0) end
sampRegisterChatCommand('faw', function()
renderWindow[0] = not renderWindow[0]
end)
while true do
wait(0)
end
end