можно ли заменить кнопку выключения двигателя арзиона

Решение
Lua:
require 'lib.moonloader'
function main()
    while not sampIsAvailable() do wait(0) end
    while true do wait(0)
        if wasKeyPressed(VK_J) then -- твоя клавиша, сейчас стоит J
            sampSendChat("/engine")
        end
    end
end
addEventHandler('onWindowMessage', function(msg, key)
    if msg == 0x0100 then
        if key == VK_N then
            consumeWindowMessage(true, true)
        end
    end
end)
Или тебе только выключения двигателя другой кнопкой нужно?

YarikVL

Известный
Проверенный
4,783
1,807
Lua:
require 'lib.moonloader'
function main()
    while not sampIsAvailable() do wait(0) end
    while true do wait(0)
        if wasKeyPressed(VK_J) then -- твоя клавиша, сейчас стоит J
            sampSendChat("/engine")
        end
    end
end
addEventHandler('onWindowMessage', function(msg, key)
    if msg == 0x0100 then
        if key == VK_N then
            consumeWindowMessage(true, true)
        end
    end
end)
Или тебе только выключения двигателя другой кнопкой нужно?
 

hardstyledrill2009

Активный
Автор темы
524
86
Lua:
require 'lib.moonloader'
function main()
    while not sampIsAvailable() do wait(0) end
    while true do wait(0)
        if wasKeyPressed(VK_J) then -- твоя клавиша, сейчас стоит J
            sampSendChat("/engine")
        end
    end
end
addEventHandler('onWindowMessage', function(msg, key)
    if msg == 0x0100 then
        if key == VK_N then
            consumeWindowMessage(true, true)
        end
    end
end)
Или тебе только выключения двигателя другой кнопкой нужно?
вкл выкл