дописание биндера

easymotion

Участник
Автор темы
49
3
Версия SA-MP
  1. 0.3.7 (R1)
  2. 0.3.7-R3
  3. Любая
Здравствуйте, нашел биндер в этой теме: https://www.blast.hk/threads/225808/post-1564650, но нужно дописать код, чтобы: 1) при открытом диалоге клавиши в биндере не срабатывали; 2) при открытом чате клавиши также не срабатывали. Заранее спасибо🙏
 

easymotion

Участник
Автор темы
49
3
Lua:
if not sampIsChatInputActive() or not sampIsDialogActive() or not isSampfuncsConsoleActive() then
    for k, v in pairs(cmds) do
        if isKeyJustPressed(k) then
            sampSendChat(v)
        end
    end
end
а вы можете скрипт скинуть полностью, а то что-то у меня не работает код, когда вставляю его в биндер
 

MSIshka

Участник
64
4
а вы можете скрипт скинуть полностью, а то что-то у меня не работает код, когда вставляю его в биндер
Lua:
local keys = require "vkeys"
require "lib.moonloader"
local cmds = {
    [VK_3] = "/usedrugs 3",
    [VK_4] = "/armour"
}

function main()
    if not isSampLoaded() or not isSampfuncsLoaded() then return end
    while not isSampAvailable() do wait(100) end
    while true do wait(0)
        if not sampIsChatInputActive() or not sampIsDialogActive() or not isSampfuncsConsoleActive() then
            for k, v in pairs(cmds) do
                if isKeyJustPressed(k) then
                    sampSendChat(v)
                end
            end
        end
    end
end
 

easymotion

Участник
Автор темы
49
3
Lua:
local keys = require "vkeys"
require "lib.moonloader"
local cmds = {
    [VK_3] = "/usedrugs 3",
    [VK_4] = "/armour"
}

function main()
    if not isSampLoaded() or not isSampfuncsLoaded() then return end
    while not isSampAvailable() do wait(100) end
    while true do wait(0)
        if not sampIsChatInputActive() or not sampIsDialogActive() or not isSampfuncsConsoleActive() then
            for k, v in pairs(cmds) do
                if isKeyJustPressed(k) then
                    sampSendChat(v)
                end
            end
        end
    end
end
также не работает скрипт, когда чат открыт, нажимаю 4 и все равно армор надевается, тоже самое с нарко
 

MSIshka

Участник
64
4
я на лаунчере аризоны играю, походу imgui


нужно в require имгуи добавить или как там работает это?
Lua:
local keys = require "vkeys"
require "lib.moonloader"
local cmds = {
    [VK_3] = "/usedrugs 3",
    [VK_4] = "/armour"
}

function main()
    if not isSampLoaded() or not isSampfuncsLoaded() then return end
    while not isSampAvailable() do wait(100) end
    while true do wait(0)
        if not sampIsChatInputActive() and not sampIsDialogActive() and not isSampfuncsConsoleActive() then
            for k, v in pairs(cmds) do
                if isKeyJustPressed(k) then
                    sampSendChat(v)
                end
            end
        end
    end
end

Моя ошибка извини