Что не так в моем говно коде? help, so easy

skief

Участник
Автор темы
40
15
Lua:
script_name("FightHelper")
script_author("shipilya")
script_version("25.11.2020")

local vkeys = 'vkeys'

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

    sampAddChatMessage("[PIZDILKA] pizdilka loaded. creator: shipilya",0xe97451)
    sampRegisterChatCommand("commands", cmd_commands)
while true do
wait(0)
if isKeyPressed(VK_J) then sampSendChat('/usedrugs 3')
 
Решение
  • script_name("FightHelper")
    script_author("shipilya")
    script_version("25.11.2020")

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

    sampAddChatMessage("[PIZDILKA] pizdilka loaded. creator: shipilya",0xe97451)
    sampRegisterChatCommand("commands", cmd_commands)
    while true do
    wait(0)
    if isKeyJustPressed(74) then sampSendChat('/usedrugs 3') end
    if isKeyJustPressed(66) then sampSendChat('/armour') end
    if isKeyJustPressed(77) then sampSendChat('/mask') end
    if isKeyJustPressed(81) then sampSendChat('/anims 1') end
    end
    end

  • мне надо чтобы все if iskeyjustpressed были вписаны с sampIsChatInputActive() и sampIsDialogActive(0)
Вместо sampIsChatInputActive()...

bottom_text

Известный
673
323
ты забыл vkeys require lib.moonloader

сделай с ним, я переписываю у меня че то не реагируют клавиши
Вопрос решен. Кому надо мое говно исскуство для аризоны держите.
Lua:
script_name("FightHelper")
script_author("shipilya")
script_version("25.11.2020")


require "lib.moonloader"
local keys = require "vkeys"


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

sampAddChatMessage("[PIZDILKA] pizdilka loaded. creator: shipilya",0xe97451)
sampRegisterChatCommand("commands", cmd_commands)
while true do
wait(0)
if isKeyJustPressed(74) and not sampIsCursorActive() then sampSendChat('/usedrugs 3') end
if isKeyJustPressed(66) and not sampIsCursorActive() then sampSendChat('/armour') end
if isKeyJustPressed(77) and not sampIsCursorActive() then sampSendChat('/mask') end
if isKeyJustPressed(81) and not sampIsCursorActive() then sampSendChat('/anims 1') end
end
end
Ошибся, вместо IsCursorActive() надо sampIsCursorActive()