Где-то ошибка.

skief

Участник
Автор темы
40
14
Суть: при нажатии/зажиме клавиш ничего не происходит, хотя должно юзаться 3 нарко.
Код:
function main()
local vkeys = require 'vkeys'
    repeat wait() until isSampAvailable()
    wait(-1)
        end
    if isKeyDown(VK_1) and isKeyJustPressed(VK_J) then
        sampAddChatMessage("/usedrugs 3")
end
 

GAuditore

Активный
131
29
Суть: при нажатии/зажиме клавиш ничего не происходит, хотя должно юзаться 3 нарко.
Код:
function main()
local vkeys = require 'vkeys'
    repeat wait() until isSampAvailable()
    wait(-1)
        end
    if isKeyDown(VK_1) and isKeyJustPressed(VK_J) then
        sampAddChatMessage("/usedrugs 3")
end
Lua:
local vkeys = require 'vkeys'
function main()
    if not isSampfuncsLoaded() or not isSampLoaded() then return end
    while not isSampAvailable() do wait(100) end
while true do
wait(0)
if isKeyDown(VK_1) and isKeyJustPressed(VK_J) then
sampSendChat ('/usedrugs 3')
end
end
end
 

skief

Участник
Автор темы
40
14
Lua:
local vkeys = require 'vkeys'
function main()
    if not isSampfuncsLoaded() or not isSampLoaded() then return end
    while not isSampAvailable() do wait(100) end
while true do
wait(0)
if isKeyDown(VK_1) and isKeyJustPressed(VK_J) then
sampSendChat ('/usedrugs 3')
end
end
end
Можешь подписать опкод на то чтобы не работала в диалогом окне имгуи?
Lua:
local vkeys = require 'vkeys'
function main()
    if not isSampfuncsLoaded() or not isSampLoaded() then return end
    while not isSampAvailable() do wait(100) end
while true do
wait(0)
if isKeyDown(VK_1) and isKeyJustPressed(VK_J) then
sampSendChat ('/usedrugs 3')
end
end
end
Не реагирует на нажатия все равно. 1+J
 

GAuditore

Активный
131
29
Можешь подписать опкод на то чтобы не работала в диалогом окне имгуи?

Не реагирует на нажатия все равно. 1+J
Lua:
local vkeys = require 'vkeys'
function main()
    if not isSampfuncsLoaded() or not isSampLoaded() then return end
    while not isSampAvailable() do wait(100) end
while true do
wait(0)
if isKeyDown(VK_1) and isKeyJustPressed(VK_J) and not перемненнаясостоярияокнаимгуи.v then
sampSendChat('/usedrugs 3')
end
end
end
Библиотека vkeys установлена?
 

skief

Участник
Автор темы
40
14
Lua:
local vkeys = require 'vkeys'
function main()
    if not isSampfuncsLoaded() or not isSampLoaded() then return end
    while not isSampAvailable() do wait(100) end
while true do
wait(0)
if isKeyDown(VK_1) and isKeyJustPressed(VK_J) and not перемненнаясостоярияокнаимгуи.v then
sampSendChat('/usedrugs 3')
end
end
end
Библиотека vkeys установлена?
Нет, только заметил. Где ее скачать?
Lua:
local vkeys = require 'vkeys'
function main()
    if not isSampfuncsLoaded() or not isSampLoaded() then return end
    while not isSampAvailable() do wait(100) end
while true do
wait(0)
if isKeyDown(VK_1) and isKeyJustPressed(VK_J) and not перемненнаясостоярияокнаимгуи.v then
sampSendChat('/usedrugs 3')
end
end
end
Библиотека vkeys установлена?
Все равно, не работает
Lua:
function  main()
    while not isSampAvailable() do wait(0) end
    while true do
        wait(0)
        if isKeyDown(49) and isKeyJustPressed(74) then sampSendChat('/usedrugs 3') end
    end
end
ебать работает, спасибо!!!
 
Последнее редактирование:

skief

Участник
Автор темы
40
14
Последнее редактирование: