Напишите легкий скрипт пожалуйста.

nedoros

Участник
Автор темы
37
2
Пожалуйста, может кто написать такой скрипт: при нажатии K (VK_K) вводится 2 команды в чат: /mask и /smk. Буду очень благодарен. Спасибо!
 
Решение
Пожалуйста, может кто написать такой скрипт: при нажатии K (VK_K) вводится 2 команды в чат: /mask и /smk. Буду очень благодарен. Спасибо!
Lua:
require 'lib.moonloader'

function main()
    repeat wait(0) until isSampAvailable()
    while true do
        wait(0)
        if not sampIsChatInputActive() and not sampIsDialogActive() and not isPauseMenuActive() then
        if isKeyJustPressed(VK_K) then
            sampSendChat('/mask')
        sampSendChat('/smk')
        end
    end
end
end

вроде так

если команда от скрипта - то sampSendChat замени на sampProcessChatInput, если я тебе помог выбери как решение

cfrfvvghh

Участник
117
14
возможно в конце одно "end" нужно убрать будет если не заработает.
require "lib.moonloader"
local keys = require "vkeys"

function main()
if not isSampLoaded() or not isSampfuncsLoaded() then return end
while not isSampAvailable() do wait(100) end

while true do
wait(0)

if isKeyJustPressed(VK_K) then
sampSendChat("/mask")
sampSendChat("/smk")
end

end
end
 

zakatov

zkt-team
Проверенный
1,723
548
 
  • Нравится
Реакции: YarikVL

bulba$h

Активный
331
91
Пожалуйста, может кто написать такой скрипт: при нажатии K (VK_K) вводится 2 команды в чат: /mask и /smk. Буду очень благодарен. Спасибо!
Lua:
require 'lib.moonloader'

function main()
    repeat wait(0) until isSampAvailable()
    while true do
        wait(0)
        if not sampIsChatInputActive() and not sampIsDialogActive() and not isPauseMenuActive() then
        if isKeyJustPressed(VK_K) then
            sampSendChat('/mask')
        sampSendChat('/smk')
        end
    end
end
end

вроде так

если команда от скрипта - то sampSendChat замени на sampProcessChatInput, если я тебе помог выбери как решение
 
  • Нравится
Реакции: nedoros

nedoros

Участник
Автор темы
37
2
Lua:
require 'lib.moonloader'

function main()
    repeat wait(0) until isSampAvailable()
    while true do
        wait(0)
        if not sampIsChatInputActive() and not sampIsDialogActive() and not isPauseMenuActive() then
        if isKeyJustPressed(VK_K) then
            sampSendChat('/mask')
        sampSendChat('/smk')
        end
    end
end
end

вроде так

если команда от скрипта - то sampSendChat замени на sampProcessChatInput, если я тебе помог выбери как решение
бро, спасибо большое