Как сделать бинд на две кнопки

Сергей

Известный
Автор темы
150
9
Версия MoonLoader
.027.0-preview
Lua:
while true do
    wait(0)
    if (wasKeyPressed(key.VK_P) and not sampIsChatInputActive() and not sampIsDialogActive() and not sampIsCursorActive()) then
        main_window_state.v = not main_window_state.v
    end
    imgui.Process = main_window_state.v
  end
end
Как мне сделать активациб на ALT+P?
 
Решение
Если я делаю так

Код:
while true do
    wait(0)
    if isKeyDown(key.VK_MENU) and wasKeyPressed(key.VK_P) and not sampIsChatInputActive() and not sampIsDialogActive() and not sampIsCursorActive()) then
        main_window_state.v = not main_window_state.v
    end
    imgui.Process = main_window_state.v
  end
end
перестает работать полностью скрипт :(
шо значи перестает работать. шо в логе?
у тебя вроде лишняя скобка перед then

Double Tap Inside

Известный
Проверенный
1,897
1,245
Lua:
while true do
    wait(0)
    if (wasKeyPressed(key.VK_P) and not sampIsChatInputActive() and not sampIsDialogActive() and not sampIsCursorActive()) then
        main_window_state.v = not main_window_state.v
    end
    imgui.Process = main_window_state.v
  end
end
Как мне сделать активациб на ALT+P?
If isKeyDown(Альт) and wasKeyPressed(P) then...........
Имена функций точных я мог забыть, но принцип показал.
 
  • Нравится
Реакции: Сергей

Сергей

Известный
Автор темы
150
9
If isKeyDown(Альт) and wasKeyPressed(P) then...........
Имена функций точных я мог забыть, но принцип показал.
Если я делаю так

Код:
while true do
    wait(0)
    if isKeyDown(key.VK_MENU) and wasKeyPressed(key.VK_P) and not sampIsChatInputActive() and not sampIsDialogActive() and not sampIsCursorActive()) then
        main_window_state.v = not main_window_state.v
    end
    imgui.Process = main_window_state.v
  end
end
перестает работать полностью скрипт :(
 

Double Tap Inside

Известный
Проверенный
1,897
1,245
Если я делаю так

Код:
while true do
    wait(0)
    if isKeyDown(key.VK_MENU) and wasKeyPressed(key.VK_P) and not sampIsChatInputActive() and not sampIsDialogActive() and not sampIsCursorActive()) then
        main_window_state.v = not main_window_state.v
    end
    imgui.Process = main_window_state.v
  end
end
перестает работать полностью скрипт :(
шо значи перестает работать. шо в логе?
у тебя вроде лишняя скобка перед then