require "lib.moonloader"
local keys = require "vkeys"
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 isSampAvailable() do wait(100) end
sampAddChatMessage("работает", main_color)
sampRegisterChatCommand("qwer", qwercmd)
sampRegisterChatCommand("optimal", optimalcmd)
while true do
wait(1)
if isKeyJustPressed(VK_F3) then
sampAddChatMessage("Тест клавиши", main_color)
end
if isKeyDown(VK_MENU) and isKeyJustPressed(VK_9) then
sampAddChatMessage("Тест комбинации", main_color)
end
end
end
function qwercmd()
sampAddChatMessage("Вы создали {FFFFFF}кмд")
end
function optimalcmd(arg)
if #arg == 0 then
sampAddChatMessage("Аргумент не ввел", main_color)
else
sampAddChatMessage("Ты ввел кмд и ввел аргумент ".. arg, main_color)
end
end