- 365
- 31
че делать если имгуи не работает, вот код
require "lib.moonloader"
local keys = require "vkeys"
local imgui = require "imgui"
local encoding = require 'encoding'
encoding.default = 'CP1251'
u8 = encoding.UTF8
local tag = "{Helper lovli}"
local label = 0
local main_color = 0x5A90CE
local main_color_text = "{5A90CE}"
local white_color = "{FFFFFF}"
local main_window_state = imgui.ImBool(false)
local text_buffer = imgui.ImBuffer(256)
function main()
if not isSampLoaded() or not isSampfuncsLoaded() then return end
while not isSampAvailable() do wait(100) end
sampRegisterChatCommand("imgui", cmd imgui)
_, id = sampGetPlayerIdByCharHandle(PLAYER_PED)
nick = sampGetPlayerNickName(id)
imgui.Process = true
while true do
wait(100)
end
end
function cmd_imgui(arg)
main_window_state.v = not main_window_state.vkeys
imgui.Process = main_window_state.vkeys
end
function imgui.OnDrawFrame()
imgui.Begin("Start imgui")
imgui.Text("Helper lovli ")
imgui.End()
end
лог
require "lib.moonloader"
local keys = require "vkeys"
local imgui = require "imgui"
local encoding = require 'encoding'
encoding.default = 'CP1251'
u8 = encoding.UTF8
local tag = "{Helper lovli}"
local label = 0
local main_color = 0x5A90CE
local main_color_text = "{5A90CE}"
local white_color = "{FFFFFF}"
local main_window_state = imgui.ImBool(false)
local text_buffer = imgui.ImBuffer(256)
function main()
if not isSampLoaded() or not isSampfuncsLoaded() then return end
while not isSampAvailable() do wait(100) end
sampRegisterChatCommand("imgui", cmd imgui)
_, id = sampGetPlayerIdByCharHandle(PLAYER_PED)
nick = sampGetPlayerNickName(id)
imgui.Process = true
while true do
wait(100)
end
end
function cmd_imgui(arg)
main_window_state.v = not main_window_state.vkeys
imgui.Process = main_window_state.vkeys
end
function imgui.OnDrawFrame()
imgui.Begin("Start imgui")
imgui.Text("Helper lovli ")
imgui.End()
end
лог