local keys = require "vkeys"
local imgui = require 'imgui'
local encoding = require 'encoding'
encoding.default = 'CP1251'
u8 = encoding.UTF8
local tag = '[My First Script]:' -- локальная переменная
local label = 0
local main_color = 0x5A90CE
local main_color_text = "{5A90CE}"
local white_color = "{FFFFFF}"
function main()
if not isSampLoaded() or not isSampfuncsLoaded() then return end
while not isSampAvaible() do wait(100) end
sampRegisterChatCommand("imgui", cmd_imgui)
_, id - sampGetPlayerIdByCharHandle(PLAYER_PED)
nick = SampGetPlayerNickname(id)
imgui.Process - true
while true do
wait(0)
if isKeyJustPressed(VK_F3) then
sampAddChatMessage("Вы нажали клавишу {FFFFFF}F3." ..main_color_text .. "Ваш ник: {FFFFFF} .. nick .. ", " .. main_color_text .. "ваш ID: {FFFFFF}" .. id, main_color)
end
if isKeyDown(VK_MENU) and isKeyJustPressed(VK_9) then
sampAddChatMessage("Вы нажали комбинацию клавиш!", main_color)
wait(500)
sampAddChatMessage("Прошло пол секунды", main_color)
end
end
end
function cmd_imgui(arg)
end
function imgui.OnDrawFrame()
imgui.Begin("Start imgui")
imgui.Test("Some text")
imgui.End()
end