Необходимый скрипт.

Статус
В этой теме нельзя размещать новые ответы.

DolgorukovGTA

Известный
Автор темы
Проверенный
652
345
7a09f409f8eb.png


Здравствуйте, необходим скрипт, желательно на LUA, чтобы при нажатии на кнопку "1" на клавиатуре, нажимался текстдрав с числом 1. ID текстдравов приложил, также, если ты нажимаешь Enter, то нажимает на "Submit".
 

AnWu

Guardian of Order
Всефорумный модератор
4,694
5,213
Lua:
require 'lib.moonloader'

function main()
    if not isSampLoaded() then return end
    while not isSampAvailable() do wait(100) end
    while true do wait(0)
        if not sampIsChatInputActive() and not isSampfuncsConsoleActive() and not sampIsDialogActive() then -- Если закрыт чат, закрыта консоль SF и не открыт диалог-окно
            if isKeyJustPressed(48) then -- Клавиша 0
                sampSendClickTextdraw(642) wait(1000)
            end
            if isKeyJustPressed(49) then -- Клавиша 1
                sampSendClickTextdraw(643) wait(1000)
            end
            if isKeyJustPressed(50) then -- Клавиша 2
                sampSendClickTextdraw(638) wait(1000)
            end
            if isKeyJustPressed(51) then -- Клавиша 3
                sampSendClickTextdraw(637) wait(1000)
            end
            if isKeyJustPressed(52) then -- Клавиша 4
                sampSendClickTextdraw(641) wait(1000)
            end
            if isKeyJustPressed(53) then -- Клавиша 5
                sampSendClickTextdraw(636) wait(1000)
            end
            if isKeyJustPressed(54) then -- Клавиша 6
                sampSendClickTextdraw(634) wait(1000)
            end
            if isKeyJustPressed(55) then -- Клавиша 7
                sampSendClickTextdraw(640) wait(1000)
            end
            if isKeyJustPressed(56) then -- Клавиша 8
                sampSendClickTextdraw(639) wait(1000)
            end
            if isKeyJustPressed(57) then -- Клавиша 9
                sampSendClickTextdraw(635) wait(1000)
            end
            if isKeyJustPressed(13) then -- Клавиша Enter
                sampSendClickTextdraw(649) wait(1000)
            end
        end
    end
end
wait убери, глупышь.
проверка на тд где
 

ШPEK

Известный
1,476
525
Lua:
require 'lib.moonloader'

function main()
    if not isSampLoaded() then return end
    while not isSampAvailable() do wait(100) end
    while true do wait(0)
        if not sampIsChatInputActive() and not isSampfuncsConsoleActive() and not sampIsDialogActive() then -- Если закрыт чат, закрыта консоль SF и не открыт диалог-окно
            if isKeyJustPressed(VK_0) and sampTextdrawIsExists(642) then -- Клавиша 0
                sampSendClickTextdraw(642) wait(1000)
            elseif isKeyJustPressed(VK_1) and sampTextdrawIsExists(643) then -- Клавиша 0
                sampSendClickTextdraw(643) wait(1000)
            elseif isKeyJustPressed(VK_2) and sampTextdrawIsExists(638) then -- Клавиша 0
                sampSendClickTextdraw(638) wait(1000)
            elseif isKeyJustPressed(VK_3) and sampTextdrawIsExists(637) then -- Клавиша 0
                sampSendClickTextdraw(637) wait(1000)
            elseif isKeyJustPressed(VK_4) and sampTextdrawIsExists(641) then -- Клавиша 0
                sampSendClickTextdraw(641) wait(1000)
            elseif isKeyJustPressed(VK_5) and sampTextdrawIsExists(636) then -- Клавиша 0
                sampSendClickTextdraw(636) wait(1000)
            elseif isKeyJustPressed(VK_6) and sampTextdrawIsExists(634) then -- Клавиша 0
                sampSendClickTextdraw(634) wait(1000)
            elseif isKeyJustPressed(VK_7) and sampTextdrawIsExists(640) then -- Клавиша 0
                sampSendClickTextdraw(640) wait(1000)
            elseif isKeyJustPressed(VK_8) and sampTextdrawIsExists(639) then -- Клавиша 0
                sampSendClickTextdraw(639) wait(1000)
            elseif isKeyJustPressed(VK_9) and sampTextdrawIsExists(635) then -- Клавиша 0
                sampSendClickTextdraw(635) wait(1000)
            elseif isKeyJustPressed(VK_RETURN) and sampTextdrawIsExists(649) then -- Клавиша 0
                sampSendClickTextdraw(649) wait(1000)
            end
        end
    end
end
Lua:
require 'lib.moonloader'

function main()
    if not isSampLoaded() then return end
    while not isSampAvailable() do wait(100) end
 
    while true do wait(0)
        if not sampIsChatInputActive() and not isSampfuncsConsoleActive() and not sampIsDialogActive() then -- Если закрыт чат, закрыта консоль SF и не открыт диалог-окно
            if isKeyDown(48) then -- Клавиша 0
                sampSendClickTextdraw(642) wait(1000)
            end
            if isKeyDown(49) then -- Клавиша 1
                sampSendClickTextdraw(643) wait(1000)
            end
            if isKeyDown(50) then -- Клавиша 2
                sampSendClickTextdraw(638) wait(1000)
            end
            if isKeyDown(51) then -- Клавиша 3
                sampSendClickTextdraw(637) wait(1000)
            end
            if isKeyDown(52) then -- Клавиша 4
                sampSendClickTextdraw(641) wait(1000)
            end
            if isKeyDown(53) then -- Клавиша 5
                sampSendClickTextdraw(636) wait(1000)
            end
            if isKeyDown(54) then -- Клавиша 6
                sampSendClickTextdraw(634) wait(1000)
            end
            if isKeyDown(55) then -- Клавиша 7
                sampSendClickTextdraw(640) wait(1000)
            end
            if isKeyDown(56) then -- Клавиша 8
                sampSendClickTextdraw(639) wait(1000)
            end
            if isKeyDown(57) then -- Клавиша 9
                sampSendClickTextdraw(635) wait(1000)
            end
            if isKeyDown(13) then -- Клавиша Enter
                sampSendClickTextdraw(649) wait(1000)
            end
        end
    end
end
юзать коды клавиш с подключённой библиотекой moonloader :thinking:
 
Последнее редактирование:

DolgorukovGTA

Известный
Автор темы
Проверенный
652
345
Lua:
require 'lib.moonloader'

function main()
    if not isSampLoaded() then return end
    while not isSampAvailable() do wait(100) end
    while true do wait(0)
        if not sampIsChatInputActive() and not isSampfuncsConsoleActive() and not sampIsDialogActive() then -- Если закрыт чат, закрыта консоль SF и не открыт диалог-окно
            if isKeyJustPressed(VK_0) and sampTextdrawIsExists(642) then -- Клавиша 0
                sampSendClickTextdraw(642) wait(1000)
            elseif isKeyJustPressed(VK_1) and sampTextdrawIsExists(643) then -- Клавиша 0
                sampSendClickTextdraw(643) wait(1000)
            elseif isKeyJustPressed(VK_2) and sampTextdrawIsExists(638) then -- Клавиша 0
                sampSendClickTextdraw(638) wait(1000)
            elseif isKeyJustPressed(VK_3) and sampTextdrawIsExists(637) then -- Клавиша 0
                sampSendClickTextdraw(637) wait(1000)
            elseif isKeyJustPressed(VK_4) and sampTextdrawIsExists(641) then -- Клавиша 0
                sampSendClickTextdraw(641) wait(1000)
            elseif isKeyJustPressed(VK_5) and sampTextdrawIsExists(636) then -- Клавиша 0
                sampSendClickTextdraw(636) wait(1000)
            elseif isKeyJustPressed(VK_6) and sampTextdrawIsExists(634) then -- Клавиша 0
                sampSendClickTextdraw(634) wait(1000)
            elseif isKeyJustPressed(VK_7) and sampTextdrawIsExists(640) then -- Клавиша 0
                sampSendClickTextdraw(640) wait(1000)
            elseif isKeyJustPressed(VK_8) and sampTextdrawIsExists(639) then -- Клавиша 0
                sampSendClickTextdraw(639) wait(1000)
            elseif isKeyJustPressed(VK_9) and sampTextdrawIsExists(635) then -- Клавиша 0
                sampSendClickTextdraw(635) wait(1000)
            elseif isKeyJustPressed(VK_RETURN) and sampTextdrawIsExists(649) then -- Клавиша 0
                sampSendClickTextdraw(649) wait(1000)
            end
        end
    end
end

юзать коды клавиш с подключённой библиотекой moonloader :thinking:

Одно и то же набирает (нажимаешь к примеру 1234, а скрипт нажимает 1111, т.к пишет, что неверный пароль введен) да еще и с задержкой огромной.
 
Статус
В этой теме нельзя размещать новые ответы.