Проверка на диалоговое окно / курсор

SamperARZ

Известный
Автор темы
6
2
Добавьте пожалуйста в биндер мне проверку на диалоги, чтобы у меня не прожимались все бинды мира, пока я вписываю цены в лавке или достаю какое-то количество оружия, а то я не могу понять как это вставить 😔
 

Вложения

  • mini-binder_by_tourmelt.lua
    524 байт · Просмотры: 1
Решение
Lua:
require 'lib.moonloader'

local list = {
    {key = VK_1, text = ''},
    {key = VK_3, text = '/dr 3'},
    {key = VK_2, text = '/anim 29'},
}

function main()
    while not isSampAvailable() do wait(0) end

    while true do
        wait(0)

        if not sampIsCursorActive() and not sampIsChatInputActive() and not sampIsDialogActive() then
            for i = 1, #list do
                if wasKeyPressed(list[i].key) and list[i].text ~= '' then
                    sampSendChat(list[i].text)
                end
            end
        end
    end
end

tripple sixx

Активный
162
69
Lua:
require 'lib.moonloader'

local list = {
    {key = VK_1, text = ''},
    {key = VK_3, text = '/dr 3'},
    {key = VK_2, text = '/anim 29'},
}

function main()
    while not isSampAvailable() do wait(0) end

    while true do
        wait(0)

        if not sampIsCursorActive() and not sampIsChatInputActive() and not sampIsDialogActive() then
            for i = 1, #list do
                if wasKeyPressed(list[i].key) and list[i].text ~= '' then
                    sampSendChat(list[i].text)
                end
            end
        end
    end
end
 
  • Влюблен
Реакции: SamperARZ