- 100
- 11
Вот код ниже, как сделать чтобы альт нажимался с задержкой не 1сек а меньше? чтобы спамил прям
require 'lib.moonloader'
local enable = false
function main()
if not isSampfuncsLoaded() or not isSampLoaded() then return end
while not isSampAvailable() do wait(100) end
sampRegisterChatCommand("autoalt", function()
if enable == false then
enable = true
sampAddChatMessage("[Auto Alt]: {FFFFFF}Активирован. Нажмите {E5336B}Правый CTRL {FFFFFF}чтобы остановить!", 0xE5336B)
end
end)
while true do
wait(0)
if enable == true and not sampIsChatInputActive() and not sampIsDialogActive() then
setVirtualKeyDown(18, true)
wait(1000)
setVirtualKeyDown(18, false)
if isKeyJustPressed(VK_RCONTROL) then
sampAddChatMessage("[Auto Alt]: {FFFFFF}Деактивирован!", 0xE5336B)
enable = false
end
end
end
end
require 'lib.moonloader'
local enable = false
function main()
if not isSampfuncsLoaded() or not isSampLoaded() then return end
while not isSampAvailable() do wait(100) end
sampRegisterChatCommand("autoalt", function()
if enable == false then
enable = true
sampAddChatMessage("[Auto Alt]: {FFFFFF}Активирован. Нажмите {E5336B}Правый CTRL {FFFFFF}чтобы остановить!", 0xE5336B)
end
end)
while true do
wait(0)
if enable == true and not sampIsChatInputActive() and not sampIsDialogActive() then
setVirtualKeyDown(18, true)
wait(1000)
setVirtualKeyDown(18, false)
if isKeyJustPressed(VK_RCONTROL) then
sampAddChatMessage("[Auto Alt]: {FFFFFF}Деактивирован!", 0xE5336B)
enable = false
end
end
end
end